Check patentability & draft patents in minutes with Patsnap Eureka AI!

Multi-dts (Device Tree Source)-file supporting method, compilation device and embedded device

An embedded device and file technology, applied in the embedded field, can solve problems such as inconvenient version management, and achieve the effect of solving the inconvenience of version management

Active Publication Date: 2018-01-26
MAIPU COMM TECH CO LTD
View PDF4 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Embodiments of the present invention provide a method for supporting multiple dts files, a compiling device, and an embedded device, which are used to solve the problem of inconvenient version management caused by a single uboot supporting only one dtb file

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Multi-dts (Device Tree Source)-file supporting method, compilation device and embedded device
  • Multi-dts (Device Tree Source)-file supporting method, compilation device and embedded device
  • Multi-dts (Device Tree Source)-file supporting method, compilation device and embedded device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] The present invention provides a method for supporting multiple dts files, referring to figure 1 , including the following steps:

[0036] S101. Obtain N dts files.

[0037] Specifically, all N dts files in the folder are traversed in the script to obtain N dts files and their file names, wherein each dts file corresponds to a device model. For example, suppose there are three dts files under the file, including board1.dts, board2.dts and board3.dts, where board1.dts corresponds to the device model board1, board2.dts corresponds to the device model board2, and board3.dts corresponds to the device Model board3.

[0038] S102. Compile the N dts files respectively to generate N dtb files, wherein each dts file is compiled into a dtb file.

[0039] Specifically, each dts file in the N dts files is compiled into a dtb file by using a DTC tool in the script. For example, compile board1.dts to board1.dtb, board2.dts to board2.dtb, and board3.dts to board3.dtb.

[0040] Be...

Embodiment 2

[0062] The present invention provides a compiling device 11, which is used for the above-mentioned multi-dts file support method, refer to image 3 As shown, the device includes:

[0063] An acquisition unit 111, configured to acquire N device tree source dts files, wherein each dts file corresponds to a device model;

[0064] The compiling unit 112 is configured to compile the N dts files acquired by the acquiring unit 111 to generate N device tree binary dtb files, wherein each dts file is compiled into a dtb file;

[0065] A creation unit 113, configured to create an assembly file;

[0066] The adding unit 114 is used to add the N dtb files generated by the compiling unit 112 to the assembly file created by the creating unit 113;

[0067] The compiling unit 112 is also used to compile the assembly file after adding N dtb files to the adding unit 114 to generate a dtb target file;

[0068] The compiling unit 112 is also used to compile the dtb object file and the universa...

Embodiment 3

[0078] The present invention provides an embedded device 12, which is used for the above-mentioned multi-dts file support method, refer to Figure 4 As shown, the device includes:

[0079] The loading unit 121 is used to load the binary bin file of the universal boot loader uboot into the memory, wherein the bin file of uboot is generated by compiling the device tree binary dtb target file and the uboot source code by the compiling device, and the dtb target file is compiled by the compiling device The assembly file is compiled and generated, and the assembly file includes N dtb files, and each dtb file is generated by compiling a device tree source dts file by a compiling device, and each dts file corresponds to a device model.

[0080] The obtaining unit 122 is configured to obtain the corresponding dtb file from the internal memory according to the current device model.

[0081] The delivery unit 123 is configured to deliver the dtb file acquired by the acquisition unit to...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a multi-dts (Device Tree Source)-file supporting method, a compilation device and an embedded device, relates to the embedding field and is used for solving the problem of inconvenience in version management since single uboot (Universal Boot Loader) only supports one dtb (Device Tree Binary) file. The method comprises the following steps that: obtaining N pieces of devicetree source dts files, wherein each dts file independently corresponds to one device model; independently compiling the N pieces of dts files to generate N pieces of device tree binary dtb files, wherein each dts file is compiled into one dtb file; creating an assembling file; adding the N pieces of dtb files into the assembling file; compiling the assembling file to generate a dtb target file; and compiling the dtb target file and a uboot source code to generate the bin (Binary) file of the uboot, wherein the embedded device obtains the corresponding dtb file from memory according to the current device model and transfers the corresponding dtb file to a Linux kernel after the bin file of the uboot is loaded to the memory of the embedded device. The embodiment of the invention is applied to a Linux embedded system.

Description

technical field [0001] The invention relates to the embedded field, in particular to a method for supporting multiple dts files, a compiling device and an embedded device. Background technique [0002] As the types of embedded devices continue to increase, a large number of redundant board-level hardware description codes appear in the Linux operating system. In order to facilitate management, Linux introduces the use of dts (English full name: device tree source, Chinese full name: device tree source) file and dtb (English full name: device tree binary, device tree binary) file to describe the device tree (English full name: device tree) architecture. The dts file is a source file that is easy for humans to read and understand. The dtb file is a binary format file formed after the dts file is compiled by DTC (English full name: device tree compiler, Chinese full name: device tree compiler), which can be parsed by the Linux kernel. [0003] Uboot (English full name: univers...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/41
Inventor 李高斌陈小松
Owner MAIPU COMM TECH CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More