@@ -324,7 +324,7 @@ remove() {
324324 if [[ -f ${_file} ]]; then
325325 msg_debug " Removeing ${_file} "
326326 rm -f " ${_file} "
327- elif [[ -d ${_file} ]]; then
327+ elif [[ -d ${_file} ]]; then
328328 msg_debug " Removeing ${_file} "
329329 rm -rf " ${_file} "
330330 fi
@@ -1009,7 +1009,7 @@ make_customize_airootfs() {
10091009
10101010 # /root permission
10111011 # https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59
1012- chmod -f 750 " ${work_dir} /x86_64 /airootfs/root"
1012+ chmod -f 750 " ${work_dir} /${arch} /airootfs/root"
10131013}
10141014
10151015# Copy mkinitcpio archiso hooks and build initramfs (airootfs)
@@ -1072,16 +1072,17 @@ make_syslinux() {
10721072
10731073 # 一時ディレクトリに設定ファイルをコピー
10741074 mkdir -p " ${work_dir} /${arch} /syslinux/"
1075- cp -a " ${script_path} /syslinux/${arch} / " * " $work_dir /${arch} /syslinux/"
1075+ cp -a " ${script_path} /syslinux/" * " ${ work_dir} /${arch} /syslinux/"
10761076 if [[ -d " ${script_path} /channels/${channel_name} /syslinux.${arch} " ]] && [[ " ${customized_syslinux} " = true ]]; then
1077- cp -af " ${script_path} /channels/${channel_name} /syslinux.${arch} /" * " $work_dir /${arch} /syslinux/"
1077+ cp -af " ${script_path} /channels/${channel_name} /syslinux.${arch} /" * " ${ work_dir} /${arch} /syslinux/"
10781078 fi
10791079
10801080 # copy all syslinux config to work dir
1081- for _cfg in $work_dir /${arch} /syslinux/* .cfg; do
1081+ for _cfg in ${ work_dir} /${arch} /syslinux/* .cfg; do
10821082 sed " s|%ARCHISO_LABEL%|${iso_label} |g;
10831083 s|%OS_NAME%|${os_name} |g;
10841084 s|%KERNEL_FILENAME%|${kernel_filename} |g;
1085+ s|%ARCH%|${arch} |g;
10851086 s|%INSTALL_DIR%|${install_dir} |g" " ${_cfg} " > " ${work_dir} /iso/${install_dir} /boot/syslinux/${_cfg##*/ } "
10861087 done
10871088
@@ -1103,7 +1104,7 @@ make_syslinux() {
11031104 if [[ -f " ${script_path} /channels/${channel_name} /splash.png" ]]; then
11041105 cp " ${script_path} /channels/${channel_name} /splash.png" " ${work_dir} /iso/${install_dir} /boot/syslinux"
11051106 else
1106- cp " ${script_path} /syslinux/${arch} / splash.png" " ${work_dir} /iso/${install_dir} /boot/syslinux"
1107+ cp " ${script_path} /syslinux/splash.png" " ${work_dir} /iso/${install_dir} /boot/syslinux"
11071108 fi
11081109
11091110 # copy files
@@ -1129,20 +1130,29 @@ make_isolinux() {
11291130# Prepare /EFI
11301131make_efi () {
11311132 mkdir -p " ${work_dir} /iso/EFI/boot"
1132- cp " ${work_dir} /${arch} /airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" " ${work_dir} /iso/EFI/boot/bootx64.efi"
1133+ # cp "${work_dir}/${arch}/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" "${work_dir}/iso/EFI/boot/bootx64.efi"
1134+
1135+ (
1136+ local __bootfile=" $( basename " $( ls " ${work_dir} /${arch} /airootfs/usr/lib/systemd/boot/efi/systemd-boot" * " .efi" ) " ) "
1137+ cp " ${work_dir} /${arch} /airootfs/usr/lib/systemd/boot/efi/${__bootfile} " " ${work_dir} /iso/EFI/boot/${__bootfile# systemd-} "
1138+ )
11331139
11341140 mkdir -p " ${work_dir} /iso/loader/entries"
1135- cp " ${script_path} /efiboot/loader/loader.conf" " ${work_dir} /iso/loader/"
1141+ # cp "${script_path}/efiboot/loader/loader.conf" "${work_dir}/iso/loader/"
1142+ sed " s|%ARCH%|${arch} |g;" " ${script_path} /efiboot/loader/loader.conf" > " ${work_dir} /iso/loader/loader.conf"
11361143
11371144 sed " s|%ARCHISO_LABEL%|${iso_label} |g;
11381145 s|%OS_NAME%|${os_name} |g;
11391146 s|%KERNEL_FILENAME%|${kernel_filename} |g;
1147+ s|%ARCH%|${arch} |g;
11401148 s|%INSTALL_DIR%|${install_dir} |g" \
1141- " ${script_path} /efiboot/loader/entries/archiso-x86_64- usb.conf" > " ${work_dir} /iso/loader/entries/archiso-x86_64 .conf"
1149+ " ${script_path} /efiboot/loader/entries/archiso-usb.conf" > " ${work_dir} /iso/loader/entries/archiso-${arch} -usb .conf"
11421150
11431151 # edk2-shell based UEFI shell
11441152 # shellx64.efi is picked up automatically when on /
1145- cp " ${work_dir} /x86_64/airootfs/usr/share/edk2-shell/x64/Shell_Full.efi" " ${work_dir} /iso/shellx64.efi"
1153+ if [[ " ${arch} " == " x86_64" ]]; then
1154+ cp " ${work_dir} /${arch} /airootfs/usr/share/edk2-shell/x64/Shell_Full.efi" " ${work_dir} /iso/shellx64.efi"
1155+ fi
11461156}
11471157
11481158# Prepare efiboot.img::/EFI for "El Torito" EFI boot mode
@@ -1163,7 +1173,11 @@ make_efiboot() {
11631173 cp " ${work_dir} /iso/${install_dir} /boot/amd_ucode.img" " ${work_dir} /efiboot/EFI/archiso/amd_ucode.img"
11641174
11651175 mkdir -p " ${work_dir} /efiboot/EFI/boot"
1166- cp " ${work_dir} /${arch} /airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" " ${work_dir} /efiboot/EFI/boot/bootx64.efi"
1176+ # cp "${work_dir}/${arch}/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi" "${work_dir}/efiboot/EFI/boot/bootx64.efi"
1177+ (
1178+ local __bootfile=" $( basename " $( ls " ${work_dir} /${arch} /airootfs/usr/lib/systemd/boot/efi/systemd-boot" * " .efi" ) " ) "
1179+ cp " ${work_dir} /${arch} /airootfs/usr/lib/systemd/boot/efi/${__bootfile} " " ${work_dir} /iso/EFI/boot/${__bootfile# systemd-} "
1180+ )
11671181
11681182 mkdir -p " ${work_dir} /efiboot/loader/entries"
11691183 cp " ${script_path} /efiboot/loader/loader.conf" " ${work_dir} /efiboot/loader/"
@@ -1172,11 +1186,14 @@ make_efiboot() {
11721186 sed " s|%ARCHISO_LABEL%|${iso_label} |g;
11731187 s|%OS_NAME%|${os_name} |g;
11741188 s|%KERNEL_FILENAME%|${kernel_filename} |g;
1189+ s|%ARCH%|${arch} |g;
11751190 s|%INSTALL_DIR%|${install_dir} |g" \
1176- " ${script_path} /efiboot/loader/entries/archiso-x86_64- cd.conf" > " ${work_dir} /efiboot/loader/entries/archiso-x86_64 .conf"
1191+ " ${script_path} /efiboot/loader/entries/archiso-cd.conf" > " ${work_dir} /efiboot/loader/entries/archiso-${arch} .conf"
11771192
11781193 # shellx64.efi is picked up automatically when on /
1179- cp " ${work_dir} /iso/shellx64.efi" " ${work_dir} /efiboot/"
1194+ if [[ " ${arch} " == " x86_64" ]]; then
1195+ cp " ${work_dir} /iso/shellx64.efi" " ${work_dir} /efiboot/"
1196+ fi
11801197
11811198 umount -d " ${work_dir} /efiboot"
11821199}
@@ -1536,7 +1553,7 @@ show_settings
15361553run_once make_pacman_conf
15371554run_once make_basefs
15381555run_once make_packages
1539- run_once make_packages_file
1556+ # run_once make_packages_file
15401557[[ " ${noaur} " = false ]] && run_once make_packages_aur
15411558run_once make_customize_airootfs
15421559run_once make_setup_mkinitcpio
0 commit comments