Skip to content

Commit 88cbf61

Browse files
committed
Merge branch 'move-syslinux' into dev
2 parents 3efd091 + 8bc596b commit 88cbf61

13 files changed

+86
-93
lines changed

build.sh

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,9 @@ make_boot() {
731731
# Add other aditional/extra files to ${install_dir}/boot/
732732
make_boot_extra() {
733733
if [[ -e "${airootfs_dir}/boot/memtest86+/memtest.bin" ]]; then
734-
cp "${airootfs_dir}/boot/memtest86+/memtest.bin" "${isofs_dir}/${install_dir}/boot/memtest"
735-
cp "${airootfs_dir}/usr/share/licenses/common/GPL2/license.txt" "${isofs_dir}/${install_dir}/boot/memtest.COPYING"
734+
install -m 0644 -- "${airootfs_dir}/boot/memtest86+/memtest.bin" "${isofs_dir}/${install_dir}/boot/memtest"
735+
install -d -m 0755 -- "${isofs_dir}/${install_dir}/boot/licenses/memtest86+/"
736+
install -m 0644 -- "${airootfs_dir}/usr/share/licenses/common/GPL2/license.txt" "${isofs_dir}/${install_dir}/boot/licenses/memtest86+/"
736737
fi
737738

738739
local _ucode_image
@@ -753,7 +754,7 @@ make_boot_extra() {
753754
# Prepare /${install_dir}/boot/syslinux
754755
make_syslinux() {
755756
_uname_r="$(file -b ${airootfs_dir}/boot/${kernel_filename} | awk 'f{print;f=0} /version/{f=1}' RS=' ')"
756-
mkdir -p "${isofs_dir}/${install_dir}/boot/syslinux"
757+
mkdir -p "${isofs_dir}/syslinux"
757758

758759
# 一時ディレクトリに設定ファイルをコピー
759760
mkdir -p "${work_dir}/${arch}/syslinux/"
@@ -768,7 +769,7 @@ make_syslinux() {
768769
s|%OS_NAME%|${os_name}|g;
769770
s|%KERNEL_FILENAME%|${kernel_filename}|g;
770771
s|%ARCH%|${arch}|g;
771-
s|%INSTALL_DIR%|${install_dir}|g" "${_cfg}" > "${isofs_dir}/${install_dir}/boot/syslinux/${_cfg##*/}"
772+
s|%INSTALL_DIR%|${install_dir}|g" "${_cfg}" > "${isofs_dir}/syslinux/${_cfg##*/}"
772773
done
773774

774775
# Replace the SYSLINUX configuration file with or without boot splash.
@@ -781,49 +782,48 @@ make_syslinux() {
781782
_no_use_config_name=splash
782783
fi
783784
for _pxe_or_sys in "sys" "pxe"; do
784-
remove "${isofs_dir}/${install_dir}/boot/syslinux/archiso_${_pxe_or_sys}_${_no_use_config_name}.cfg"
785-
mv "${isofs_dir}/${install_dir}/boot/syslinux/archiso_${_pxe_or_sys}_${_use_config_name}.cfg" "${isofs_dir}/${install_dir}/boot/syslinux/archiso_${_pxe_or_sys}.cfg"
785+
remove "${isofs_dir}/syslinux/archiso_${_pxe_or_sys}_${_no_use_config_name}.cfg"
786+
mv "${isofs_dir}/syslinux/archiso_${_pxe_or_sys}_${_use_config_name}.cfg" "${isofs_dir}/syslinux/archiso_${_pxe_or_sys}.cfg"
786787
done
787788

788789
# Set syslinux wallpaper
789790
if [[ -f "${channel_dir}/splash.png" ]]; then
790-
cp "${channel_dir}/splash.png" "${isofs_dir}/${install_dir}/boot/syslinux"
791+
cp "${channel_dir}/splash.png" "${isofs_dir}/syslinux"
791792
else
792-
cp "${script_path}/syslinux/splash.png" "${isofs_dir}/${install_dir}/boot/syslinux"
793+
cp "${script_path}/syslinux/splash.png" "${isofs_dir}/syslinux"
793794
fi
794795

795796
# remove config
796797
local _remove_config
797798
function _remove_config() {
798-
remove "${isofs_dir}/${install_dir}/boot/syslinux/${1}"
799-
sed -i "s|$(cat "${isofs_dir}/${install_dir}/boot/syslinux/archiso_sys_load.cfg" | grep "${1}")||g" "${isofs_dir}/${install_dir}/boot/syslinux/archiso_sys_load.cfg"
799+
remove "${isofs_dir}/syslinux/${1}"
800+
sed -i "s|$(cat "${isofs_dir}/syslinux/archiso_sys_load.cfg" | grep "${1}")||g" "${isofs_dir}/syslinux/archiso_sys_load.cfg"
800801
}
801802

802-
if [[ "${norescue_entry}" = true ]]; then
803-
_remove_config archiso_sys_rescue.cfg
804-
fi
805-
806-
if [[ "${memtest86}" = false ]]; then
807-
_remove_config memtest86.cfg
808-
fi
803+
if [[ "${norescue_entry}" = true ]]; then _remove_config archiso_sys_rescue.cfg; fi
804+
if [[ "${memtest86}" = false ]]; then _remove_config memtest86.cfg; fi
809805

810806
# copy files
811-
cp "${work_dir}"/${arch}/airootfs/usr/lib/syslinux/bios/*.c32 "${isofs_dir}/${install_dir}/boot/syslinux"
812-
cp "${airootfs_dir}/usr/lib/syslinux/bios/lpxelinux.0" "${isofs_dir}/${install_dir}/boot/syslinux"
813-
cp "${airootfs_dir}/usr/lib/syslinux/bios/memdisk" "${isofs_dir}/${install_dir}/boot/syslinux"
814-
mkdir -p "${isofs_dir}/${install_dir}/boot/syslinux/hdt"
815-
gzip -c -9 "${airootfs_dir}/usr/share/hwdata/pci.ids" > "${isofs_dir}/${install_dir}/boot/syslinux/hdt/pciids.gz"
816-
gzip -c -9 "${airootfs_dir}/usr/lib/modules/${_uname_r}/modules.alias" > "${isofs_dir}/${install_dir}/boot/syslinux/hdt/modalias.gz"
807+
cp "${work_dir}"/${arch}/airootfs/usr/lib/syslinux/bios/*.c32 "${isofs_dir}/syslinux"
808+
cp "${airootfs_dir}/usr/lib/syslinux/bios/lpxelinux.0" "${isofs_dir}/syslinux"
809+
cp "${airootfs_dir}/usr/lib/syslinux/bios/memdisk" "${isofs_dir}/syslinux"
810+
811+
812+
if [[ -e "${isofs_dir}/syslinux/hdt.c32" ]]; then
813+
install -d -m 0755 -- "${isofs_dir}/syslinux/hdt"
814+
if [[ -e "${airootfs_dir}/usr/share/hwdata/pci.ids" ]]; then
815+
gzip -c -9 "${airootfs_dir}/usr/share/hwdata/pci.ids" > "${isofs_dir}/syslinux/hdt/pciids.gz"
816+
fi
817+
find "${airootfs_dir}/usr/lib/modules" -name 'modules.alias' -print -exec gzip -c -9 '{}' ';' -quit > "${isofs_dir}/syslinux/hdt/modalias.gz"
818+
fi
817819
}
818820

819821
# Prepare /isolinux
820822
make_isolinux() {
821-
mkdir -p "${isofs_dir}/isolinux"
822-
sed "s|%INSTALL_DIR%|${install_dir}|g" \
823-
"${script_path}/system/isolinux.cfg" > "${isofs_dir}/isolinux/isolinux.cfg"
824-
cp "${airootfs_dir}/usr/lib/syslinux/bios/isolinux.bin" "${isofs_dir}/isolinux/"
825-
cp "${airootfs_dir}/usr/lib/syslinux/bios/isohdpfx.bin" "${isofs_dir}/isolinux/"
826-
cp "${airootfs_dir}/usr/lib/syslinux/bios/ldlinux.c32" "${isofs_dir}/isolinux/"
823+
install -d -m 0755 -- "${isofs_dir}/syslinux"
824+
sed "s|%INSTALL_DIR%|${install_dir}|g" "${script_path}/system/isolinux.cfg" > "${isofs_dir}/syslinux/isolinux.cfg"
825+
install -m 0644 -- "${airootfs_dir}/usr/lib/syslinux/bios/isolinux.bin" "${isofs_dir}/syslinux/"
826+
install -m 0644 -- "${airootfs_dir}/usr/lib/syslinux/bios/isohdpfx.bin" "${isofs_dir}/syslinux/"
827827
}
828828

829829
# Prepare /EFI
@@ -1039,13 +1039,6 @@ make_overisofs() {
10391039
# Build ISO
10401040
make_iso() {
10411041
local _iso_efi_boot_args=""
1042-
if [[ ! -f "${work_dir}/iso/isolinux/isolinux.bin" ]]; then
1043-
_msg_error "The file '${work_dir}/iso/isolinux/isolinux.bin' does not exist." 1
1044-
fi
1045-
if [[ ! -f "${work_dir}/iso/isolinux/isohdpfx.bin" ]]; then
1046-
_msg_error "The file '${work_dir}/iso/isolinux/isohdpfx.bin' does not exist." 1
1047-
fi
1048-
10491042
# If exists, add an EFI "El Torito" boot image (FAT filesystem) to ISO-9660 image.
10501043
if [[ -f "${work_dir}/iso/EFI/alteriso/efiboot.img" ]]; then
10511044
_iso_efi_boot_args="-eltorito-alt-boot -e EFI/alteriso/efiboot.img -no-emul-boot -isohybrid-gpt-basdat"
@@ -1063,10 +1056,10 @@ make_iso() {
10631056
-appid "${iso_application}" \
10641057
-publisher "${iso_publisher}" \
10651058
-preparer "prepared by AlterISO" \
1066-
-eltorito-boot isolinux/isolinux.bin \
1067-
-eltorito-catalog isolinux/boot.cat \
1059+
-eltorito-boot syslinux/isolinux.bin \
1060+
-eltorito-catalog syslinux/boot.cat \
10681061
-no-emul-boot -boot-load-size 4 -boot-info-table \
1069-
-isohybrid-mbr ${work_dir}/iso/isolinux/isohdpfx.bin \
1062+
-isohybrid-mbr ${work_dir}/iso/syslinux/isohdpfx.bin \
10701063
${_iso_efi_boot_args} \
10711064
-output "${out_dir}/${iso_filename}" \
10721065
"${work_dir}/iso/"

syslinux/archiso.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
DEFAULT select
99

1010
LABEL select
11-
COM32 boot/syslinux/whichsys.c32
11+
COM32 syslinux/whichsys.c32
1212
APPEND -pxe- pxe -sys- sys -iso- sys
1313

1414
LABEL pxe
15-
CONFIG boot/syslinux/archiso_pxe_load.cfg
15+
CONFIG syslinux/archiso_pxe_load.cfg
1616

1717
LABEL sys
18-
CONFIG boot/syslinux/archiso_sys_load.cfg
18+
CONFIG syslinux/archiso_sys_load.cfg

syslinux/archiso_head.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#
77

88
SERIAL 0 38400
9-
UI boot/syslinux/vesamenu.c32
9+
UI syslinux/vesamenu.c32
1010
MENU TITLE %OS_NAME%
11-
MENU BACKGROUND boot/syslinux/splash.png
11+
MENU BACKGROUND syslinux/splash.png
1212

1313
MENU WIDTH 78
1414
MENU MARGIN 4

syslinux/archiso_pxe_load.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# (c) 2019-2021 Fascode Network.
66
#
77

8-
INCLUDE boot/syslinux/archiso_head.cfg
8+
INCLUDE syslinux/archiso_head.cfg
99

10-
INCLUDE boot/syslinux/archiso_pxe.cfg
10+
INCLUDE syslinux/archiso_pxe.cfg
1111

12-
INCLUDE boot/syslinux/archiso_tail.cfg
12+
INCLUDE syslinux/archiso_tail.cfg

syslinux/archiso_pxe_nosplash.cfg

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@
55
# (c) 2019-2021 Fascode Network.
66
#
77

8-
LABEL arch_%ARCH%_nbd
8+
LABEL alter_%ARCH%_nbd
99
TEXT HELP
1010
Boot the %OS_NAME% (%ARCH%) live medium (Using NBD).
1111
It allows you to install %OS_NAME% or perform system maintenance.
1212
ENDTEXT
1313
MENU LABEL Boot %OS_NAME% (%ARCH%) (NBD)
14-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
15-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
14+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
15+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
1616
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} checksum verify
1717
SYSAPPEND 3
1818

19-
LABEL arch_%ARCH%_nfs
19+
LABEL alter_%ARCH%_nfs
2020
TEXT HELP
2121
Boot the %OS_NAME% (%ARCH%) live medium (Using NFS).
2222
It allows you to install %OS_NAME% or perform system maintenance.
2323
ENDTEXT
2424
MENU LABEL Boot %OS_NAME% (%ARCH%) (NFS)
25-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
26-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
25+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
26+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
2727
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt checksum verify
2828
SYSAPPEND 3
2929

30-
LABEL arch_%ARCH%_http
30+
LABEL alter_%ARCH%_http
3131
TEXT HELP
3232
Boot the %OS_NAME% (%ARCH%) live medium (Using HTTP).
3333
It allows you to install %OS_NAME% or perform system maintenance.
3434
ENDTEXT
3535
MENU LABEL Boot %OS_NAME% (%ARCH%) (HTTP)
36-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
37-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
36+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
37+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
3838
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ checksum verify
3939
SYSAPPEND 3

syslinux/archiso_pxe_splash.cfg

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@
55
# (c) 2019-2021 Fascode Network.
66
#
77

8-
LABEL arch_%ARCH%_nbd
8+
LABEL alter_%ARCH%_nbd
99
TEXT HELP
1010
Boot the %OS_NAME% (%ARCH%) live medium (Using NBD).
1111
It allows you to install %OS_NAME% or perform system maintenance.
1212
ENDTEXT
1313
MENU LABEL Boot %OS_NAME% (%ARCH%) (NBD)
14-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
15-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
14+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
15+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
1616
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} loglevel=3 quiet splash udev.log-priority=3 checksum verify
1717
SYSAPPEND 3
1818

19-
LABEL arch_%ARCH%_nfs
19+
LABEL alter_%ARCH%_nfs
2020
TEXT HELP
2121
Boot the %OS_NAME% (%ARCH%) live medium (Using NFS).
2222
It allows you to install %OS_NAME% or perform system maintenance.
2323
ENDTEXT
2424
MENU LABEL Boot %OS_NAME% (%ARCH%) (NFS)
25-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
26-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
25+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
26+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
2727
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt loglevel=3 quiet splash udev.log-priority=3 checksum verify
2828
SYSAPPEND 3
2929

30-
LABEL arch_%ARCH%_http
30+
LABEL alter_%ARCH%_http
3131
TEXT HELP
3232
Boot the %OS_NAME% (%ARCH%) live medium (Using HTTP).
3333
It allows you to install %OS_NAME% or perform system maintenance.
3434
ENDTEXT
3535
MENU LABEL Boot %OS_NAME% (%ARCH%) (HTTP)
36-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
37-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
36+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
37+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
3838
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ loglevel=3 quiet splash udev.log-priority=3 checksum verify
3939
SYSAPPEND 3

syslinux/archiso_select.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# (c) 2019-2021 Fascode Network.
66
#
77

8-
DEFAULT arch_%ARCH%
8+
DEFAULT alter_%ARCH%
99
TIMEOUT 100

syslinux/archiso_sys_load.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
# (c) 2019-2021 Fascode Network.
66
#
77

8-
INCLUDE boot/syslinux/archiso_head.cfg
8+
INCLUDE syslinux/archiso_head.cfg
99

10-
INCLUDE boot/syslinux/archiso_select.cfg
10+
INCLUDE syslinux/archiso_select.cfg
1111

12-
INCLUDE boot/syslinux/archiso_sys.cfg
12+
INCLUDE syslinux/archiso_sys.cfg
1313

14-
INCLUDE boot/syslinux/archiso_sys_rescue.cfg
14+
INCLUDE syslinux/archiso_sys_rescue.cfg
1515

16-
INCLUDE boot/syslinux/memtest86.cfg
16+
INCLUDE syslinux/memtest86.cfg
1717

18-
INCLUDE boot/syslinux/archiso_tail.cfg
18+
INCLUDE syslinux/archiso_tail.cfg

syslinux/archiso_sys_nosplash.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
# (c) 2019-2021 Fascode Network.
66
#
77

8-
LABEL arch_%ARCH%
8+
LABEL alter_%ARCH%
99
TEXT HELP
1010
Boot the %OS_NAME% (%ARCH%) live medium.
1111
It allows you to install %OS_NAME% or perform system maintenance.
1212
ENDTEXT
1313
MENU LABEL Boot %OS_NAME% (%ARCH%)
14-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
15-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
14+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
15+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
1616
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%

syslinux/archiso_sys_rescue.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Disable KMS. Try it if you are having problems with graphics.
1111
Specifically, add nomodeset to the kernel parameters.
1212
ENDTEXT
1313
MENU LABEL Boot %OS_NAME% (%ARCH%) with safe graphics
14-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
15-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
14+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
15+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
1616
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% nomodeset
1717

1818
LABEL rescue
@@ -21,6 +21,6 @@ Start with minimal of prompts. do not use systemd.
2121
Please use it in the environment where GUI cannot be started.
2222
ENDTEXT
2323
MENU LABEL Boot %OS_NAME% (%ARCH%) without GUI
24-
LINUX boot/%ARCH%/%KERNEL_FILENAME%
25-
INITRD boot/intel-ucode.img,boot/amd-ucode.img,boot/%ARCH%/archiso.img
24+
LINUX /%INSTALL_DIR%/boot/%ARCH%/%KERNEL_FILENAME%
25+
INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/%ARCH%/archiso.img
2626
APPEND arch=%ARCH% archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% systemd.unit=multi-user.target nomodeset

0 commit comments

Comments
 (0)