diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-boot/aboot |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-boot/aboot')
-rw-r--r-- | sys-boot/aboot/Manifest | 11 | ||||
-rw-r--r-- | sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild | 86 | ||||
-rw-r--r-- | sys-boot/aboot/files/aboot-define_stat_only_in_userspace.patch | 35 | ||||
-rw-r--r-- | sys-boot/aboot/files/aboot-gcc-3.4.patch | 31 | ||||
-rw-r--r-- | sys-boot/aboot/files/aboot-pt_note.patch | 308 | ||||
-rw-r--r-- | sys-boot/aboot/files/aboot.conf | 10 | ||||
-rw-r--r-- | sys-boot/aboot/metadata.xml | 11 |
7 files changed, 492 insertions, 0 deletions
diff --git a/sys-boot/aboot/Manifest b/sys-boot/aboot/Manifest new file mode 100644 index 000000000000..6c8296a7fb85 --- /dev/null +++ b/sys-boot/aboot/Manifest @@ -0,0 +1,11 @@ +AUX aboot-define_stat_only_in_userspace.patch 930 SHA256 ba7b34d1361ff4635e0f4aa7118295d4b93fc8716333a23bbc8a4dbe4ddea5de SHA512 b219d941943e0780030e402773a5ca3d9d2b3779b0162ad464d636c06268d37fa99f80ab9f7585013ffdfb8e13c1661f533ff6dad08451b5fe778d0a3fa9bd4e WHIRLPOOL e1184bba6b69b340e1c6989175c873d5fc9cd2d33b0ee5f2a83b40924856d7f07883614b1f607f1507d094bab36746997e69fe5f7e81305005e0fe6a441d0705 +AUX aboot-gcc-3.4.patch 830 SHA256 9757c85226ec5355a849a24a71415604569a7de06036bcfb3e4814fa448b5d18 SHA512 9e5f95a18b7d2eac6ab589f86f0e7a7ba189642b5cf0b302324ea0e2de243bf0379f119c79d44a9aa6b59096a582878438d0a1b42c0b626650ba908777bf0760 WHIRLPOOL b2ed3e55f3be60c698396cc638036234811bff399f1322506b10fe5fac18f232d10539dabba8a575180436081255adcb0481fe6dbe3729d5c4cc4a443671cef6 +AUX aboot-pt_note.patch 8966 SHA256 ef8a8e20bf482d0aa2cd4da09c867f021018fde486f6c631d7c236d790d81a2b SHA512 0df0be83d4f487ab899a37be494e90c926311dd39b49c953ab9fa97ac70a6430d697b62d8c12315fd6dcb0c7790d27eb6391754acecf440cbe0c363b050b5479 WHIRLPOOL bab6f78b9f6379f9ffd92478d9225b1ac8c4eda7f183de32a7407c9aa505554b21bfde38b0f73a6724e8aa9989f360d34fb0e369a225160e9a8d7111e7e24e6b +AUX aboot.conf 295 SHA256 41372b883807cbd871a5c8f17c4787273f2107ba10be127f73ca9e445ce72ebd SHA512 2dc56371223f6dfa19d13feaa9e33655997f571309ba9158e265051b5b9fe3e2f79ccf66385bde8433cf8b5cd0cb95b3036de43f93392c31a95638039f658e30 WHIRLPOOL f1f9d7ca909c7adaa8a1a7a98219763cde16f619abb5f117a837f8aab389a683e33fdd9e308df4bfc4ff78813156ba089349697668104f4161461b8af015dc53 +DIST aboot-1.0_pre20040408.tar.bz2 115062 SHA256 a8ae8f2bf549c1cc79ea66a0a11c8db5c0257ce0d94b97418eb1c658723b12d2 SHA512 b1fff7ce806336f89efe8239108a8547053f22727cba93cea742995432c4f35133f8dc619588390ba6e0d114e2fd62b80b730443e6c18900aa2a8832ddd4ebfc WHIRLPOOL 74d6d72c0d6802682b10fb9a6505b95365ce5b784c0a2377d922604467129a6812f6ab00d579d511d93e3c40ba40627ad7f2f49eb6e08a0de10f7549aa09997e +DIST aboot_gentoo.diff.bz2 9527 SHA256 6b141b7c90560d07ad740cfb8660a26935acfa96376e73439271d1fa9c6d0730 SHA512 868a73fee56e9bf6d986175a6a4dc321ed12fb78d74dfb8f1a3e35274577ddc9ea0820768b44836403587b3976ad8dacdcf6562a9ce5c45981c752670901155f WHIRLPOOL b621387b6a6d04db8e2d1c3554c6615c782d783c9f42f854160e40ec1a2969ba1e5cff4be72e631379f485d5d0780f5dee87e81c67a1c313480bcf0b0d261937 +DIST gentoo-headers-base-2.6.22.tar.bz2 4700338 SHA256 da57d0d8d12a59b05f0d3851e6d2f67c413baece046f4ec03831aa70df88710a SHA512 99849928eede0c4b101ddc9179c0974cac6b4f18803dc98b72dcbe80cea88d3062f709beaa1b890edbed9c147be0dd516065d4cee945164b5d9f19f7a3cf249d WHIRLPOOL cf35281fc5558c14a134bd4018e70a8cca589972c90980786669892a23aff4b1236f0c69586dfad4836bcdac7b75c5a902e15b88cc835adbcff16bbb5ded7181 +EBUILD aboot-1.0_pre20040408-r3.ebuild 2498 SHA256 9e623b875cfb0ea00710d6740c9b780c5f071e333eda169ee5a4c4b3d94d9e64 SHA512 9e129427a16ff0260e86887bfba3b7b8858572bc978acb0a1e588fe9039771e23d1724ef294134c9836f5be11d63b924c75d285e80f27d8775812e1bf4cf1446 WHIRLPOOL 606bbf85a01148cb32a438d973c1768a113f08462288ca7a0bc7539071524ca0182f222338ff16325fadcc13f388c369fbf2a9fc08e7ac033409d03a714a9ac1 +MISC ChangeLog 3159 SHA256 e70a31951e7d67c38528b57bfea930c6e23e92cf5dc93a8431e75e050d82df1a SHA512 fda7ddba86eaf9d19c776583c7a8ef8dca19b7247bde7ccdb7d18f7a24f8cd55108df9ddbc9ca619b62bb810af31ba2fe9a206af25473bbb123cf856f53c8402 WHIRLPOOL 66d0f207a6e3468ebec8f737583dea5429c93fdc1179ffba006e9758f46713fad3e021f5eb3c5cc0acb4d69c253c9c8ec0c20d073a58d4b1cb8908fc0f365bdd +MISC ChangeLog-2015 3427 SHA256 fa51abbcb5b7563a23e2c2701e0aebded0d48fb33317c07590c7c52ae7b185df SHA512 d49bb6daabf4ba3fd3059b8ca6e034068169e7bb57ad56abf7867431ecac73b57e081ab1fb43ed943d23b9e8dfc1ee2835133b7f5636ddbde66f152f400f4bb0 WHIRLPOOL bc084937f3825018590ffdfca87fc72f7c8237f1ce7daa3474e7dc2e1fb7f543ffcc95e3f826ca1545645c389202b1af71b92331ab8bacab93d29a5b514cebd3 +MISC metadata.xml 338 SHA256 d2ffec8c65393ef6c8498f6c5ef174726de59289d3a02da2604bf95795e97e6b SHA512 2c9c87a850f9900d030fd37a4f59308136f478db254fbfd8e37d4f3c16ab33c74d1ef4119b74f4e0b34310ef066ffb53f89e2a4013cfca4a7b56f690e2aa7faf WHIRLPOOL 9be9da3ec0b475e9660be666228fb88b29e80b45d95c0c58d146ac382bdb98d65498a27518bb9bc7e67e54d9d25858810025554d35dee47e5f3c1941280d50a9 diff --git a/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild new file mode 100644 index 000000000000..9fcd14b1d0ff --- /dev/null +++ b/sys-boot/aboot/aboot-1.0_pre20040408-r3.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils + +KERN_VER="2.6.22" + +DESCRIPTION="Alpha Linux boot loader for SRM" +HOMEPAGE="http://aboot.sourceforge.net/" +SRC_URI="http://aboot.sourceforge.net/tarballs/${P}.tar.bz2 + mirror://gentoo/gentoo-headers-base-${KERN_VER}.tar.bz2 + mirror://gentoo/${PN}_gentoo.diff.bz2 + https://dev.gentoo.org/~armin76/dist/${PN}_gentoo.diff.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* alpha" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_unpack() { + unpack ${A} + # setup local copies of kernel headers since we rely so + # heavily on linux internals. + mv gentoo-headers-base-${KERN_VER}/include/{linux,asm-generic,asm-alpha} "${S}"/include/ || die + cd "${S}"/include + ln -s asm-alpha asm || die + touch linux/config.h || die + cd "${S}" + epatch "${FILESDIR}/aboot-gcc-3.4.patch" + epatch "${FILESDIR}/aboot-pt_note.patch" + # Bug 364697 + epatch "${FILESDIR}/aboot-define_stat_only_in_userspace.patch" + + # Modified patch from Debian to add netboot support + epatch "${WORKDIR}"/aboot_gentoo.diff +} + +src_compile() { + # too many problems with parallel building + emake -j1 || die "emake failed" +} + +src_install() { + dodir /boot /sbin /usr/share/man/man{1,5,8} + make \ + root="${D}" \ + bindir="${D}"/sbin \ + bootdir="${D}"/boot \ + mandir="${D}"/usr/share/man \ + install + + insinto /boot + doins net_aboot.nh + dobin netabootwrap + dodoc ChangeLog INSTALL README TODO aboot.conf + + insinto /etc + newins "${FILESDIR}"/aboot.conf aboot.conf.example + +} + +pkg_postinst() { + einfo "To make aboot install a new bootloader on your harddisk follow" + einfo "these steps:" + einfo "" + einfo " - edit the file /etc/aboot.conf" + einfo " - cd /boot" + einfo " - swriteboot -c2 /dev/sda bootlx" + einfo " This will install a new bootsector on /dev/sda and aboot will" + einfo " use the second partition on this device to lookup kernel and " + einfo " initrd (as described in the aboot.conf file)" + einfo "" + einfo "IMPORTANT :" + einfo "" + einfo "The partition table of your boot device has to contain " + einfo "a BSD-DISKLABEL and the first 12 megabytes of your boot device" + einfo "must not be part of a partition as aboot will write its bootloader" + einfo "in there and not as with most x86 bootloaders into the " + einfo "master boot sector. If your partition table does not reflect this" + einfo "you are going to destroy your installation !" + einfo "Also note that aboot currently only supports ext2/3 partitions" + einfo "to boot from." +} diff --git a/sys-boot/aboot/files/aboot-define_stat_only_in_userspace.patch b/sys-boot/aboot/files/aboot-define_stat_only_in_userspace.patch new file mode 100644 index 000000000000..5b0b5e0efedf --- /dev/null +++ b/sys-boot/aboot/files/aboot-define_stat_only_in_userspace.patch @@ -0,0 +1,35 @@ +# Patch by Sergei Trofimovich +# http://bugs.gentoo.org/364697 + +diff --git a/Makefile b/Makefile +index bbe3b60..b4245af 100644 +--- a/Makefile ++++ b/Makefile +@@ -138,10 +138,10 @@ distclean: clean + find . -name \*~ | xargs rm -f + + lib/%: +- make -C lib $* CPPFLAGS="$(CPPFLAGS)" TESTING="$(TESTING)" ++ make -C lib $* CPPFLAGS="$(CPPFLAGS) -D__KERNEL__" TESTING="$(TESTING)" + + tools/%: +- make -C tools $* CPPFLAGS="$(CPPFLAGS)" ++ make -C tools $* CPPFLAGS="$(CPPFLAGS) -U__KERNEL__" + + sdisklabel/%: + make -C sdisklabel $* CPPFLAGS="$(CPPFLAGS)" +diff --git a/include/isolib.h b/include/isolib.h +index 392327a..0ef6e2a 100644 +--- a/include/isolib.h ++++ b/include/isolib.h +@@ -7,7 +7,10 @@ + # define fd_set kernel_fd_set + #endif + ++#ifdef __KERNEL__ ++/* userspace stuff has it's own struct stat */ + #include <asm/stat.h> ++#endif + + extern int iso_read_super (void * data, int quiet); + extern int iso_open (const char * filename); diff --git a/sys-boot/aboot/files/aboot-gcc-3.4.patch b/sys-boot/aboot/files/aboot-gcc-3.4.patch new file mode 100644 index 000000000000..24da18ce8190 --- /dev/null +++ b/sys-boot/aboot/files/aboot-gcc-3.4.patch @@ -0,0 +1,31 @@ +--- aboot-1.0_pre20040408/cons.c ++++ aboot-1.0_pre20040408/cons.c +@@ -20,7 +20,6 @@ + #endif + + long cons_dev; /* console device */ +-extern long int dispatch(); /* Need the full 64 bit return here...*/ + + long + cons_puts(const char *str, long len) +--- aboot-1.0_pre20040408/fs/ext2.c ++++ aboot-1.0_pre20040408/fs/ext2.c +@@ -6,6 +6,7 @@ + * This file has been ported from the DEC 32-bit Linux version + * by David Mosberger (davidm@cs.arizona.edu). + */ ++#include <string.h> + #include <linux/stat.h> + #include <linux/types.h> + #include <linux/version.h> +--- aboot-1.0_pre20040408/include/cons.h ++++ aboot-1.0_pre20040408/include/cons.h +@@ -3,7 +3,7 @@ + + extern long cons_dev; /* console device */ + +-extern long dispatch(long proc, ...); ++extern long int dispatch(long proc, ...); + + #ifdef TESTING + #define STRINGIFY(sym) #sym diff --git a/sys-boot/aboot/files/aboot-pt_note.patch b/sys-boot/aboot/files/aboot-pt_note.patch new file mode 100644 index 000000000000..d28527ad5b0c --- /dev/null +++ b/sys-boot/aboot/files/aboot-pt_note.patch @@ -0,0 +1,308 @@ +Recent build changes have added a PT_NOTE entry to the kernel's +ELF header. A perfectly valid change, but Alpha's aboot loader +is none too bright about examining these headers. + +The following patch to aboot-1.0_pre20040408.tar.bz2 makes it +so that only PT_LOAD entries are considered for loading, as well +as several other changes required to get the damned thing to +build again. + +--- aboot-1.0_pre20040408/Makefile ++++ aboot-1.0_pre20040408/Makefile +@@ -32,15 +32,15 @@ export + # + LOADADDR = 20000000 + +-ABOOT_LDFLAGS = -static -N -Taboot.lds ++ABOOT_LDFLAGS = -static -N -Taboot.lds --relax + + CC = gcc + TOP = $(shell pwd) + ifeq ($(TESTING),) +-CPPFLAGS = $(CFGDEFS) -I$(TOP)/include +-CFLAGS = $(CPPFLAGS) -D__KERNEL__ -Os -Wall -fno-builtin -mno-fp-regs -ffixed-8 ++CPPFLAGS = $(CFGDEFS) -I$(TOP)/include -I$(KSRC)/include ++CFLAGS = $(CPPFLAGS) -D__KERNEL__ -Os -Wall -fno-builtin -mno-fp-regs + else +-CPPFLAGS = -DTESTING $(CFGDEFS) -I$(TOP)/include ++CPPFLAGS = -DTESTING $(CFGDEFS) -I$(TOP)/include -I$(KSRC)/include + CFLAGS = $(CPPFLAGS) -O -g3 -Wall -D__KERNEL__ -ffixed-8 + endif + ASFLAGS = $(CPPFLAGS) + +--- aboot-1.0_pre20040408/aboot.c ++++ aboot-1.0_pre20040408/aboot.c +@@ -19,7 +19,6 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-#include <linux/elf.h> + #include <linux/kernel.h> + #include <linux/version.h> + +@@ -27,6 +26,7 @@ + #include <asm/hwrpb.h> + #include <asm/system.h> + ++#include <elf.h> + #include <alloca.h> + #include <errno.h> + +@@ -37,16 +37,6 @@ + #include "utils.h" + #include "string.h" + +-#ifndef elf_check_arch +-# define aboot_elf_check_arch(e) 1 +-#else +-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) +-# define aboot_elf_check_arch(e) elf_check_arch(e) +-# else +-# define aboot_elf_check_arch(e) elf_check_arch(e->e_machine) +-# endif +-#endif +- + struct bootfs * bfs = 0; /* filesystem to boot from */ + char * dest_addr = 0; + jmp_buf jump_buffer; +@@ -83,77 +73,89 @@ static unsigned long entry_addr = START_ADDR; + long + first_block (const char *buf, long blocksize) + { +- struct elfhdr *elf; +- struct elf_phdr *phdrs; ++ Elf64_Ehdr *elf; ++ Elf64_Phdr *phdrs; ++ int i, j; + +- elf = (struct elfhdr *) buf; ++ elf = (Elf64_Ehdr *) buf; + +- if (elf->e_ident[0] == 0x7f +- && strncmp(elf->e_ident + 1, "ELF", 3) == 0) +- { +- int i; +- /* looks like an ELF binary: */ +- if (elf->e_type != ET_EXEC) { +- printf("aboot: not an executable ELF file\n"); +- return -1; +- } +- if (!aboot_elf_check_arch(elf)) { +- printf("aboot: ELF executable not for this machine\n"); +- return -1; +- } +- if (elf->e_phoff + elf->e_phnum * sizeof(*phdrs) > (unsigned) blocksize) { +- printf("aboot: " +- "ELF program headers not in first block (%ld)\n", +- (long) elf->e_phoff); ++ if (elf->e_ident[0] != 0x7f ++ || elf->e_ident[1] != 'E' ++ || elf->e_ident[2] != 'L' ++ || elf->e_ident[3] != 'F') { ++ /* Fail silently, it might be a compressed file */ ++ return -1; ++ } ++ if (elf->e_ident[EI_CLASS] != ELFCLASS64 ++ || elf->e_ident[EI_DATA] != ELFDATA2LSB ++ || elf->e_machine != EM_ALPHA) { ++ printf("aboot: ELF executable not for this machine\n"); ++ return -1; ++ } ++ ++ /* Looks like an ELF binary. */ ++ if (elf->e_type != ET_EXEC) { ++ printf("aboot: not an executable ELF file\n"); ++ return -1; ++ } ++ ++ if (elf->e_phoff + elf->e_phnum * sizeof(*phdrs) ++ > (unsigned) blocksize) { ++ printf("aboot: ELF program headers not in first block (%ld)\n", ++ (long) elf->e_phoff); ++ return -1; ++ } ++ ++ phdrs = (struct elf_phdr *) (buf + elf->e_phoff); ++ chunks = malloc(sizeof(struct segment) * elf->e_phnum); ++ start_addr = phdrs[0].p_vaddr; /* assume they are sorted */ ++ entry_addr = elf->e_entry; ++ ++ for (i = j = 0; i < elf->e_phnum; ++i) { ++ int status; ++ ++ if (phdrs[i].p_type != PT_LOAD) ++ continue; ++ ++ chunks[j].addr = phdrs[i].p_vaddr; ++ chunks[j].offset = phdrs[i].p_offset; ++ chunks[j].size = phdrs[i].p_filesz; ++ printf("aboot: PHDR %d vaddr %#lx offset %#lx size %#lx\n", ++ i, chunks[j].addr, chunks[j].offset, chunks[j].size); ++ ++ status = check_memory(chunks[j].addr, chunks[j].size); ++ if (status) { ++ printf("aboot: Can't load kernel.\n" ++ " Memory at %lx - %lx (PHDR %i) " ++ "is %s\n", ++ chunks[j].addr, ++ chunks[j].addr + chunks[j].size - 1, ++ i, ++ (status == -ENOMEM) ? ++ "Not Found" : ++ "Busy (Reserved)"); + return -1; + } +- phdrs = (struct elf_phdr *) (buf + elf->e_phoff); +- chunks = malloc(sizeof(struct segment) * elf->e_phnum); +- nchunks = elf->e_phnum; +- start_addr = phdrs[0].p_vaddr; /* assume they are sorted */ +- entry_addr = elf->e_entry; +-#ifdef DEBUG +- printf("aboot: %d program headers, start address %#lx, entry %#lx\n", +- nchunks, start_addr, entry_addr); +-#endif +- for (i = 0; i < elf->e_phnum; ++i) { +- int status; +- +- chunks[i].addr = phdrs[i].p_vaddr; +- chunks[i].offset = phdrs[i].p_offset; +- chunks[i].size = phdrs[i].p_filesz; +-#ifdef DEBUG +- printf("aboot: segment %d vaddr %#lx offset %#lx size %#lx\n", +- i, chunks[i].addr, chunks[i].offset, chunks[i].size); +-#endif +- +-#ifndef TESTING +- status = check_memory(chunks[i].addr, chunks[i].size); +- if (status) { ++ ++ if (phdrs[i].p_memsz > phdrs[i].p_filesz) { ++ if (bss_size > 0) { + printf("aboot: Can't load kernel.\n" +- " Memory at %lx - %lx (chunk %i) " +- "is %s\n", +- chunks[i].addr, +- chunks[i].addr + chunks[i].size - 1, +- i, +- (status == -ENOMEM) ? +- "Not Found" : +- "Busy (Reserved)"); ++ " Multiple BSS segments" ++ " (PHDR %d)\n", i); + return -1; + } +-#endif ++ ++ bss_start = (char *) (phdrs[i].p_vaddr + ++ phdrs[i].p_filesz); ++ bss_size = phdrs[i].p_memsz - phdrs[i].p_filesz; ++ + } +- bss_start = (char *) (phdrs[elf->e_phnum - 1].p_vaddr + +- phdrs[elf->e_phnum - 1].p_filesz); +- bss_size = (phdrs[elf->e_phnum - 1].p_memsz - +- phdrs[elf->e_phnum - 1].p_filesz); +-#ifdef DEBUG +- printf("aboot: bss at 0x%p, size %#lx\n", bss_start, bss_size); +-#endif +- } else { +- /* Fail silently, it might be a compressed file */ +- return -1; ++ ++ j++; + } ++ ++ nchunks = j; ++ printf("aboot: bss at 0x%p, size %#lx\n", bss_start, bss_size); + + return 0; + } + +--- aboot-1.0_pre20040408/aboot.lds ++++ aboot-1.0_pre20040408/aboot.lds +@@ -1,22 +1,25 @@ + OUTPUT_FORMAT("elf64-alpha") + ENTRY(__start) ++PHDRS { kernel PT_LOAD; } + SECTIONS + { + . = 0x20000000; +- .text : { *(.text) } ++ .text : { *(.text) } :kernel + _etext = .; + PROVIDE (etext = .); +- .rodata : { *(.rodata) } +- .data : { *(.data) CONSTRUCTORS } +- .got : { *(.got) } +- .sdata : { *(.sdata) } ++ .rodata : { *(.rodata*) } :kernel ++ .data : { *(.data*) } :kernel ++ .got : { *(.got) } :kernel ++ .sdata : { *(.sdata) } :kernel + _edata = .; + PROVIDE (edata = .); +- .sbss : { *(.sbss) *(.scommon) } +- .bss : { *(.bss) *(COMMON) } ++ .sbss : { *(.sbss) *(.scommon) } :kernel ++ .bss : { *(.bss) *(COMMON) } :kernel + _end = . ; + PROVIDE (end = .); + ++ /DISCARD/ : { *(.eh_frame) } ++ + .mdebug 0 : { *(.mdebug) } + .note 0 : { *(.note) } + .comment 0 : { *(.comment) } + +--- aboot-1.0_pre20040408/cons.c ++++ aboot-1.0_pre20040408/cons.c +@@ -82,7 +81,7 @@ cons_getenv(long index, char *envval, long maxlen) + * allocated on the stack (which guaranteed to by 8 byte + * aligned). + */ +- char * tmp = alloca(maxlen); ++ char tmp[maxlen]; + long len; + + len = dispatch(CCB_GET_ENV, index, tmp, maxlen - 1); + +--- aboot-1.0_pre20040408/disk.c ++++ aboot-1.0_pre20040408/disk.c +@@ -113,7 +113,7 @@ int + load_uncompressed (int fd) + { + long nread, nblocks; +- unsigned char *buf; ++ char *buf; + int i; + + buf = malloc(bfs->blocksize); +@@ -131,7 +131,7 @@ load_uncompressed (int fd) + + for(i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) +- printf("%02X ", buf[j+16*i]); ++ printf("%02X ", (unsigned char) buf[j+16*i]); + for(j = 0; j < 16; j++) { + c = buf[j+16*i]; + printf("%c", (c >= ' ') ? c : ' '); + +--- aboot-1.0_pre20040408/head.S ++++ aboot-1.0_pre20040408/head.S +@@ -19,8 +19,7 @@ __start: + .quad 0,0,0,0,0,0,0,0 + 1: br $27,2f + 2: ldgp $29,0($27) +- lda $27,main_ +- jsr $26,($27),main_ ++ bsr $26,main_ !samegp + call_pal PAL_halt + .end __start + +@@ -170,4 +169,4 @@ run_kernel: + mov $16,$27 + mov $17,$30 + jmp $31,($27) +- .end run_kernel +\ No newline at end of file ++ .end run_kernel diff --git a/sys-boot/aboot/files/aboot.conf b/sys-boot/aboot/files/aboot.conf new file mode 100644 index 000000000000..02114138e938 --- /dev/null +++ b/sys-boot/aboot/files/aboot.conf @@ -0,0 +1,10 @@ +# +# aboot default configurations +# +0:3/vmlinux.gz ro root=/dev/sda2 +1:3/vmlinux.old.gz ro root=/dev/sda2 +2:3/vmlinux.new.gz ro root=/dev/sda2 +3:3/vmlinux ro root=/dev/sda2 +8:- ro root=/dev/sda2 # fs less boot of raw kernel +9:0/- ro root=/dev/sda2 # fs less boot of (compressed) ECOFF kernel +- diff --git a/sys-boot/aboot/metadata.xml b/sys-boot/aboot/metadata.xml new file mode 100644 index 000000000000..297c7b4b4d3d --- /dev/null +++ b/sys-boot/aboot/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>alpha@gentoo.org</email> + <name>Gentoo Linux Alpha Development</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">aboot</remote-id> + </upstream> +</pkgmetadata> |