1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/aboot/stone_mod_aboot.sh
3 # Copyright (C) 2004 - 2025 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # [MAIN] 70 aboot Aboot Boot Loader Setup
15 create_kernel_list
() {
17 for x
in `(cd /boot/; ls vmlinux-*gz) | sort -Vr`; do
18 ver
=${x/vmlinux-}; ver
=${ver%.gz}
20 $((alpha_idyx++)):${bootdev##*[^0-9]}$bootpath/$x initrd=$bootpath/initrd-${ver} root=$rootdev ro
26 cat << EOT > /boot/aboot.conf
28 # /boot/aboot.conf created with the T2 SDE Aboot STONE module
32 create_kernel_list
>> /boot
/aboot.conf
34 gui_message
"This is the new /boot/aboot.conf file:
36 $(< /boot/aboot.conf)"
40 gui_cmd
'Installing Aboot' "echo 'calling swriteboot'; swriteboot ${bootdev%%[0-9]} /boot/bootlx"
45 local dev
="`grep \" $1 \" /proc/mounts | tail -n 1 |
47 if [ ! "$dev" ]; then # try the higher dentry
48 local try
="`dirname $1`"
49 dev
="`grep \" $try \" /proc/mounts | tail -n 1 | \
52 if [ -h "$dev" ]; then
53 echo "/dev/`readlink $dev`"
62 dir
="`dirname $dir`/`readlink $dir`"
63 dir
="`echo $dir | sed 's,[^/]*/\.\./,,g'`"
69 bootdev
="`device4 /boot`"
71 if [ "$rootdev" = "$bootdev" ]
72 then bootpath
=/boot
; else bootpath
=""; fi
74 if [ ! -f /boot
/aboot.conf
]; then
75 if gui_yesno
"Aboot does not appear to be configured.
76 Automatically install Aboot now?"; then
78 if ! aboot_install
; then
79 gui_message
"There was an error while installing Aboot."
86 gui_menu yaboot
'Aboot Boot Loader Setup' \
87 "Root Device ........... $rootdev" "" \
88 "Boot Device ........... $bootdev" "" \
89 "Boot Path ............. $bootpath" "" \
91 '(Re-)Create aboot.conf with installed kernels' 'create_aboot_conf' \
92 '(Re-)Install Aboot' 'aboot_install' \
94 "Edit /boot/aboot.conf (Config file)" \
95 "gui_edit 'STONE Configuration' /boot/aboot.conf"