|
16 | 16 |
|
17 | 17 | # Internal config |
18 | 18 | # Do not change these values. |
19 | | -script_path="$(readlink -f ${0%/*})" |
| 19 | +script_path="$( cd -P "$( dirname "$(readlink -f "$0")" )" && pwd )" |
20 | 20 | defaultconfig="${script_path}/default.conf" |
21 | 21 | rebuild=false |
22 | 22 | customized_username=false |
@@ -638,11 +638,9 @@ make_pacman_conf() { |
638 | 638 | sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${build_pacman_conf} > "${work_dir}/pacman-${arch}.conf" |
639 | 639 | } |
640 | 640 |
|
641 | | -# Base installation, plus needed packages (airootfs) |
| 641 | +# Base installation (airootfs) |
642 | 642 | make_basefs() { |
643 | 643 | ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" init |
644 | | - # ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "haveged intel-ucode amd-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh efitools" install |
645 | | - ${mkalteriso} ${mkalteriso_option} -w "${work_dir}/${arch}" -C "${work_dir}/pacman-${arch}.conf" -D "${install_dir}" -p "bash haveged intel-ucode amd-ucode mkinitcpio-nfs-utils nbd" install |
646 | 644 |
|
647 | 645 | # Install plymouth. |
648 | 646 | if [[ "${boot_splash}" = true ]]; then |
@@ -910,6 +908,10 @@ make_customize_airootfs() { |
910 | 908 | # Delete customize_airootfs.sh. |
911 | 909 | remove "${work_dir}/${arch}/airootfs/root/customize_airootfs.sh" |
912 | 910 | remove "${work_dir}/${arch}/airootfs/root/customize_airootfs_${channel_name}.sh" |
| 911 | + |
| 912 | + # /root permission |
| 913 | + # https://github.com/archlinux/archiso/commit/d39e2ba41bf556674501062742190c29ee11cd59 |
| 914 | + chmod -f 750 "${work_dir}/x86_64/airootfs/root" |
913 | 915 | } |
914 | 916 |
|
915 | 917 | # Copy mkinitcpio archiso hooks and build initramfs (airootfs) |
@@ -960,10 +962,18 @@ make_boot() { |
960 | 962 |
|
961 | 963 | # Add other aditional/extra files to ${install_dir}/boot/ |
962 | 964 | make_boot_extra() { |
963 | | - cp "${work_dir}/${arch}/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img" |
964 | | - cp "${work_dir}/${arch}/airootfs/usr/share/licenses/intel-ucode/LICENSE" "${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE" |
965 | | - cp "${work_dir}/${arch}/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img" |
966 | | - cp "${work_dir}/${arch}/airootfs/usr/share/licenses/amd-ucode/LICENSE.amd-ucode" "${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE" |
| 965 | + if [[ -e "${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.bin" ]]; then |
| 966 | + cp "${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.bin" "${work_dir}/iso/${install_dir}/boot/memtest" |
| 967 | + cp "${work_dir}/${arch}/airootfs/usr/share/licenses/common/GPL2/license.txt" "${work_dir}/iso/${install_dir}/boot/memtest.COPYING" |
| 968 | + fi |
| 969 | + if [[ -e "${work_dir}/${arch}/airootfs/boot/intel-ucode.img" ]]; then |
| 970 | + cp "${work_dir}/${arch}/airootfs/boot/intel-ucode.img" "${work_dir}/iso/${install_dir}/boot/intel_ucode.img" |
| 971 | + cp "${work_dir}/${arch}/airootfs/usr/share/licenses/intel-ucode/LICENSE" "${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE" |
| 972 | + fi |
| 973 | + if [[ -e "${work_dir}/${arch}/airootfs/boot/amd-ucode.img" ]]; then |
| 974 | + cp "${work_dir}/${arch}/airootfs/boot/amd-ucode.img" "${work_dir}/iso/${install_dir}/boot/amd_ucode.img" |
| 975 | + cp "${work_dir}/${arch}/airootfs/usr/share/licenses/amd-ucode/LICENSE" "${work_dir}/iso/${install_dir}/boot/amd_ucode.LICENSE" |
| 976 | + fi |
967 | 977 | } |
968 | 978 |
|
969 | 979 | # Prepare /${install_dir}/boot/syslinux |
@@ -1042,7 +1052,7 @@ make_efi() { |
1042 | 1052 |
|
1043 | 1053 | # edk2-shell based UEFI shell |
1044 | 1054 | # shellx64.efi is picked up automatically when on / |
1045 | | - cp "/usr/share/edk2-shell/x64/Shell_Full.efi" "${work_dir}/iso/shellx64.efi" |
| 1055 | + cp "${work_dir}/x86_64/airootfs/usr/share/edk2-shell/x64/Shell_Full.efi" "${work_dir}/iso/shellx64.efi" |
1046 | 1056 | } |
1047 | 1057 |
|
1048 | 1058 | # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode |
|
0 commit comments