boot2.c (163533) | boot2.c (164134) |
---|---|
1/*- 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. 9 * 10 * This software is provided "AS IS" and without any express or 11 * implied warranties, including, without limitation, the implied 12 * warranties of merchantability and fitness for a particular 13 * purpose. 14 */ 15 16#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Robert Nordier 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are freely 6 * permitted provided that the above copyright notice and this 7 * paragraph and the following disclaimer are duplicated in all 8 * such forms. 9 * 10 * This software is provided "AS IS" and without any express or 11 * implied warranties, including, without limitation, the implied 12 * warranties of merchantability and fitness for a particular 13 * purpose. 14 */ 15 16#include <sys/cdefs.h> |
17__FBSDID("$FreeBSD: head/sys/boot/arm/at91/boot2/boot2.c 163533 2006-10-20 09:12:05Z imp $"); | 17__FBSDID("$FreeBSD: head/sys/boot/arm/at91/boot2/boot2.c 164134 2006-11-09 20:07:26Z imp $"); |
18 19#include <sys/param.h> 20#include <sys/disklabel.h> 21#include <sys/diskmbr.h> 22#include <sys/dirent.h> 23#include <sys/reboot.h> 24 25#include <machine/elf.h> 26 27#include <stdarg.h> 28 29#include "emac.h" 30#include "lib.h" 31#include "sd-card.h" 32#include "ee.h" | 18 19#include <sys/param.h> 20#include <sys/disklabel.h> 21#include <sys/diskmbr.h> 22#include <sys/dirent.h> 23#include <sys/reboot.h> 24 25#include <machine/elf.h> 26 27#include <stdarg.h> 28 29#include "emac.h" 30#include "lib.h" 31#include "sd-card.h" 32#include "ee.h" |
33#include "board.h" |
|
33 34#define RBX_ASKNAME 0x0 /* -a */ 35#define RBX_SINGLE 0x1 /* -s */ 36/* 0x2 is reserved for log2(RB_NOSYNC). */ 37/* 0x3 is reserved for log2(RB_HALT). */ 38/* 0x4 is reserved for log2(RB_INITNAME). */ 39#define RBX_DFLTROOT 0x5 /* -r */ 40/* #define RBX_KDB 0x6 -d */ --- 20 unchanged lines hidden (view full) --- 61/* pass: -a, -s, -r, -v, -g */ 62#define RBX_MASK (OPT_SET(RBX_ASKNAME) | OPT_SET(RBX_SINGLE) | \ 63 OPT_SET(RBX_DFLTROOT) | \ 64 OPT_SET(RBX_VERBOSE) | \ 65 OPT_SET(RBX_GDB)) 66 67#define PATH_CONFIG "/boot.config" 68//#define PATH_KERNEL "/boot/kernel/kernel" | 34 35#define RBX_ASKNAME 0x0 /* -a */ 36#define RBX_SINGLE 0x1 /* -s */ 37/* 0x2 is reserved for log2(RB_NOSYNC). */ 38/* 0x3 is reserved for log2(RB_HALT). */ 39/* 0x4 is reserved for log2(RB_INITNAME). */ 40#define RBX_DFLTROOT 0x5 /* -r */ 41/* #define RBX_KDB 0x6 -d */ --- 20 unchanged lines hidden (view full) --- 62/* pass: -a, -s, -r, -v, -g */ 63#define RBX_MASK (OPT_SET(RBX_ASKNAME) | OPT_SET(RBX_SINGLE) | \ 64 OPT_SET(RBX_DFLTROOT) | \ 65 OPT_SET(RBX_VERBOSE) | \ 66 OPT_SET(RBX_GDB)) 67 68#define PATH_CONFIG "/boot.config" 69//#define PATH_KERNEL "/boot/kernel/kernel" |
69#define PATH_KERNEL "/kernel.gz.tramp" | 70#define PATH_KERNEL "/boot/kernel/kernel.gz.tramp" |
70 71#define NOPT 5 72 73#define OPT_SET(opt) (1 << (opt)) 74#define OPT_CHECK(opt) ((opts) & OPT_SET(opt)) 75 76extern uint32_t _end; 77 --- 58 unchanged lines hidden (view full) --- 136 default: 137 if (s - cmd < sizeof(cmd) - 1) 138 *s++ = c; 139 xputchar(c); 140 } 141 } 142} 143 | 71 72#define NOPT 5 73 74#define OPT_SET(opt) (1 << (opt)) 75#define OPT_CHECK(opt) ((opts) & OPT_SET(opt)) 76 77extern uint32_t _end; 78 --- 58 unchanged lines hidden (view full) --- 137 default: 138 if (s - cmd < sizeof(cmd) - 1) 139 *s++ = c; 140 xputchar(c); 141 } 142 } 143} 144 |
144// Each board has to provide one of these. 145void board_init(void); 146 | |
147int 148main(void) 149{ 150 int autoboot, c = 0; 151 ino_t ino; 152 153 board_init(); 154 EMAC_Init(); --- 164 unchanged lines hidden --- | 145int 146main(void) 147{ 148 int autoboot, c = 0; 149 ino_t ino; 150 151 board_init(); 152 EMAC_Init(); --- 164 unchanged lines hidden --- |