26 lines
523 B
Bash
Executable File
26 lines
523 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu -o pipefail
|
|
|
|
mkdir -p out/
|
|
|
|
mkdir -p /tmp/xenon_initrd/debug
|
|
mkdir -p /tmp/xenon_initrd/sys
|
|
|
|
cp zig-cache/bin/xenon /tmp/xenon_initrd/sys/core
|
|
|
|
if [ -d third_party/microcode/ ]; then
|
|
cp -r third_party/microcode/ /tmp/xenon_initrd/sys/
|
|
fi
|
|
|
|
if [ -f third_party/panic.ppm ]; then
|
|
cp third_party/panic.ppm /tmp/xenon_initrd/debug/
|
|
fi
|
|
|
|
TARGET=$(realpath out/initrd)
|
|
|
|
cd /tmp/xenon_initrd
|
|
find -type f | cpio -o --reproducible -H newc > $TARGET
|
|
# tar -c -z -f $TARGET *
|
|
|
|
rm -r /tmp/xenon_initrd
|