Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netboot with Yocto and U-Boot for Pi 4b - DTB Issue #1210

Open
KarolPWr opened this issue Aug 2, 2023 · 0 comments
Open

Netboot with Yocto and U-Boot for Pi 4b - DTB Issue #1210

KarolPWr opened this issue Aug 2, 2023 · 0 comments

Comments

@KarolPWr
Copy link

KarolPWr commented Aug 2, 2023

I'm working on implementing netboot (via tftp) for Pi 4b using Yocto and U-Boot. Currently, I can successfully load the Image file with tftp and the rootfs with NFS. However, when I use the device tree (dtb) file from tmp/deploy, the boot crashes. The strange thing is that it works flawlessly when booting straight from the SD card, without using tftp.

After some research, I came across information stating that dtb files are patched during boot by the Raspberry Pi firmware, which is likely why they work from the SD card.

My setup currently looks like this:

server/nfsroot/ - filesystem extracted from deploy/images
server/tftpboot/ - Image.bin and bcm/dtb - Image and .dtb copied from deploy 

env set ipaddr <IP>; env set serverip <SRV_IP>;env set nfsroot /nfsroot;env set image Image.bin;env set fdt_file bcm.dtb
env set netload 'tftpboot ${loadaddr} ${image};tftpboot ${fdt_addr} ${fdt_file}'
env set netargs 'setenv bootargs 8250.nr_uarts=1 console=ttyS0,115200 rootwait rw root=/dev/nfs ip=${ipaddr} nfsroot=${serverip}:${nfsroot}'
env set netboot 'run netargs;run netload;booti ${loadaddr} - ${fdt_addr}'

Above will not work - kernel starts, and it mounts the NFS rootfs, but it fails during SD card initialization. Everything works when I don't use the .dtb from tftp and instead remove the line: tftpboot ${fdt_addr} ${fdt_file}. Even if I use the exact same .dtb that is on the SD card, it still does not work.

I'm looking for a proper way to implement fully flexible tftpboot with Image, dtb, and rootfs. How can this be done properly?

Relevant discussions on this topic:
1
2
3
4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant