mirror of
git://git.2f30.org/morpheus.git
synced 2024-06-30 18:31:20 +00:00
35 lines
609 B
Bash
Executable File
35 lines
609 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Export important variables for the build scripts
|
|
top=$(pwd)
|
|
root=$top/root
|
|
mirror=http://dl.2f30.org/morpheus-pkgs
|
|
export top root mirror
|
|
|
|
./clean
|
|
# Create directory hierarchy
|
|
mkdir -p src cross
|
|
mkdir -p $root/{bin,boot,dev,etc,home,root,var,share,sys,proc}
|
|
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!
|