mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Wrap /lib/fel-load.sh as function
This commit is contained in:
@@ -74,27 +74,29 @@ fel_load() {
|
|||||||
write 0x43100000 "${FEL_ROOTFS}"/boot/boot.scr
|
write 0x43100000 "${FEL_ROOTFS}"/boot/boot.scr
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -f $USERPATCHES_PATH/fel-hooks.sh ]]; then
|
function start_fel_boot() {
|
||||||
display_alert "Using additional FEL hooks in" "userpatches/fel-hooks.sh" "info"
|
if [[ -f $USERPATCHES_PATH/fel-hooks.sh ]]; then
|
||||||
# shellcheck source=/dev/null
|
display_alert "Using additional FEL hooks in" "userpatches/fel-hooks.sh" "info"
|
||||||
source "$USERPATCHES_PATH"/fel-hooks.sh
|
# shellcheck source=/dev/null
|
||||||
fi
|
source "$USERPATCHES_PATH"/fel-hooks.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# basic sanity check
|
# basic sanity check
|
||||||
if [[ -n $FEL_ROOTFS ]]; then
|
if [[ -n $FEL_ROOTFS ]]; then
|
||||||
fel_prepare_host
|
fel_prepare_host
|
||||||
fel_prepare_target
|
fel_prepare_target
|
||||||
[[ $(type -t fel_post_prepare) == function ]] && fel_post_prepare
|
[[ $(type -t fel_post_prepare) == function ]] && fel_post_prepare
|
||||||
RES=b
|
RES=b
|
||||||
while [[ $RES != q ]]; do
|
while [[ $RES != q ]]; do
|
||||||
if [[ $FEL_AUTO != yes ]]; then
|
if [[ $FEL_AUTO != yes ]]; then
|
||||||
display_alert "Connect device in FEL mode and press" "<Enter>" "info"
|
display_alert "Connect device in FEL mode and press" "<Enter>" "info"
|
||||||
read -r
|
read -r
|
||||||
fi
|
fi
|
||||||
fel_load
|
fel_load
|
||||||
display_alert "Press any key to boot again, <q> to finish" "FEL" "info"
|
display_alert "Press any key to boot again, <q> to finish" "FEL" "info"
|
||||||
read -r -n 1 RES
|
read -r -n 1 RES
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
service nfs-kernel-server restart
|
service nfs-kernel-server restart
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
@@ -100,7 +100,7 @@ PRE_INSTALL_DISTRIBUTION_SPECIFIC
|
|||||||
if [[ $ROOTFS_TYPE == fel ]]; then
|
if [[ $ROOTFS_TYPE == fel ]]; then
|
||||||
FEL_ROOTFS=$SDCARD/
|
FEL_ROOTFS=$SDCARD/
|
||||||
display_alert "Starting FEL boot" "$BOARD" "info"
|
display_alert "Starting FEL boot" "$BOARD" "info"
|
||||||
source $SRC/lib/fel-load.sh
|
start_fel_boot
|
||||||
else
|
else
|
||||||
prepare_partitions
|
prepare_partitions
|
||||||
create_image
|
create_image
|
||||||
|
|||||||
Reference in New Issue
Block a user