mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
Tweaks to allow qubes install w/o custom script
usb-boot automatically uses internal xen binary / command line when multiboot is detected. also tweaked to evaluate/remove variable refs in kexec arguments
This commit is contained in:
parent
1f8eaa696e
commit
76a20288a3
@ -33,6 +33,7 @@ adjust_cmd_line() {
|
||||
fi
|
||||
}
|
||||
|
||||
first_module=y
|
||||
while read line
|
||||
do
|
||||
key=`echo $line | cut -d\ -f1`
|
||||
@ -40,16 +41,23 @@ do
|
||||
restval=`echo $line | cut -d\ -f3-`
|
||||
if [ "$key" = "kernel" ]; then
|
||||
fix_file_path
|
||||
kexeccmd="$kexeccmd -l $filepath"
|
||||
if [ "$kexectype" = "multiboot" ]; then
|
||||
cmdline="$restval"
|
||||
adjust_cmd_line
|
||||
kexeccmd="$kexeccmd --command-line \"$cmdline\""
|
||||
# always overload xen and with custom arguments
|
||||
# TODO: control this replacement via flag
|
||||
kexeccmd="$kexeccmd -l /bin/xen.gz"
|
||||
kexeccmd="$kexeccmd --command-line \"no-real-mode reboot=no\""
|
||||
else
|
||||
kexeccmd="$kexeccmd -l $filepath"
|
||||
fi
|
||||
fi
|
||||
if [ "$key" = "module" ]; then
|
||||
fix_file_path
|
||||
kexeccmd="$kexeccmd --module \"$filepath $restval\""
|
||||
cmdline="$restval"
|
||||
if [ -n $first_module ]; then
|
||||
adjust_cmd_line
|
||||
unset first_module
|
||||
fi
|
||||
kexeccmd="$kexeccmd --module \"$filepath $cmdline\""
|
||||
fi
|
||||
if [ "$key" = "initrd" ]; then
|
||||
fix_file_path
|
||||
|
@ -15,14 +15,16 @@ echo_entry() {
|
||||
if [ "$kexectype" = "elf" ]; then
|
||||
if [ -z "$kernel" ]; then return; fi
|
||||
|
||||
entry="$name|$kexectype|kernel $kernel|initrd $initrd"
|
||||
entry="$name|$kexectype|kernel $kernel"
|
||||
if [ -n "$initrd" ]; then entry="$entry|initrd $initrd"; fi
|
||||
if [ -n "$append" ]; then entry="$entry|append $append"; fi
|
||||
echo "$entry"
|
||||
|
||||
echo $(eval "echo \"$entry\"")
|
||||
fi
|
||||
if [ "$kexectype" = "multiboot" ]; then
|
||||
if [ -z "$kernel" ]; then return; fi
|
||||
|
||||
echo "$name|$kexectype|kernel $kernel$modules"
|
||||
echo $(eval "echo \"$name|$kexectype|kernel $kernel$modules\"")
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user