1
0
mirror of git://git.2f30.org/morpheus.git synced 2024-07-01 01:41:21 +00:00
morpheus/stage0

36 lines
625 B
Plaintext
Raw Normal View History

2013-09-06 08:31:51 +00:00
#!/bin/sh
# Export important variables for the build scripts
top=$(pwd)
root=$top/root
2013-09-06 09:53:51 +00:00
nprocs=4
2013-09-06 08:31:51 +00:00
mirror=http://dl.2f30.org/morpheus-pkgs
2013-09-06 09:53:51 +00:00
export top root nprocs mirror
2013-09-06 08:31:51 +00:00
2013-09-06 09:08:58 +00:00
./clean
2013-09-06 08:31:51 +00:00
# Create directory hierarchy
2013-09-06 08:55:38 +00:00
mkdir -p src cross
2013-09-06 09:08:58 +00:00
mkdir -p $root/{bin,boot,dev,etc,home,root,var,share,sys,proc}
2013-09-06 08:31:51 +00:00
mkdir -p $root/dev/shm
mkdir -p $root/share/man
pushd $root/
ln -s /bin sbin
popd
./build cross-scripts/musl-0.9.13
PATH=$top/cross/bin:$PATH
export PATH
# Build stage0 packages
pkglist=$(ls pkgs)
for pkg in $pkglist; do
./build pkgs/$pkg
done
pushd $root
find . | cpio --quiet -H newc -o | gzip -9 -n > ../rootfs.img
popd
echo OK!