From owner-p4-projects@FreeBSD.ORG Fri Apr 28 22:00:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 35A6916A408; Fri, 28 Apr 2006 22:00:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBEE416A400 for ; Fri, 28 Apr 2006 22:00:53 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A111843D46 for ; Fri, 28 Apr 2006 22:00:53 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3SM0qNL002956 for ; Fri, 28 Apr 2006 22:00:53 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3SM0qxg002935 for perforce@freebsd.org; Fri, 28 Apr 2006 22:00:52 GMT (envelope-from imp@freebsd.org) Date: Fri, 28 Apr 2006 22:00:52 GMT Message-Id: <200604282200.k3SM0qxg002935@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 96330 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 22:00:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=96330 Change 96330 by imp@imp_hammer on 2006/04/28 22:00:03 Trim a bit. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#13 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#13 (text+ko) ==== @@ -1,6 +1,8 @@ # $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.2 2006/04/21 07:41:36 imp Exp $ .if !target(__at91_boot_Makefile.inc__) +.PATH: ${.CURDIR}/../../../../libkern ${.CURDIR}/../../../../libkern/arm + __at91_boot_Makefile.inc__: CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#2 (text+ko) ==== @@ -1,13 +1,10 @@ # $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.1 2006/04/19 17:16:48 imp Exp $ -# A value of 0x80 enables LBA support. -BOOT_BOOT1_FLAGS?= 0x80 - BOOT_COMCONSOLE_SPEED?= 9600 P=boot2 FILES=${P} -SRCS=arm_init.s boot2.c divsi3.S ashldi3.c +SRCS=arm_init.s boot2.c ashldi3.c divsi3.S NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} @@ -18,7 +15,5 @@ -I${.CURDIR}/../../../common \ -I${.CURDIR}/../../../.. \ -D_KERNEL \ - -DFLAGS=${BOOT_BOOT1_FLAGS} \ - -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ - -DSIOFMT=${B2SIOFMT} \ + -DUFS1_ONLY \ -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \ ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#2 (text+ko) ==== @@ -68,7 +68,6 @@ OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL)) #define PATH_CONFIG "/boot.config" -#define PATH_BOOT3 "/boot/loader" #define PATH_KERNEL "/boot/kernel/kernel" #define ARGS 0x900 @@ -90,7 +89,7 @@ extern uint32_t _end; -static const char optstr[NOPT] = "DhaCgmnpqrsv"; /* Also 'P', 'S' */ +static const char optstr[NOPT] = "DhaCgmnpqrsv"; /* Also 'P' */ static const unsigned char flags[NOPT] = { RBX_DUAL, RBX_SERIAL, @@ -113,7 +112,7 @@ static char cmd[512]; static char kname[1024]; static uint32_t opts; -static int comspeed = SIOSPD; +//static int comspeed = SIOSPD; void exit(int); static void load(void); @@ -213,24 +212,11 @@ *cmd = 0; } - /* - * Try to exec stage 3 boot loader. If interrupted by a keypress, - * or in case of failure, try to load a kernel directly instead. - */ - - if (autoboot && !*kname) { - memcpy(kname, PATH_BOOT3, sizeof(PATH_BOOT3)); - if (getc(3) == -1) { - load(); - memcpy(kname, PATH_KERNEL, sizeof(PATH_KERNEL)); - } - } - /* Present the user with the boot2 prompt. */ for (;;) { if (!autoboot || !OPT_CHECK(RBX_QUIET)) - printf("\nFreeBSD/i386 boot\n" + printf("\nFreeBSD/arm boot\n" "Default: %s\n" "boot: ", kname); if (!autoboot || getc(5) == -1) @@ -252,12 +238,14 @@ struct exec ex; Elf32_Ehdr eh; } hdr; +#if 0 static Elf32_Phdr ep[2]; static Elf32_Shdr es[2]; +#endif caddr_t p; ino_t ino; uint32_t addr, x; - int fmt, i, j; + int fmt/*, i, j*/; if (!(ino = lookup(kname))) { if (!ls) @@ -338,7 +326,7 @@ { char *arg = cmd; char *ep, *p; - int c, i, j; + int c, i; while ((c = *arg++)) { if (c == ' ' || c == '\t' || c == '\n') @@ -349,16 +337,6 @@ *p++ = 0; if (c == '-') { while ((c = *arg++)) { - if (c == 'S') { - j = 0; - while ((unsigned int)(i = *arg++ - '0') <= 9) - j = j * 10 + i; - if (j > 0 && i == -'0') { - comspeed = j; - break; - } - /* Fall through to error below ('S' not in optstr[]). */ - } for (i = 0; c != optstr[i]; i++) if (i == NOPT - 1) return -1;