summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-02-04 21:16:10 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2018-02-04 21:16:10 +0100
commitae49983b15e102ff4850e2b387ebafc839cdc9e5 (patch)
treec853ccae95e60c0a3ca50be9814a7b0e73cd196e
parent02ad152b238969c713c6febb8954a7aea1787cb5 (diff)
downloadbootstrap32-ae49983b15e102ff4850e2b387ebafc839cdc9e5.tar.xz
added a simple CD-ROM creation script
-rw-r--r--README65
-rwxr-xr-xcreate_cdrom.sh57
-rw-r--r--default.conf5
3 files changed, 66 insertions, 61 deletions
diff --git a/README b/README
index ee33e41..3ad26be 100644
--- a/README
+++ b/README
@@ -148,7 +148,9 @@ su cross ./create_ca-certificates-utils_shim.sh
./build_stage1.sh
+# Build stage 1 ISO
+su cross ./create_cdrom.sh
# TODO FROM HERE:
@@ -167,16 +169,15 @@ PACKAGES=" \
archlinux-keyring archlinux32-keyring pacman-mirrorlist pacman \
fakeroot \
make mpfr gawk libmpc binutils gcc \
- linux uinit \
glibc \
- \
+# TODO: iputils is for ping only, a little bit too many packages for
+# that.
sysfsutils libidn nettle iputils"
-# libunwind
+# libunwind and systrace for debugging
# mpfr for gawk, gcc
# sysfsutils and libidn, nettle for iputils
SYSROOT_PACKAGES=" \
- \
file libmpc mpfr \
sysfsutils libidn"
@@ -713,62 +714,6 @@ testing:
bash, backspace and cursor keys are not working:
=> tty erase '^?'
-# create CD ROM
-###############
-
-# no ramdisk, no modules, no fancy startup, just a shell script
-
-sudo rm -rf isolinux
-mkdir isolinux
-sudo cp -a i486-root/* isolinux/.
-sudo chown -R cross:cross isolinux/.
-cd isolinux
-mkdir boot/isolinux
-# hda for K5
-# hdb for virsh arch486
-sudo chown cross:cross boot/isolinux/isolinux.cfg
-cat >boot/isolinux/isolinux.cfg <<EOF
-UI menu.c32
-TIMEOUT 300
-PROMPT 1
-LABEL hda
- KERNEL /boot/vmlinuz-linux
- APPEND root=/dev/hda init=/sbin/init console=ttyS0 console=tty0'
-LABEL hdb
- KERNEL /boot/vmlinuz-linux
- APPEND root=/dev/hdb init=/sbin/init console=ttyS0 console=tty0'
-LABEL hdc
- KERNEL /boot/vmlinuz-linux
- APPEND root=/dev/hdc init=/sbin/init console=ttyS0 console=tty0'
-LABEL hdd
- KERNEL /boot/vmlinuz-linux
- APPEND root=/dev/hdd init=/sbin/init console=ttyS0 console=tty0'
-LABEL sr0
- KERNEL /boot/vmlinuz-linux
- APPEND root=/dev/sr0 init=/sbin/init console=ttyS0 console=tty0'
-LABEL sr1
- KERNEL /boot/vmlinuz-linux
- APPEND root=/dev/sr1 init=/sbin/init console=ttyS0 console=tty0'
-EOF
-mkdir -p etc/init
-cat >etc/init/boot <<EOF
-#!/bin/sh
-mount -t proc proc /proc
-ln -s /proc/self/fd /dev/fd
-mount -t sysfs sys /sys
-mount -t tmpfs nodev,nosuid,size=4M /tmp
-exec /usr/bin/bash
-EOF
-sudo chown -R root:root .
-sudo chmod 0775 etc/init/boot
-sudo cp /usr/lib/syslinux/bios/ldlinux.c32 boot/isolinux/.
-sudo cp /usr/lib/syslinux/bios/menu.c32 boot/isolinux/.
-sudo cp /usr/lib/syslinux/bios/libutil.c32 boot/isolinux/.
-sudo cp /usr/lib/syslinux/bios/isolinux.bin boot/isolinux/.
-sudo genisoimage -J -r -o ../arch486.iso -b boot/isolinux/isolinux.bin \
- -c boot/isolinux/boot.cat -input-charset UTF-8 -no-emul-boot \
- -boot-load-size 4 -boot-info-table -joliet-long .
-cd ..
# create virtual HD
###################
diff --git a/create_cdrom.sh b/create_cdrom.sh
new file mode 100755
index 0000000..b0dab38
--- /dev/null
+++ b/create_cdrom.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+. "./default.conf"
+
+# builds a small ISO image for stage 1 system:
+# no ramdisk, no modules, no fancy startup, just a shell script
+
+sudo rm -rf $STAGE1_ISOLINUX
+mkdir $STAGE1_ISOLINUX
+sudo cp -a $STAGE1_CHROOT/* $STAGE1_ISOLINUX/.
+sudo chown -R cross:cross $STAGE1_ISOLINUX/.
+cd $STAGE1_ISOLINUX
+mkdir boot/isolinux
+sudo chown cross:cross boot/isolinux/isolinux.cfg
+cat >boot/isolinux/isolinux.cfg <<EOF
+UI menu.c32
+TIMEOUT 300
+PROMPT 1
+LABEL hda
+ KERNEL /boot/vmlinuz-linux
+ APPEND root=/dev/hda init=/sbin/init console=ttyS0 console=tty0'
+LABEL hdb
+ KERNEL /boot/vmlinuz-linux
+ APPEND root=/dev/hdb init=/sbin/init console=ttyS0 console=tty0'
+LABEL hdc
+ KERNEL /boot/vmlinuz-linux
+ APPEND root=/dev/hdc init=/sbin/init console=ttyS0 console=tty0'
+LABEL hdd
+ KERNEL /boot/vmlinuz-linux
+ APPEND root=/dev/hdd init=/sbin/init console=ttyS0 console=tty0'
+LABEL sr0
+ KERNEL /boot/vmlinuz-linux
+ APPEND root=/dev/sr0 init=/sbin/init console=ttyS0 console=tty0'
+LABEL sr1
+ KERNEL /boot/vmlinuz-linux
+ APPEND root=/dev/sr1 init=/sbin/init console=ttyS0 console=tty0'
+EOF
+mkdir -p etc/init
+cat >etc/init/boot <<EOF
+#!/bin/sh
+mount -t proc proc /proc
+ln -s /proc/self/fd /dev/fd
+mount -t sysfs sys /sys
+mount -t tmpfs nodev,nosuid,size=4M /tmp
+exec /usr/bin/bash
+EOF
+sudo chown -R root:root .
+sudo chmod 0775 etc/init/boot
+sudo cp /usr/lib/syslinux/bios/ldlinux.c32 boot/isolinux/.
+sudo cp /usr/lib/syslinux/bios/menu.c32 boot/isolinux/.
+sudo cp /usr/lib/syslinux/bios/libutil.c32 boot/isolinux/.
+sudo cp /usr/lib/syslinux/bios/isolinux.bin boot/isolinux/.
+sudo genisoimage -J -r -o ../arch486.iso -b boot/isolinux/isolinux.bin \
+ -c boot/isolinux/boot.cat -input-charset UTF-8 -no-emul-boot \
+ -boot-load-size 4 -boot-info-table -joliet-long .
+cd ..
+
diff --git a/default.conf b/default.conf
index c177825..c5397ce 100644
--- a/default.conf
+++ b/default.conf
@@ -33,6 +33,9 @@ STAGE1_BUILD=$CROSS_HOME/$TARGET_CPU-build
# where packages are stored for stage 1
STAGE1_PACKAGES=$STAGE1_CHROOT/packages/$TARGET_CPU/
+# where to store the directory which go to the ISO image
+STAGE1_ISOLINUX=$CROSS_HOME/isolinux
+
# git repository for PKGBUILD diffs and patches for the
# i686 architecture
GIT_URL_ARCHLINUX32_PACKAGES=https://github.com/archlinux32/packages.git
@@ -41,7 +44,7 @@ GIT_URL_ARCHLINUX32_PACKAGES=https://github.com/archlinux32/packages.git
ARCHLINUX32_PACKAGES=$CROSS_HOME/packages32
# uncomment to debug scripts
-#set -x
+set -x
# some default variables, not to be changed
SCRIPT=$(sudo realpath -s "$0")