Update bootloader
This commit is contained in:
32
buildroot-external/barebox-env/bin/init
Normal file
32
buildroot-external/barebox-env/bin/init
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
export PATH=/env/bin
|
||||
|
||||
global autoboot_timeout
|
||||
global boot.default
|
||||
global linux.bootargs.base
|
||||
global linux.bootargs.console
|
||||
#linux.bootargs.dyn.* will be cleared at the beginning of boot
|
||||
global linux.bootargs.dyn.root
|
||||
global editcmd
|
||||
|
||||
[ -z "${global.autoboot_timeout}" ] && global.autoboot_timeout=3
|
||||
magicvar -a global.autoboot_timeout "timeout in seconds before automatic booting"
|
||||
[ -z "${global.boot.default}" ] && global.boot.default="system0"
|
||||
[ -z "${global.editcmd}" ] && global.editcmd=sedit
|
||||
|
||||
[ -e /env/config-board ] && /env/config-board
|
||||
|
||||
# Autostart
|
||||
for i in /env/init/*; do
|
||||
. $i
|
||||
done
|
||||
|
||||
echo -e -n "\nHit any key to stop autoboot: "
|
||||
timeout -a $global.autoboot_timeout
|
||||
autoboot="$?"
|
||||
|
||||
if [ "$autoboot" = 0 ]; then
|
||||
boot
|
||||
fi
|
||||
|
||||
9
buildroot-external/barebox-env/init/bootchooser
Normal file
9
buildroot-external/barebox-env/init/bootchooser
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
global bootchooser.targets
|
||||
global bootchooser.system0.boot
|
||||
global bootchooser.system1.boot
|
||||
|
||||
[ -z "${global.bootchooser.targets}" ] && global.bootchooser.targets="system0 system1"
|
||||
[ -z "${global.bootchooser.system0.boot}" ] && global.bootchooser.system0.boot="system0"
|
||||
[ -z "${global.bootchooser.system1.boot}" ] && global.bootchooser.system1.boot="system1"
|
||||
1
buildroot-external/barebox-env/nv/autoboot_timeout
Normal file
1
buildroot-external/barebox-env/nv/autoboot_timeout
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
buildroot-external/barebox-env/nv/boot.default
Normal file
1
buildroot-external/barebox-env/nv/boot.default
Normal file
@@ -0,0 +1 @@
|
||||
bootchooser
|
||||
@@ -0,0 +1 @@
|
||||
system0
|
||||
@@ -0,0 +1 @@
|
||||
10
|
||||
@@ -0,0 +1 @@
|
||||
system1
|
||||
@@ -0,0 +1 @@
|
||||
20
|
||||
1
buildroot-external/barebox-env/nv/bootchooser.targets
Normal file
1
buildroot-external/barebox-env/nv/bootchooser.targets
Normal file
@@ -0,0 +1 @@
|
||||
system0 system1
|
||||
Reference in New Issue
Block a user