diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-boot/colo | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-boot/colo')
-rw-r--r-- | sys-boot/colo/Manifest | 1 | ||||
-rw-r--r-- | sys-boot/colo/colo-1.22.ebuild | 118 | ||||
-rw-r--r-- | sys-boot/colo/files/default.colo | 25 | ||||
-rw-r--r-- | sys-boot/colo/files/menu.colo | 61 | ||||
-rw-r--r-- | sys-boot/colo/files/simple.colo | 20 | ||||
-rw-r--r-- | sys-boot/colo/metadata.xml | 14 |
6 files changed, 239 insertions, 0 deletions
diff --git a/sys-boot/colo/Manifest b/sys-boot/colo/Manifest new file mode 100644 index 000000000000..f486c8994f5e --- /dev/null +++ b/sys-boot/colo/Manifest @@ -0,0 +1 @@ +DIST colo-1.22.tar.gz 257968 RMD160 4a07cfe5050f395a8eb7c7d5fe71748877377084 SHA1 079e0409f662be9cac8b645c972f013f3f17af92 SHA256 ec51237286be9581d6be1ff3e43c9a654aaf4e1414d1bb194f02032e57119163 diff --git a/sys-boot/colo/colo-1.22.ebuild b/sys-boot/colo/colo-1.22.ebuild new file mode 100644 index 000000000000..c57d0f8661ce --- /dev/null +++ b/sys-boot/colo/colo-1.22.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +DESCRIPTION="CObalt LOader - Modern bootloader for Cobalt MIPS machines" +HOMEPAGE="http://www.colonel-panic.org/cobalt-mips/" +SRC_URI="http://www.colonel-panic.org/cobalt-mips/colo/colo-${PV}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~mips" +IUSE="" +DEPEND="" +RDEPEND="" +RESTRICT="strip" + +src_unpack() { + unpack ${A} +} + +src_compile() { + echo -e "" + einfo ">>> Building the CoLo Bootloader ..." + + # Remove -Werror from CFLAGS + # gcc-4.3.x is more strict; We'll go back and fix later + cd "${S}" + for x in $(grep -rl "Werror" "${S}"/*); do + sed -i -e 's/\-Werror//g' "${x}" + done + + # Keep elf2rfx from automatically building via the Makefile + sed -i -e 's/tools\/elf2rfx //' "${S}"/Makefile + + # Build it first with BUILD_CC in case of cross-compiles + cd "${S}"/tools/elf2rfx + make CC="$(tc-getBUILD_CC)" || die + + # Build the rest + cd "${S}" + make clean || die # emake breaks the build + make CC="$(tc-getCC)" OBJCOPY="$(tc-getOBJCOPY)" \ + STRIP="$(tc-getSTRIP)" || die + + # Now rebuild elf2rfx again with CC so it can be installed + cd "${S}"/tools/elf2rfx + make clean || die + make CC="$(tc-getCC)" || die +} + +src_install() { + # bins + dodir /usr/lib/colo + cp binaries/colo-chain.elf "${D}"/usr/lib/colo + cp binaries/colo-rom-image.bin "${D}"/usr/lib/colo + + # docs + dodoc CHANGES INSTALL README README.{restore,shell,netcon} tools/README.tools TODO + + # all tools except lcdtools (see below) + local tool + for tool in flash-tool colo-perm copy-rom elf2rfx; do + + einfo "Installing ${tool} binary to ${D}/usr/sbin" + dosbin tools/${tool}/${tool} + if [ -f tools/${tool}/${tool}.8 ]; then + einfo "Installing ${tool} manpage to ${D}/usr/share/man" + doman tools/flash-tool/flash-tool.8 + fi + + done + + # lcdtools + for tool in paneld putlcd e2fsck-lcd; do + einfo "Installing ${tool} binary and manpage to ${D}/usr/sbin" + dosbin tools/lcdtools/${tool}/${tool} + doman tools/lcdtools/${tool}/${tool}.8 + done + dolib.a tools/lcdtools/liblcd/liblcd.a + + # bootscripts + dodir /usr/lib/colo/scripts + cp "${FILESDIR}"/*.colo "${D}"/usr/lib/colo/scripts +} + +pkg_postinst() { + echo -e "" + einfo "Install locations:" + einfo " Binaries:\t/usr/lib/${PN}" + einfo " Docs:\t/usr/share/doc/${PF}" + einfo " Tools:\t/usr/sbin/{flash-tool,colo-perm,copy-rom," + einfo " \tputlcd,paneld,e2fsck-lcd,elf2rfx}" + einfo " Scripts:\t/usr/lib/${PN}/scripts" + echo -e "" + einfo "Please read the docs to fully understand the behavior of this bootloader, and" + einfo "edit the boot scripts to suit your needs." + echo -e "" + ewarn "Users installing ${PN} for the first time need to be aware that newer" + ewarn "versions of ${PN} disable the serial port by default. If the serial port" + ewarn "is needed, select it from the boot menu. Users using the example boot" + ewarn "scripts provided will have the serial port automatically enabled." + echo -e "" + ewarn "Note: It is HIGHLY recommended that you use the chain" + ewarn "bootloader (colo-chain.elf) 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/default.colo b/sys-boot/colo/files/default.colo new file mode 100644 index 000000000000..676a038388d1 --- /dev/null +++ b/sys-boot/colo/files/default.colo @@ -0,0 +1,25 @@ +#:CoLo:# + +# Turn on the serial port +-serial on + +# Generate a menu to select the appropriate kernel image on the LCD Screen +# Format is: +# menu "<message>" <time out> <menu text 1> <menu option 1> <menu text 2> <menu option 2> ... +# +# Where <menu text> is the item displayed, and <menu option> is the item +# that the text corresponds to. When a menu item is selected, the env variable +# {menu-option} gets set to the value of <menu option>. +# +# Please note, no sample script has been provided for a backup script (linuxold). +# You will need to create one yourself if you require this. +menu "colo-@COLOVER@" 100 Linux linux Linux-OLD linuxold + +# Loads the corresponding script depending on the selected value from the menu +-load /boot/menu-{menu-option}.colo +-script + +# Incase of failure, return to the menu +load /boot/default.colo +script + diff --git a/sys-boot/colo/files/menu.colo b/sys-boot/colo/files/menu.colo new file mode 100644 index 000000000000..4bf82ad5f6be --- /dev/null +++ b/sys-boot/colo/files/menu.colo @@ -0,0 +1,61 @@ +#:CoLo:# +# Example configuration file for CoLo, version 1.16 or above. +# +# $Id$ + +# Turn on the serial port; if possible. - means to ignore the error and keep +# going. Without this, execution would halt here if this command failed (e.g. +# on Qube 2700; which lacks serial ports) +-serial on + +# Mount the hard drive +lcd "Mounting hda1" +mount hda1 + +# Ask the user... which kernel? +# Timeout; 50/10 seconds +# +# The format is: +# select "Message Goes Here" TimeOut label1 [label2 ... [labelN]] +# +# This will set the {menu-option} variable to the entry corresponding to the +# selected value, or 0 if no option is selected. +select "Which Kernel?" 50 Working New + +# Now... jump to the line corresponding to the selection... +# +# Explaination of the goto command... +# goto [-]numMarks -- prefixing with - means jump backwards +# or +# goto numMarks{b|f} -- b == jump back, f == jump forward +# +# Marks are indicated by a line starting with a @ symbol. +# +# We use this jump to set the {image-name} variable to a kernel image. +# +# Explaination of the var command: +# var VariableName Value +# + +goto {menu-option} + +# {menu-option} = 0; TimeOut or Cancel +var image-name vmlinux.gz.working + +# Skip to the next two @ lines, start at the third @ line. +goto 3f + +# {menu-option} = 1; "Working" selected. +@var image-name vmlinux.gz.working + +goto 2f +@var image-name vmlinux.gz.new + +# Load the requested image +@lcd "Loading Linux" {image-name} +load /{image-name} + +# Boot +lcd "Booting..." +execute root=/dev/hda5 ro console=ttyS0,115200 +boot diff --git a/sys-boot/colo/files/simple.colo b/sys-boot/colo/files/simple.colo new file mode 100644 index 000000000000..84b84170a396 --- /dev/null +++ b/sys-boot/colo/files/simple.colo @@ -0,0 +1,20 @@ +#:CoLo:# +# +# Simple CoLo boot script. +# $Id$ + +# Turn serial on; if possible +# - means: "ignore any failure", so if the machine has no serial device (such as +# a Qube 2700), it will simply pretend the command never happened. +-serial on + +# Mount the hard drive +mount hda1 + +# Loads the kernel into memory (and unzips if needed) +# Makes sure this points at the correct kernel image +load /boot/kernel.gz + +# Executes the loaded image with the specified command args +# Change these args to suit your purposes +execute root=/dev/hda5 console=ttyS0,115200 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> + |