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

OBSOLETE - Add UBOOT_ONLY config property to the default build procedure - will be replaced by another pull request #4422

Closed

Conversation

mhoffrog
Copy link
Member

@mhoffrog mhoffrog commented Nov 12, 2022

This config simplifies the U-Boot build only scenario. If this switch is set, then KERNEL_ONLY is implied to "yes". The U-Boot only build also ensures proper host prepare and any other validation, the default build procedure performs.

The motivation is to simplify UBOOT_ONLY building by just one compile parameter / switch, but keeping the default
dependent compile procedures like e.g. host compare and other pre-config validations as is.
This makes it also useful for CICD compile configurations.

Changes

  • lib/functions/main/config-prepare.sh:
    • imply to set KERNEL_ONLY=yes, if UBOOT_ONLY is set "yes"
  • lib/functions/main/default-build.sh:
    • changed do_default():
      • added appropriateif {U-Boot compiling} else {Kernel and other compiling - original unchanged code} fi

        Note for the code review: The diff of this new if / else branch in do_default() is looking a bit irritating, since it does not reflect that the code in the new else branch was not touched at all rather than just indented by another tab character.

Closes issue #4421

Test

  • Tested - see log of bash terminal output (cut in the middle to shorten for the relevant here):
user@HOST:~/Projects/Armbian/build$ ./compile.sh BOARD=cubietruck BRANCH=current RELEASE=focal BUILD_MINIMAL=yes BUILD_DESKTOP=no UBOOT_ONLY=yes KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,gpg,7z SYNC_CLOCK=no
[ warn ] This script requires root privileges, trying to use sudo 
[ o.k. ] Using config file [ /home/mhoffrog/Projects/Armbian/build/userpatches/config-example.conf ]
[ o.k. ] Command line: setting BOARD to [ cubietruck ]
[ o.k. ] Command line: setting BRANCH to [ current ]
[ o.k. ] Command line: setting RELEASE to [ focal ]
[ o.k. ] Command line: setting BUILD_MINIMAL to [ yes ]
[ o.k. ] Command line: setting BUILD_DESKTOP to [ no ]
[ o.k. ] Command line: setting UBOOT_ONLY to [ yes ]
[ o.k. ] Command line: setting KERNEL_CONFIGURE to [ no ]
[ o.k. ] Command line: setting COMPRESS_OUTPUTIMAGE to [ sha,gpg,7z ]
[ o.k. ] Command line: setting SYNC_CLOCK to [ no ]
[ .... ] Extension being added [ sunxi-tools :: added by functions/cli/cli-entrypoint.sh:105 -> functions/main/config-prepare.sh:140 -> functions/configuration/main-config.sh:174 -> config/sources/families/sun7i.conf:1 -> config/sources/families/include/sunxi_common.inc:1 ]                                                                                                                    
[ o.k. ] Extension manager [ processed 3 Extension Methods calls and 3 Extension Method implementations ]
[ o.k. ] Using user configuration override [ /home/mhoffrog/Projects/Armbian/build/userpatches/lib.config ]
[ o.k. ] Preparing [ host ]
[ o.k. ] Build host OS release [ focal ]
[ .... ] Installing build dependencies 
[ o.k. ] Checking for external GCC compilers 
[ o.k. ] Downloading sources 
[ o.k. ] Checking git sources [ u-boot v2022.07 ]
[ .... ]  Cleaning ....  [ 93 files ]
[ o.k. ] Checking git sources [ linux-mainline/5.15 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitorigin/linux-5.15.y ]                                                                                                                      
[ .... ] Switch v5.15.77 = da3267ca3045f6958b56cbd9d185b68f7e14216d 
[ o.k. ] Checking git sources [ sunxi-tools master ]
[ .... ] Up to date 
[ o.k. ] Cleaning /home/mhoffrog/Projects/Armbian/build/output/debs for [ cubietruck current ]
[ o.k. ] Cleaning [ u-boot/v2022.07 ]
[ o.k. ] Compiling u-boot [ 2022.07 ]
[ o.k. ] Compiler version [ arm-none-linux-gnueabihf-gcc 9.2.1 ]
[ .... ] Checking out to clean sources 
[ o.k. ] Cleaning [ u-boot/v2022.07 ]
[ o.k. ] Started patching process for [ u-boot sunxi-cubietruck-current ]
[ o.k. ] Looking for user patches in [ userpatches/u-boot/u-boot-sunxi ]
[ o.k. ] * [l][c] 0000-sunxi-allwinner-a10-spi-driver.patch 
[ o.k. ] * [l][c] 0001-add-orange-pi-3-lts-support.patch 
[ o.k. ] * [l][c] Bananapro-01-add-hdmi-de-reg_ahci_5v.patch 
[ o.k. ] * [l][c] Bananapro-02-add-AXP209-regulators.patch 
[ o.k. ] * [l][c] Merrii_Hummingbird_A20.patch 
[ o.k. ] * [l][c] add-a20-optional-eMMC.patch 
[ o.k. ] * [l][c] add-a64-olinuxino-emmc-support.patch 
[ o.k. ] * [l][c] add-a64-olinuxino-spl-spi.patch 
[ o.k. ] * [l][c] add-awsom-defconfig.patch 
[ o.k. ] * [l][c] add-emmc_support_to_neo1_and_2.patch 
[ o.k. ] * [l][c] add-h616-THS-workaround.patch 
[ o.k. ] * [l][c] add-nanopi-air-emmc.patch 
[ o.k. ] * [l][c] add-nanopi-duo.patch 
[ o.k. ] * [l][c] add-nanopi-m1-plus2-emmc.patch 
[ o.k. ] * [l][c] add-nanopi-neo-core.patch 
[ o.k. ] * [l][c] add-orangepi-plus2-emmc.patch 
[ o.k. ] * [l][c] add-orangepi-zero-plus-pxe-support.patch 
[ o.k. ] * [l][c] add-orangepi-zero-usb-boot-support.patch 
[ o.k. ] * [l][c] add-orangepi-zeroplus2_h3.patch 
[ o.k. ] * [l][c] add-sunvell-r69.patch 
[ o.k. ] * [l][c] add-xx-boot-auto-dt-select-neo2.patch 
[ o.k. ] * [l][c] add-xx-nanopi-k1-plus-emmc.patch 
[ o.k. ] * [l][c] add-xx-nanopineocore2.patch 
[ o.k. ] * [l][c] add-zeropi.patch 
[ o.k. ] * [l][c] adjust-default-dram-clockspeeds.patch 
[ o.k. ] * [l][c] adjust-small-boards-cpufreq.patch 
[ o.k. ] * [l][c] enable-autoboot-keyed.patch 
[ o.k. ] * [l][c] enable-ethernet-orangepiprime.patch 
[ o.k. ] * [l][c] enable-r_pio-gpio-access-h3-h5.patch 
[ o.k. ] * [l][c] fdt-setprop-fix-unaligned-access.patch 
[ o.k. ] * [l][c] fix-sunxi-nand-spl.patch 
[ o.k. ] * [l][c] fix-usb1-vbus-opiwin.patch 
[ o.k. ] * [l][c] h3-Fix-PLL1-setup-to-never-use-dividers.patch 
[ o.k. ] * [l][c] h3-enable-power-led.patch 
[ o.k. ] * [l][c] h3-set-safe-axi_apb-clock-dividers.patch 
[ o.k. ] * [l][c] lower-default-DRAM-freq-A64-H5.patch 
[ o.k. ] * [l][c] pinebook-add-rare-panel-support.patch 
[ o.k. ] * [l][c] sun8i-set-machid.patch 
[ o.k. ] * [l][c] sunxi-boot-splash.patch 
[ o.k. ] * [l][c] sunxi_H616_GPU_enable_hack.patch 
[ o.k. ] * [l][c] xxx-disable-de2-to-improve-edid-detection.patch 
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
...
  CAT     u-boot-dtb.bin
  COPY    u-boot.dtb
  COPY    u-boot.bin
  MKIMAGE u-boot.img
  MKIMAGE u-boot-dtb.img
  BINMAN  all
[ o.k. ] Building deb [ linux-u-boot-current-cubietruck_22.11.0-trunk_armhf.deb ]
[ o.k. ] U-Boot build done [ @host ]
[ o.k. ] Target directory [ /home/mhoffrog/Projects/Armbian/build/output/debs/ ]
[ o.k. ] File name [ linux-u-boot-current-cubietruck_22.11.0-trunk_armhf.deb ]
[ o.k. ] Runtime [ 0 min ]
[ o.k. ] Repeat Build Options [ ./compile.sh  BOARD=cubietruck BRANCH=current RELEASE=focal BUILD_MINIMAL=yes BUILD_DESKTOP=no UBOOT_ONLY=yes KERNEL_ONLY=yes KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,gpg,7z  ]                                                
user@HOST:~/Projects/Armbian/build$

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I did create pull request Add UBOOT_ONLY option doc documentation#279 for the appropriate Armbian doc update
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

mhoffrog added a commit to MHARMBIAN/armbian_documentation that referenced this pull request Nov 12, 2022
This config simplifies the U-Boot build only scenario.
If this switch is set, then KERNEL_ONLY is implied to "yes".
The U-Boot only build also ensures proper host prepare and
any other validation, the default build procedure performs.

closes armbian#4421
EvilOlaf pushed a commit to armbian/documentation that referenced this pull request Nov 15, 2022
@mhoffrog
Copy link
Member Author

This pull request has become obsolete since of the discussion on issue #4421.

It will be replaced by a new pull request.

=> I close this one without merging.

@mhoffrog mhoffrog closed this Nov 15, 2022
@mhoffrog mhoffrog changed the title Add UBOOT_ONLY config property to the default build procedure OBSOLETE - Add UBOOT_ONLY config property to the default build procedure - will be replaced by another pull request Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Compile script: Add a BUILD_ONLY switch to the build procedure
1 participant