From 62f0556e01422acbffc694a8b3651baa12f947e1 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 5 Nov 2023 21:56:45 +0100 Subject: [PATCH] void [mini-]info --- build.sh | 88 +++++++++++++++++++++++++++------------------ live/source/boot.sh | 8 +++++ 2 files changed, 62 insertions(+), 34 deletions(-) diff --git a/build.sh b/build.sh index 082a021..2febdfa 100644 --- a/build.sh +++ b/build.sh @@ -158,61 +158,81 @@ mkdir --parents "${GRUB_ROOT}" # grub / cfg ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ echo -n "\ -echo ' -grub.cfg ↓ -' +function list_vars { + echo -n \"\\ + root | \${root} + prefix | \${prefix} +check_signatures | \${check_signatures} +\" + list_trusted +} + +clear ls echo -n \"\\ -cmdpath: \${cmdpath} - root: \${root} + --- + cpu-platform | \${grub_cpu}-\${grub_platform} + cmdpath | \${cmdpath} + --- \" -for f in '/.disk/info' '/.disk/mini-info' ; do - if [ -f \"\${f}\" ] ; then - echo \" (\${root})\${f}\" +if [ -f '/.disk/info' -o -f '/.disk/mini-info' ] ; then + for f in '/.disk/info' '/.disk/mini-info' ; do + echo -n ' |' + if [ -f \"\${f}\" ] ; then + echo -n '*' + else + echo -n ' ' + fi + echo \"(\${root})\${f}\" + done + unset f + echo ' *' +fi +list_vars +echo ' ---' + +unset cmdroot +regexp --set cmdroot '^\((.*)\)' \"\${cmdpath}\" +echo \" cmdroot | \${cmdroot}\" +if [ \"\${cmdroot}\" != \"\${root}\" ] ; then + if [ -d \"(\${cmdroot})/boot/grub/\${grub_cpu}-\${grub_platform}\" ] ; then + prefix=\"(\${cmdroot})/boot/grub\" + root=\"\${cmdroot}\" fi -done -unset f -echo \"\\ - prefix: \${prefix} -\" +fi +unset cmdroot function set_init { data_uuid='${DATA}' search --no-floppy --set data \\ --fs-uuid \"\${data_uuid}\" # - search --no-floppy --set esp \\ - --fs-uuid '${ESP}' - if [ \"\${esp}\" ] ; then - env=\"(\${esp})/grub.env\" - live=\"(\${esp})/${PROJECT}/live\" - # - for file in \${live}/source/*.sh ; do - source \"\${file}\" - done - unset file - fi + unset esp + regexp --set esp '^\((.*)\)' \"\${prefix}\" + env=\"(\${esp})/grub.env\" + live=\"(\${esp})/${PROJECT}/live\" + # + for file in \${live}/source/*.sh ; do + source \"\${file}\" + done + unset file } function normal_init { check_signatures='no' - # set_init - if [ \"\${esp}\" ] ; then - prefix=\"(\${esp})/boot/grub\" - root=\"\${esp}\" - fi } normal_init -echo 'main.sh ↓' source \"\${live}/main.sh\" -echo 'main.sh ↑' -echo -n ' -grub.cfg ↑ ' -sleep --interruptible --verbose 60 +echo ' *' +list_vars +echo -n \"\\ + --- + escape | \" +sleep --interruptible --verbose 1000 " > "${GRUB_CFG}" # grub / env ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ diff --git a/live/source/boot.sh b/live/source/boot.sh index 31ee22c..34b713b 100644 --- a/live/source/boot.sh +++ b/live/source/boot.sh @@ -9,6 +9,9 @@ function debsquash { initrd_path="(squash)/initrd.img" loopback "squash" "${lmp}/${sfs}" fi + # + echo 'linux' + echo "${linux_path}" linux \ "${linux_path}" \ boot="live" \ @@ -17,5 +20,10 @@ ip="frommedia" \ live-media-path="${lmp}" \ live-media-uuid="${data_uuid}" \ toram="${sfs}" + # + echo + # + echo 'initrd' + echo "${initrd_path}" initrd "${initrd_path}" }