diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-07-05 10:38:18 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-07-05 10:38:18 -0700 |
commit | cf28645f8a8ce844dea435d04f4e101c3d3bcd55 (patch) | |
tree | 3c9cad4d19350aa1f4ae8801c0f526cc55290430 /tools/iso/linux | |
parent | ff856aa0ba9a84998255c5af4fbeeef7f086c499 (diff) | |
download | mu-cf28645f8a8ce844dea435d04f4e101c3d3bcd55.tar.gz |
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.
Diffstat (limited to 'tools/iso/linux')
-rwxr-xr-x | tools/iso/linux | 14 |
1 files changed, 6 insertions, 8 deletions
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` <elf file>" 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 |