Genode Packages collection
https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
957 B
40 lines
957 B
{ stdenv, nixpkgs, packages, hw-image }: |
|
|
|
nixpkgs.writeScriptBin "hw-iso" (with nixpkgs.buildPackages; |
|
let inherit (stdenv) cc; |
|
|
|
in '' |
|
#!${runtimeShell} |
|
set -eu |
|
|
|
SYSLINUX="${syslinux}/share/syslinux" |
|
|
|
TMPDIR="$(${coreutils}/bin/mktemp -d)" |
|
trap "rm -rf $TMPDIR" err exit |
|
|
|
mkdir -p "$TMPDIR/boot/syslinux" |
|
${hw-image.program} $@ > "$TMPDIR/boot/image.elf" |
|
|
|
pushd "$TMPDIR" > /dev/null |
|
out="hw.iso" |
|
|
|
# build ISO layout |
|
cp ${./isolinux.cfg} boot/syslinux/isolinux.cfg |
|
cp \ |
|
$SYSLINUX/isolinux.bin \ |
|
$SYSLINUX/ldlinux.c32 \ |
|
$SYSLINUX/libcom32.c32 \ |
|
$SYSLINUX/mboot.c32 \ |
|
boot/syslinux |
|
chmod +w boot/syslinux/isolinux.bin |
|
|
|
# create ISO image |
|
${cdrkit}/bin/mkisofs -o "$out" \ |
|
-b syslinux/isolinux.bin -c syslinux/boot.cat \ |
|
-no-emul-boot -boot-load-size 4 -boot-info-table \ |
|
-iso-level 2 \ |
|
boot |
|
|
|
${syslinux}/bin/isohybrid "$out" |
|
cat "$out" |
|
'')
|
|
|