morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit 078247af11d24bb9a2808e9da8f7182ebb255140
parent 2e225d2dfdeb0c5d47793d02296d126181209998
Author: sin <sin@2f30.org>
Date:   Fri Sep  6 09:50:29 +0100

Fix build system and add kernel pkg

Diffstat:
build | 18++++++++++++++++++
pkgbuild | 11+++++------
pkgs/kernel | 12++++++++++++
qemu-run | 2+-
stage0 | 7+------
5 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/build b/build @@ -1,4 +1,22 @@ #!/bin/sh +# +# Only meant to be executed from within the stage0 script + +fetch() { + return +} + +unpack() { + return +} + +build() { + return +} + +install() { + return +} . $1 ( diff --git a/pkgbuild b/pkgbuild @@ -12,15 +12,14 @@ mirror=http://dl.2f30.org/morpheus-pkgs export top root mirror # Create directory hierarchy -mkdir -p $root/{bin,boot,dev,etc,svc,home,root,var,share,devel} -mkdir -p $root/share/man -mkdir -p $root/devel/{include,lib,src} -mkdir -p $root/var/run +rm -rf $root src +mkdir -p src +mkdir -p $root/{bin,boot,dev,etc,svc,home,root,var,share,devel,sys,proc} mkdir -p $root/dev/shm -mkdir -p $root/{sys,proc} +mkdir -p $root/devel/{include,lib,src} +mkdir -p $root/share/man pushd $root/ ln -s /bin sbin popd -mkdir -p src ./build pkgs/"$1" diff --git a/pkgs/kernel b/pkgs/kernel @@ -0,0 +1,12 @@ +url=http://dl.2f30.org/morpheus-pkgs/bzImage +urlconfig=http://dl.2f30.org/morpheus-pkgs/bzImage.config + +fetch() { + wget -c $url -O src/bzImage + wget -c $urlconfig -O src/bzImage.config +} + +install() { + cp src/bzImage $root/boot + cp src/bzImage.config $root/boot +} diff --git a/qemu-run b/qemu-run @@ -7,4 +7,4 @@ ps -ef | grep vde_switch | grep "sock $vdesock" | grep -v grep > /dev/null || { slirpvde -s "$vdesock" --dhcp --daemon -H '10.1.2.0/24' -L '2223:10.1.2.15:22' } -qemu-system-x86_64 -enable-kvm -smp 2 -m 1024 -net nic,model=ne2k_pci -net vde,sock="${vdesock}" -kernel kernel/bzImage -initrd rootfs.img -append "quiet" +qemu-system-x86_64 -enable-kvm -smp 2 -m 1024 -net nic,model=ne2k_pci -net vde,sock="${vdesock}" -kernel root/boot/bzImage -initrd rootfs.img -append "quiet" diff --git a/stage0 b/stage0 @@ -8,6 +8,7 @@ export top root mirror # Create directory hierarchy rm -rf $root src +mkdir -p src mkdir -p $root/{bin,boot,dev,etc,svc,home,root,var,share,devel,sys,proc} mkdir -p $root/dev/shm mkdir -p $root/devel/{include,lib,src} @@ -15,8 +16,6 @@ mkdir -p $root/share/man pushd $root/ ln -s /bin sbin popd -mkdir -p src -mkdir -p kernel ./build cross-scripts/musl-0.9.13 @@ -29,10 +28,6 @@ for pkg in $pkglist; do ./build pkgs/$pkg done -# Fetch kernel -wget -c http://dl.2f30.org/morpheus-pkgs/bzImage -O kernel/bzImage -wget -c http://dl.2f30.org/morpheus-pkgs/bzImage-config -O kernel/bzImage-config - pushd $root find . | cpio --quiet -H newc -o | gzip -9 -n > ../rootfs.img popd