Support dual bootloader (#27)
* Support dual bootloader Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Make ova running Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * fix uboot Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Update supervisor Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> * Support all rpi Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
This commit is contained in:
committed by
Pascal Vizeli
parent
f9f8b91b31
commit
a426046bcc
47
buildroot-external/bootloader/barebox.config
Normal file
47
buildroot-external/bootloader/barebox.config
Normal file
@@ -0,0 +1,47 @@
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
# CONFIG_CMD_VERSION is not set
|
||||
# CONFIG_TIMESTAMP is not set
|
||||
|
||||
CONFIG_PROMPT="HassOS-boot:"
|
||||
CONFIG_CMDLINE_EDITING=y
|
||||
CONFIG_AUTO_COMPLETE=y
|
||||
CONFIG_MENU=y
|
||||
CONFIG_BOOTM_SHOW_TYPE=y
|
||||
CONFIG_BOOTM_OFTREE=y
|
||||
CONFIG_FLEXIBLE_BOOTARGS=y
|
||||
CONFIG_DEFAULT_COMPRESSION_LZ4=y
|
||||
|
||||
# CONFIG_PARTITION_DISK_DOS is not set
|
||||
CONFIG_PARTITION_DISK_EFI=y
|
||||
# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
|
||||
# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
|
||||
|
||||
CONFIG_STATE=y
|
||||
CONFIG_STATE_DRV=y
|
||||
CONFIG_BOOTCHOOSER=y
|
||||
CONFIG_CMD_BOOT=y
|
||||
CONFIG_CMD_NV=y
|
||||
CONFIG_CMD_EXPORT=y
|
||||
CONFIG_CMD_GLOBAL=y
|
||||
CONFIG_CMD_BASENAME=y
|
||||
CONFIG_CMD_DIRNAME=y
|
||||
CONFIG_CMD_READLINK=y
|
||||
CONFIG_CMD_GETOPT=y
|
||||
CONFIG_CMD_MENUTREE=y
|
||||
CONFIG_CMD_TIMEOUT=y
|
||||
CONFIG_CMD_OFTREE=y
|
||||
CONFIG_CMD_STATE=y
|
||||
CONFIG_CMD_BOOTCHOOSER=y
|
||||
CONFIG_CMD_READF=y
|
||||
|
||||
CONFIG_OFTREE=y
|
||||
CONFIG_OFTREE_OVERLAY=y
|
||||
|
||||
CONFIG_DISK=y
|
||||
CONFIG_DISK_WRITE=y
|
||||
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_FAT_WRITE=y
|
||||
CONFIG_FS_FAT_LFN=y
|
||||
CONFIG_FS_EXT4=y
|
||||
CONFIG_LZ4_DECOMPRESS=y
|
||||
18
buildroot-external/bootloader/barebox/bin/init
Normal file
18
buildroot-external/bootloader/barebox/bin/init
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
export PATH=/env/bin
|
||||
|
||||
# Autostart
|
||||
for i in /env/init/*; do
|
||||
. $i
|
||||
done
|
||||
|
||||
echo "- Hit m for menu or wait for autoboot -"
|
||||
timeout -a 1 -s -v key
|
||||
|
||||
# Run menu
|
||||
if [ "${key}" != "m" ]; then
|
||||
boot
|
||||
fi
|
||||
|
||||
menutree
|
||||
8
buildroot-external/bootloader/barebox/boot/system0
Normal file
8
buildroot-external/bootloader/barebox/boot/system0
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
global linux.bootargs.dyn.root="root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
|
||||
|
||||
mkdir -p /mnt/system
|
||||
mount -t ext4 /dev/disk0.hassos-kernel0 /mnt/system
|
||||
|
||||
global bootm.image="/mnt/system/bzImage"
|
||||
8
buildroot-external/bootloader/barebox/boot/system1
Normal file
8
buildroot-external/bootloader/barebox/boot/system1
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
global linux.bootargs.dyn.root="root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro"
|
||||
|
||||
mkdir -p /mnt/system
|
||||
mount -t ext4 /dev/disk0.hassos-kernel1 /mnt/system
|
||||
|
||||
global bootm.image="/mnt/system/bzImage"
|
||||
9
buildroot-external/bootloader/barebox/init/bootchooser
Normal file
9
buildroot-external/bootloader/barebox/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"
|
||||
6
buildroot-external/bootloader/barebox/init/cmdline
Normal file
6
buildroot-external/bootloader/barebox/init/cmdline
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
global linux.bootargs.base=""
|
||||
if [ -f /boot/cmdline.txt ]; then
|
||||
readf /boot/cmdline.txt global.linux.bootargs.base
|
||||
fi
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
global linux.bootargs.zram="zram.enabled=1 zram.num_devices=3"
|
||||
global linux.bootargs.apparmor="apparmor=1 security=apparmor"
|
||||
global linux.bootargs.misc="rootwait"
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
boot
|
||||
@@ -0,0 +1 @@
|
||||
Autoboot
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
boot system0
|
||||
@@ -0,0 +1 @@
|
||||
Boot System 0
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
boot system1
|
||||
@@ -0,0 +1 @@
|
||||
Boot System 1
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Enter 'exit' to get back to the menu"
|
||||
|
||||
sh
|
||||
@@ -0,0 +1 @@
|
||||
Shell
|
||||
1
buildroot-external/bootloader/barebox/menu/title
Normal file
1
buildroot-external/bootloader/barebox/menu/title
Normal file
@@ -0,0 +1 @@
|
||||
HassOS boot Menu:
|
||||
1
buildroot-external/bootloader/barebox/nv/boot.default
Normal file
1
buildroot-external/bootloader/barebox/nv/boot.default
Normal file
@@ -0,0 +1 @@
|
||||
bootchooser
|
||||
@@ -0,0 +1 @@
|
||||
system0
|
||||
@@ -0,0 +1 @@
|
||||
system1
|
||||
@@ -0,0 +1 @@
|
||||
state.bootstate
|
||||
@@ -0,0 +1 @@
|
||||
A B
|
||||
1
buildroot-external/bootloader/barebox/nv/editcmd
Normal file
1
buildroot-external/bootloader/barebox/nv/editcmd
Normal file
@@ -0,0 +1 @@
|
||||
sedit
|
||||
19
buildroot-external/bootloader/uboot.config
Normal file
19
buildroot-external/bootloader/uboot.config
Normal file
@@ -0,0 +1,19 @@
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
# CONFIG_EXPERT is not set
|
||||
# CONFIG_DISPLAY_CPUINFO is not set
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_SYS_PROMPT="HassOS> "
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
# CONFIG_ISO_PARTITION is not set
|
||||
CONFIG_EFI_PARTITION=y
|
||||
# CONFIG_ENV_IS_NOWHERE is not set
|
||||
# CONFIG_ENV_IS_IN_FAT is not set
|
||||
CONFIG_ENV_IS_IN_EXT4=y
|
||||
CONFIG_ENV_EXT4_DEVICE_AND_PART="0:6"
|
||||
CONFIG_ENV_EXT4_FILE="/hassos.env"
|
||||
CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
CONFIG_REGEX=y
|
||||
CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
# CONFIG_EFI_LOADER is not set
|
||||
Reference in New Issue
Block a user