Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/configs/baseline/build.sh
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2020-07-29 18:18:33 +0300
committernl6720 <nl6720@gmail.com>2020-07-29 18:19:42 +0300
commitff0c13f90c4e4ca922171a08f7344e86cd64fcd0 (patch)
tree26fcd7ef9834e89c1cc995620517bdb38eaec04e /configs/baseline/build.sh
parenta5886ad71ec821a37a96f4bef94002186359792d (diff)
Build initramfs images only once
Place custom mkinitcpio.conf in airootfs. Use a custom mkinitcpio preset to specify generated image file path.
Diffstat (limited to 'configs/baseline/build.sh')
-rwxr-xr-xconfigs/baseline/build.sh17
1 files changed, 5 insertions, 12 deletions
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh
index 92d1249..79cd34e 100755
--- a/configs/baseline/build.sh
+++ b/configs/baseline/build.sh
@@ -56,6 +56,11 @@ make_custom_airootfs() {
done < "${_airootfs}/etc/passwd"
fi
fi
+
+ mkdir -p -- "${work_dir}/airootfs/etc/initcpio/hooks"
+ mkdir -p -- "${work_dir}/airootfs/etc/initcpio/install"
+ cp /usr/lib/initcpio/hooks/archiso "${work_dir}/airootfs/etc/initcpio/hooks/"
+ cp /usr/lib/initcpio/install/archiso "${work_dir}/airootfs/etc/initcpio/install/"
}
# Packages (airootfs)
@@ -64,17 +69,6 @@ make_packages() {
-p "$(grep -h -v '^#' "${script_path}/packages.x86_64"| sed ':a;N;$!ba;s/\n/ /g')" install
}
-# Copy mkinitcpio archiso hooks and build initramfs (airootfs)
-make_setup_mkinitcpio() {
- mkdir -p "${work_dir}/airootfs/etc/initcpio/hooks"
- mkdir -p "${work_dir}/airootfs/etc/initcpio/install"
- cp /usr/lib/initcpio/hooks/archiso "${work_dir}/airootfs/etc/initcpio/hooks"
- cp /usr/lib/initcpio/install/archiso "${work_dir}/airootfs/etc/initcpio/install"
- cp "${script_path}/mkinitcpio.conf" "${work_dir}/airootfs/etc/mkinitcpio-archiso.conf"
- mkarchiso -v -w "${work_dir}" -D "${install_dir}" \
- -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' run
-}
-
# Prepare ${install_dir}/boot/
make_boot() {
mkdir -p "${work_dir}/iso/${install_dir}/boot/${arch}"
@@ -118,7 +112,6 @@ make_iso() {
run_once make_custom_airootfs
run_once make_pacman_conf
run_once make_packages
-run_once make_setup_mkinitcpio
run_once make_boot
run_once make_syslinux
run_once make_isolinux