mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-19 01:35:24 +01:00
Merge pull request #17 from bittorf/add_ci_helper
Add new build target 'minikernel'
This commit is contained in:
commit
96320a1b3f
1 changed files with 28 additions and 10 deletions
38
rootfs.sh
38
rootfs.sh
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
QEMU_CMD="${1:-qemu-system-x86_64}" # or 'chroot'
|
QEMU_CMD="${1:-qemu-system-x86_64}" # or 'chroot' or 'minikernel'
|
||||||
QEMU_RAM="${2:-8G}"
|
QEMU_RAM="${2:-8G}"
|
||||||
|
|
||||||
pushd sysa
|
pushd sysa
|
||||||
|
|
@ -12,6 +12,8 @@ pushd sysa
|
||||||
mkdir -p tmp/
|
mkdir -p tmp/
|
||||||
sudo mount -t tmpfs -o size=8G tmpfs tmp
|
sudo mount -t tmpfs -o size=8G tmpfs tmp
|
||||||
|
|
||||||
|
LOGFILE="$PWD/tmp/bootstrap.log"
|
||||||
|
|
||||||
# base: mescc-tools-seed
|
# base: mescc-tools-seed
|
||||||
# copy in all the mescc-tools-seed stuff
|
# copy in all the mescc-tools-seed stuff
|
||||||
cp -r mescc-tools-seed/src/mescc-tools-seed/x86/* tmp
|
cp -r mescc-tools-seed/src/mescc-tools-seed/x86/* tmp
|
||||||
|
|
@ -125,17 +127,33 @@ cd tmp
|
||||||
find . | cpio -H newc -o | gzip > initramfs.igz
|
find . | cpio -H newc -o | gzip > initramfs.igz
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
if [ "${QEMU_CMD}" = 'chroot' ]; then
|
case "${QEMU_CMD}" in
|
||||||
sudo PATH="/after/bin:${PATH}" chroot . /init
|
chroot)
|
||||||
else
|
sudo PATH="/after/bin:${PATH}" chroot . /init | tee "$LOGFILE"
|
||||||
${QEMU_CMD} -enable-kvm \
|
;;
|
||||||
-m "${QEMU_RAM}" \
|
minikernel)
|
||||||
-nographic \
|
git clone --depth 1 --branch v0.4 https://github.com/bittorf/kritis-linux.git
|
||||||
-no-reboot \
|
|
||||||
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0
|
kritis-linux/ci_helper.sh \
|
||||||
fi
|
--arch x86_64 \
|
||||||
|
--ramsize 4G \
|
||||||
|
--kernel 5.10.8 \
|
||||||
|
--initrd initramfs.igz \
|
||||||
|
--log "$LOGFILE"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
${QEMU_CMD} -enable-kvm \
|
||||||
|
-m "${QEMU_RAM:-8G}" \
|
||||||
|
-nographic \
|
||||||
|
-no-reboot \
|
||||||
|
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0 | tee "$LOGFILE"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
|
# eventually keep logfile before unmount:
|
||||||
|
echo "see logfile: $LOGFILE"
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
sudo umount sysa/tmp
|
sudo umount sysa/tmp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue