First of all thanks for the developers for this wonderful distro!
…but what about a bootmanager using USB keyboard?..
----{Greek choir}: …no nO NO NOOOO! BURN THE HERETIC!..----
----{World}:…Changes…Now here is a…----
Bootmanager:
http://www.lightofdawn.org/wiki/wiki.cgi/-wiki/KexecBootMenu
modified for Manjaro ARM. It is kexec based and can use USB keyboards.
It should boot any Linux, tested with Manjaro and Armbian.
Test enviroment:
X96Air P2, khadas kernel, modified meson-sm1-x96maxplus-vim100m dtb
SD card with Manjaro linux
on the boot partition are images, initramf’s, dtbs, bootmenu.cfg
u-boot.ext with extlinux starts SSD Manjaro (where bootmenu is installed)
SSD with boot partitions and root filesystems
Installation:
- Install kexec-tools
- Get bootmenu from the above link (Donwload paragraph)
- Apply patch “sedpatch” (below): “sed -i -f sedpatch bootmenu” and make it executable
- Copy to a safe directory (/root/bootmenu/bootmenu for me)
- Create your bootmenu.cfg and copy to your bootdevice (see and read the example below)
- Modify your uEnv.txt or extlinux.conf or whatever: add rdinit=/root/bootmenu/bootmenu to APPEND
- /etc/mkinitcpio.conf: add BINARIES=(/usr/bin/stty /usr/bin/kexec /root/bootmenu/bootmenu)
- mkinitcpio -p YOURKERNEL (mkinitcpio -p linux-khadas for me)
- Copy the new initramfs-linux.img to your boot device if necessary
Hints:
Reading the original site is highly recomended but it is not fully up to date.
As a prerequisite you need a bootable working Manjaro system.
Be prepared for misconfiguration, have a bootable media (or PC …) to correct mistakes.
Use linux image formats only, u-boot formats (uInitrd …) won’t work.
sedpatch:
512c\
# cleanup\
stty echo\
CNORM\
echo; echo; echo; echo
508c\
kexec -e
479c\
#cp bootmenu.cfg /tmp #stub
477a\
modprobe -a meson_drm meson_dw_hdmi display_connector
395c\
[ $DEFAULT_ENTRY -eq 1 ] && set -- I || set -- ENTER
370c\
kexec -l "$kernel" "$initrd" "$dtb" --append="$append" && exitcode=boot
367c\
[ $dtb ] && [ -e $TMP_MOUNT/$dtb ] && dtb="--dtb=$TMP_MOUNT/$dtb" || dtb=
365c\
[ -e $TMP_MOUNT/$kernel ] && kernel="$TMP_MOUNT/$kernel" || return 1
357a\
[ -z "$root" ] && root=$bootmenu
342c\
dtb*) dtb=$(echo ${p#dtb} | sed 's/[ \\t]*//') ;;
172c\
dtb*) TPUT $(($APPEND_LINE+3)) 1; echo "$p" ;;\
append*) TPUT $(($APPEND_LINE+4)) 1; echo "$p" ;;
58,60c\
set -- $(stty size)\
MAXX=$2\
MAXY=$1
15c\
APPINFO="BootMenu 1.2"
bootmenu.cfg:
#The "root" keyword entry is not mandatory now, it defaults to the device where this file is found.
#The first entry should be the modified Manjaro install for the "default" working properly.
#autoboot with "default 1" now simply runs the original init, same as hitting the "i" key
#default Manjaro_ARM_SSD
default 1
bootdelay 8
title Manjaro_ARM_SSD
kernel SSDManjaro/Image
initrd SSDManjaro/initramfs-linux.img
dtb meson-sm1-X96Air-gbit.dtb
append root=LABEL=PB-Debian rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 plymouth.ignore-serial-consoles cpufreq.default_governor=ondemand
title Manjaro_SD
kernel Image
initrd initramfs-linux.img
dtb meson-sm1-X96Air.dtb
append root=PARTUUID=e460bc4c-02 rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 quiet splash plymouth.ignore-serial-consoles
title Armbian_flippy
kernel Armbian_new/vmlinuz-5.16.18-flippy-71+
initrd Armbian_new/initrd.img-5.16.18-flippy-71+
dtb Armbian_new/meson-sm1-x96-air-gbit.dtb
append root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1
title Coreelec
kernel Coreelec/Image
initrd Coreelec/initrd.img
dtb Coreelec/dtb.img
append BOOT_IMAGE=kernel.img boot=LABEL=COREELEC disk=LABEL=STORAGE console=ttyS0,115200 console=tty0 no_console_suspend hdmimode=720p60hz frac_rate_policy=0 native_4k_gui=0 voutmode='hdmi' textmode debugging nopkmute