What is a u-Boot dtb file and how do I use it (BeagleBoard xM)?
I'm trying to build a custom Linux for a BeagleBoard xM (Rev. C). I do a lot of C/C++ but am a beginner at building and installing Linux from scratch.
I used the Yocto Project build appliance (https://www.yoctoproject.org/) which seemed promising - it built files for the u-Boot boot loader, Linux kernel and root file system.
This page gives instructions for setting up the micro SD card with the Yocto-generated files. However, the image files include a ".dtb" file which is not mentioned in the set up instructions.
Does this file have something to do with the board hardware? Various sites mention loading dtd files (maybe in uEnv.txt?) but I haven't found any detailed information.
I used the above instructions to set up the boot partition with MLO and u-boot.img, and messed about a bit with the uEnv.txt. I also set up a second partition with the root file system.
I was able to boot and log in (via serial port console), but it looked like most of the board hardware - e.g. video and all USB devices including ethernet - were not working. Could this be because I wasn't using the .dtb file?
Can someone explain the dtb and how to use it on a beagle board? Thanks!
linux boot bootloader beagleboard
add a comment |
I'm trying to build a custom Linux for a BeagleBoard xM (Rev. C). I do a lot of C/C++ but am a beginner at building and installing Linux from scratch.
I used the Yocto Project build appliance (https://www.yoctoproject.org/) which seemed promising - it built files for the u-Boot boot loader, Linux kernel and root file system.
This page gives instructions for setting up the micro SD card with the Yocto-generated files. However, the image files include a ".dtb" file which is not mentioned in the set up instructions.
Does this file have something to do with the board hardware? Various sites mention loading dtd files (maybe in uEnv.txt?) but I haven't found any detailed information.
I used the above instructions to set up the boot partition with MLO and u-boot.img, and messed about a bit with the uEnv.txt. I also set up a second partition with the root file system.
I was able to boot and log in (via serial port console), but it looked like most of the board hardware - e.g. video and all USB devices including ethernet - were not working. Could this be because I wasn't using the .dtb file?
Can someone explain the dtb and how to use it on a beagle board? Thanks!
linux boot bootloader beagleboard
It turns out that I misread the file name - I originally thought it was a ".dtd" file but it is ACTUALLY ".dtb" - which is why I couldn't find information about it. The question has now been updated.
– Jeremy
Apr 2 '14 at 20:24
Minimal example with QEMU virtual device to better understand the concept: stackoverflow.com/questions/17488320/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jul 16 '17 at 12:36
add a comment |
I'm trying to build a custom Linux for a BeagleBoard xM (Rev. C). I do a lot of C/C++ but am a beginner at building and installing Linux from scratch.
I used the Yocto Project build appliance (https://www.yoctoproject.org/) which seemed promising - it built files for the u-Boot boot loader, Linux kernel and root file system.
This page gives instructions for setting up the micro SD card with the Yocto-generated files. However, the image files include a ".dtb" file which is not mentioned in the set up instructions.
Does this file have something to do with the board hardware? Various sites mention loading dtd files (maybe in uEnv.txt?) but I haven't found any detailed information.
I used the above instructions to set up the boot partition with MLO and u-boot.img, and messed about a bit with the uEnv.txt. I also set up a second partition with the root file system.
I was able to boot and log in (via serial port console), but it looked like most of the board hardware - e.g. video and all USB devices including ethernet - were not working. Could this be because I wasn't using the .dtb file?
Can someone explain the dtb and how to use it on a beagle board? Thanks!
linux boot bootloader beagleboard
I'm trying to build a custom Linux for a BeagleBoard xM (Rev. C). I do a lot of C/C++ but am a beginner at building and installing Linux from scratch.
I used the Yocto Project build appliance (https://www.yoctoproject.org/) which seemed promising - it built files for the u-Boot boot loader, Linux kernel and root file system.
This page gives instructions for setting up the micro SD card with the Yocto-generated files. However, the image files include a ".dtb" file which is not mentioned in the set up instructions.
Does this file have something to do with the board hardware? Various sites mention loading dtd files (maybe in uEnv.txt?) but I haven't found any detailed information.
I used the above instructions to set up the boot partition with MLO and u-boot.img, and messed about a bit with the uEnv.txt. I also set up a second partition with the root file system.
I was able to boot and log in (via serial port console), but it looked like most of the board hardware - e.g. video and all USB devices including ethernet - were not working. Could this be because I wasn't using the .dtb file?
Can someone explain the dtb and how to use it on a beagle board? Thanks!
linux boot bootloader beagleboard
linux boot bootloader beagleboard
edited Apr 2 '14 at 20:21
Jeremy
asked Apr 1 '14 at 21:19
JeremyJeremy
2981313
2981313
It turns out that I misread the file name - I originally thought it was a ".dtd" file but it is ACTUALLY ".dtb" - which is why I couldn't find information about it. The question has now been updated.
– Jeremy
Apr 2 '14 at 20:24
Minimal example with QEMU virtual device to better understand the concept: stackoverflow.com/questions/17488320/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jul 16 '17 at 12:36
add a comment |
It turns out that I misread the file name - I originally thought it was a ".dtd" file but it is ACTUALLY ".dtb" - which is why I couldn't find information about it. The question has now been updated.
– Jeremy
Apr 2 '14 at 20:24
Minimal example with QEMU virtual device to better understand the concept: stackoverflow.com/questions/17488320/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jul 16 '17 at 12:36
It turns out that I misread the file name - I originally thought it was a ".dtd" file but it is ACTUALLY ".dtb" - which is why I couldn't find information about it. The question has now been updated.
– Jeremy
Apr 2 '14 at 20:24
It turns out that I misread the file name - I originally thought it was a ".dtd" file but it is ACTUALLY ".dtb" - which is why I couldn't find information about it. The question has now been updated.
– Jeremy
Apr 2 '14 at 20:24
Minimal example with QEMU virtual device to better understand the concept: stackoverflow.com/questions/17488320/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jul 16 '17 at 12:36
Minimal example with QEMU virtual device to better understand the concept: stackoverflow.com/questions/17488320/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jul 16 '17 at 12:36
add a comment |
3 Answers
3
active
oldest
votes
Answering my own question, after I figured out what to search for. A "dtb" file contains a Device Tree Blob (or Binary)(nice description here). It's the new(er) way to pass hardware information about the board to the Linux kernel.
It can be loaded into memory and passed to the kernel by u-Boot.
Here are the u-Boot commands I used:
setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw'
fatload mmc 0:1 0x80300000 zImage
fatload mmc 0:1 0x815f0000 beagle-xm.dtb
bootz 0x80300000 - 0x815f0000
zImage being the kernel, and beagle-xm.dtb being the device tree blob. I automated the boot process by setting up a "uenvcmd=..." variable in uEnv.txt (with the above in it), but it's a bit ugly and there are probably better ways.
Note that this boots up, and says that it loaded the device tree OK. However, I still have no USB devices or video (as far as I can tell). However, I suspect that may be a different problem.
2
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
add a comment |
I am using Ubuntu 14.04 on the beaglebone black, so my setup may be a bit different, but here is how I loaded a custom dtb:
In uEnv.txt, add a line with: dtb=name-of-desired.dtb
The locations searched should be as specified here. For me this was /boot/dtbs/linux-kernel/ where linux-kernel is the name of the loaded version.
add a comment |
Note that there are 2 dtb. The u-boot dtb and the kernel dtb. They are 2 different things. U-boot board dts/dtb is not always used, not mandatory, btw in u-boot you can use the "u-boot" dtb embedding it into u-boot or concatenating it to u-boot.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f736500%2fwhat-is-a-u-boot-dtb-file-and-how-do-i-use-it-beagleboard-xm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Answering my own question, after I figured out what to search for. A "dtb" file contains a Device Tree Blob (or Binary)(nice description here). It's the new(er) way to pass hardware information about the board to the Linux kernel.
It can be loaded into memory and passed to the kernel by u-Boot.
Here are the u-Boot commands I used:
setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw'
fatload mmc 0:1 0x80300000 zImage
fatload mmc 0:1 0x815f0000 beagle-xm.dtb
bootz 0x80300000 - 0x815f0000
zImage being the kernel, and beagle-xm.dtb being the device tree blob. I automated the boot process by setting up a "uenvcmd=..." variable in uEnv.txt (with the above in it), but it's a bit ugly and there are probably better ways.
Note that this boots up, and says that it loaded the device tree OK. However, I still have no USB devices or video (as far as I can tell). However, I suspect that may be a different problem.
2
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
add a comment |
Answering my own question, after I figured out what to search for. A "dtb" file contains a Device Tree Blob (or Binary)(nice description here). It's the new(er) way to pass hardware information about the board to the Linux kernel.
It can be loaded into memory and passed to the kernel by u-Boot.
Here are the u-Boot commands I used:
setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw'
fatload mmc 0:1 0x80300000 zImage
fatload mmc 0:1 0x815f0000 beagle-xm.dtb
bootz 0x80300000 - 0x815f0000
zImage being the kernel, and beagle-xm.dtb being the device tree blob. I automated the boot process by setting up a "uenvcmd=..." variable in uEnv.txt (with the above in it), but it's a bit ugly and there are probably better ways.
Note that this boots up, and says that it loaded the device tree OK. However, I still have no USB devices or video (as far as I can tell). However, I suspect that may be a different problem.
2
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
add a comment |
Answering my own question, after I figured out what to search for. A "dtb" file contains a Device Tree Blob (or Binary)(nice description here). It's the new(er) way to pass hardware information about the board to the Linux kernel.
It can be loaded into memory and passed to the kernel by u-Boot.
Here are the u-Boot commands I used:
setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw'
fatload mmc 0:1 0x80300000 zImage
fatload mmc 0:1 0x815f0000 beagle-xm.dtb
bootz 0x80300000 - 0x815f0000
zImage being the kernel, and beagle-xm.dtb being the device tree blob. I automated the boot process by setting up a "uenvcmd=..." variable in uEnv.txt (with the above in it), but it's a bit ugly and there are probably better ways.
Note that this boots up, and says that it loaded the device tree OK. However, I still have no USB devices or video (as far as I can tell). However, I suspect that may be a different problem.
Answering my own question, after I figured out what to search for. A "dtb" file contains a Device Tree Blob (or Binary)(nice description here). It's the new(er) way to pass hardware information about the board to the Linux kernel.
It can be loaded into memory and passed to the kernel by u-Boot.
Here are the u-Boot commands I used:
setenv bootargs 'console=tty0 console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw'
fatload mmc 0:1 0x80300000 zImage
fatload mmc 0:1 0x815f0000 beagle-xm.dtb
bootz 0x80300000 - 0x815f0000
zImage being the kernel, and beagle-xm.dtb being the device tree blob. I automated the boot process by setting up a "uenvcmd=..." variable in uEnv.txt (with the above in it), but it's a bit ugly and there are probably better ways.
Note that this boots up, and says that it loaded the device tree OK. However, I still have no USB devices or video (as far as I can tell). However, I suspect that may be a different problem.
answered Apr 2 '14 at 20:34
JeremyJeremy
2981313
2981313
2
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
add a comment |
2
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
2
2
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
It's the new(er) way to pass hardware information about the board to the Linux kernel. There were no previous way to pass hardware information to the kernel. Instead, the kernel would have to statically include all the information and so would have a board-specific C file to list all those mappings. This was a maintenance nightmare from the kernel point of view.
– BatchyX
Apr 2 '14 at 20:38
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
Thanks! I figured out how to load the dtb file, and Linux now boots up and issues various messages about loading drivers, but I can't see any USB devices (including the ethernet module). See new question: link. Maybe there is something I need to manually configure in Linux?
– Jeremy
Apr 13 '14 at 20:54
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
But what address to use for the dtb file? For example, if my zImage goes to address 0x43000000 (in stead of the example above 0x80300000), where should the dtb go?
– André van Schoubroeck
Jul 6 '16 at 10:26
add a comment |
I am using Ubuntu 14.04 on the beaglebone black, so my setup may be a bit different, but here is how I loaded a custom dtb:
In uEnv.txt, add a line with: dtb=name-of-desired.dtb
The locations searched should be as specified here. For me this was /boot/dtbs/linux-kernel/ where linux-kernel is the name of the loaded version.
add a comment |
I am using Ubuntu 14.04 on the beaglebone black, so my setup may be a bit different, but here is how I loaded a custom dtb:
In uEnv.txt, add a line with: dtb=name-of-desired.dtb
The locations searched should be as specified here. For me this was /boot/dtbs/linux-kernel/ where linux-kernel is the name of the loaded version.
add a comment |
I am using Ubuntu 14.04 on the beaglebone black, so my setup may be a bit different, but here is how I loaded a custom dtb:
In uEnv.txt, add a line with: dtb=name-of-desired.dtb
The locations searched should be as specified here. For me this was /boot/dtbs/linux-kernel/ where linux-kernel is the name of the loaded version.
I am using Ubuntu 14.04 on the beaglebone black, so my setup may be a bit different, but here is how I loaded a custom dtb:
In uEnv.txt, add a line with: dtb=name-of-desired.dtb
The locations searched should be as specified here. For me this was /boot/dtbs/linux-kernel/ where linux-kernel is the name of the loaded version.
answered Nov 19 '14 at 0:18
Damian MandaDamian Manda
12614
12614
add a comment |
add a comment |
Note that there are 2 dtb. The u-boot dtb and the kernel dtb. They are 2 different things. U-boot board dts/dtb is not always used, not mandatory, btw in u-boot you can use the "u-boot" dtb embedding it into u-boot or concatenating it to u-boot.
add a comment |
Note that there are 2 dtb. The u-boot dtb and the kernel dtb. They are 2 different things. U-boot board dts/dtb is not always used, not mandatory, btw in u-boot you can use the "u-boot" dtb embedding it into u-boot or concatenating it to u-boot.
add a comment |
Note that there are 2 dtb. The u-boot dtb and the kernel dtb. They are 2 different things. U-boot board dts/dtb is not always used, not mandatory, btw in u-boot you can use the "u-boot" dtb embedding it into u-boot or concatenating it to u-boot.
Note that there are 2 dtb. The u-boot dtb and the kernel dtb. They are 2 different things. U-boot board dts/dtb is not always used, not mandatory, btw in u-boot you can use the "u-boot" dtb embedding it into u-boot or concatenating it to u-boot.
answered Dec 15 '18 at 17:01
Angelo DureghelloAngelo Dureghello
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f736500%2fwhat-is-a-u-boot-dtb-file-and-how-do-i-use-it-beagleboard-xm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It turns out that I misread the file name - I originally thought it was a ".dtd" file but it is ACTUALLY ".dtb" - which is why I couldn't find information about it. The question has now been updated.
– Jeremy
Apr 2 '14 at 20:24
Minimal example with QEMU virtual device to better understand the concept: stackoverflow.com/questions/17488320/…
– Ciro Santilli 新疆改造中心 六四事件 法轮功
Jul 16 '17 at 12:36