Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Idea of automatic uboot/kernel recompilation

Featured Replies

Playing with BUILD_MINIMAL I had to several times run compilation script for the same board / system / branch. To speed up verification I thought: what is a point to constantly build u-boot / kernel?

So I added CLEAN_LEVEL option to not delete generated debs.

 

I have noted that from one hand I can disable cleaning of (for example) kernel deb files, but from other hand if there is repository update no new deb is produced.

 

And the idea.... or is this already implemented somewhere?

 

Build of u-boot / kernel is initiated when no deb file exists.

fetch_from_repo function knows if the repository is updated.

 

What is fetch_from_repo returns update status and this is used also in main.sh as additional check? I.e. deb exists but is older than latest repo update so compilation is required.

 

Essentially, to change:

 

if [[ ! -f ${DEST}/debs/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then

 

into something like:

 

if [[ ${UBOOT_UPDATED} == "yes" || ! -f ${DEST}/debs/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then

 

And diff proposal:

diff --git a/lib/general.sh b/lib/general.sh
index dc0718a4..64edeaa8 100644
--- a/lib/general.sh
+++ b/lib/general.sh
@@ -294,6 +294,7 @@ fetch_from_repo()
                        fetch_from_repo "$surl" "$workdir/$i" "$sref"
                done
        fi
+       [[ $changed == false ]] && return 1
 } #############################################################################

 #--------------------------------------------------------------------------------------------------------------------------------
diff --git a/lib/main.sh b/lib/main.sh
index 00ec251c..b9779edb 100644
--- a/lib/main.sh
+++ b/lib/main.sh
@@ -311,10 +311,15 @@ start=$(date +%s)

 # ignore updates help on building all images - for internal purposes
 # fetch_from_repo <url> <dir> <ref> <subdir_flag>
+BOOT_IS_UPDATED=false
+KERNEL_IS_UPDATED=false
 if [[ $IGNORE_UPDATES != yes ]]; then
        display_alert "Downloading sources" "" "info"
        fetch_from_repo "$BOOTSOURCE" "$BOOTDIR" "$BOOTBRANCH" "yes"
+       [[ $? == 0 ]] && BOOT_IS_UPDATED=true
        fetch_from_repo "$KERNELSOURCE" "$KERNELDIR" "$KERNELBRANCH" "yes"
+       [[ $? == 0 ]] && KERNEL_IS_UPDATED=true
        if [[ -n $ATFSOURCE ]]; then
                fetch_from_repo "$ATFSOURCE" "$ATFDIR" "$ATFBRANCH" "yes"
        fi
@@ -357,7 +362,7 @@ for option in $(tr ',' ' ' <<< "$CLEAN_LEVEL"); do
 done

 # Compile u-boot if packed .deb does not exist
-if [[ ! -f ${DEST}/debs/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then
+if [[ $BOOT_IS_UPDATED == true || ! -f ${DEST}/debs/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then
        if [[ -n $ATFSOURCE ]]; then
                compile_atf
        fi
@@ -365,7 +370,7 @@ if [[ ! -f ${DEST}/debs/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then
 fi

 # Compile kernel if packed .deb does not exist
-if [[ ! -f ${DEST}/debs/${CHOSEN_KERNEL}_${REVISION}_${ARCH}.deb ]]; then
+if [[ $KERNEL_IS_UPADTED == true || ! -f ${DEST}/debs/${CHOSEN_KERNEL}_${REVISION}_${ARCH}.deb ]]; then
        KDEB_CHANGELOG_DIST=$RELEASE
        compile_kernel
 fi

 

 

  • Author

So you suggest to use CLEAN_LEVEL="debs" to remove debs all the time and eventually add IGNORE_UPDATES ?

1 hour ago, Hijax said:

So you suggest to use CLEAN_LEVEL="debs" to remove debs all the time and eventually add IGNORE_UPDATES ?

 

IGNORE_UPDATES is used internally, when all stuff is rebuild. Rebuilding is done by phases:
1. All kernels and u-boots are rebuild, one by one and in parallel by default

2. When this is done, BSP packages are rebuild in parallel and here I don't want to check things upstream
3. Images can also be build in parallel (if EXTERNAL="no" is used) and here is the same ... 

 

For normal usage your proposition makes sense, but not sure if I want this in BUILD_ALL scenario.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.