summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-boot/colo/ChangeLog10
-rw-r--r--sys-boot/colo/Manifest6
-rw-r--r--sys-boot/colo/colo-1.4.ebuild105
-rw-r--r--sys-boot/colo/files/colo-1.4-gentoo.patch81
-rw-r--r--sys-boot/colo/files/default.boot.example2
-rw-r--r--sys-boot/colo/files/digest-colo-1.41
-rw-r--r--sys-boot/colo/metadata.xml14
7 files changed, 219 insertions, 0 deletions
diff --git a/sys-boot/colo/ChangeLog b/sys-boot/colo/ChangeLog
new file mode 100644
index 000000000000..2248bc2b989a
--- /dev/null
+++ b/sys-boot/colo/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-boot/colo
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/colo/ChangeLog,v 1.1 2004/04/05 07:49:06 kumba Exp $
+
+*colo-1.4 (05 Apr 2004)
+
+ 05 Apr 2004; Joshua Kinard <kumba@gentoo.org> colo-1.4.ebuild,
+ files/colo-1.4-gentoo.patch files/default.boot.example:
+ Initial import of a modern bootloader for Cobalt MIPS systems
+
diff --git a/sys-boot/colo/Manifest b/sys-boot/colo/Manifest
new file mode 100644
index 000000000000..f987f9c79001
--- /dev/null
+++ b/sys-boot/colo/Manifest
@@ -0,0 +1,6 @@
+MD5 d873c7140012382730c94ee367e4856a colo-1.4.ebuild 3264
+MD5 821bbe104fd36eab5f08495277bc5adb metadata.xml 364
+MD5 9656458f406e5480feb8558a29ecefe9 ChangeLog 335
+MD5 c1b257fb8b0e15a8f27cbef798f5aede files/colo-1.4-gentoo.patch 2631
+MD5 7c11a1ef9a1547e23ae00c09ef797d11 files/digest-colo-1.4 63
+MD5 6a9e242bf3b159c4ead248ff40151b32 files/default.boot.example 9
diff --git a/sys-boot/colo/colo-1.4.ebuild b/sys-boot/colo/colo-1.4.ebuild
new file mode 100644
index 000000000000..a2dfe89c5387
--- /dev/null
+++ b/sys-boot/colo/colo-1.4.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-boot/colo/colo-1.4.ebuild,v 1.1 2004/04/05 07:49:06 kumba Exp $
+
+inherit eutils
+
+DESCRIPTION="CObalt Linux lOader - Modern bootloader for Cobalt MIPS machines"
+HOMEPAGE="http://www.colonel-panic.org/cobalt-mips/"
+SRC_URI="http://www.colonel-panic.org/cobalt-mips/boot-loader/release-${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~mips"
+IUSE=""
+DEPEND=""
+FLASHTOOLVER="1.2"
+
+pkg_setup() {
+ # See if we're on a cobalt system (must use the cobalt-mips profile)
+ if [ "${PROFILE_ARCH}" != "cobalt" ]; then
+ echo -e ""
+ eerror "This package is only intended for the Cobalt Microserver MIPS-based"
+ eerror "systems. It will not function on any other MIPS-based system or any"
+ eerror "other architecture"
+ echo -e ""
+ die
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # patch boot-loader Makefile(s)
+ S=${WORKDIR}/boot-loader-${PV}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-gentoo.patch
+}
+
+src_compile() {
+ # boot-loader
+ echo -e ""
+ einfo "Building boot-loader-${PV} ..."
+ S=${WORKDIR}/boot-loader-${PV}
+ cd ${S}
+ make clean || die # emake breaks the build
+ make || die
+
+ # flash-tool
+ echo -e ""
+ einfo "Building flash-tool-${FLASHTOOLVER} ..."
+ S=${WORKDIR}/flash-tool-${FLASHTOOLVER}
+ cd ${S}
+ rm -f flash-tool
+ make clean || die
+ make || die
+}
+
+src_install() {
+ # boot-loader bins
+ S=${WORKDIR}/boot-loader-${PV}
+ cd ${S}
+ dodir /usr/lib/colo
+ cp chain.bin ${D}/usr/lib/colo
+ cp boot.bin ${D}/usr/lib/colo
+ cp ${FILESDIR}/default.boot.example ${D}/usr/lib/colo
+
+ # boot-loader docs
+ dodoc COPYING INSTALL README README.{restore,shell} TODO
+
+ # flash-tool bins
+ S=${WORKDIR}/flash-tool-${FLASHTOOLVER}
+ cd ${S}
+ dosbin flash-tool
+}
+
+pkg_postinst() {
+ echo -e ""
+ einfo "Binaries for this bootloader have been stored in"
+ einfo "/usr/lib/cobalt-bootloader. Documentation has been"
+ einfo "installed in /usr/share/doc/${PF}. The flash utility"
+ einfo "has been installed as /usr/sbin/flash-tool. An example"
+ einfo "default.boot has been placed in /usr/lib/colo. It is"
+ einfo "a script file the bootloader uses to execute a series"
+ einfo "of commands to load the machine. If you desire the"
+ einfo "machine to boot to the bootloader command prompt, copy"
+ einfo "/usr/lib/colo/default.boot.example to /boot/default.boot,"
+ einfo "otherwise the bootloader will attempt to automatically"
+ einfo "boot /boot/vmlinux.gz. It is recommended that you edit"
+ einfo "the default.boot.example script to fit your needs and"
+ einfo "place it in /boot as default.boot."
+ echo -e ""
+ ewarn "Note: It is HIGHLY recommended that you use the chain"
+ ewarn "bootloader (chain.bin) first before attempting to"
+ ewarn "write the bootloader to the flash chip to verify that"
+ ewarn "it will work for you. It is also recommended that"
+ ewarn "you read the documentation in /usr/share/doc/${PF}"
+ ewarn "as it explains how to properly use this package."
+ echo -e ""
+ eerror "Warning: Make sure that IF you plan on flashing the"
+ eerror "bootloader into the flash chip that you are using a"
+ eerror "modern 2.4 Linux kernel (i.e., >2.4.18), otherwise"
+ eerror "you run a risk of destroying the contents of the"
+ eerror "flash chip and rendering the machine unusable."
+ echo -e ""
+ echo -e ""
+}
diff --git a/sys-boot/colo/files/colo-1.4-gentoo.patch b/sys-boot/colo/files/colo-1.4-gentoo.patch
new file mode 100644
index 000000000000..2f07715d078a
--- /dev/null
+++ b/sys-boot/colo/files/colo-1.4-gentoo.patch
@@ -0,0 +1,81 @@
+diff -Naurp boot-loader-1.4.orig/chain/Makefile boot-loader-1.4/chain/Makefile
+--- boot-loader-1.4.orig/chain/Makefile 2004-03-28 16:48:37.000000000 -0500
++++ boot-loader-1.4/chain/Makefile 2004-04-03 03:06:52.337184944 -0500
+@@ -12,7 +12,7 @@ OBJS= chain.o\
+ serial.o\
+ start.o\
+
+-MIPSFLAGS= -mno-abicalls -fno-pic -EL -mips2 -mcpu=r5000
++MIPSFLAGS= -mno-abicalls -fno-pic -G 0 -mips4 -mabi=32 -mtune=r5000
+
+ CFLAGS= -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-builtin -nostdlib $(MIPSFLAGS)
+ ASFLAGS= $(MIPSFLAGS)
+diff -Naurp boot-loader-1.4.orig/chain/src/start.S boot-loader-1.4/chain/src/start.S
+--- boot-loader-1.4.orig/chain/src/start.S 2004-03-28 16:25:38.000000000 -0500
++++ boot-loader-1.4/chain/src/start.S 2004-04-03 03:37:01.898089872 -0500
+@@ -18,7 +18,7 @@
+
+ _start: la sp, __stack - 16
+ lui gp, %hi(_gp)
+- bal chain
++ jal chain
+ addiu gp, %lo(_gp)
+
+ b .
+diff -Naurp boot-loader-1.4.orig/stage1/Makefile boot-loader-1.4/stage1/Makefile
+--- boot-loader-1.4.orig/stage1/Makefile 2004-03-28 11:06:07.000000000 -0500
++++ boot-loader-1.4/stage1/Makefile 2004-04-03 03:07:24.047364264 -0500
+@@ -15,7 +15,7 @@ OBJS= init.o\
+ fast.o\
+ start.o\
+
+-MIPSFLAGS= -mno-abicalls -fno-pic -EL -mips2 -mcpu=r5000
++MIPSFLAGS= -mno-abicalls -fno-pic -G 0 -mips4 -mabi=32 -mtune=r5000
+
+ CFLAGS= -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-builtin -nostdlib $(MIPSFLAGS)
+ ASFLAGS= $(MIPSFLAGS)
+diff -Naurp boot-loader-1.4.orig/stage1/src/start.S boot-loader-1.4/stage1/src/start.S
+--- boot-loader-1.4.orig/stage1/src/start.S 2004-03-28 11:06:07.000000000 -0500
++++ boot-loader-1.4/stage1/src/start.S 2004-04-03 03:35:24.893836760 -0500
+@@ -16,16 +16,16 @@
+
+ la sp, __stack - 16
+ lui gp, %hi(_gp)
+- bal cpu_init
++ jal cpu_init
+ addiu gp, %lo(_gp)
+
+- bal stage1
++ jal stage1
+ nop
+
+- bal loader
++ jal loader
+ subu sp, v0, 16
+
+- b fatal
++ j fatal
+ nop
+
+ .org 0x200
+@@ -36,7 +36,7 @@
+
+ 1: la sp, __stack - 16
+ lui gp, %hi(_gp)
+- b exception
++ j exception
+ addiu gp, %lo(_gp)
+
+ .org 0x280
+diff -Naurp boot-loader-1.4.orig/stage2/Makefile boot-loader-1.4/stage2/Makefile
+--- boot-loader-1.4.orig/stage2/Makefile 2004-03-28 14:30:52.000000000 -0500
++++ boot-loader-1.4/stage2/Makefile 2004-04-03 03:07:39.687986528 -0500
+@@ -32,7 +32,7 @@ OBJS= main.o\
+ launch.o\
+ start.o\
+
+-MIPSFLAGS= -mno-abicalls -fno-pic -EL -mips2 -mcpu=r5000
++MIPSFLAGS= -mno-abicalls -fno-pic -G 0 -mips4 -mabi=32 -mtune=r5000
+
+ CFLAGS= -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-builtin -nostdlib $(MIPSFLAGS)
+ ASFLAGS= $(MIPSFLAGS)
diff --git a/sys-boot/colo/files/default.boot.example b/sys-boot/colo/files/default.boot.example
new file mode 100644
index 000000000000..4419cf0775fc
--- /dev/null
+++ b/sys-boot/colo/files/default.boot.example
@@ -0,0 +1,2 @@
+mount
+ls
diff --git a/sys-boot/colo/files/digest-colo-1.4 b/sys-boot/colo/files/digest-colo-1.4
new file mode 100644
index 000000000000..e2f5d9426f82
--- /dev/null
+++ b/sys-boot/colo/files/digest-colo-1.4
@@ -0,0 +1 @@
+MD5 51e908ca404b68e1346186c0de479c9d release-1.4.tar.gz 139761
diff --git a/sys-boot/colo/metadata.xml b/sys-boot/colo/metadata.xml
new file mode 100644
index 000000000000..ff9c798e1578
--- /dev/null
+++ b/sys-boot/colo/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mips</herd>
+ <maintainer>
+ <email>mips@gentoo.org</email>
+ <name>Mips Team</name>
+ </maintainer>
+
+ <longdescription>
+ COLO is CObalt Linux lOader - a Modern Bootloader for Cobalt MIPS machines.
+ </longdescription>
+</pkgmetadata>
+