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

uboot: completely clean before building each target; slower but correct #7659

Conversation

rpardini
Copy link
Member

@rpardini rpardini commented Jan 5, 2025

uboot: completely clean before building each target; slower but correct

  • u-boot: add per-target and general metadata files to u-boot package
    • incl some indicative fdt/extlinux/gpt info
    • include full config and defconfig for each target
    • mark the old .config file as legacy (it was always the last-target's config)
    • fix: savedefconfig after build, not before (as target_map might change it)
    • fix: some very old u-boots (2011, odroidc1) do not have savedefconfig at all, so make it optional
    • fix: same for .config -- very old u-boots worked different (boards.cfg?)
  • uboot: completely clean before building each target; slower but correct
    • with this, every u-boot build will be a full rebuild.
      • still, building u-boot is pretty fast
      • and it is better to be a bit slower and actually produce correct results
  • rockchip64_common: uboot_custom_postprocess(): add logging about BOOT_SUPPORT_SPI and BOOT_SPI_RKSPI_LOADER
  • uboot: debug u-boot directory contents before/after patching
    • with DEBUG=yes, allows us to see what is leftover in directory during builds
    • with new cleaning in separate commit, there shouldn't be any leftovers at all
  • u-boot: rock-5a: fix UBOOT_TARGET_MAP whitespace/newlines and add note
  • u-boot: orangepi5: fix UBOOT_TARGET_MAP whitespace/newlines and add note
  • u-boot: orangepi5pro: fix UBOOT_TARGET_MAP whitespace/newlines and add note

- incl some indicative fdt/extlinux/gpt info
- include full config and defconfig for each target
- mark the old .config file as legacy (it was always the last-target's config)
- fix: savedefconfig after build, not before (as target_map might change it)
- fix: some very old u-boots (2011, odroidc1) do not have `savedefconfig` at all, so make it optional
- fix: same for `.config` -- very old u-boots worked different (`boards.cfg`?)
- with this, every u-boot build will be a full rebuild.
  - still, building u-boot is pretty fast
  - and it is better to be a bit slower and actually produce correct results
- with DEBUG=yes, allows us to see what is leftover in directory during builds
- with new cleaning in separate commit, there shouldn't be any leftovers _at all_
@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Framework Framework components labels Jan 5, 2025
@rpardini rpardini marked this pull request as ready for review January 5, 2025 14:50
Copy link
Member

@igorpecovnik igorpecovnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rpardini
Copy link
Member Author

rpardini commented Jan 5, 2025

Build 535 u-boots with this, on Jammy. (Only bananapif3 fails, because it requires Noble, but that's unrelated.)

@rpardini rpardini merged commit eaa8ab0 into armbian:main Jan 5, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Framework components Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

2 participants