Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/configs/baseline
diff options
context:
space:
mode:
Diffstat (limited to 'configs/baseline')
-rw-r--r--configs/baseline/airootfs/etc/mkinitcpio.conf69
-rw-r--r--configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset11
-rwxr-xr-xconfigs/baseline/build.sh17
-rw-r--r--configs/baseline/mkinitcpio.conf4
4 files changed, 85 insertions, 16 deletions
diff --git a/configs/baseline/airootfs/etc/mkinitcpio.conf b/configs/baseline/airootfs/etc/mkinitcpio.conf
new file mode 100644
index 0000000..9741d17
--- /dev/null
+++ b/configs/baseline/airootfs/etc/mkinitcpio.conf
@@ -0,0 +1,69 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# vim:set ft=sh
+# MODULES
+# The following modules are loaded before any boot hooks are
+# run. Advanced users may wish to specify all system modules
+# in this array. For instance:
+# MODULES=(piix ide_disk reiserfs)
+MODULES=()
+
+# BINARIES
+# This setting includes any additional binaries a given user may
+# wish into the CPIO image. This is run last, so it may be used to
+# override the actual binaries included by a given hook
+# BINARIES are dependency parsed, so you may safely ignore libraries
+BINARIES=()
+
+# FILES
+# This setting is similar to BINARIES above, however, files are added
+# as-is and are not parsed in any way. This is useful for config files.
+FILES=()
+
+# HOOKS
+# This is the most important setting in this file. The HOOKS control the
+# modules and scripts added to the image, and what happens at boot time.
+# Order is important, and it is recommended that you do not change the
+# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
+# help on a given hook.
+# 'base' is _required_ unless you know precisely what you are doing.
+# 'udev' is _required_ in order to automatically load modules
+# 'filesystems' is _required_ unless you specify your fs modules in MODULES
+# Examples:
+## This setup specifies all modules in the MODULES setting above.
+## No raid, lvm2, or encrypted root is needed.
+# HOOKS=(base)
+#
+## This setup will autodetect all modules for your system and should
+## work as a sane default
+# HOOKS=(base udev autodetect block filesystems)
+#
+## This setup will generate a 'full' image which supports most systems.
+## No autodetection is done.
+# HOOKS=(base udev block filesystems)
+#
+## This setup assembles a pata mdadm array with an encrypted root FS.
+## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
+# HOOKS=(base udev block mdadm encrypt filesystems)
+#
+## This setup loads an lvm2 volume group on a usb device.
+# HOOKS=(base udev block lvm2 filesystems)
+#
+## NOTE: If you have /usr on a separate partition, you MUST include the
+# usr, fsck and shutdown hooks.
+HOOKS=(base udev archiso block filesystems)
+
+# COMPRESSION
+# Use this to compress the initramfs image. By default, gzip compression
+# is used. Use 'cat' to create an uncompressed image.
+#COMPRESSION="gzip"
+#COMPRESSION="bzip2"
+#COMPRESSION="lzma"
+#COMPRESSION="xz"
+#COMPRESSION="lzop"
+#COMPRESSION="lz4"
+
+# COMPRESSION_OPTIONS
+# Additional options for the compressor
+#COMPRESSION_OPTIONS=()
diff --git a/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset b/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset
new file mode 100644
index 0000000..a1949cd
--- /dev/null
+++ b/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset
@@ -0,0 +1,11 @@
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# mkinitcpio preset file for the 'linux' package on archiso
+
+PRESETS=('archiso')
+
+ALL_kver='/boot/vmlinuz-linux'
+ALL_config='/etc/mkinitcpio.conf'
+
+archiso_image="/boot/archiso.img"
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
diff --git a/configs/baseline/mkinitcpio.conf b/configs/baseline/mkinitcpio.conf
deleted file mode 100644
index 2f9a39a..0000000
--- a/configs/baseline/mkinitcpio.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-HOOKS=(base udev archiso block filesystems)