[configs/releng] Make all syslinux bootloaders works with the sames configs.

* In that way, we have unified directory scheme among {pxe,sys,ext,iso}linux,
  sharing the same directory structure and config files.
* Also enable IPAPPEND (will show a warning message about unknown directive in non-pxelinux before menu)

NEW:
* Rename syslinux*.cfg -> archiso*.cfg
* Now syslinux.cfg is only a "loadconfig" trick like we are doing for isolinux
* All paths are now relative to %INSTALL_DIR% ($archisobasedir) (Default: /arch/)

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2011-11-28 12:28:03 -03:00
parent 8bd067461d
commit 0411fc90bb
14 changed files with 118 additions and 109 deletions

View File

@ -60,9 +60,11 @@ make_syslinux() {
local _src_syslinux=${work_dir}/root-image/usr/lib/syslinux local _src_syslinux=${work_dir}/root-image/usr/lib/syslinux
local _dst_syslinux=${work_dir}/iso/${install_dir}/boot/syslinux local _dst_syslinux=${work_dir}/iso/${install_dir}/boot/syslinux
mkdir -p ${_dst_syslinux} mkdir -p ${_dst_syslinux}
for _cfg in ${script_path}/syslinux/*.cfg; do
sed "s|%ARCHISO_LABEL%|${iso_label}|g; sed "s|%ARCHISO_LABEL%|${iso_label}|g;
s|%INSTALL_DIR%|${install_dir}|g; s|%INSTALL_DIR%|${install_dir}|g;
s|%ARCH%|${arch}|g" ${script_path}/syslinux/syslinux.cfg > ${_dst_syslinux}/syslinux.cfg s|%ARCH%|${arch}|g" ${_cfg} > ${_dst_syslinux}/${_cfg##*/}
done
cp ${script_path}/syslinux/splash.png ${_dst_syslinux} cp ${script_path}/syslinux/splash.png ${_dst_syslinux}
cp ${_src_syslinux}/*.c32 ${_dst_syslinux} cp ${_src_syslinux}/*.c32 ${_dst_syslinux}
cp ${_src_syslinux}/*.com ${_dst_syslinux} cp ${_src_syslinux}/*.com ${_dst_syslinux}
@ -188,7 +190,7 @@ make_dual() {
cp -a -l -f ${_src_one} ${work_dir}/dual cp -a -l -f ${_src_one} ${work_dir}/dual
cp -a -l -n ${_src_two} ${work_dir}/dual cp -a -l -n ${_src_two} ${work_dir}/dual
rm -f ${work_dir}/dual/iso/${install_dir}/aitab rm -f ${work_dir}/dual/iso/${install_dir}/aitab
rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/syslinux.cfg rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/*.cfg
if [[ ${_iso_type} == "core" ]]; then if [[ ${_iso_type} == "core" ]]; then
if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs || if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs ||
! -e ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs || ! -e ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs ||

View File

@ -1,5 +1,5 @@
DEFAULT loadconfig DEFAULT loadconfig
LABEL loadconfig LABEL loadconfig
CONFIG /%INSTALL_DIR%/boot/syslinux/syslinux.cfg CONFIG /%INSTALL_DIR%/boot/syslinux/archiso.cfg
APPEND /%INSTALL_DIR%/boot/syslinux/ APPEND /%INSTALL_DIR%/

View File

@ -0,0 +1,12 @@
DEFAULT choose
PROMPT 0
LABEL choose
KERNEL boot/syslinux/ifcpu64.c32
APPEND have64 -- nohave64
LABEL have64
CONFIG boot/syslinux/archiso_both.cfg
LABEL nohave64
CONFIG boot/syslinux/archiso_32only.cfg

View File

@ -0,0 +1,3 @@
INCLUDE boot/syslinux/archiso_head.cfg
INCLUDE boot/syslinux/archiso_arch32.cfg
INCLUDE boot/syslinux/archiso_tail.cfg

View File

@ -4,8 +4,7 @@ Boot the Arch Linux (i686) live medium. It allows you to install Arch Linux or
perform system maintenance. perform system maintenance.
ENDTEXT ENDTEXT
MENU LABEL Boot Arch Linux (i686) MENU LABEL Boot Arch Linux (i686)
LINUX /%INSTALL_DIR%/boot/i686/vmlinuz LINUX boot/i686/vmlinuz
INITRD /%INSTALL_DIR%/boot/i686/archiso.img INITRD boot/i686/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
# Next line should be uncommented when prepare enviroment to boot from PXE. IPAPPEND 3
#IPAPPEND 3

View File

@ -4,8 +4,7 @@ Boot the Arch Linux (x86_64) live medium. It allows you to install Arch Linux or
perform system maintenance. perform system maintenance.
ENDTEXT ENDTEXT
MENU LABEL Boot Arch Linux (x86_64) MENU LABEL Boot Arch Linux (x86_64)
LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz LINUX boot/x86_64/vmlinuz
INITRD /%INSTALL_DIR%/boot/x86_64/archiso.img INITRD boot/x86_64/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
# Next line should be uncommented when prepare enviroment to boot from PXE. IPAPPEND 3
#IPAPPEND 3

View File

@ -0,0 +1,4 @@
INCLUDE boot/syslinux/archiso_head.cfg
INCLUDE boot/syslinux/archiso_arch32.cfg
INCLUDE boot/syslinux/archiso_arch64.cfg
INCLUDE boot/syslinux/archiso_tail.cfg

View File

@ -1,8 +1,8 @@
SERIAL 0 38400 SERIAL 0 38400
DEFAULT vesamenu.c32 DEFAULT boot/syslinux/vesamenu.c32
PROMPT 0 PROMPT 0
MENU TITLE Arch Linux MENU TITLE Arch Linux
MENU BACKGROUND splash.png MENU BACKGROUND boot/syslinux/splash.png
TIMEOUT 3000 TIMEOUT 3000
MENU WIDTH 78 MENU WIDTH 78

View File

@ -4,26 +4,26 @@ Boot an existing operating system. Press TAB to edit the disk and partition
number to boot. number to boot.
ENDTEXT ENDTEXT
MENU LABEL Boot existing OS MENU LABEL Boot existing OS
COM32 chain.c32 COM32 boot/syslinux/chain.c32
APPEND hd0 0 APPEND hd0 0
# http://www.memtest.org/ # http://www.memtest.org/
LABEL memtest LABEL memtest
MENU LABEL Run Memtest86+ (RAM test) MENU LABEL Run Memtest86+ (RAM test)
LINUX /%INSTALL_DIR%/boot/memtest LINUX boot/memtest
# http://hdt-project.org/ # http://hdt-project.org/
LABEL hdt LABEL hdt
MENU LABEL Hardware Information (HDT) MENU LABEL Hardware Information (HDT)
COM32 hdt.c32 COM32 boot/syslinux/hdt.c32
APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz APPEND modules_alias=boot/syslinux/hdt/modalias.gz pciids=boot/syslinux/hdt/pciids.gz
LABEL reboot LABEL reboot
MENU LABEL Reboot MENU LABEL Reboot
COM32 reboot.c32 COM32 boot/syslinux/reboot.c32
LABEL poweroff LABEL poweroff
MENU LABEL Power Off MENU LABEL Power Off
COMBOOT poweroff.com COMBOOT boot/syslinux/poweroff.com
ONTIMEOUT arch32 ONTIMEOUT arch32

View File

@ -1,12 +1,5 @@
DEFAULT choose DEFAULT loadconfig
PROMPT 0
LABEL choose LABEL loadconfig
KERNEL ifcpu64.c32 CONFIG /%INSTALL_DIR%/boot/syslinux/archiso.cfg
APPEND have64 -- nohave64 APPEND /%INSTALL_DIR%/
LABEL have64
CONFIG syslinux_both.cfg
LABEL nohave64
CONFIG syslinux_32only.cfg

View File

@ -1,3 +0,0 @@
INCLUDE syslinux_head.cfg
INCLUDE syslinux_arch32.cfg
INCLUDE syslinux_tail.cfg

View File

@ -1,4 +0,0 @@
INCLUDE syslinux_head.cfg
INCLUDE syslinux_arch32.cfg
INCLUDE syslinux_arch64.cfg
INCLUDE syslinux_tail.cfg

View File

@ -0,0 +1,69 @@
SERIAL 0 38400
DEFAULT boot/syslinux/vesamenu.c32
PROMPT 0
MENU TITLE Arch Linux
MENU BACKGROUND boot/syslinux/splash.png
TIMEOUT 3000
MENU WIDTH 78
MENU MARGIN 4
MENU ROWS 6
MENU VSHIFT 10
MENU TIMEOUTROW 13
MENU TABMSGROW 11
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
LABEL arch
TEXT HELP
Boot the Arch Linux live medium. It allows you to install Arch Linux or
perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux
LINUX boot/%ARCH%/vmlinuz
INITRD boot/%ARCH%/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
IPAPPEND 3
LABEL existing
TEXT HELP
Boot an existing operating system. Press TAB to edit the disk and partition
number to boot.
ENDTEXT
MENU LABEL Boot existing OS
COM32 boot/syslinux/chain.c32
APPEND hd0 0
# http://www.memtest.org/
LABEL memtest
MENU LABEL Run Memtest86+ (RAM test)
LINUX boot/memtest
# http://hdt-project.org/
LABEL hdt
MENU LABEL Hardware Information (HDT)
COM32 boot/syslinux/hdt.c32
APPEND modules_alias=boot/syslinux/hdt/modalias.gz pciids=boot/syslinux/hdt/pciids.gz
LABEL reboot
MENU LABEL Reboot
COM32 boot/syslinux/reboot.c32
LABEL poweroff
MENU LABEL Power Off
COMBOOT boot/syslinux/poweroff.com
ONTIMEOUT arch

View File

@ -1,70 +1,5 @@
SERIAL 0 38400 DEFAULT loadconfig
DEFAULT vesamenu.c32
PROMPT 0
MENU TITLE Arch Linux
MENU BACKGROUND splash.png
TIMEOUT 3000
MENU WIDTH 78 LABEL loadconfig
MENU MARGIN 4 CONFIG /%INSTALL_DIR%/boot/syslinux/archiso.cfg
MENU ROWS 6 APPEND /%INSTALL_DIR%/
MENU VSHIFT 10
MENU TIMEOUTROW 13
MENU TABMSGROW 11
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
LABEL arch
TEXT HELP
Boot the Arch Linux live medium. It allows you to install Arch Linux or
perform system maintenance.
ENDTEXT
MENU LABEL Boot Arch Linux
LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz
INITRD /%INSTALL_DIR%/boot/%ARCH%/archiso.img
APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
# Next line should be uncommented when prepare enviroment to boot from PXE.
#IPAPPEND 3
LABEL existing
TEXT HELP
Boot an existing operating system. Press TAB to edit the disk and partition
number to boot.
ENDTEXT
MENU LABEL Boot existing OS
COM32 chain.c32
APPEND hd0 0
# http://www.memtest.org/
LABEL memtest
MENU LABEL Run Memtest86+ (RAM test)
LINUX /%INSTALL_DIR%/boot/memtest
# http://hdt-project.org/
LABEL hdt
MENU LABEL Hardware Information (HDT)
COM32 hdt.c32
APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz
LABEL reboot
MENU LABEL Reboot
COM32 reboot.c32
LABEL poweroff
MENU LABEL Power Off
COMBOOT poweroff.com
ONTIMEOUT arch