CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Sat Aug 22 10:12:29 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: ashldi3.S Log Message: Minor improvement. add/addx is faster and the size remains the same. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/ashldi3.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/ashldi3.S diff -u src/sys/arch/x68k/stand/xxboot/ashldi3.S:1.2 src/sys/arch/x68k/stand/xxboot/ashldi3.S:1.3 --- src/sys/arch/x68k/stand/xxboot/ashldi3.S:1.2 Sat Aug 22 10:05:04 2020 +++ src/sys/arch/x68k/stand/xxboot/ashldi3.S Sat Aug 22 10:12:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ashldi3.S,v 1.2 2020/08/22 10:05:04 isaki Exp $ */ +/* $NetBSD: ashldi3.S,v 1.3 2020/08/22 10:12:29 isaki Exp $ */ /* * Copyright (C) 2020 Tetsuya Isaki. All rights reserved. @@ -37,8 +37,8 @@ ASENTRY_NOPROFILE(__ashldi3) | %a0 = shift count jbra start loop: - lsll #1,%d1 | X:%d1 <<= 1 - roxll #1,%d0 | %d0:X <<= 1 + addl %d1,%d1 | X:%d1 <<= 1 + addxl %d0,%d0 | %d0:X <<= 1 start: subql #1,%a0 | sub %a0 doesn't affect ccr, tstl %a0 | but this extra TST op is
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Sat Aug 22 10:05:04 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: ashldi3.S Log Message: typo in comment. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/ashldi3.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/ashldi3.S diff -u src/sys/arch/x68k/stand/xxboot/ashldi3.S:1.1 src/sys/arch/x68k/stand/xxboot/ashldi3.S:1.2 --- src/sys/arch/x68k/stand/xxboot/ashldi3.S:1.1 Sun Aug 16 06:43:43 2020 +++ src/sys/arch/x68k/stand/xxboot/ashldi3.S Sat Aug 22 10:05:04 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ashldi3.S,v 1.1 2020/08/16 06:43:43 isaki Exp $ */ +/* $NetBSD: ashldi3.S,v 1.2 2020/08/22 10:05:04 isaki Exp $ */ /* * Copyright (C) 2020 Tetsuya Isaki. All rights reserved. @@ -37,8 +37,8 @@ ASENTRY_NOPROFILE(__ashldi3) | %a0 = shift count jbra start loop: - lsll #1,%d1 | X:%d1 =<< 1 - roxll #1,%d0 | %d0:X =<< 1 + lsll #1,%d1 | X:%d1 <<= 1 + roxll #1,%d0 | %d0:X <<= 1 start: subql #1,%a0 | sub %a0 doesn't affect ccr, tstl %a0 | but this extra TST op is
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 14 03:54:46 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: Makefile.xxboot xxboot.ldscript Log Message: Reduce binary size as possible. These reduce filesize about 20 words. - Use word alignment (rather than longword alignment) for text/data section. - Use short reference. In the bootloader, all symbols can be expressed in short. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.16 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.17 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.16 Fri Aug 14 03:40:47 2020 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Fri Aug 14 03:54:46 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xxboot,v 1.16 2020/08/14 03:40:47 isaki Exp $ +# $NetBSD: Makefile.xxboot,v 1.17 2020/08/14 03:54:46 isaki Exp $ NOMAN= # defined @@ -40,6 +40,7 @@ CPPFLAGS+= -DHEAP_START=0x0010 CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common AFLAGS= ${CFLAGS:M-[ID]*} +AFLAGS+= -Wa,-l LINKFLAGS= -n -Bstatic -T ${.CURDIR}/../xxboot.ldscript LINKFLAGS+= --defsym=TEXTADDR=$(TEXT) LINKFLAGS+= --defsym=BOOT_TEXTADDR=$(BOOT_TEXT) Index: src/sys/arch/x68k/stand/xxboot/xxboot.ldscript diff -u src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.8 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.9 --- src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.8 Fri Aug 14 03:25:39 2020 +++ src/sys/arch/x68k/stand/xxboot/xxboot.ldscript Fri Aug 14 03:54:46 2020 @@ -8,6 +8,8 @@ SECTIONS { . = TEXTADDR; .text : + ALIGN(2) + SUBALIGN(2) { CREATE_OBJECT_SYMBOLS *(.text) @@ -24,6 +26,8 @@ SECTIONS _etext = .; } .data : + ALIGN(2) + SUBALIGN(2) { /* The first three sections are for SunOS dynamic linking. */ *(.dynamic)
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 14 03:43:28 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: bootmain.c Log Message: Use DEV_OPEN() macro. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/stand/xxboot/bootmain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/bootmain.c diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.6 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.7 --- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.6 Fri Aug 14 03:34:22 2020 +++ src/sys/arch/x68k/stand/xxboot/bootmain.c Fri Aug 14 03:43:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.6 2020/08/14 03:34:22 isaki Exp $ */ +/* $NetBSD: bootmain.c,v 1.7 2020/08/14 03:43:28 isaki Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -163,5 +163,5 @@ devopen(struct open_file *f, const char { *file = __UNCONST(fname); - return xxopen(f); + return DEV_OPEN()(f); }
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 14 03:40:48 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: Makefile.xxboot src/sys/arch/x68k/stand/xxboot/cdboot_cd9660: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2: Makefile Log Message: Use fixed 'xx' instead of DEV and DEVDRV for simplicity. There is no choice other than xx for now. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot cvs rdiff -u -r1.2 -r1.3 \ src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.15 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.16 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.15 Fri Aug 14 03:29:23 2020 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Fri Aug 14 03:40:47 2020 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile.xxboot,v 1.15 2020/08/14 03:29:23 isaki Exp $ +# $NetBSD: Makefile.xxboot,v 1.16 2020/08/14 03:40:47 isaki Exp $ NOMAN= # defined .include -BOOT= $(DEV)boot_$(FS) +BOOT= xxboot_$(FS) VERSIONFILE= ${.CURDIR}/../version VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ END { print it }' ${VERSIONFILE} @@ -25,7 +25,7 @@ BINMODE= 444 S= ${.CURDIR}/../../../../.. M= $S/arch/x68k .PATH: ${.CURDIR}/.. -SRCS= boot.S bootmain.c conf.c consio1.c $(DEVDRV).c +SRCS= boot.S bootmain.c conf.c consio1.c xx.c .include "${S}/conf/newvers_stand.mk" @@ -51,7 +51,7 @@ LDLIBS+= -L${LIBIOCS} -liocs .PATH: $S/lib/libsa CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=$(FS) -CPPFLAGS+= -DLIBSA_SINGLE_DEVICE=$(DEV) +CPPFLAGS+= -DLIBSA_SINGLE_DEVICE=xx CPPFLAGS+= -DLIBSA_NO_FD_CHECKING CPPFLAGS+= -DLIBSA_NO_FS_WRITE CPPFLAGS+= -DLIBSA_NO_RAW_ACCESS Index: src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile diff -u src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile:1.2 src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile:1.3 --- src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile:1.2 Sat Nov 17 19:10:46 2012 +++ src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile Fri Aug 14 03:40:47 2020 @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.2 2012/11/17 19:10:46 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3 2020/08/14 03:40:47 isaki Exp $ -DEV= xx -DEVDRV= xx FS= cd9660 BOOTCPPFLAGS= -DCDBOOT Index: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.4 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.5 --- src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.4 Sat Nov 17 19:10:47 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile Fri Aug 14 03:40:47 2020 @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.4 2012/11/17 19:10:47 tsutsui Exp $ +# $NetBSD: Makefile,v 1.5 2020/08/14 03:40:47 isaki Exp $ -DEV= xx -DEVDRV= xx FS= ffsv1 BOOTCPPFLAGS= -DSDBOOT -DFDBOOT Index: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.4 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.5 --- src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.4 Sat Nov 17 19:10:47 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile Fri Aug 14 03:40:47 2020 @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.4 2012/11/17 19:10:47 tsutsui Exp $ +# $NetBSD: Makefile,v 1.5 2020/08/14 03:40:47 isaki Exp $ -DEV= xx -DEVDRV= xx FS= ffsv2 BOOTCPPFLAGS= -DSDBOOT -DFDBOOT Index: src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.4 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.5 --- src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.4 Sat Nov 17 19:10:47 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile Fri Aug 14 03:40:47 2020 @@ -1,7 +1,5 @@ -# $NetBSD: Makefile,v 1.4 2012/11/17 19:10:47 tsutsui Exp $ +# $NetBSD: Makefile,v 1.5 2020/08/14 03:40:47 isaki Exp $ -DEV= xx -DEVDRV= xx FS= lfsv1 BOOTCPPFLAGS= -DSDBOOT -DFDBOOT Index: src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.4 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.5 --- src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.4 Sat Nov 17 19:10:47 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_l
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 14 03:34:22 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: bootmain.c xx.c Added Files: src/sys/arch/x68k/stand/xxboot: xxboot.h Log Message: Add xxboot.h common header to share prototype definitions. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/stand/xxboot/bootmain.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/xx.c cvs rdiff -u -r0 -r1.3 src/sys/arch/x68k/stand/xxboot/xxboot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/bootmain.c diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.5 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.6 --- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.5 Fri Aug 14 02:51:48 2020 +++ src/sys/arch/x68k/stand/xxboot/bootmain.c Fri Aug 14 03:34:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.5 2020/08/14 02:51:48 isaki Exp $ */ +/* $NetBSD: bootmain.c,v 1.6 2020/08/14 03:34:22 isaki Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -39,25 +39,12 @@ #include #include +#include "xxboot.h" #include "libx68k.h" #include "iocs.h" #include "exec_image.h" #define EXSCSI_BDID ((void *)0x00ea0001) -#define BINF_ISFD(pbinf) (*((uint8_t *)(pbinf) + 1) == 0) - -/* boot.S */ -extern int badbaddr(volatile void *); -extern unsigned int ID; /* target SCSI ID */ -extern unsigned int BOOT_INFO; /* result of IOCS(__BOOTINF) */ -extern struct { - struct fdfmt{ - uint8_t N; /* sector length 0: 128, ..., 3: 1K */ - uint8_t C; /* cylinder # */ - uint8_t H; /* head # */ - uint8_t R; /* sector # */ - } minsec, maxsec; -} FDSECMINMAX; /* FD format type of the first track */ /* for debug */ unsigned int startregs[16]; @@ -107,8 +94,6 @@ get_scsi_host_adapter(char *devstr) return ha; } -extern const char bootprog_name[], bootprog_rev[]; - void bootmain(void) { Index: src/sys/arch/x68k/stand/xxboot/xx.c diff -u src/sys/arch/x68k/stand/xxboot/xx.c:1.2 src/sys/arch/x68k/stand/xxboot/xx.c:1.3 --- src/sys/arch/x68k/stand/xxboot/xx.c:1.2 Sat Nov 17 16:02:00 2012 +++ src/sys/arch/x68k/stand/xxboot/xx.c Fri Aug 14 03:34:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xx.c,v 1.2 2012/11/17 16:02:00 tsutsui Exp $ */ +/* $NetBSD: xx.c,v 1.3 2020/08/14 03:34:22 isaki Exp $ */ /* * Copyright (c) 2010 MINOURA Makoto. @@ -28,7 +28,7 @@ #include #include -extern void RAW_READ(void *buf, uint32_t blkpos, size_t bytelen); +#include "xxboot.h" int xxopen(struct open_file *f, ...) Added files: Index: src/sys/arch/x68k/stand/xxboot/xxboot.h diff -u /dev/null src/sys/arch/x68k/stand/xxboot/xxboot.h:1.3 --- /dev/null Fri Aug 14 03:34:22 2020 +++ src/sys/arch/x68k/stand/xxboot/xxboot.h Fri Aug 14 03:34:22 2020 @@ -0,0 +1,51 @@ +/* $NetBSD: xxboot.h,v 1.3 2020/08/14 03:34:22 isaki Exp $ */ + +/* + * Copyright (C) 2020 Tetsuya Isaki. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. + */ + +#define BINF_ISFD(pbinf) (*((uint8_t *)(pbinf) + 1) == 0) + +/* boot.S */ +extern void RAW_READ(void *, uint32_t, size_t); +extern int badbaddr(volatile void *); +extern unsigned int BOOT_INFO; /* result of IOCS(__BOOTINF) */ +extern unsigned int ID; /* target SCSI ID */ +extern struct { + struct fdfmt{ + uint8_t N; /* sector length 0: 128, ..., 3: 1K */ + uint8_t C; /* cylinder # */ + uint8_t H; /* head # */ + uint8_t R; /* sector # */ + } minsec, maxsec; +} FDSECMINMAX; /* FD format type of the first track */ + +/* xx.c */ +extern int xxopen(struct open_file *, ...); +extern int xxclose(struct open_file *); +extern int xxstrategy(void *, int, daddr_t, size_t, void *, size_t *); + +/* vers.c */ +extern cons
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 14 03:25:39 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: Makefile.xxboot xxboot.ldscript Log Message: - Restore display of first_kbyte. This is helpful for development. - Check the filesize of resulting file instead of section sizes. If there is a gap between sections, the filesize may be exceeded even though the section total is not exceeded. Of course that doesn't usually happen but I've experienced this during development. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.13 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.14 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.13 Mon Aug 10 07:00:49 2020 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Fri Aug 14 03:25:39 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xxboot,v 1.13 2020/08/10 07:00:49 rin Exp $ +# $NetBSD: Makefile.xxboot,v 1.14 2020/08/14 03:25:39 isaki Exp $ NOMAN= # defined @@ -61,10 +61,19 @@ SRCS+= exec_image.S .include "${.CURDIR}/../../Makefile.booters" +CLEANFILES+= ${PROG}.map + ${PROG}: $(OBJS) ${_MKTARGET_LINK} - $(LD) $(LINKFLAGS) -o ${PROG} $(OBJS) $(LDLIBS) + $(LD) $(LINKFLAGS) -Map=${PROG}.map -o ${PROG} $(OBJS) $(LDLIBS) + : Print some addresses for convenience + @${TOOL_AWK} '/first_kbyte$$/ { print "\t\t" $$2 "\t" $$1 }' ${PROG}.map + @echo " filesize "`${TOOL_STAT} -f %z ${PROG}` + @if [ `${TOOL_STAT} -f %z ${PROG}` -gt 8192 ]; then \ + echo "${PROG} filesize exceeds 8192 bytes"; \ + exit 1; \ + fi ${TOUCHPROG} .include Index: src/sys/arch/x68k/stand/xxboot/xxboot.ldscript diff -u src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.7 src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.8 --- src/sys/arch/x68k/stand/xxboot/xxboot.ldscript:1.7 Tue Jan 28 11:57:22 2020 +++ src/sys/arch/x68k/stand/xxboot/xxboot.ldscript Fri Aug 14 03:25:39 2020 @@ -48,6 +48,4 @@ SECTIONS } ASSERT(first_kbyte - TEXTADDR <= 1024, "Error: first_kbyte exceeds 1KB"); -ASSERT(_edata - TEXTADDR <= TEXTDATASIZE, -"Error: text+data is too large to bootarea"); ASSERT(_end <= BOOT_TEXTADDR, "Error: _end conflicts BOOT_TEXT");
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 14 02:51:48 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: bootmain.c Log Message: Make compilable even with XXBOOT_DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/bootmain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/bootmain.c diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.4 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.5 --- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.4 Sat Nov 17 19:10:46 2012 +++ src/sys/arch/x68k/stand/xxboot/bootmain.c Fri Aug 14 02:51:48 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.4 2012/11/17 19:10:46 tsutsui Exp $ */ +/* $NetBSD: bootmain.c,v 1.5 2020/08/14 02:51:48 isaki Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -135,7 +135,8 @@ bootmain(void) /* floppy */ #ifdef XXBOOT_DEBUG *(uint32_t *)bootdevstr = - ('f' << 24 | 'd' << 16 | '@' << 8 | '0' + (BOOT_INFO & 3)); + ('f' << 24) | ('d' << 16) | ('@' << 8) | + ('0' + (BOOT_INFO & 3)); bootdevstr[4] = '\0'; #endif /* fdNa for 1024 bytes/sector, fdNc for 512 bytes/sector */
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Tue Jan 28 12:02:02 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: Makefile.xxboot boot.S Log Message: Set heap area explicitly. Until the load address was moved, the heap was placed at _end (it's default) and it was large space. After moving, this default space was too small. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot \ src/sys/arch/x68k/stand/xxboot/boot.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.11 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.12 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.11 Sat Jan 18 07:25:12 2020 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Tue Jan 28 12:02:02 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xxboot,v 1.11 2020/01/18 07:25:12 isaki Exp $ +# $NetBSD: Makefile.xxboot,v 1.12 2020/01/28 12:02:02 isaki Exp $ NOMAN= # defined @@ -36,6 +36,7 @@ CPPFLAGS+= -DTEXTADDR="$(TEXT)" -DBOOT_T CPPFLAGS+= -DTDSIZE="$(TEXTDATASIZE)" CPPFLAGS+= -DPROG=\"$(PROG)\" -DBOOT_VERS=\"$(VERSION)\" CPPFLAGS+= -DBOOT_STAGE1 $(BOOTCPPFLAGS) +CPPFLAGS+= -DHEAP_START=0x0010 CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common AFLAGS= ${CFLAGS:M-[ID]*} Index: src/sys/arch/x68k/stand/xxboot/boot.S diff -u src/sys/arch/x68k/stand/xxboot/boot.S:1.11 src/sys/arch/x68k/stand/xxboot/boot.S:1.12 --- src/sys/arch/x68k/stand/xxboot/boot.S:1.11 Tue Jan 28 11:57:22 2020 +++ src/sys/arch/x68k/stand/xxboot/boot.S Tue Jan 28 12:02:02 2020 @@ -2,7 +2,7 @@ | author: chapuni(webmas...@chapuni.com) | ITOH Yasufumi | -| $NetBSD: boot.S,v 1.11 2020/01/28 11:57:22 isaki Exp $ +| $NetBSD: boot.S,v 1.12 2020/01/28 12:02:02 isaki Exp $ | | (1) IPL (or previous stage loader) loads first 1KB of this primary @@ -37,6 +37,7 @@ | ~~~~~~ | ::::<-SP::<-SP | + - - - - - -++ - - - - - -++ - - - - - -+0x10 +| :::(heap) ::(heap) : | :::::: |
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Thu Jan 16 12:54:16 UTC 2020 Modified Files: src/sys/arch/x68k/stand/xxboot: Makefile.xxboot Log Message: Remove .else part of .if OBJECT_FMT == ELF. All similar parts in other Makefiles are removed in 2010. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.4 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.5 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.4 Sat Apr 8 19:53:23 2017 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Thu Jan 16 12:54:16 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xxboot,v 1.4 2017/04/08 19:53:23 christos Exp $ +# $NetBSD: Makefile.xxboot,v 1.5 2020/01/16 12:54:16 isaki Exp $ NOMAN= # defined @@ -38,12 +38,8 @@ CPPFLAGS+= -DBOOT_STAGE1 $(BOOTCPPFLAGS) CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common AFLAGS= ${CFLAGS:M-[ID]*} -.if ${OBJECT_FMT} == "ELF" LINKFLAGS= -n -Bstatic -T ${.CURDIR}/../xxboot.ldscript -M LINKFLAGS+= -noinhibit-exec # XXX -.else -LINKFLAGS= -n -Bstatic -Ttext ${TEXT} -M -.endif LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR} LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR} LDLIBS= -L${LIBSA}/lib/sa -lsa -L ${LIBSA}/lib/kern -lkern @@ -68,7 +64,6 @@ ${PROG}: $(OBJS) ${_MKTARGET_LINK} $(LD) $(LINKFLAGS) -o ${PROG} $(OBJS) $(LDLIBS) > $(PROG).map @grep first_kbyte $(PROG).map -.if ${OBJECT_FMT} == "ELF" @if [ `(echo ibase=16; \ ${TOOL_SED} -n \ 's/^.*0x\([0-9a-f]*\).* first_kbyte$$/\1-$(TEXT)-400/p'\ @@ -85,27 +80,6 @@ ${PROG}: $(OBJS) then echo '$(BOOT): text+data is too large'; \ rm $(PROG) ; exit 1; \ fi -.else - mv $(PROG) $(PROG).x - $(OBJCOPY) -I a.out-m68k-netbsd -O binary $(PROG).x $(PROG) - @rm -f $(PROG).x - @if [ `(echo ibase=16; \ - ${TOOL_SED} -n \ - 's/ first_kbyte:.*0x\(.*\),.*$$/\1-$(TEXT)-400/p' \ - $(PROG).map | \ - tr a-f A-F) | bc` -gt 0 ]; \ - then echo '$(BOOT): first_kbyte exceeds the first killobyte'; \ - rm $(PROG) ; exit 1; \ - fi - @if [ `(echo ibase=16; \ - ${TOOL_SED} -n \ - 's/ _edata:.*0x\(.*\),.*$$/\1-$(TEXT)-$(TEXTDATASIZE)/p' \ - $(PROG).map | \ - tr a-f A-F) | bc` -gt 0 ]; \ - then echo '$(BOOT): text+data is too large'; \ - rm $(PROG) ; exit 1; \ - fi -.endif ${TOUCHPROG} .include
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: isaki Date: Fri Aug 8 15:20:10 UTC 2014 Modified Files: src/sys/arch/x68k/stand/xxboot: Makefile.xxboot Log Message: Remove OBJCOPY?=objcopy. Falling back to the hosttool is not a good way now. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.2 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.3 --- src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.2 Mon Aug 12 16:34:05 2013 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Fri Aug 8 15:20:10 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xxboot,v 1.2 2013/08/12 16:34:05 joerg Exp $ +# $NetBSD: Makefile.xxboot,v 1.3 2014/08/08 15:20:10 isaki Exp $ NOMAN= # defined @@ -47,7 +47,6 @@ LINKFLAGS= -n -Bstatic -T ${.CURDIR}/. LINKFLAGS+= -noinhibit-exec # XXX .else LINKFLAGS= -n -Bstatic -Ttext ${TEXT} -M -OBJCOPY?= objcopy .endif LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR} LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR}
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 19:10:47 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot: bootmain.c version src/sys/arch/x68k/stand/xxboot/cdboot_cd9660: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2: Makefile Log Message: Make xxboot for ufs variants actually functional: - set bootdev properly even on SCSI HD and floppy boot per SDBOOT/FDBOOT/CDBOOT defines in each Makefile - always print xxboot name and version - use IOCS PRINT calls instead of printf to avoid size overflow in DEBUG case - wrap debug stuff with #ifdef XXBOOT_DEBUG - bump version to denote changes Mostly taken from old boot_ufs. XXX: xxboot_lfs[12] are untested. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/xxboot/bootmain.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/version cvs rdiff -u -r1.1 -r1.2 \ src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/bootmain.c diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.3 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.4 --- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.3 Sat Nov 17 16:16:46 2012 +++ src/sys/arch/x68k/stand/xxboot/bootmain.c Sat Nov 17 19:10:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.3 2012/11/17 16:16:46 tsutsui Exp $ */ +/* $NetBSD: bootmain.c,v 1.4 2012/11/17 19:10:46 tsutsui Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -44,11 +44,20 @@ #include "exec_image.h" #define EXSCSI_BDID ((void *)0x00ea0001) +#define BINF_ISFD(pbinf) (*((uint8_t *)(pbinf) + 1) == 0) /* boot.S */ extern int badbaddr(volatile void *); extern unsigned int ID; /* target SCSI ID */ extern unsigned int BOOT_INFO; /* result of IOCS(__BOOTINF) */ +extern struct { + struct fdfmt{ + uint8_t N; /* sector length 0: 128, ..., 3: 1K */ + uint8_t C; /* cylinder # */ + uint8_t H; /* head # */ + uint8_t R; /* sector # */ + } minsec, maxsec; +} FDSECMINMAX; /* FD format type of the first track */ /* for debug */ unsigned int startregs[16]; @@ -65,10 +74,16 @@ get_scsi_host_adapter(char *devstr) uint8_t *bootrom; int ha; +#ifdef XXBOOT_DEBUG *(uint32_t *)(devstr + 0) = '/' << 24 | 's' << 16 | 'p' << 8 | 'c'; +#if defined(CDBOOT) *(uint32_t *)(devstr + 4) = '@' << 24 | '0' << 16 | '/' << 8 | 'c'; +#else + *(uint32_t *)(devstr + 4) = '@' << 24 | '0' << 16 | '/' << 8 | 's'; +#endif *(uint32_t *)(devstr + 8) = 'd' << 24 | '@' << 16 | '0' << 8 | ','; *(uint32_t *)(devstr + 12) = '0' << 24 | ':' << 16 | 'a' << 8 | '\0'; +#endif bootrom = (uint8_t *)(BOOT_INFO & 0x00e0); /* @@ -79,10 +94,14 @@ get_scsi_host_adapter(char *devstr) ha = (X68K_BOOT_SCSIIF_SPC << 4) | 0; } else if (badbaddr(EXSCSI_BDID)) { ha = (X68K_BOOT_SCSIIF_MHA << 4) | 0; +#ifdef XXBOOT_DEBUG *(uint32_t *)devstr = '/' << 24 | 'm' << 16 | 'h' << 8 | 'a'; +#endif } else { ha = (X68K_BOOT_SCSIIF_SPC << 4) | 1; +#ifdef XXBOOT_DEBUG devstr[5] = '1'; +#endif } return ha; @@ -97,18 +116,45 @@ bootmain(void) char bootdevstr[16]; u_long marks[MARK_MAX]; -#ifdef DEBUG - printf("%s rev.%s\n", bootprog_name, bootprog_rev); -#endif + IOCS_B_PRINT(bootprog_name); + IOCS_B_PRINT(" rev."); + IOCS_B_PRINT(bootprog_rev); + IOCS_B_PRINT("\r\n"); ha = get_scsi_host_adapter(bootdevstr); +#ifdef XXBOOT_DEBUG bootdevstr[10] = '0' + (ID & 7); bootdevstr[14] = 'a'; +#endif + +#if defined(CDBOOT) bootdev = X68K_MAKESCSIBOOTDEV(X68K_MAJOR_CD, ha >> 4, ha & 15, ID & 7, 0, 0); -#ifdef DEBUG - printf(" boot device: %s\n", bootdevstr); +#elif defined(FDBOOT) || defined(SDBOOT) + if (BINF_ISFD(&BOOT_INFO)) { + /* floppy */ +#ifdef XXBOOT_DEBUG + *(uint32_t *)bootdevstr = + ('f' << 24 | 'd' << 16 | '@' << 8 | '0' + (BOOT_INFO & 3)); + bootdevstr[4] = '\0'; +#endif + /* fdNa for 1024 bytes/sector, fdNc for 512 bytes/sector */ + bootdev = X68K_MAKEBOOTDEV(X68K_MAJOR_FD, BOOT_INFO & 3, + (FDSECMINMAX.minsec.N == 3) ? 0 : 2); + } else { + /* SCSI */ + bootdev = X68K_MAKESCSIBOOTDEV(X68K_MAJOR_SD, ha >> 4, ha & 15, + ID & 7, 0, 0 /* XXX: assume partition a */); + } +#else + bootdev = 0; +#endif + +#ifdef XXBOOT_DEBUG + IOCS_B_PRINT("boot device: "); + IOCS_B_PRINT(bootdevstr); #endif + IOCS_B_PRINT("\r\n"); marks[MARK_START] = BOOT_TEXTADDR; fd = load
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 17:59:00 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2: Makefile Log Message: Fix previous; no need to echo dummy command. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.2 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.3 --- src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.2 Sat Nov 17 17:51:09 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile Sat Nov 17 17:58:59 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:09 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3 2012/11/17 17:58:59 tsutsui Exp $ DEV= xx DEVDRV= xx FS= ffsv1 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= true +TOUCHPROG= @true .include "../Makefile.xxboot" Index: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.2 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.3 --- src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.2 Sat Nov 17 17:51:10 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile Sat Nov 17 17:58:59 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:10 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3 2012/11/17 17:58:59 tsutsui Exp $ DEV= xx DEVDRV= xx FS= ffsv2 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= true +TOUCHPROG= @true .include "../Makefile.xxboot" Index: src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.2 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.3 --- src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.2 Sat Nov 17 17:51:10 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile Sat Nov 17 17:59:00 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:10 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3 2012/11/17 17:59:00 tsutsui Exp $ DEV= xx DEVDRV= xx FS= lfsv1 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= true +TOUCHPROG= @true .include "../Makefile.xxboot" Index: src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.2 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.3 --- src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.2 Sat Nov 17 17:51:10 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Sat Nov 17 17:59:00 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:10 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3 2012/11/17 17:59:00 tsutsui Exp $ DEV= xx DEVDRV= xx FS= lfsv2 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= true +TOUCHPROG= @true .include "../Makefile.xxboot"
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 17:51:10 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2: Makefile Log Message: Appease warning "nbmake: ${TOUCHPROG} expands to empty string". To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.1 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.2 --- src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile:1.1 Tue Mar 20 13:01:33 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile Sat Nov 17 17:51:09 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/03/20 13:01:33 minoura Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:09 tsutsui Exp $ DEV= xx DEVDRV= xx FS= ffsv1 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= +TOUCHPROG= true .include "../Makefile.xxboot" Index: src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.1 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.2 --- src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile:1.1 Tue Mar 20 13:01:33 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile Sat Nov 17 17:51:10 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/03/20 13:01:33 minoura Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:10 tsutsui Exp $ DEV= xx DEVDRV= xx FS= ffsv2 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= +TOUCHPROG= true .include "../Makefile.xxboot" Index: src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.1 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.2 --- src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile:1.1 Tue Mar 20 13:01:33 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile Sat Nov 17 17:51:10 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/03/20 13:01:33 minoura Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:10 tsutsui Exp $ DEV= xx DEVDRV= xx FS= lfsv1 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= +TOUCHPROG= true .include "../Makefile.xxboot" Index: src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile diff -u src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.1 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.2 --- src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile:1.1 Tue Mar 20 13:01:33 2012 +++ src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Sat Nov 17 17:51:10 2012 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2012/03/20 13:01:33 minoura Exp $ +# $NetBSD: Makefile,v 1.2 2012/11/17 17:51:10 tsutsui Exp $ DEV= xx DEVDRV= xx FS= lfsv2 BOOTCPPFLAGS= -DSDBOOT -TOUCHPROG= +TOUCHPROG= true .include "../Makefile.xxboot"
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 16:16:46 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot: bootmain.c Log Message: Set *file for FS_OPS() pathname properly in devopen(). Now bootxx_ffsv1 (and other bootxx ufs variants) work properly. XXX: cd9660_open() in sys/lib/libsa/cd9660.c seems to open a file in the first entry of root directory if specified path is empty. Not sure if it's intentional behavoir. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/bootmain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/bootmain.c diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.2 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.3 --- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.2 Sat Nov 17 15:59:28 2012 +++ src/sys/arch/x68k/stand/xxboot/bootmain.c Sat Nov 17 16:16:46 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.2 2012/11/17 15:59:28 tsutsui Exp $ */ +/* $NetBSD: bootmain.c,v 1.3 2012/11/17 16:16:46 tsutsui Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -130,5 +130,6 @@ int devopen(struct open_file *f, const char *fname, char **file) { + *file = __UNCONST(fname); return xxopen(f); }
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 16:02:00 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot: xx.c Log Message: - use declarations in - remove __P() and some KNF - remove extern variable decl - use uintNN_t type To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/xx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/xx.c diff -u src/sys/arch/x68k/stand/xxboot/xx.c:1.1 src/sys/arch/x68k/stand/xxboot/xx.c:1.2 --- src/sys/arch/x68k/stand/xxboot/xx.c:1.1 Tue Mar 20 13:01:32 2012 +++ src/sys/arch/x68k/stand/xxboot/xx.c Sat Nov 17 16:02:00 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: xx.c,v 1.1 2012/03/20 13:01:32 minoura Exp $ */ +/* $NetBSD: xx.c,v 1.2 2012/11/17 16:02:00 tsutsui Exp $ */ /* * Copyright (c) 2010 MINOURA Makoto. @@ -26,31 +26,30 @@ */ #include +#include -struct open_file; -extern void RAW_READ __P((void *buf, u_int32_t blkpos, size_t bytelen)); -int xxopen(struct open_file *); -int xxclose(struct open_file *); -int xxstrategy(void *, int, daddr_t, size_t, void *, size_t *); +extern void RAW_READ(void *buf, uint32_t blkpos, size_t bytelen); int -xxopen(struct open_file *f) +xxopen(struct open_file *f, ...) { + return 0; } int xxclose(struct open_file *f) { + return 0; } -extern unsigned int SCSI_BLKLEN; int xxstrategy(void *arg, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize) { - RAW_READ(buf, (u_int32_t)dblk, size); + + RAW_READ(buf, (uint32_t)dblk, size); if (rsize) *rsize = size; return 0;
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 15:59:28 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot: bootmain.c Log Message: - fix comments - use proper uintNN_t types - use ANSI function decls - remove unnecessary function decl - remove __P() - misc KNF and cosmetics To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/bootmain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/bootmain.c diff -u src/sys/arch/x68k/stand/xxboot/bootmain.c:1.1 src/sys/arch/x68k/stand/xxboot/bootmain.c:1.2 --- src/sys/arch/x68k/stand/xxboot/bootmain.c:1.1 Tue Mar 20 13:01:32 2012 +++ src/sys/arch/x68k/stand/xxboot/bootmain.c Sat Nov 17 15:59:28 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: bootmain.c,v 1.1 2012/03/20 13:01:32 minoura Exp $ */ +/* $NetBSD: bootmain.c,v 1.2 2012/11/17 15:59:28 tsutsui Exp $ */ /*- * Copyright (c) 1993, 1994 Takumi Nakamura. @@ -43,44 +43,43 @@ #include "iocs.h" #include "exec_image.h" -#define EXSCSI_BDID ((void*) 0x00ea0001) +#define EXSCSI_BDID ((void *)0x00ea0001) -/* boot_cd9660.S */ -extern int badbaddr __P((volatile void *adr)); +/* boot.S */ +extern int badbaddr(volatile void *); extern unsigned int ID; /* target SCSI ID */ extern unsigned int BOOT_INFO; /* result of IOCS(__BOOTINF) */ /* for debug */ unsigned int startregs[16]; -static int get_scsi_host_adapter (char *); -void bootmain (void) __attribute__ ((__noreturn__)); +static int get_scsi_host_adapter(char *); +void bootmain(void) __attribute__ ((__noreturn__)); /* * Check the type of SCSI interface */ static int -get_scsi_host_adapter(devstr) - char *devstr; +get_scsi_host_adapter(char *devstr) { - char *bootrom; + uint8_t *bootrom; int ha; - *(int *)devstr = '/' << 24 | 's' << 16 | 'p' << 8 | 'c'; - *(int *)(devstr + 4) = '@' << 24 | '0' << 16 | '/' << 8 | 'c'; - *(int *)(devstr + 8) = 'd' << 24 | '@' << 16 | '0' << 8 | ','; - *(int *)(devstr + 12) = '0' << 24 | ':' << 16 | 'a' << 8 | '\0'; + *(uint32_t *)(devstr + 0) = '/' << 24 | 's' << 16 | 'p' << 8 | 'c'; + *(uint32_t *)(devstr + 4) = '@' << 24 | '0' << 16 | '/' << 8 | 'c'; + *(uint32_t *)(devstr + 8) = 'd' << 24 | '@' << 16 | '0' << 8 | ','; + *(uint32_t *)(devstr + 12) = '0' << 24 | ':' << 16 | 'a' << 8 | '\0'; - bootrom = (char *) (BOOT_INFO & 0x00e0); + bootrom = (uint8_t *)(BOOT_INFO & 0x00e0); /* * bootrom+0x24 "SCSIIN" ... Internal SCSI (spc@0) * "SCSIEX" ... External SCSI (spc@1 or mha@0) */ - if (*(u_short *)(bootrom + 0x24 + 4) == 0x494e) { /* "IN" */ + if (*(uint16_t *)(bootrom + 0x24 + 4) == 0x494e) { /* "IN" */ ha = (X68K_BOOT_SCSIIF_SPC << 4) | 0; } else if (badbaddr(EXSCSI_BDID)) { ha = (X68K_BOOT_SCSIIF_MHA << 4) | 0; - *(int *)devstr = '/' << 24 | 'm' << 16 | 'h' << 8 | 'a'; + *(uint32_t *)devstr = '/' << 24 | 'm' << 16 | 'h' << 8 | 'a'; } else { ha = (X68K_BOOT_SCSIIF_SPC << 4) | 1; devstr[5] = '1'; @@ -127,9 +126,9 @@ bootmain(void) exit(0); } -extern int xxboot(struct open_file *); int devopen(struct open_file *f, const char *fname, char **file) { + return xxopen(f); }
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 15:53:21 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot: boot.S Log Message: Use a correct function name in .globl decl. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/xxboot/boot.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/boot.S diff -u src/sys/arch/x68k/stand/xxboot/boot.S:1.2 src/sys/arch/x68k/stand/xxboot/boot.S:1.3 --- src/sys/arch/x68k/stand/xxboot/boot.S:1.2 Sat Nov 17 15:50:13 2012 +++ src/sys/arch/x68k/stand/xxboot/boot.S Sat Nov 17 15:53:21 2012 @@ -2,7 +2,7 @@ | author: chapuni(webmas...@chapuni.com) | ITOH Yasufumi | -| $NetBSD: boot.S,v 1.2 2012/11/17 15:50:13 tsutsui Exp $ +| $NetBSD: boot.S,v 1.3 2012/11/17 15:53:21 tsutsui Exp $ #include #include "iocscall.h" @@ -19,7 +19,7 @@ #define BOOT_ERROR(s) jbsr boot_error; .asciz s; .even - .globl _C_LABEL(bootufs) + .globl _C_LABEL(bootmain) .text ASENTRY_NOPROFILE(start) ASENTRY_NOPROFILE(top)
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: tsutsui Date: Sat Nov 17 15:50:13 UTC 2012 Modified Files: src/sys/arch/x68k/stand/xxboot: boot.S Log Message: Pull fixes in comments from x68k/stand/boot_ufs/boot.S rev 1.9 and 1.10. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/boot.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x68k/stand/xxboot/boot.S diff -u src/sys/arch/x68k/stand/xxboot/boot.S:1.1 src/sys/arch/x68k/stand/xxboot/boot.S:1.2 --- src/sys/arch/x68k/stand/xxboot/boot.S:1.1 Tue Mar 20 13:01:32 2012 +++ src/sys/arch/x68k/stand/xxboot/boot.S Sat Nov 17 15:50:13 2012 @@ -1,8 +1,8 @@ | file: boot.S | author: chapuni(webmas...@chapuni.com) -| Yasha(it...@netbsd.org) +| ITOH Yasufumi | -| $NetBSD: boot.S,v 1.1 2012/03/20 13:01:32 minoura Exp $ +| $NetBSD: boot.S,v 1.2 2012/11/17 15:50:13 tsutsui Exp $ #include #include "iocscall.h" @@ -66,7 +66,7 @@ clrbss: clrb %a1@+ | we use 68020 instructions, and check MPU beforehand | - | here d1.w = -1, and the above "subw a1,d0" = 0x9049, and + | here d0.w = -1, and the above "subw a1,d0" = 0x9049, and | if MPU <= 010 loads 0x49, | if MPU >= 020 loads 0x90. | This is a move, not a tst instruction
CVS commit: src/sys/arch/x68k/stand/xxboot
Module Name:src Committed By: minoura Date: Tue Mar 20 13:01:33 UTC 2012 Added Files: src/sys/arch/x68k/stand/xxboot: Makefile Makefile.xxboot boot.S bootmain.c conf.c consio1.c version xx.c xxboot.ldscript src/sys/arch/x68k/stand/xxboot/cdboot_cd9660: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1: Makefile src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2: Makefile Log Message: Initial support for xxboot (cdboot_cd9660, specifically). To generate a diff of this commit: cvs rdiff -u -r0 -r1.15 src/sys/arch/x68k/stand/xxboot/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot \ src/sys/arch/x68k/stand/xxboot/boot.S \ src/sys/arch/x68k/stand/xxboot/bootmain.c \ src/sys/arch/x68k/stand/xxboot/conf.c \ src/sys/arch/x68k/stand/xxboot/consio1.c \ src/sys/arch/x68k/stand/xxboot/version \ src/sys/arch/x68k/stand/xxboot/xx.c \ src/sys/arch/x68k/stand/xxboot/xxboot.ldscript cvs rdiff -u -r0 -r1.1 src/sys/arch/x68k/stand/xxboot/cdboot_cd9660/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv1/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/x68k/stand/xxboot/xxboot_ffsv2/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv1/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/x68k/stand/xxboot/xxboot_lfsv2/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/x68k/stand/xxboot/Makefile diff -u /dev/null src/sys/arch/x68k/stand/xxboot/Makefile:1.15 --- /dev/null Tue Mar 20 13:01:33 2012 +++ src/sys/arch/x68k/stand/xxboot/Makefile Tue Mar 20 13:01:32 2012 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.15 2012/03/20 13:01:32 minoura Exp $ + +SUBDIR= cdboot_cd9660 xxboot_ffsv1 xxboot_ffsv2 xxboot_lfsv1 xxboot_lfsv2 + +.include Index: src/sys/arch/x68k/stand/xxboot/Makefile.xxboot diff -u /dev/null src/sys/arch/x68k/stand/xxboot/Makefile.xxboot:1.1 --- /dev/null Tue Mar 20 13:01:33 2012 +++ src/sys/arch/x68k/stand/xxboot/Makefile.xxboot Tue Mar 20 13:01:32 2012 @@ -0,0 +1,116 @@ +# $NetBSD: Makefile.xxboot,v 1.1 2012/03/20 13:01:32 minoura Exp $ + +NOMAN= # defined + +.include + +BOOT= $(DEV)boot_$(FS) +VERSIONFILE= ${.CURDIR}/../version +VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ + END { print it }' ${VERSIONFILE} +NEWVERSWHAT= "${BOOT}" + +# text and bss addresses in hex +TEXT= 0f # Primary (me) +TEXTDATASIZE= 2000 # 8KB for UFS at maximum + # 30KB (=(16-1)*2048) for ISO9660 at max. +BOOT_TEXT= 006000 # Secondary (/boot) + +PROG= $(BOOT) +BINDIR= /usr/mdec +STRIPFLAG= +BINMODE= 444 + +S= ${.CURDIR}/../../../../.. +M= $S/arch/x68k +.PATH: ${.CURDIR}/.. +SRCS= boot.S bootmain.c conf.c consio1.c $(DEVDRV).c + +SRCS+= vers.c +CLEANFILES+= vers.c +vers.c: ${VERSIONFILE} + ${_MKTARGET_CREATE} + ${HOST_SH} ${S}/conf/newvers_stand.sh ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT} + +CFLAGS= -Os -fomit-frame-pointer +#CFLAGS+= -Wall +CPPFLAGS+= -D_STANDALONE +CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)" +CPPFLAGS+= -DTDSIZE="0x$(TEXTDATASIZE)" +CPPFLAGS+= -DPROG=\"$(PROG)\" -DBOOT_VERS=\"$(VERSION)\" +CPPFLAGS+= -DBOOT_STAGE1 $(BOOTCPPFLAGS) +CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} +CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common +AFLAGS= ${CFLAGS:M-[ID]*} +.if ${OBJECT_FMT} == "ELF" +LINKFLAGS= -n -Bstatic -T ${.CURDIR}/../xxboot.ldscript -M +LINKFLAGS+= -noinhibit-exec # XXX +.else +LINKFLAGS= -n -Bstatic -Ttext ${TEXT} -M +OBJCOPY?= objcopy +.endif +LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR} +LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR} +LDLIBS= -L${LIBSA}/lib/sa -lsa -L ${LIBSA}/lib/kern -lkern +LDLIBS+= -L${LIBIOCS} -liocs + +.PATH: $S/lib/libsa +CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=$(FS) +CPPFLAGS+= -DLIBSA_SINGLE_DEVICE=$(DEV) +CPPFLAGS+= -DLIBSA_NO_TWIDDLE -DLIBSA_NO_FD_CHECKING -DLIBSA_NO_RAW_ACCESS -DLIBSA_NO_FS_WRITE +SRCS+= open.c close.c read.c lseek.c loadfile.c loadfile_aout.c alloc.c +SRCS+= $(FS).c + +.PATH: $M/stand/common +SRCS+= exec_image.S + +.include "${.CURDIR}/../../Makefile.booters" + +CLEANFILES+= ${PROG}.x $(PROG).map ${PROG} + + +${PROG}: $(OBJS) + ${_MKTARGET_LINK} + $(LD) $(LINKFLAGS) -o ${PROG} $(OBJS) $(LDLIBS) > $(PROG).map + @grep first_kbyte $(PROG).map +.if ${OBJECT_FMT} == "ELF" + @if [ `(echo ibase=16; \ + ${TOOL_SED} -n \ + 's/^.*0x\([0-9a-f]*\).* first_kbyte$$/\1-$(TEXT)-400/p'\ + $(PROG).map | \ + tr a-f A-F) | bc` -gt 0 ]; \ + then echo '$(BOOT): first_kbyte exceeds the first killobyte'; \ + rm $(PROG) ; exit 1; \ + fi + @if [ `(echo ibase=16; \ + ${TOOL_SED} -n \ + 's/^.*0x\([0-9a-f]*\).* _edata *= *\.$$/\1-$(TEXT)-$(TEXTDATASIZE)/p' \ + $(P