Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
GRUB is the GRand Unified Bootloader. Briefly, bootloader is the
first software program that runs when a computer starts. It is
responsible for loading and transferring control to the operating
system kernel software (such as NetBSD or Linux). GRUB understands
ffs, FAT{16,32}, ext2fs, ReiserFS, minixfs, and VSTafs. It can
directly boot NetBSD, FreeBSD, OpenBSD and Linux without any other
bootloader, loading a.out and ELF kernels from the disk and passing
along necessary arguments (in most cases). It can also boot any
operating system (the above, plus e.g. Windows, OS/2) by chaining
to that operating system's specific loader. Grub features a runtime
command line and loads its configuration at boot rather than
requiring rerunning of a separate utility. Other features are TFTP
booting, serial console support, large disk support, support for
both DOS MBR label and BSD disklabel simultaneously, booting from
hard drive or floppy.
GRUB is available for the i386 architecture only.
+27
View File
@@ -0,0 +1,27 @@
===========================================================================
$NetBSD: MESSAGE,v 1.6 2006/12/17 19:21:42 jmmv Exp $
If your root filesystem is of a type not supported directly by grub
(e.g., lfs), you may have difficulties. See the info docs for more
details.
GRUB is not actually installed on your disk until you run a command
such as
grub-install /dev/wd0d
or
grub-install '(hd0)'
To boot NetBSD, put something similar to these lines into /grub/menu.lst:
title NetBSD
root (hd0,0,a) # NetBSD on 1st MBR partition of 1st IDE disk
chainloader +1
Alternatively, for NetBSD 4.x kernels and above, you can use the following
provided that your kernel was built with "options MULTIBOOT" (the default):
title NetBSD
root (hd0,0,a) # NetBSD on 1st MBR partition of 1st IDE disk
kernel /netbsd
===========================================================================
+72
View File
@@ -0,0 +1,72 @@
# $NetBSD: Makefile,v 1.56 2012/10/23 19:51:05 asau Exp $
DISTNAME= grub-0.97
PKGREVISION= 9
CATEGORIES= sysutils
MASTER_SITES= ftp://alpha.gnu.org/gnu/grub/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.gnu.org/software/grub/
COMMENT= GRand Unified Bootloader -- Boots *BSD, Linux, groks ffs, FAT, ext2
LICENSE= gnu-gpl-v2
CONFLICTS= grub2-[0-9]*
ONLY_FOR_PLATFORM= *-*-i386 NetBSD-[5-9].*-x86_64
GNU_CONFIGURE= YES
USE_TOOLS+= gmake
INFO_FILES= YES
INSTALLATION_DIRS= share/doc/grub
BUILDLINK_TRANSFORM+= opt:-fno-builtin:-ffreestanding
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= GRUB_NETWORK_CARDS
BUILD_DEFS+= GRUB_PRESET_COMMAND
BUILD_DEFS+= GRUB_SCAN_ARGS
.include "../../mk/curses.buildlink3.mk"
PLIST_VARS+= netboot
.if defined(GRUB_NETWORK_CARDS)
CONFIGURE_ARGS+= --enable-diskless
PLIST.netboot= yes
.for nic in ${GRUB_NETWORK_CARDS}
CONFIGURE_ARGS+= --enable-${nic}
.endfor
post-install: grub-netboot-install
.PHONY: grub-netboot-install
grub-netboot-install:
${INSTALL_DATA} ${WRKSRC}/netboot/README.netboot \
${PREFIX}/share/doc/grub
.endif
.if defined(GRUB_PRESET_COMMAND) && !empty(GRUB_PRESET_COMMAND)
CONFIGURE_ARGS+= --enable-preset-menu=${WRKSRC}/presetmenu
post-extract: grub-presetmenu
.PHONY: grub-presetmenu
grub-presetmenu:
${ECHO} ${GRUB_PRESET_COMMAND} > ${WRKSRC}/presetmenu
.endif
.if defined(GRUB_SCAN_ARGS)
CONFIGURE_ARGS+= ${GRUB_SCAN_ARGS}
.endif
SUBST_CLASSES+= grubterm
SUBST_STAGE.grubterm= post-patch
SUBST_MESSAGE.grubterm= Changing references to <term.h> to <grubterm.h>
SUBST_FILES.grubterm= grub/*.c stage2/Makefile.in stage2/*.c
SUBST_SED.grubterm= -e "s,<term.h>,<grubterm.h>,g"
SUBST_SED.grubterm+= -e "s, term.h , grubterm.h ,g"
post-extract:
${MV} ${WRKSRC}/stage2/term.h ${WRKSRC}/stage2/grubterm.h
.include "../../mk/bsd.pkg.mk"
+30
View File
@@ -0,0 +1,30 @@
@comment $NetBSD: PLIST,v 1.15 2009/06/14 18:16:06 joerg Exp $
bin/mbchk
info/grub.info
info/multiboot.info
man/man1/mbchk.1
man/man8/grub-install.8
man/man8/grub-md5-crypt.8
man/man8/grub-terminfo.8
man/man8/grub.8
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/e2fs_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/fat_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/ffs_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/iso9660_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/jfs_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/minix_stage1_5
${PLIST.netboot}lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/nbgrub
${PLIST.netboot}lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/pxegrub
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/reiserfs_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/stage1
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/stage2
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/stage2_eltorito
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/ufs2_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/vstafs_stage1_5
lib/grub/${MACHINE_ARCH}-${LOWER_VENDOR}/xfs_stage1_5
sbin/grub
sbin/grub-install
sbin/grub-md5-crypt
sbin/grub-set-default
sbin/grub-terminfo
${PLIST.netboot}share/doc/grub/README.netboot
+19
View File
@@ -0,0 +1,19 @@
$NetBSD: distinfo,v 1.23 2010/02/21 16:44:52 wiz Exp $
SHA1 (grub-0.97.tar.gz) = 2580626c4579bd99336d3af4482c346c95dac4fb
RMD160 (grub-0.97.tar.gz) = 7fb5674edf0c950bd38e94f85ff1e2909aa741f0
Size (grub-0.97.tar.gz) = 971783 bytes
SHA1 (patch-aa) = 2fd8872e6e3d3912d41d3eb8dff9371320a53bf3
SHA1 (patch-ab) = 945ee0385d82f4ea98e86acfa449bcbf2a214285
SHA1 (patch-ac) = dc7774a09ca88f6696e0680a7be39df56244eedc
SHA1 (patch-ad) = 613e915a015ad22c9bd5712d416e12b1b81fdb93
SHA1 (patch-ae) = 9e41bd80a6aed16d7d638c808d81c34f4114578a
SHA1 (patch-af) = 9447ead52940203c998afb67e38ae3d3d26097f8
SHA1 (patch-ag) = 1dd709652d457ba03dda47b64d22cd9320f81e26
SHA1 (patch-ah) = ff62b64177a0e68400c32e013cb585526db94217
SHA1 (patch-ai) = 60088cf6786a364da37e19fbb5df4c6fd7641016
SHA1 (patch-aj) = bfbac23a7c250ed615dcfb4a988708c970b617d8
SHA1 (patch-ak) = 8e67eb603e639ca47536cb191e7e29ec48b95642
SHA1 (patch-al) = 58761e867ff182ad46c42b15575395ba8c38fbd6
SHA1 (patch-am) = d848f67f7f21fa076751d14bd3235ae7351be1b7
SHA1 (patch-an) = b86401eceed91ff49a00a1e2a7aa49009e01a875
+18
View File
@@ -0,0 +1,18 @@
# $NetBSD: hacks.mk,v 1.2 2008/02/08 10:34:20 tnn Exp $
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "DragonFly" && !empty(PKGSRC_COMPILER:Mgcc)
#
# The standalone modules doesn't support propolice.
#
.if !defined(HAS_PROPOLICE)
HAS_PROPOLICE!= ( ${CC} -v 2>&1 | ${GREP} 'propolice' ) 2>/dev/null || echo no
MAKEVARS+= HAS_PROPOLICE
.endif
.if ${HAS_PROPOLICE} != "no"
CFLAGS+= -fno-stack-protector
CXXFLAGS+= -fno-stack-protector
.endif
.endif
+18
View File
@@ -0,0 +1,18 @@
$NetBSD: patch-aa,v 1.3 2006/10/17 21:55:33 bad Exp $
--- stage2/pc_slice.h.orig 2003-07-09 13:45:53.000000000 +0200
+++ stage2/pc_slice.h 2006-09-18 00:36:35.000000000 +0200
@@ -246,6 +246,13 @@
#define FS_HFS 15 /* Macintosh HFS */
#define FS_FILECORE 16 /* Acorn Filecore Filing System */
#define FS_EXT2FS 17 /* Linux Extended 2 file system */
+#define FS_NTFS 18 /* Windows/NT file system */
+#define FS_RAID 19 /* RAIDframe component */
+#define FS_CCD 20 /* concatenated disk component */
+#define FS_JFS2 21 /* IBM JFS2 */
+#define FS_APPLEUFS 22 /* Apple UFS */
+
+#define RF_PROTECTED_SECTORS 64 /* sectors reserved by RAIDframe */
#endif /* _PC_SLICE_H */
+20
View File
@@ -0,0 +1,20 @@
$NetBSD: patch-ab,v 1.3 2006/10/17 21:55:33 bad Exp $
--- stage2/disk_io.c.orig 2004-05-23 18:35:24.000000000 +0200
+++ stage2/disk_io.c 2006-09-18 01:12:19.000000000 +0200
@@ -632,6 +632,15 @@
bsd_evil_hack = 4;
#endif /* ! STAGE1_5 */
+ if (BSD_PART_TYPE(buf, i) == FS_RAID)
+ {
+ /* found a RAID partition, restart inside that */
+ /* *offset += RF_PROTECTED_SECTORS; */
+ *start += RF_PROTECTED_SECTORS;
+ *len -= RF_PROTECTED_SECTORS;
+ /* *partition = (*partition & 0xFF00FF) | (0xFF << 8); */
+ /* return next_bsd_partition(); */
+ }
return 1;
}
}
+186
View File
@@ -0,0 +1,186 @@
$NetBSD: patch-ac,v 1.4 2006/02/03 09:59:32 jmmv Exp $
--- stage2/boot.c.orig 2004-03-30 13:44:08.000000000 +0200
+++ stage2/boot.c
@@ -22,6 +22,7 @@
#include "shared.h"
#include "freebsd.h"
+#include "netbsd_reboot.h"
#include "imgact_aout.h"
#include "i386-elf.h"
@@ -104,7 +105,21 @@ load_image (char *kernel, char *arg, ker
&& BOOTABLE_I386_ELF ((*((Elf32_Ehdr *) buffer))))
{
if (type == KERNEL_TYPE_MULTIBOOT)
- entry_addr = (entry_func) pu.elf->e_entry;
+ {
+ if (flags & MULTIBOOT_AOUT_KLUDGE)
+ {
+ struct multiboot_header *mbh;
+
+ mbh = (struct multiboot_header *) (buffer + i);
+
+ entry_addr = (entry_func) mbh->entry_addr;
+ text_len = mbh->load_end_addr - mbh->load_addr;
+ data_len = 0;
+ bss_len = mbh->bss_end_addr - mbh->load_end_addr;
+ }
+ else
+ entry_addr = (entry_func) pu.elf->e_entry;
+ }
else
entry_addr = (entry_func) (pu.elf->e_entry & 0xFFFFFF);
@@ -610,9 +625,19 @@ load_image (char *kernel, char *arg, ker
if (type == KERNEL_TYPE_FREEBSD || type == KERNEL_TYPE_NETBSD)
memaddr = RAW_ADDR (phdr->p_paddr & 0xFFFFFF);
else
- memaddr = RAW_ADDR (phdr->p_paddr);
+ {
+ memaddr = RAW_ADDR (phdr->p_paddr);
+ if (flags & MULTIBOOT_AOUT_KLUDGE &&
+ memaddr >= mbi.mem_upper * 1024)
+ {
+ memaddr &= RAW_ADDR (0xFFFFFF);
+ }
+ }
memsiz = phdr->p_memsz;
+ if (flags & MULTIBOOT_AOUT_KLUDGE)
+ memsiz += bss_len;
+
if (memaddr < RAW_ADDR (0x100000))
errnum = ERR_BELOW_1MB;
@@ -872,6 +897,91 @@ bsd_boot_entry (int flags, int bootdev,
* variables.
*/
+int
+netbsd_value(char arg)
+{
+ switch (arg) {
+ case 'a':
+ return(NB_RB_ASKNAME);
+ break;
+ case 'b':
+ return(NB_RB_HALT);
+ break;
+ case 'c':
+ return(NB_RB_USERCONF);
+ break;
+ case 'd':
+ return(NB_RB_KDB);
+ break;
+ case 'm':
+ return(NB_RB_MINIROOT);
+ break;
+ case 'q':
+ return(NB_AB_QUIET);
+ break;
+ case 's':
+ return(NB_RB_SINGLE);
+ break;
+ case 'v':
+ return(NB_AB_VERBOSE);
+ break;
+ case 'x':
+ return(NB_AB_DEBUG);
+ break;
+ case 'z':
+ return(NB_AB_SILENT);
+ break;
+ default:
+ break;
+ }
+ return(0);
+}
+
+int
+freebsd_value(char arg)
+{
+ switch (arg) {
+ case 'C':
+ return(RB_CDROM);
+ break;
+ case 'a':
+ return(RB_ASKNAME);
+ break;
+ case 'b':
+ return(RB_HALT);
+ break;
+ case 'c':
+ return(RB_CONFIG);
+ break;
+ case 'd':
+ return(RB_KDB);
+ break;
+ case 'D':
+ return(RB_MULTIPLE);
+ break;
+ case 'g':
+ return(RB_GDB);
+ break;
+ case 'h':
+ return(RB_SERIAL);
+ break;
+ case 'm':
+ return(RB_MUTE);
+ break;
+ case 'r':
+ return(RB_DFLTROOT);
+ break;
+ case 's':
+ return(RB_SINGLE);
+ break;
+ case 'v':
+ return(RB_VERBOSE);
+ break;
+ default:
+ break;
+ }
+ return(0);
+}
void
bsd_boot (kernel_t type, int bootdev, char *arg)
@@ -894,31 +1004,12 @@ bsd_boot (kernel_t type, int bootdev, ch
{
while (*str && *str != ' ')
{
- if (*str == 'C')
- clval |= RB_CDROM;
- if (*str == 'a')
- clval |= RB_ASKNAME;
- if (*str == 'b')
- clval |= RB_HALT;
- if (*str == 'c')
- clval |= RB_CONFIG;
- if (*str == 'd')
- clval |= RB_KDB;
- if (*str == 'D')
- clval |= RB_MULTIPLE;
- if (*str == 'g')
- clval |= RB_GDB;
- if (*str == 'h')
- clval |= RB_SERIAL;
- if (*str == 'm')
- clval |= RB_MUTE;
- if (*str == 'r')
- clval |= RB_DFLTROOT;
- if (*str == 's')
- clval |= RB_SINGLE;
- if (*str == 'v')
- clval |= RB_VERBOSE;
- str++;
+ if (type == KERNEL_TYPE_NETBSD) {
+ clval |= netbsd_value(*str);
+ } else {
+ clval |= freebsd_value(*str);
+ }
+ str++;
}
continue;
}
+71
View File
@@ -0,0 +1,71 @@
$NetBSD: patch-ad,v 1.4 2005/10/23 19:53:24 rillig Exp $
--- stage2/netbsd_reboot.h 1970-01-01 01:00:00.000000000 +0100
+++ stage2/netbsd_reboot.h 2005-07-25 21:49:37.000000000 +0200
@@ -0,0 +1,66 @@
+/* %NetBSD: reboot.h,v 1.22 2005/02/03 19:20:02 perry Exp % */
+
+/*
+ * Copyright (c) 1982, 1986, 1988, 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
+ *
+ * @(#)reboot.h 8.3 (Berkeley) 12/13/94
+ */
+
+/*
+ * WARNING! This file is stripped and modified!
+ */
+
+/*
+ * Arguments to reboot system call. These are passed to the boot program,
+ * and then on to init.
+ */
+#define NB_RB_AUTOBOOT 0 /* flags for system auto-booting itself */
+
+#define NB_RB_ASKNAME 0x001 /* ask for file name to reboot from */
+#define NB_RB_SINGLE 0x002 /* reboot to single user only */
+#define NB_RB_NOSYNC 0x004 /* dont sync before reboot */
+#define NB_RB_HALT 0x008 /* don't reboot, just halt */
+#define NB_RB_INITNAME 0x010 /* name given for /etc/init (unused) */
+#define __NB_RB_UNUSED1 0x020 /* was RB_DFLTROOT, obsolete */
+#define NB_RB_KDB 0x040 /* give control to kernel debugger */
+#define NB_RB_RDONLY 0x080 /* mount root fs read-only */
+#define NB_RB_DUMP 0x100 /* dump kernel memory before reboot */
+#define NB_RB_MINIROOT 0x200 /* mini-root present in memory at boot time */
+#define NB_RB_STRING 0x400 /* use provided bootstr */
+#define NB_RB_POWERDOWN (RB_HALT|0x800) /* turn power off (or at least halt) */
+#define NB_RB_USERCONF 0x1000 /* change configured devices */
+
+/*
+ * Extra autoboot flags (passed by boot prog to kernel). See also
+ * macros bootverbose, bootquiet in <sys/systm.h>.
+ */
+#define NB_AB_NORMAL 0x00000 /* boot normally (default) */
+#define NB_AB_QUIET 0x10000 /* boot quietly */
+#define NB_AB_VERBOSE 0x20000 /* boot verbosely */
+#define NB_AB_SILENT 0x40000 /* boot silently */
+#define NB_AB_DEBUG 0x80000 /* boot with debug messages */
+22
View File
@@ -0,0 +1,22 @@
$NetBSD: patch-ae,v 1.4 2010/02/21 16:44:52 wiz Exp $
--- stage2/shared.h 2004-06-19 18:40:09.000000000 +0200
+++ stage2/shared.h 2005-07-25 21:33:19.000000000 +0200
@@ -911,7 +911,7 @@ int substring (const char *s1, const cha
int nul_terminate (char *str);
int get_based_digit (int c, int base);
int safe_parse_maxint (char **str_ptr, int *myint_ptr);
-int memcheck (int start, int len);
+int memcheck (unsigned long int start, unsigned long int len);
void grub_putstr (const char *str);
#ifndef NO_DECOMPRESSION
@@ -975,6 +975,8 @@
#ifndef STAGE1_5
void bsd_boot (kernel_t type, int bootdev, char *arg)
__attribute__ ((noreturn));
+int freebsd_value(char arg);
+int netbsd_value(char arg);
/* Define flags for load_image here. */
/* Don't pass a Linux's mem option automatically. */
+14
View File
@@ -0,0 +1,14 @@
$NetBSD: patch-af,v 1.3 2006/10/17 21:55:33 bad Exp $
--- stage2/fsys_ffs.c.orig 2003-07-09 13:45:52.000000000 +0200
+++ stage2/fsys_ffs.c 2006-09-20 00:38:40.000000000 +0200
@@ -83,7 +83,8 @@
int retval = 1;
if ((((current_drive & 0x80) || (current_slice != 0))
- && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS))
+ && ! (IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)
+ || IS_PC_SLICE_TYPE_BSD_WITH_FS(current_slice, FS_RAID)))
|| part_length < (SBLOCK + (SBSIZE / DEV_BSIZE))
|| !devread (SBLOCK, 0, SBSIZE, (char *) SUPERBLOCK)
|| SUPERBLOCK->fs_magic != FS_MAGIC)
+14
View File
@@ -0,0 +1,14 @@
$NetBSD: patch-ag,v 1.3 2006/10/17 21:55:33 bad Exp $
--- stage2/fsys_ufs2.c.orig 2004-06-19 14:17:52.000000000 +0200
+++ stage2/fsys_ufs2.c
@@ -88,7 +88,8 @@ ufs2_mount (void)
type = 0;
if (! (((current_drive & 0x80) || (current_slice != 0))
- && ! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)))
+ && ! (IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_BSDFFS)
+ || IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_RAID))))
{
for (i = 0; sblock_try[i] != -1; ++i)
{
+24
View File
@@ -0,0 +1,24 @@
$NetBSD: patch-ah,v 1.4 2006/12/17 19:21:43 jmmv Exp $
--- docs/grub.info.orig 2005-05-08 05:00:05.000000000 +0200
+++ docs/grub.info
@@ -881,10 +881,18 @@ GRUB can load NetBSD a.out and ELF direc
2. Load the kernel with `kernel' (*note kernel::). You should append
the ugly option `--type=netbsd', if you want to load an ELF
- kernel, like this:
+ kernel that corresponds to NetBSD 3.x, previous versions or a
+ recent kernel built without Multiboot support:
grub> kernel --type=netbsd /netbsd-elf
+ Alternatively, if you want to load a Multiboot-enabled kernel, the
+ default in NetBSD 4.x and above, use the following:
+
+ grub> kernel /netbsd-multiboot
+
+ This is the recommended method if available.
+
3. Run `boot' (*note boot::).
For now, however, GRUB doesn't allow you to pass kernel parameters,
+26
View File
@@ -0,0 +1,26 @@
$NetBSD: patch-ai,v 1.2 2005/11/12 06:35:24 jlam Exp $
--- util/grub-install.in.orig 2004-07-24 14:57:31.000000000 -0400
+++ util/grub-install.in
@@ -119,10 +119,10 @@ convert () {
| sed "s%.*/r\{0,1\}da[0-9]\(s[0-9]*[a-h]\)%\1%"`
;;
netbsd* | knetbsd*-gnu)
- tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([sw]d[0-9]*\).*$%r\1d%' \
+ tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([lsw]d[0-9]*\).*$%r\1d%' \
| sed 's%r\{0,1\}\(fd[0-9]*\).*$%r\1a%'`
tmp_part=`echo "$1" \
- | sed "s%.*/r\{0,1\}[sw]d[0-9]\([abe-p]\)%\1%"`
+ | sed "s%.*/r\{0,1\}[lsw]d[0-9]\([abe-p]\)%\1%"`
;;
*)
echo "grub-install does not support your OS yet." 1>&2
@@ -321,7 +321,7 @@ fi
# Stage 1.5 does not exist.
# Create the GRUB directory if it is not present.
-test -d "$bootdir" || mkdir "$bootdir" || exit 1
+test -z "$bootdir" || test -d "$bootdir" || mkdir "$bootdir" || exit 1
test -d "$grubdir" || mkdir "$grubdir" || exit 1
# If --recheck is specified, remove the device map, if present.
+15
View File
@@ -0,0 +1,15 @@
$NetBSD: patch-aj,v 1.1 2003/07/13 17:35:06 wiz Exp $
--- stage2/bios.c.orig Sun Dec 30 08:33:23 2001
+++ stage2/bios.c
@@ -20,6 +20,10 @@
#include "shared.h"
+void __enable_execute_stack(void *addr)
+{
+}
+
/* These are defined in asm.S, and never be used elsewhere, so declare the
prototypes here. */
+14
View File
@@ -0,0 +1,14 @@
$NetBSD: patch-ak,v 1.3 2007/06/25 13:05:56 tron Exp $
--- /build/pkg_comp/default/pkg_comp/obj/pkgsrc/sysutils/grub/default/grub-0.97/netboot/etherboot.h 2003-07-09 13:45:37.000000000 +0200
+++ netboot/etherboot.h 2007-06-24 15:28:38.000000000 +0200
@@ -531,9 +531,7 @@
extern int network_ready;
extern struct rom_info rom;
extern struct arptable_t arptable[MAX_ARP];
-extern struct bootpd_t bootp_data;
#define BOOTP_DATA_ADDR (&bootp_data)
-extern unsigned char *end_of_rfc1533;
/* config.c */
extern struct nic nic;
+22
View File
@@ -0,0 +1,22 @@
$NetBSD: patch-al,v 1.3 2007/06/25 13:05:57 tron Exp $
--- /build/pkg_comp/default/pkg_comp/obj/pkgsrc/sysutils/grub/default/grub-0.97/netboot/sis900.c 2003-07-09 13:45:38.000000000 +0200
+++ netboot/sis900.c 2007-06-24 18:15:38.000000000 +0200
@@ -901,7 +901,7 @@
const char *p) /* Packet */
{
u32 status, to, nstype;
- u32 tx_status;
+ volatile u32 tx_status;
/* Stop the transmitter */
outl(TxDIS, ioaddr + cr);
@@ -940,7 +940,7 @@
to = currticks() + TX_TIMEOUT;
- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
+ while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
/* wait */ ;
if (currticks() >= to) {
+22
View File
@@ -0,0 +1,22 @@
$NetBSD: patch-am,v 1.3 2007/06/25 13:05:57 tron Exp $
--- /build/pkg_comp/default/pkg_comp/obj/pkgsrc/sysutils/grub/default/grub-0.97/netboot/natsemi.c 2003-07-09 13:45:38.000000000 +0200
+++ netboot/natsemi.c 2007-06-24 18:25:21.000000000 +0200
@@ -608,7 +608,7 @@
const char *p) /* Packet */
{
u32 status, to, nstype;
- u32 tx_status;
+ volatile u32 tx_status;
/* Stop the transmitter */
outl(TxOff, ioaddr + ChipCmd);
@@ -647,7 +647,7 @@
to = currticks() + TX_TIMEOUT;
- while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to))
+ while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to))
/* wait */ ;
if (currticks() >= to) {
+31
View File
@@ -0,0 +1,31 @@
$NetBSD: patch-an,v 1.3 2010/02/21 16:44:52 wiz Exp $
--- stage2/char_io.c
+++ stage2/char_io.c
@@ -1175,13 +1175,13 @@
#endif /* ! STAGE1_5 */
int
-memcheck (int addr, int len)
+memcheck (unsigned long int addr, unsigned long int len)
{
#ifdef GRUB_UTIL
- auto int start_addr (void);
- auto int end_addr (void);
+ auto unsigned long int start_addr (void);
+ auto int unsigned long end_addr (void);
- auto int start_addr (void)
+ auto unsigned long int start_addr (void)
{
int ret;
# if defined(HAVE_START_SYMBOL)
@@ -1192,7 +1192,7 @@
return ret;
}
- auto int end_addr (void)
+ auto unsigned long int end_addr (void)
{
int ret;
# if defined(HAVE_END_SYMBOL)