summaryrefslogtreecommitdiff
path: root/configs/baseline
diff options
context:
space:
mode:
authorEsteban Carnevale <alfplayer@mailoo.org>2013-09-03 16:20:57 -0300
committerEsteban Carnevale <alfplayer@mailoo.org>2013-09-03 16:20:57 -0300
commit42307e7e3985d8de6ff987c3eb88e0f143c39813 (patch)
treec0759b75fe02f71a9167cff8420e16e995cac941 /configs/baseline
parentfd3ccb1d3ea53e5da96473558b6c2457ae8affa5 (diff)
Update profile baselinerelease/2013.09.01release
Diffstat (limited to 'configs/baseline')
-rw-r--r--configs/baseline/aitab2
-rwxr-xr-xconfigs/baseline/build.sh83
-rw-r--r--configs/baseline/isolinux/isolinux.cfg5
-rw-r--r--configs/baseline/mkinitcpio.conf1
-rw-r--r--configs/baseline/syslinux/syslinux.cfg8
5 files changed, 99 insertions, 0 deletions
diff --git a/configs/baseline/aitab b/configs/baseline/aitab
new file mode 100644
index 0000000..234f61c
--- /dev/null
+++ b/configs/baseline/aitab
@@ -0,0 +1,2 @@
+# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size>
+root-image / %ARCH% gzip ext4 50%
diff --git a/configs/baseline/build.sh b/configs/baseline/build.sh
new file mode 100755
index 0000000..b016b45
--- /dev/null
+++ b/configs/baseline/build.sh
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+set -e -u
+
+iso_name=parabola
+iso_label="PARABOLA_$(date +%Y%m)"
+iso_version=$(date +%Y.%m.%d)
+install_dir=parabola
+arch=$(uname -m)
+work_dir=work
+out_dir=out
+
+script_path=$(readlink -f ${0%/*})
+
+# Helper function to run make_*() only one time per architecture.
+run_once() {
+ if [[ ! -e ${work_dir}/build.${1}_${arch} ]]; then
+ $1
+ touch ${work_dir}/build.${1}_${arch}
+ fi
+}
+
+# Base installation (root-image)
+make_basefs() {
+ mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" init
+}
+
+# Copy mkinitcpio parabolaiso hooks and build initramfs (root-image)
+make_setup_mkinitcpio() {
+ cp /usr/lib/initcpio/hooks/parabolaiso ${work_dir}/root-image/usr/lib/initcpio/hooks
+ cp /usr/lib/initcpio/install/parabolaiso ${work_dir}/root-image/usr/lib/initcpio/install
+ cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-parabolaiso.conf
+ mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" -r 'mkinitcpio -c /etc/mkinitcpio-parabolaiso.conf -k /boot/vmlinuz-linux-libre -g /boot/parabolaiso.img' run
+}
+
+# Prepare ${install_dir}/boot/
+make_boot() {
+ mkdir -p ${work_dir}/iso/${install_dir}/boot/${arch}
+ cp ${work_dir}/root-image/boot/parabolaiso.img ${work_dir}/iso/${install_dir}/boot/${arch}/parabolaiso.img
+ cp ${work_dir}/root-image/boot/vmlinuz-linux-libre ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz
+}
+
+# Prepare /${install_dir}/boot/syslinux
+make_syslinux() {
+ mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux
+ sed "s|%PARABOLAISO_LABEL%|${iso_label}|g;
+ s|%INSTALL_DIR%|${install_dir}|g;
+ s|%ARCH%|${arch}|g" ${script_path}/syslinux/syslinux.cfg > ${work_dir}/iso/${install_dir}/boot/syslinux/syslinux.cfg
+ cp ${work_dir}/root-image/usr/lib/syslinux/menu.c32 ${work_dir}/iso/${install_dir}/boot/syslinux/
+}
+
+# Prepare /isolinux
+make_isolinux() {
+ mkdir -p ${work_dir}/iso/isolinux
+ sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg
+ cp ${work_dir}/root-image/usr/lib/syslinux/isolinux.bin ${work_dir}/iso/isolinux/
+ cp ${work_dir}/root-image/usr/lib/syslinux/isohdpfx.bin ${work_dir}/iso/isolinux/
+}
+
+# Process aitab
+make_aitab() {
+ sed "s|%ARCH%|${arch}|g" ${script_path}/aitab > ${work_dir}/iso/${install_dir}/aitab
+}
+
+# Build all filesystem images specified in aitab (.fs.sfs .sfs)
+make_prepare() {
+ mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" prepare
+}
+
+# Build ISO
+make_iso() {
+ mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" checksum
+ mkparabolaiso -v -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${arch}.iso"
+}
+
+run_once make_basefs
+run_once make_setup_mkinitcpio
+run_once make_boot
+run_once make_syslinux
+run_once make_isolinux
+run_once make_aitab
+run_once make_prepare
+run_once make_iso
diff --git a/configs/baseline/isolinux/isolinux.cfg b/configs/baseline/isolinux/isolinux.cfg
new file mode 100644
index 0000000..44b5684
--- /dev/null
+++ b/configs/baseline/isolinux/isolinux.cfg
@@ -0,0 +1,5 @@
+DEFAULT loadconfig
+
+LABEL loadconfig
+ CONFIG /%INSTALL_DIR%/boot/syslinux/syslinux.cfg
+ APPEND /%INSTALL_DIR%/
diff --git a/configs/baseline/mkinitcpio.conf b/configs/baseline/mkinitcpio.conf
new file mode 100644
index 0000000..8cf3926
--- /dev/null
+++ b/configs/baseline/mkinitcpio.conf
@@ -0,0 +1 @@
+HOOKS="base udev parabolaiso block filesystems"
diff --git a/configs/baseline/syslinux/syslinux.cfg b/configs/baseline/syslinux/syslinux.cfg
new file mode 100644
index 0000000..4761da9
--- /dev/null
+++ b/configs/baseline/syslinux/syslinux.cfg
@@ -0,0 +1,8 @@
+UI boot/syslinux/menu.c32
+MENU TITLE Parabola GNU/Linux-libre
+
+LABEL parabola
+MENU LABEL Parabola GNU/Linux-libre
+LINUX boot/%ARCH%/vmlinuz
+INITRD boot/%ARCH%/parabolaiso.img
+APPEND parabolaisobasedir=%INSTALL_DIR% parabolaisolabel=%PARABOLAISO_LABEL%