cdsteinkuehler / br2rauc

Buildroot + RAUC
Other
51 stars 18 forks source link

[Feedback] Replacing upstream u-boot with custom u-boot binary #25

Open embed123linux opened 1 month ago

embed123linux commented 1 month ago

Hello Charles,

This is not an issue but I am looking forward for your feedback.

Instead of using the upstream u-boot, I would like to integrate a custom u-boot binary (modified to meet some requirements, added new functions). Will there be any potential issues if I add a custom Buildroot package (for modified u-boot) and remove the upstream u-boot package in the Buildroot config? Could there be any dependency issue or boot scripts should be adjusted?

Thanks in advance

cdsteinkuehler commented 1 month ago

Like the Linux kernel, U-Boot is not really a package like most of the other bits that make up a root filesystem image. Instead, when you configure Buildroot, you can specify a custom version and source for the U-Boot code (in the Bootloaders menu). So just point Buildroot to your U-Boot code (it can be a git/svn/Hg repo or a tarball) and let Buildroot do it's thing. Additionally you can apply patches to U-Boot as part of the Buildroot process if that's needed.

embed123linux commented 1 month ago

thanks for quick update. For testing I have already built the binary. So, I will just install them to BINARIES_DIR like here https://github.com/buildroot/buildroot/blob/2e07cd5a1bc7f2b2d2db9702eca159729232b839/boot/uboot/uboot.mk#L424

cdsteinkuehler commented 1 month ago

That's your call, but I would generally recommend trying to get Buildroot to compile/install your version of U-Boot vs. trying to apply it later as a pre-compiled binary. It seems like a less "fragile" approach and less likely to break as Buildroot moves forward with their annual LTS updates.