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

46 lines
903 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-17 09:24:55 +00:00
mkdir -p $root/{bin,boot,dev,etc,home,root,lib,var,share,tmp,sys,proc}
2013-09-06 08:31:51 +00:00
mkdir -p $root/dev/shm
2013-09-17 09:24:55 +00:00
mkdir -p $root/share/{doc,man}
2013-09-16 10:20:23 +00:00
mkdir -p $root/var/run
2013-09-06 08:31:51 +00:00
pushd $root/
2013-09-06 09:59:40 +00:00
if [ -e sbin ]; then
unlink sbin
fi
2013-09-06 08:31:51 +00:00
ln -s /bin sbin
popd
./build cross-scripts/musl-0.9.13
2013-09-07 14:32:03 +00:00
./build cross-scripts/libevent-2.0.21
./build cross-scripts/ncurses-5.9
2013-09-06 11:01:40 +00:00
./build cross-scripts/zlib-1.2.8
2013-09-06 08:31:51 +00:00
PATH=$top/cross/bin:$PATH
export PATH
# Build stage0 packages
pkglist=$(ls pkgs)
for pkg in $pkglist; do
./build pkgs/$pkg
done
2013-09-06 11:42:24 +00:00
# Strip all executables
find $root/bin -executable -type f -exec strip {} \; &>/dev/null
2013-09-06 08:31:51 +00:00
pushd $root
2013-09-08 17:39:49 +00:00
find . | cpio --quiet -H newc -o | gzip -9 -n > ../morpheus.img
2013-09-06 08:31:51 +00:00
popd
echo OK!