diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-11-08 22:41:42 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2011-11-08 22:41:42 +0000 |
commit | 61240962b2288bd0cc96bb267b4241b78e644ecf (patch) | |
tree | 562e5800922e0313096c1e8a0e598e941cc5650a /sys | |
parent | 3cccbcc99dac53f2d09146af229f2f36e12094ba (diff) |
Let beagle GENERIC work as 'swap generic'.
ok deraadt@ drahn@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/beagle/beagle/beagle_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/beagle/beagle/uboot_tags.c | 4 | ||||
-rw-r--r-- | sys/arch/beagle/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/beagle/include/bootconfig.h | 5 | ||||
-rw-r--r-- | sys/arch/beagle/stand/boot.scr/boot.cmd | 5 |
5 files changed, 14 insertions, 8 deletions
diff --git a/sys/arch/beagle/beagle/beagle_machdep.c b/sys/arch/beagle/beagle/beagle_machdep.c index 1712777de3e..253c796a24d 100644 --- a/sys/arch/beagle/beagle/beagle_machdep.c +++ b/sys/arch/beagle/beagle/beagle_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: beagle_machdep.c,v 1.10 2011/10/24 22:49:07 drahn Exp $ */ +/* $OpenBSD: beagle_machdep.c,v 1.11 2011/11/08 22:41:41 krw Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -503,7 +503,7 @@ initarm(void *arg0, void *arg1, void *arg2) * Examine the boot args string for options we need to know about * now. */ - process_kernel_args(""); + process_kernel_args(bootconfig.bootstring); #ifdef RAMDISK_HOOKS boothowto |= RB_DFLTROOT; #endif /* RAMDISK_HOOKS */ diff --git a/sys/arch/beagle/beagle/uboot_tags.c b/sys/arch/beagle/beagle/uboot_tags.c index f4041d1df46..30198580986 100644 --- a/sys/arch/beagle/beagle/uboot_tags.c +++ b/sys/arch/beagle/beagle/uboot_tags.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uboot_tags.c,v 1.2 2011/10/24 22:49:07 drahn Exp $ */ +/* $OpenBSD: uboot_tags.c,v 1.3 2011/11/08 22:41:41 krw Exp $ */ /* * Copyright (c) 2011 Dale Rahn <drahn@openbsd.org> * @@ -106,6 +106,8 @@ parse_uboot_tags(void *handle) case ATAG_CMDLINE: printf("atag cmdline [%s]\n", tag->u.cmdline.cmdline); + strncpy(bootconfig.bootstring, tag->u.cmdline.cmdline, + sizeof(bootconfig.bootstring)); break; case ATAG_SERIAL: printf("atag serial 0x%08x:%08x\n", diff --git a/sys/arch/beagle/conf/GENERIC b/sys/arch/beagle/conf/GENERIC index 58d52fc97ef..dafedb5f63f 100644 --- a/sys/arch/beagle/conf/GENERIC +++ b/sys/arch/beagle/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.11 2011/11/06 01:34:53 drahn Exp $ +# $OpenBSD: GENERIC,v 1.12 2011/11/08 22:41:41 krw Exp $ # # GENERIC machine description file # @@ -47,7 +47,7 @@ makeoptions CPUFLAGS="-mcpu=armv5" # dont have gcc v7 support yet. option WSDISPLAY_DEFAULTSCREENS=1 #option WSDISPLAY_COMPAT_PCVT # emulate some ioctls -config bsd root on sd0a swap on sd0b +config bsd swap generic # The main bus device mainbus0 at root diff --git a/sys/arch/beagle/include/bootconfig.h b/sys/arch/beagle/include/bootconfig.h index bb612488a51..cec496f2ac7 100644 --- a/sys/arch/beagle/include/bootconfig.h +++ b/sys/arch/beagle/include/bootconfig.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bootconfig.h,v 1.3 2011/09/20 22:02:13 miod Exp $ */ +/* $OpenBSD: bootconfig.h,v 1.4 2011/11/08 22:41:41 krw Exp $ */ /* $NetBSD: bootconfig.h,v 1.2 2001/06/21 22:08:28 chris Exp $ */ /* @@ -51,14 +51,15 @@ typedef struct _PhysMem { } PhysMem; #define DRAM_BLOCKS 2 +#define MAX_BOOT_STRING 255 typedef struct _BootConfig { PhysMem dram[DRAM_BLOCKS]; u_int dramblocks; + char bootstring[MAX_BOOT_STRING]; } BootConfig; extern BootConfig bootconfig; -#define MAX_BOOT_STRING 255 #endif /* _KERNEL || _STANDALONE */ #if defined(_KERNEL) diff --git a/sys/arch/beagle/stand/boot.scr/boot.cmd b/sys/arch/beagle/stand/boot.scr/boot.cmd index 67b954b1d10..13eaeb9b0c1 100644 --- a/sys/arch/beagle/stand/boot.scr/boot.cmd +++ b/sys/arch/beagle/stand/boot.scr/boot.cmd @@ -1 +1,4 @@ -fatload mmc 0 0x82800000 bsd.umg; bootm 0x82800000 +setenv loadaddr 0x82800000 ; +setenv bootargs DSBOsd0i:/bsd.umg ; +fatload mmc 0 ${loadaddr} bsd.umg ; +bootm ${loadaddr} |