Skip to contentSkip to conversation

Altera Cyclone V DTB origin

DISCUSSION Steffen Schuetz 3 participants 4 messages May 18, 2015 – May 19, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

I build a customized Linux image using Yocto Daisy - we need gcc >= 4.8
- following the instructions at
http://rocketboards.org/foswiki/Documentation/YoctoDoraBuildWithMetaAltera . Besides the zImage and rootfs the build process outputs an .dtb file. Now, in order to get the FPGA fabric involved, I'd have to come up with a modified dts and build it.
That's where I'm a bit lost in the blur. I can not figure out where the generated dtb is coming from? What's the mechanism behind? I cannot find any .dts nor .dtb in the meta-altera layer.

Besides that I realized that if I use the dtb that shipped with the board with the "daisy" kernel, the boot process gets stuck at "Waiting for root device /dev/mmcblk0p3..." The "shipped" kernel is version 3.8.0 while the "daisy" one is 3.10.31-ltsi.
Was there a change in the device tree layout as the "old" one doesn't work with the "daisy" kernel?

Thanks in advance!

Regards,
Steffen

begin:vcard
fn:Dipl.-Ing. Steffen Schuetz
n:Schuetz;Steffen
org:TU Kaiserslautern;AG Robotersysteme, FB Informatik adr:Gottlieb-Daimler-Str., Geb. 48;;Postfach 3049;Kaiserslautern;Rheinland-Pfalz;67663;Germany email;internet:[email protected]
tel;work:+49 631 205 2579
tel;fax:+49 631 205 2640
x-mozilla-html:FALSE
url:http://agrosy.cs.uni-kl.de
version:2.1
end:vcard

#1 lore raw

Hi,

I found that the dtb is obtained from a git reposirtory during the build
and stored under build/tmp/work/socfpga_cyclone5-poky-linux-gnueabi/linux-altera-ltsi/3.10-r1/git/arch/arm/boot/dts/ I succesfully build a custom dtb following these suggestions:
https://community.freescale.com/thread/325219

Is there a way to do this using a bitbake mechanism?

Thanks!

Best Regards,
Steffen

Quoted 24 lines · Steffen Schuetz

Hi,

I build a customized Linux image using Yocto Daisy - we need gcc >= 4.8
- following the instructions at
http://rocketboards.org/foswiki/Documentation/YoctoDoraBuildWithMetaAltera . Besides the zImage and rootfs the build process outputs an .dtb file. Now, in order to get the FPGA fabric involved, I'd have to come up with a modified dts and build it.
That's where I'm a bit lost in the blur. I can not figure out where the generated dtb is coming from? What's the mechanism behind? I cannot find any .dts nor .dtb in the meta-altera layer.

Besides that I realized that if I use the dtb that shipped with the board with the "daisy" kernel, the boot process gets stuck at "Waiting for root device /dev/mmcblk0p3..." The "shipped" kernel is version 3.8.0 while the "daisy" one is 3.10.31-ltsi.
Was there a change in the device tree layout as the "old" one doesn't work with the "daisy" kernel?

Thanks in advance!

Regards,
Steffen

#2 lore raw

Perhaps someone could improve on this, but
you can build a dtb from a source dts using a bbappend for your linux kernel.
1. drop a copy of your new dts in ${S}/arch/arm/boot/dts
2. add the name of your dtb to the KERNEL_DEVICETREE variable.

If you are modifying an existing dts file, the cleanest approach is probably to use a patch file for step 1. However, you could also create a completely new file. That you could add either as a patch or by a direct file copy with something like

SRC_URI += "my-device-tree.dts"
KERNEL_DEVICETREE += "my-device-tree.dtb" do_patch_append() {
cp ${WORKDIR}/my-device-tree.dts ${S}/arch/arm/boot/dts/
}

Using do_configure_append (or even possibly do_unpack_append) might be more appropriate and would let you easily patch your own file in another layer, but I have not personally tried that.

However, if changing the name of the dtb (i.e. adding your own), you may need to tweak your bootloader (U-boot?) to pass the right dtb to the kernel at boot. I don't know the Altera Cyclone configuration/layers/versions so take that as a very general statement.

Also, check the kernel recipe you are extending KERNEL_DEVICETREE may need to be expressed as KERNEL_DEVICETREE_somemachinenamehere.

Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Steffen Schuetz
Sent: Monday, May 18, 2015 7:13 AM
To: [email protected]
Subject: Re: [yocto] Altera Cyclone V DTB origin

Hi,

I found that the dtb is obtained from a git reposirtory during the build and stored under build/tmp/work/socfpga_cyclone5-poky-linux-gnueabi/linux-altera- ltsi/3.10-r1/git/arch/arm/boot/dts/
I succesfully build a custom dtb following these suggestions:
https://community.freescale.com/thread/325219

Is there a way to do this using a bitbake mechanism?

Thanks!

Best Regards,
Steffen

On 05/18/2015 11:41 AM, Steffen Schuetz wrote:

Quoted 28 lines
Quoted 6 lines

Hi,

I build a customized Linux image using Yocto Daisy - we need gcc >= 4.8
- following the instructions at

http://rocketboards.org/foswiki/Documentation/YoctoDoraBuildWithMetaAlter
a .

Quoted 19 lines

Besides the zImage and rootfs the build process outputs an .dtb file. Now, in order to get the FPGA fabric involved, I'd have to come up with a modified dts and build it.
That's where I'm a bit lost in the blur. I can not figure out where the generated dtb is coming from? What's the mechanism behind? I cannot find any .dts nor .dtb in the meta-altera layer.

Besides that I realized that if I use the dtb that shipped with the board with the "daisy" kernel, the boot process gets stuck at "Waiting for root device /dev/mmcblk0p3..." The "shipped" kernel is version 3.8.0 while the "daisy" one is 3.10.31-ltsi.
Was there a change in the device tree layout as the "old" one doesn't work with the "daisy" kernel?

Thanks in advance!

Regards,
Steffen

________________________________

Notice to recipient: This email is meant for only the intended recipient of the transmission, and may be a communication privileged by law, subject to export control restrictions or that otherwise contains proprietary information. If you receive this email by mistake, please notify us immediately by replying to this message and then destroy it and do not review, disclose, copy or distribute it. Thank you in advance for your cooperation.

#3 lore raw
Quoted 16 lines · Virgil

Perhaps someone could improve on this, but
you can build a dtb from a source dts using a bbappend for your linux kernel.
1. drop a copy of your new dts in ${S}/arch/arm/boot/dts
2. add the name of your dtb to the KERNEL_DEVICETREE variable.

If you are modifying an existing dts file, the cleanest approach is probably to use a patch file for step 1. However, you could also create a completely new file. That you could add either as a patch or by a direct file copy with something like

SRC_URI += "my-device-tree.dts" KERNEL_DEVICETREE += "my-device-tree.dtb" do_patch_append() {
cp ${WORKDIR}/my-device-tree.dts ${S}/arch/arm/boot/dts/
}

Quoted 6 lines

Using do_configure_append (or even possibly do_unpack_append) might be more appropriate and would let you easily patch your own file in another layer, but I have not personally tried that.

However, if changing the name of the dtb (i.e. adding your own), you may need to tweak your bootloader (U-boot?) to pass the right dtb to the kernel at boot. I don't know the Altera Cyclone configuration/layers/versions so take that as a very general statement.

Also, check the kernel recipe you are extending KERNEL_DEVICETREE may need to be expressed as KERNEL_DEVICETREE_somemachinenamehere.

you should checkout meta-altera here
https://github.com/kraj/meta-altera

Quoted 62 lines
Quoted 24 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Steffen Schuetz
Sent: Monday, May 18, 2015 7:13 AM
To: [email protected]
Subject: Re: [yocto] Altera Cyclone V DTB origin

Hi,

I found that the dtb is obtained from a git reposirtory during the build and stored under build/tmp/work/socfpga_cyclone5-poky-linux-gnueabi/linux-altera- ltsi/3.10-r1/git/arch/arm/boot/dts/
I succesfully build a custom dtb following these suggestions:
https://community.freescale.com/thread/325219

Is there a way to do this using a bitbake mechanism?

Thanks!

Best Regards,
Steffen

On 05/18/2015 11:41 AM, Steffen Schuetz wrote:

Quoted 28 lines
Quoted 6 lines

Hi,

I build a customized Linux image using Yocto Daisy - we need gcc >= 4.8
- following the instructions at

http://rocketboards.org/foswiki/Documentation/YoctoDoraBuildWithMetaAlter
a .

Quoted 19 lines

Besides the zImage and rootfs the build process outputs an .dtb file. Now, in order to get the FPGA fabric involved, I'd have to come up with a modified dts and build it.
That's where I'm a bit lost in the blur. I can not figure out where the generated dtb is coming from? What's the mechanism behind? I cannot find any .dts nor .dtb in the meta-altera layer.

Besides that I realized that if I use the dtb that shipped with the board with the "daisy" kernel, the boot process gets stuck at "Waiting for root device /dev/mmcblk0p3..." The "shipped" kernel is version 3.8.0 while the "daisy" one is 3.10.31-ltsi.
Was there a change in the device tree layout as the "old" one doesn't work with the "daisy" kernel?

Thanks in advance!

Regards,
Steffen

________________________________

Notice to recipient: This email is meant for only the intended recipient of the transmission, and may be a communication privileged by law, subject to export control restrictions or that otherwise contains proprietary information. If you receive this email by mistake, please notify us immediately by replying to this message and then destroy it and do not review, disclose, copy or distribute it. Thank you in advance for your cooperation. --
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto