summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/mbootpack/README9
-rw-r--r--system/mbootpack/mbootpack-0.6a_asm_page_fix.patch37
-rw-r--r--system/mbootpack/mbootpack.SlackBuild92
-rw-r--r--system/mbootpack/mbootpack.info10
-rw-r--r--system/mbootpack/slack-desc19
5 files changed, 167 insertions, 0 deletions
diff --git a/system/mbootpack/README b/system/mbootpack/README
new file mode 100644
index 0000000000..d613e4069e
--- /dev/null
+++ b/system/mbootpack/README
@@ -0,0 +1,9 @@
+mbootpack (Multiboot kernel and modules)
+
+This is a tool that takes a multiboot kernel and modules (e.g. a Xen
+VMM, linux kernel and initrd), and packages them up as a single file
+that looks like a bzImage linux kernel. The aim is to allow you to
+boot multiboot kernels (in particular, Xen) using bootloaders that
+don't support multiboot (i.e. pretty much anything except GRUB and
+SYSLINUX). This is, as you might expect, pretty grim stuff, involving
+lots of lovely 16-bit real-mode code.
diff --git a/system/mbootpack/mbootpack-0.6a_asm_page_fix.patch b/system/mbootpack/mbootpack-0.6a_asm_page_fix.patch
new file mode 100644
index 0000000000..0a5cb0d910
--- /dev/null
+++ b/system/mbootpack/mbootpack-0.6a_asm_page_fix.patch
@@ -0,0 +1,37 @@
+# Well, since asm/page.h has been removed from make headers_install,
+# we replace it with sys/user.h
+# Copyright 2010, mario <mario@slackverse.org>
+
+--- mbootpack-0.6a/buildimage.c.ORIG 2008-12-09 14:10:59.000000000 +0100
++++ mbootpack-0.6a/buildimage.c 2010-06-18 18:15:11.130697044 +0200
+@@ -38,7 +38,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+-#include <asm/page.h>
++#include <sys/user.h>
+
+ #include "mbootpack.h"
+ #include "mb_header.h"
+--- mbootpack-0.6a/mbootpack.c.ORIG 2008-12-09 14:10:59.000000000 +0100
++++ mbootpack-0.6a/mbootpack.c 2010-06-18 18:15:21.709696839 +0200
+@@ -43,7 +43,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+-#include <asm/page.h>
++#include <sys/user.h>
+
+ /* From GNU GRUB */
+ #include "mb_header.h"
+--- mbootpack-0.6a/setup.S.ORIG 2008-12-09 14:10:59.000000000 +0100
++++ mbootpack-0.6a/setup.S 2010-06-18 18:15:33.899696996 +0200
+@@ -82,7 +82,7 @@
+ #include <linux/compile.h>
+ #include <asm/boot.h>
+ #include <asm/e820.h>
+-#include <asm/page.h>
++#include <sys/user.h>
+ */
+
+ /* Definitions that should have come from these includes */
diff --git a/system/mbootpack/mbootpack.SlackBuild b/system/mbootpack/mbootpack.SlackBuild
new file mode 100644
index 0000000000..33c2c39f6f
--- /dev/null
+++ b/system/mbootpack/mbootpack.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/sh
+
+# Slackware build script for mbootpack
+
+# Copyright 2010, mario <mario@slackverse.org>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=mbootpack
+VERSION=${VERSION:-0.6a}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Fix asm/page.h error
+patch -p1 <$CWD/mbootpack-0.6a_asm_page_fix.patch
+
+make
+
+# We have to do things manually since mbootpack doesn't have make install
+mkdir -p $PKG/usr/bin
+cp -a bootsect mbootpack mkhex setup $PKG/usr/bin
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Changes GPL README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/mbootpack/mbootpack.info b/system/mbootpack/mbootpack.info
new file mode 100644
index 0000000000..a9e7da9160
--- /dev/null
+++ b/system/mbootpack/mbootpack.info
@@ -0,0 +1,10 @@
+PRGNAM="mbootpack"
+VERSION="0.6a"
+HOMEPAGE="http://www.tjd.phlegethon.org/software/"
+DOWNLOAD="http://www.tjd.phlegethon.org/software/mbootpack-0.6a.tar.gz"
+MD5SUM="52daf9084da07916f0bc40ab693bb894"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="mario"
+EMAIL="mario@slackverse.org"
+APPROVED="rworkman"
diff --git a/system/mbootpack/slack-desc b/system/mbootpack/slack-desc
new file mode 100644
index 0000000000..dcda8515a2
--- /dev/null
+++ b/system/mbootpack/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mbootpack: mbootpack (Multiboot kernel and modules)
+mbootpack:
+mbootpack: This is a tool that takes a multiboot kernel and modules (e.g. a Xen
+mbootpack: VMM, linux kernel and initrd), and packages them up as a single file
+mbootpack: that looks like a bzImage linux kernel. The aim is to allow you to
+mbootpack: boot multiboot kernels (in particular, Xen) using bootloaders that
+mbootpack: don't support multiboot (i.e. pretty much anything except GRUB and
+mbootpack: SYSLINUX). This is, as you might expect, pretty grim stuff, involving
+mbootpack: lots of lovely 16-bit real-mode code.
+mbootpack:
+mbootpack: Homepage: http://www.tjd.phlegethon.org/software/