From cf28645f8a8ce844dea435d04f4e101c3d3bcd55 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 5 Jul 2020 10:38:18 -0700 Subject: 6610 - tweak the Linux boot image generator So far we hardcoded the translation process and it only supported SubX. Now we pass in an ELF binary and outsource how it's generated. --- tools/iso/linux | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/iso/linux b/tools/iso/linux index ac0f720b..09401f11 100755 --- a/tools/iso/linux +++ b/tools/iso/linux @@ -1,6 +1,6 @@ #!/bin/sh -# Build one or more .subx files into an ELF binary, and package it up into a -# bootable ISO image with a Linux kernel. +# Package up an ELF binary generated by Mu into a bootable ISO image with a +# Linux kernel. # # Must be run on Linux, and from the top-level mu/ directory. # @@ -11,20 +11,18 @@ set -e -if [ $# -eq 0 ] +if [ $# -ne 1 ] then - echo "Usage: `basename $0` file.subx ..." + echo "Usage: `basename $0` " exit 1 fi -echo "=== building SubX binary" -./translate_subx $* -mv a.elf init - echo "=== constructing initramfs out of SubX binary" rm -rf tmp_linux/isoimage mkdir -p tmp_linux/isoimage/boot +cp -i $1 init echo init | cpio -R root:root -H newc -o | xz -9 --check=none > tmp_linux/isoimage/boot/rootfs.xz +rm init if [ ! -d kernel.linux ] then -- cgit 1.4.1-2-gfad0