mirror of
https://github.com/Noratrieb/captain.git
synced 2026-01-14 14:35:02 +01:00
Initial commit
This commit is contained in:
commit
f0ffa77500
24 changed files with 802 additions and 0 deletions
30
ahoy/build-root.sh
Executable file
30
ahoy/build-root.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
target_tuple="$(uname -m)-unknown-linux-musl"
|
||||
|
||||
cargo build -p quarterdeck --target "$target_tuple"
|
||||
cargo build -p cog --target "$target_tuple"
|
||||
cargo build -p coreutils --target "$target_tuple"
|
||||
|
||||
target_dir="../target/$target_tuple/debug"
|
||||
|
||||
rm -rf rootfs
|
||||
|
||||
mkdir -p rootfs
|
||||
mkdir -p rootfs/bin
|
||||
|
||||
install_bin() {
|
||||
cp "$target_dir/$1" rootfs/bin
|
||||
}
|
||||
|
||||
install_bin quarterdeck
|
||||
install_bin cog
|
||||
install_bin net
|
||||
install_bin ls
|
||||
|
||||
mkdir -p rootfs/etc
|
||||
cp /etc/resolv.conf rootfs/etc/resolv.conf
|
||||
Loading…
Add table
Add a link
Reference in a new issue