CVS commit: src/sys/arch/atari/stand/keymaps
Module Name:src Committed By: tsutsui Date: Sat May 29 09:50:04 UTC 2021 Modified Files: src/sys/arch/atari/stand/keymaps: Makefile.inc src/sys/arch/atari/stand/keymaps/de: de-kbdmap.c src/sys/arch/atari/stand/keymaps/fr: fr-kbdmap.c src/sys/arch/atari/stand/keymaps/uk: uk-kbdmap.c src/sys/arch/atari/stand/keymaps/us: us-kbdmap.c Log Message: Appease compiler warnings derived from ancient HOST files. PR/56187 Also fix misc styles and formats per KNF. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/keymaps/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/fr/fr-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/uk/uk-kbdmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/us/us-kbdmap.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/atari/stand/keymaps/Makefile.inc diff -u src/sys/arch/atari/stand/keymaps/Makefile.inc:1.7 src/sys/arch/atari/stand/keymaps/Makefile.inc:1.8 --- src/sys/arch/atari/stand/keymaps/Makefile.inc:1.7 Sat May 4 21:56:50 2002 +++ src/sys/arch/atari/stand/keymaps/Makefile.inc Sat May 29 09:50:04 2021 @@ -1,4 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.7 2002/05/04 21:56:50 bjh21 Exp $ +# $NetBSD: Makefile.inc,v 1.8 2021/05/29 09:50:04 tsutsui Exp $ + +.include + +#HOST_CFLAGS+= -Wall -Werror realall: ${MAP} Index: src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c diff -u src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:1.3 src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:1.4 --- src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c:1.3 Wed Mar 18 10:22:25 2009 +++ src/sys/arch/atari/stand/keymaps/de/de-kbdmap.c Sat May 29 09:50:04 2021 @@ -1,172 +1,179 @@ -/* $NetBSD: de-kbdmap.c,v 1.3 2009/03/18 10:22:25 cegger Exp $ */ +/* $NetBSD: de-kbdmap.c,v 1.4 2021/05/29 09:50:04 tsutsui Exp $ */ /* * Contributed by Thomas Gerner */ +#if !defined(_KERNEL) +#include +#include +#endif + #include "../../../dev/kbdmap.h" /* mode shortcuts: */ #define S KBD_MODE_STRING -#define C KBD_MODE_CAPS -#define K KBD_MODE_KPAD +#define C KBD_MODE_CAPS +#define K KBD_MODE_KPAD struct kbdmap kbdmap; struct kbdmap ascii_kbdmap = { /* normal map */ { -/* 0x00 */ 0, 0, 0, ESC, 0, '1', 0, '2', -/* 0x04 */ 0, '3', 0, '4', 0, '5', 0, '6', -/* 0x08 */ 0, '7', 0, '8', 0, '9', 0, '0', -/* 0x0c */ C, 0xDF, 0, '\'', 0, '\b', 0, '\t', -/* 0x10 */ C, 'q', C, 'w', C, 'e', C, 'r', -/* 0x14 */ C, 't', C, 'z', C, 'u', C, 'i', -/* 0x18 */ C, 'o', C, 'p', C, 0xFC, 0, '+', -/* 0x1c */ 0, '\r', 0, 0, C, 'a', C, 's', -/* 0x20 */ C, 'd', C, 'f', C, 'g', C, 'h', -/* 0x24 */ C, 'j', C, 'k', C, 'l', C, 0xF6, -/* 0x28 */ C, 0xE4, 0, '#', 0, 0, 0, '~', -/* 0x2c */ C, 'y', C, 'x', C, 'c', C, 'v', -/* 0x30 */ C, 'b', C, 'n', C, 'm', 0, ',', -/* 0x34 */ 0, '.', 0, '-', 0, 0, 0, 0, -/* 0x38 */ 0, 0, 0, ' ', 0, 0, S, 0x10, -/* 0x3c */ S, 0x15, S, 0x1A, S, 0x1F, S, 0x24, -/* 0x40 */ S, 0x29, S, 0x2E, S, 0x33, S, 0x38, -/* 0x44 */ S, 0x3D, 0, 0, 0, 0, 0, 0, -/* 0x48 */ S, 0x00, 0, 0, 0, '-', S, 0x0C, -/* 0x4c */ 0, 0, S, 0x08, 0, '+', 0, 0, -/* 0x50 */ S, 0x04, 0, 0, 0, 0, 0, DEL, -/* 0x54 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, -/* 0x5c */ 0, 0, 0, 0, 0, 0, 0, 0, +/* 0x00 */ { 0, 0 }, { 0, ESC }, { 0, '1' }, { 0, '2' }, +/* 0x04 */ { 0, '3' }, { 0, '4' }, { 0, '5' }, { 0, '6' }, +/* 0x08 */ { 0, '7' }, { 0, '8' }, { 0, '9' }, { 0, '0' }, +/* 0x0C */ { C, 0xDF }, { 0, '\'' }, { 0, '\b' }, { 0, '\t' }, +/* 0x10 */ { C, 'q' }, { C, 'w' }, { C, 'e' }, { C, 'r' }, +/* 0x14 */ { C, 't' }, { C, 'z' }, { C, 'u' }, { C, 'i' }, +/* 0x18 */ { C, 'o' }, { C, 'p' }, { C, 0xFC }, { 0, '+' }, +/* 0x1C */ { 0, '\r' }, { 0, 0 }, { C, 'a' }, { C, 's' }, +/* 0x20 */ { C, 'd' }, { C, 'f' }, { C, 'g' }, { C, 'h' }, +/* 0x24 */ { C, 'j' }, { C, 'k' }, { C, 'l' }, { C, 0xF6 }, +/* 0x28 */ { C, 0xE4 }, { 0, '#' }, { 0, 0 }, { 0, '~' }, +/* 0x2C */ { C, 'y' }, { C, 'x' }, { C, 'c' }, { C, 'v' }, +/* 0x30 */ { C, 'b' }, { C, 'n' }, { C, 'm' }, { 0, ',' }, +/* 0x34 */ { 0, '.' }, { 0, '-' }, { 0, 0 }, { 0, 0 }, +/* 0x38 */ { 0, 0 }, { 0, ' ' }, { 0, 0 }, { S, 0x10 }, +/* 0x3C */ { S, 0x15 }, { S, 0x1A }, { S, 0x1F }, { S, 0x24 }, +/* 0x40 */ { S, 0x29 }, { S, 0x2E }, { S, 0x33 }, { S, 0x38 }, +/* 0x44 */ { S, 0x3D }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x48 */ { S, 0x00 }, { 0, 0 }, { 0, '-' }, { S, 0x0C }, +/* 0x4C */ { 0, 0 }, { S, 0x08 }, { 0, '+' }, { 0, 0 }, +/* 0x50 */ { S, 0x04 }, { 0, 0 }, { 0, 0 }, { 0, DEL }, +/* 0x54 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x58 */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, +/* 0x5C */ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, /* 0x60 */ -/* 0x60 */ 0, '<', 0, 0, 0, 0, 0, '(', -/* 0x64 */ 0, ')', 0, '/', 0, '*',
CVS commit: src/sys/arch/atari/stand/bootxxx
Module Name:src Committed By: rin Date: Wed Jul 1 23:37:10 UTC 2020 Modified Files: src/sys/arch/atari/stand/bootxxx: Makefile.bootxxx Log Message: Correct SRCS; bsdstart.S not bsdstart.s. Fix build with bsd.dep.mk rev 1.87, which requires more strict filename matching. Found by martin. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx 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/atari/stand/bootxxx/Makefile.bootxxx diff -u src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx:1.8 src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx:1.9 --- src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx:1.8 Sun Jan 12 15:26:28 2014 +++ src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx Wed Jul 1 23:37:10 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootxxx,v 1.8 2014/01/12 15:26:28 tsutsui Exp $ +# $NetBSD: Makefile.bootxxx,v 1.9 2020/07/01 23:37:10 rin Exp $ NOMAN= # defined @@ -39,7 +39,7 @@ LINKFLAGS= -static -N -e start -Ttext ${ # # Warning: start.S should be the first source! # -SRCS= start.S bootxxx.c aout.c bsdstart.s elf.c filesystem.c sysinfo.c +SRCS= start.S bootxxx.c aout.c bsdstart.S elf.c filesystem.c sysinfo.c LIBS= ${LIBSA} ${LIBKERN}
CVS commit: src/sys/arch/atari/stand/tostools/libtos
Module Name:src Committed By: maya Date: Wed Nov 7 22:51:47 UTC 2018 Modified Files: src/sys/arch/atari/stand/tostools/libtos: libtos.h Log Message: Don't provide these definitions on netbsd as before, but without relying on int8_t being a macro. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/tostools/libtos/libtos.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/atari/stand/tostools/libtos/libtos.h diff -u src/sys/arch/atari/stand/tostools/libtos/libtos.h:1.6 src/sys/arch/atari/stand/tostools/libtos/libtos.h:1.7 --- src/sys/arch/atari/stand/tostools/libtos/libtos.h:1.6 Sun Jul 17 20:54:37 2011 +++ src/sys/arch/atari/stand/tostools/libtos/libtos.h Wed Nov 7 22:51:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: libtos.h,v 1.6 2011/07/17 20:54:37 joerg Exp $ */ +/* $NetBSD: libtos.h,v 1.7 2018/11/07 22:51:47 maya Exp $ */ /* * Copyright (c) 1995 Waldi Ravens. @@ -58,14 +58,14 @@ #define VA_LIST va_list #endif -#ifndef int8_t +#ifndef __NetBSD__ /* * My TOS/MiNT installation does not define these (Leo 09/10/2001). */ typedef unsigned char u_int8_t; typedef unsigned short u_int16_t; typedef unsigned long u_int32_t; -#endif /* int8_t */ +#endif /* __NetBSD__ */ struct kparamb; struct osdsc;
CVS commit: src/sys/arch/atari/stand/keymaps
Module Name:src Committed By: christos Date: Fri May 4 00:36:16 UTC 2018 Modified Files: src/sys/arch/atari/stand/keymaps/de: Makefile src/sys/arch/atari/stand/keymaps/fr: Makefile src/sys/arch/atari/stand/keymaps/uk: Makefile src/sys/arch/atari/stand/keymaps/us: Makefile Log Message: remove bsd.hostinit.mk To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/de/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/fr/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/uk/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/keymaps/us/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/atari/stand/keymaps/de/Makefile diff -u src/sys/arch/atari/stand/keymaps/de/Makefile:1.3 src/sys/arch/atari/stand/keymaps/de/Makefile:1.4 --- src/sys/arch/atari/stand/keymaps/de/Makefile:1.3 Tue May 1 15:59:45 2018 +++ src/sys/arch/atari/stand/keymaps/de/Makefile Thu May 3 20:36:16 2018 @@ -1,10 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2018/05/01 19:59:45 christos Exp $ - -.include +# $NetBSD: Makefile,v 1.4 2018/05/04 00:36:16 christos Exp $ HOSTPROG=de-kbdmap MAP=de.map -MAN= .include - Index: src/sys/arch/atari/stand/keymaps/fr/Makefile diff -u src/sys/arch/atari/stand/keymaps/fr/Makefile:1.3 src/sys/arch/atari/stand/keymaps/fr/Makefile:1.4 --- src/sys/arch/atari/stand/keymaps/fr/Makefile:1.3 Tue May 1 15:59:45 2018 +++ src/sys/arch/atari/stand/keymaps/fr/Makefile Thu May 3 20:36:16 2018 @@ -1,10 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2018/05/01 19:59:45 christos Exp $ - -.include +# $NetBSD: Makefile,v 1.4 2018/05/04 00:36:16 christos Exp $ HOSTPROG=fr-kbdmap MAP=fr.map -MAN= .include - Index: src/sys/arch/atari/stand/keymaps/uk/Makefile diff -u src/sys/arch/atari/stand/keymaps/uk/Makefile:1.3 src/sys/arch/atari/stand/keymaps/uk/Makefile:1.4 --- src/sys/arch/atari/stand/keymaps/uk/Makefile:1.3 Tue May 1 15:59:45 2018 +++ src/sys/arch/atari/stand/keymaps/uk/Makefile Thu May 3 20:36:16 2018 @@ -1,10 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2018/05/01 19:59:45 christos Exp $ - -.include +# $NetBSD: Makefile,v 1.4 2018/05/04 00:36:16 christos Exp $ HOSTPROG=uk-kbdmap MAP=uk.map -MAN= .include - Index: src/sys/arch/atari/stand/keymaps/us/Makefile diff -u src/sys/arch/atari/stand/keymaps/us/Makefile:1.3 src/sys/arch/atari/stand/keymaps/us/Makefile:1.4 --- src/sys/arch/atari/stand/keymaps/us/Makefile:1.3 Tue May 1 15:59:45 2018 +++ src/sys/arch/atari/stand/keymaps/us/Makefile Thu May 3 20:36:16 2018 @@ -1,10 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2018/05/01 19:59:45 christos Exp $ - -.include +# $NetBSD: Makefile,v 1.4 2018/05/04 00:36:16 christos Exp $ HOSTPROG=us-kbdmap MAP=us.map -MAN= .include -
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: christos Date: Wed Jan 11 18:32:49 UTC 2017 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: need To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.35 src/sys/arch/atari/stand/installboot/installboot.c:1.36 --- src/sys/arch/atari/stand/installboot/installboot.c:1.35 Wed Aug 12 13:59:51 2015 +++ src/sys/arch/atari/stand/installboot/installboot.c Wed Jan 11 13:32:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.35 2015/08/12 17:59:51 tsutsui Exp $ */ +/* $NetBSD: installboot.c,v 1.36 2017/01/11 18:32:48 christos Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -30,8 +30,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include +#include +#include #include #include #include
CVS commit: src/sys/arch/atari/stand/ahdilabel
Module Name:src Committed By: christos Date: Sun Oct 9 14:51:26 UTC 2016 Modified Files: src/sys/arch/atari/stand/ahdilabel: ahdilabel.c Log Message: PR/51540: Henning Petersen: replace , with ; To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/stand/ahdilabel/ahdilabel.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/atari/stand/ahdilabel/ahdilabel.c diff -u src/sys/arch/atari/stand/ahdilabel/ahdilabel.c:1.10 src/sys/arch/atari/stand/ahdilabel/ahdilabel.c:1.11 --- src/sys/arch/atari/stand/ahdilabel/ahdilabel.c:1.10 Fri Mar 28 09:35:13 2014 +++ src/sys/arch/atari/stand/ahdilabel/ahdilabel.c Sun Oct 9 10:51:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ahdilabel.c,v 1.10 2014/03/28 13:35:13 ozaki-r Exp $ */ +/* $NetBSD: ahdilabel.c,v 1.11 2016/10/09 14:51:26 christos Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -262,7 +262,7 @@ show_parts (struct ahdi_ptable *ptable, printf ("%5u/%2u/%3u ", cylinder, track, sector); sector = ptable->parts[i].start + (ptable->parts[i].size ? - ptable->parts[i].size - 1 : 0), + ptable->parts[i].size - 1 : 0); cylinder = sector / ptable->secpercyl; sector -= cylinder * ptable->secpercyl; track = sector / ptable->nsectors;
CVS commit: src/sys/arch/atari/stand/binpatch
Module Name:src Committed By: christos Date: Thu Sep 22 17:08:16 UTC 2016 Modified Files: src/sys/arch/atari/stand/binpatch: binpatch.c Log Message: Catch up with mdsetimage changes. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/binpatch/binpatch.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/atari/stand/binpatch/binpatch.c diff -u src/sys/arch/atari/stand/binpatch/binpatch.c:1.6 src/sys/arch/atari/stand/binpatch/binpatch.c:1.7 --- src/sys/arch/atari/stand/binpatch/binpatch.c:1.6 Thu Aug 20 11:14:49 2009 +++ src/sys/arch/atari/stand/binpatch/binpatch.c Thu Sep 22 13:08:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: binpatch.c,v 1.6 2009/08/20 15:14:49 tsutsui Exp $ */ +/* $NetBSD: binpatch.c,v 1.7 2016/09/22 17:08:16 christos Exp $ */ /*- * Copyright (c) 2009 Izumi Tsutsui. All rights reserved. @@ -60,7 +60,7 @@ __COPYRIGHT("@(#) Copyright (c) 1996\ #endif /* not lint */ #ifndef lint -__RCSID("$NetBSD: binpatch.c,v 1.6 2009/08/20 15:14:49 tsutsui Exp $"); +__RCSID("$NetBSD: binpatch.c,v 1.7 2016/09/22 17:08:16 christos Exp $"); #endif /* not lint */ #include @@ -79,7 +79,6 @@ __RCSID("$NetBSD: binpatch.c,v 1.6 2009/ #include "extern.h" -int main(int, char *[]); static void usage(void) __dead; bool replace, verbose; @@ -88,20 +87,10 @@ char *symbol; size_t size; uint64_t val; -#ifdef NLIST_AOUT -/* - * Since we can't get the text address from an a.out executable, we - * need to be able to specify it. Note: there's no way to test to - * see if the user entered a valid address! - */ -int T_flag_specified; /* the -T flag was specified */ -u_long text_start; /* Start of kernel text */ -#endif /* NLIST_AOUT */ - static const struct { const char *name; int (*check)(const char *, size_t); - int (*findoff)(const char *, size_t, u_long, size_t *); + int (*findoff)(const char *, size_t, u_long, size_t *, u_long); } exec_formats[] = { #ifdef NLIST_AOUT { "a.out", check_aout, findoff_aout, }, @@ -139,8 +128,10 @@ main(int argc, char *argv[]) uint64_t uval64; int64_t sval64; int ch, fd, rv, i, n; + u_long text_start; /* Start of kernel text (a.out) */ setprogname(argv[0]); + text_start = (unsigned long)~0; while ((ch = getopt(argc, argv, "bwldT:a:s:o:r:v")) != -1) switch (ch) { @@ -182,15 +173,8 @@ main(int argc, char *argv[]) verbose = true; break; case 'T': -#ifdef NLIST_AOUT - T_flag_specified = 1; text_start = strtoul(optarg, NULL, 0); break; -#else - fprintf(stderr, "%s: unknown option -- %c\n", - getprogname(), (char)ch); - /*FALLTHROUGH*/ -#endif /* NLIST_AOUT */ case '?': default: usage(); @@ -251,15 +235,13 @@ main(int argc, char *argv[]) if (verbose) { fprintf(stderr, "%s is an %s binary\n", fname, exec_formats[i].name); -#ifdef NLIST_AOUT - if (T_flag_specified) + if (text_start != (u_long)~0) fprintf(stderr, "kernel text loads at 0x%lx\n", text_start); -#endif } if ((*exec_formats[i].findoff)(mappedfile, sb.st_size, - addr, &valoff) != 0) + addr, &valoff, text_start) != 0) errx(EXIT_FAILURE, "couldn't find file offset for %s in %s", symbol != NULL ? nl[0].n_name : "address" , fname); @@ -365,11 +347,7 @@ usage(void) { fprintf(stderr, - "usage: %s [-b|-w|-l|-d] [-a address | -s symbol] [-o offset]\n" - "[-r value] " -#ifdef NLIST_AOUT - "[-T text_start] " -#endif - "[-v] binary\n", getprogname()); + "Usage: %s [-b|-w|-l|-d] [-a address | -s symbol] [-o offset]" + " [-r value] [-T text_start] [-v] binary\n", getprogname()); exit(EXIT_FAILURE); }
CVS commit: src/sys/arch/atari/stand
Module Name:src Committed By: christos Date: Sat Sep 17 18:09:24 UTC 2016 Modified Files: src/sys/arch/atari/stand: Makefile.booters Log Message: kill PIE/SSP To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/atari/stand/Makefile.booters 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/atari/stand/Makefile.booters diff -u src/sys/arch/atari/stand/Makefile.booters:1.4 src/sys/arch/atari/stand/Makefile.booters:1.5 --- src/sys/arch/atari/stand/Makefile.booters:1.4 Mon Aug 12 12:34:05 2013 +++ src/sys/arch/atari/stand/Makefile.booters Sat Sep 17 14:09:24 2016 @@ -1,5 +1,7 @@ -# $NetBSD: Makefile.booters,v 1.4 2013/08/12 16:34:05 joerg Exp $ +# $NetBSD: Makefile.booters,v 1.5 2016/09/17 18:09:24 christos Exp $ +NOPIE= # defined +NOSSP= # defined BINDIR= /usr/mdec/${BTYPE:tl} DBG=
CVS commit: src/sys/arch/atari/stand/bootxx
Module Name:src Committed By: dholland Date: Sat Jun 11 06:28:07 UTC 2016 Modified Files: src/sys/arch/atari/stand/bootxx: bootxx.c Log Message: PR 51200 gets in libsa considered harmful: use kgets To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/stand/bootxx/bootxx.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/atari/stand/bootxx/bootxx.c diff -u src/sys/arch/atari/stand/bootxx/bootxx.c:1.16 src/sys/arch/atari/stand/bootxx/bootxx.c:1.17 --- src/sys/arch/atari/stand/bootxx/bootxx.c:1.16 Sat Nov 15 06:30:10 2014 +++ src/sys/arch/atari/stand/bootxx/bootxx.c Sat Jun 11 06:28:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.16 2014/11/15 06:30:10 tsutsui Exp $ */ +/* $NetBSD: bootxx.c,v 1.17 2016/06/11 06:28:07 dholland Exp $ */ /* * Copyright (c) 1995 Waldi Ravens. @@ -66,7 +66,7 @@ bootxx(void *readsector, void *disklabel setheap((void *)HEAPSTART, (void *)HEAPEND); printf("\033v\nNetBSD/atari secondary bootloader" - " ($Revision: 1.16 $)\n\n"); + " ($Revision: 1.17 $)\n\n"); if (init_dskio(readsector, disklabel, -1)) return -1; @@ -109,7 +109,7 @@ usr_info(osdsc_t *od) printf("\nEnter os-type [.%s] root-fs [:a] kernel [%s]" " options [none]:\n\033e", od->ostype, od->osname); - gets(p); + kgets(p, sizeof(line)); printf("\033f"); for (;;) {
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: tsutsui Date: Sun Mar 13 08:54:45 UTC 2016 Modified Files: src/sys/arch/atari/stand/installboot: disklabel.c installboot.h Log Message: Misc KNF and ANSIfy. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/installboot/disklabel.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/disklabel.c diff -u src/sys/arch/atari/stand/installboot/disklabel.c:1.6 src/sys/arch/atari/stand/installboot/disklabel.c:1.7 --- src/sys/arch/atari/stand/installboot/disklabel.c:1.6 Sat Oct 1 15:59:00 2011 +++ src/sys/arch/atari/stand/installboot/disklabel.c Sun Mar 13 08:54:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.c,v 1.6 2011/10/01 15:59:00 chs Exp $ */ +/* $NetBSD: disklabel.c,v 1.7 2016/03/13 08:54:45 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -57,29 +57,29 @@ struct ahdilabel { }; u_int dkcksum(struct disklabel *); -u_int32_t readdisklabel(char *, struct disklabel *); +uint32_t readdisklabel(char *, struct disklabel *); static int bsd_label(int, off_t, struct disklabel *); -static int ahdi_label(int, u_int32_t *, struct disklabel *); +static int ahdi_label(int, uint32_t *, struct disklabel *); static int ahdi_getparts(int, daddr_t, daddr_t, struct ahdilabel *); u_int dkcksum (struct disklabel *dl) { - u_int16_t sum = 0, - *st = (u_int16_t *)dl, - *end = (u_int16_t *)&dl->d_partitions[dl->d_npartitions]; + uint16_t sum = 0, + *st = (uint16_t *)dl, + *end = (uint16_t *)&dl->d_partitions[dl->d_npartitions]; while (st < end) sum ^= *st++; - return(sum); + return sum; } -u_int32_t -readdisklabel (char *fn, struct disklabel *dl) +uint32_t +readdisklabel(char *fn, struct disklabel *dl) { int fd, e; - u_int32_t bbsec; + uint32_t bbsec; memset(dl, 0, sizeof *dl); @@ -89,63 +89,62 @@ readdisklabel (char *fn, struct disklabe /* Try NetBSD/Atari format first */ if ((e = bsd_label(fd, (off_t)0, dl)) < 0) err(EXIT_FAILURE, "%s", fn); - if (!e) - return(0); + if (e == 0) + return 0; /* Try unprotected AHDI format last */ if ((e = ahdi_label(fd, &bbsec, dl)) < 0) err(EXIT_FAILURE, "%s", fn); - if (!e) - return(bbsec); + if (e == 0) + return bbsec; warnx("%s: Unknown disk label format.", fn); - return(NO_BOOT_BLOCK); + return NO_BOOT_BLOCK; } static int -bsd_label (int fd, off_t offs, struct disklabel *label) +bsd_label(int fd, off_t offs, struct disklabel *label) { struct bootblock bb; struct disklabel *p; if (lseek(fd, offs, SEEK_SET) != offs) - return(-1); + return -1; if (read(fd, &bb, sizeof(bb)) != sizeof(bb)) - return(-1); + return -1; p = (struct disklabel *)bb.bb_label; - if ( (offs == 0 && bb.bb_magic != NBDAMAGIC) - || (offs != 0 && bb.bb_magic != AHDIMAGIC) - || p->d_npartitions > MAXPARTITIONS - || p->d_magic2 != DISKMAGIC - || p->d_magic != DISKMAGIC - || dkcksum(p) != 0 - ) { - return(1); + if ((offs == 0 && bb.bb_magic != NBDAMAGIC) || + (offs != 0 && bb.bb_magic != AHDIMAGIC) || + p->d_npartitions > MAXPARTITIONS || + p->d_magic2 != DISKMAGIC || + p->d_magic != DISKMAGIC || + dkcksum(p) != 0) { + return 1; } *label = *p; - return(0); + return 0; } static int -ahdi_label (int fd, u_int32_t *bbsec, struct disklabel *label) +ahdi_label(int fd, uint32_t *bbsec, struct disklabel *label) { struct ahdilabel al; u_int i, j; int e; memset(&al, 0, sizeof(al)); - if ((e = ahdi_getparts(fd, AHDI_BBLOCK, AHDI_BBLOCK, &al))) - return(e); + if ((e = ahdi_getparts(fd, AHDI_BBLOCK, AHDI_BBLOCK, &al)) != 0) + return e; /* * Perform sanity checks. */ if (al.bslst == 0 || al.bslend == 0) - return(1); + return 1; if (al.nsecs == 0 || al.nparts == 0) - return(1); + return 1; if (al.nparts > AHDI_MAXPARTS) warnx("Too many AHDI partitions (%u).", al.nparts); for (i = 0; i < al.nparts; ++i) { @@ -153,19 +152,19 @@ ahdi_label (int fd, u_int32_t *bbsec, st for (j = 0; j < al.nroots; ++j) { daddr_t aux = al.roots[j]; if (aux >= p1->ap_st && aux <= p1->ap_end) -return(1); +return 1; } for (j = i + 1; j < al.nparts; ++j) { struct ahdi_part *p2 = &al.parts[j]; if (p1->ap_st >= p2->ap_st && p1->ap_st <= p2->ap_end) -return(1); +return 1; if (p2->ap_st >= p1->ap_st && p2->ap_st <= p1->ap_end) -return(1); +return 1; } if (p1->ap_st >= al.bslst && p1->ap_st <= al.bslend) - return(1); + return 1; if (al.bslst >= p1->ap_st && al.bslst <= p1->ap_end) - return(1); + return 1; } /* @@ -179,23 +178,19 @@ ahdi_label (int fd, u_int32_t *bbsec, st if (id == AHDI_PID_NBD || id == AHDI_PID_RAW) { off_t offs = pd->ap_st * AHDI_BSIZE; if ((e = bsd_label(fd, offs, label)) < 0) -
CVS commit: src/sys/arch/atari/stand/tostools/file2swp
Module Name:src Committed By: dholland Date: Sat Mar 12 02:17:05 UTC 2016 Modified Files: src/sys/arch/atari/stand/tostools/file2swp: file2swp.c Log Message: Remove unused variable, found by gcc. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/sys/arch/atari/stand/tostools/file2swp/file2swp.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/atari/stand/tostools/file2swp/file2swp.c diff -u src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.8 src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.9 --- src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.8 Sat Mar 12 02:15:50 2016 +++ src/sys/arch/atari/stand/tostools/file2swp/file2swp.c Sat Mar 12 02:17:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: file2swp.c,v 1.8 2016/03/12 02:15:50 dholland Exp $ */ +/* $NetBSD: file2swp.c,v 1.9 2016/03/12 02:17:05 dholland Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "cread.h" char *Infile = "minifs.gz"; -const char version[] = "$Revision: 1.8 $"; +const char version[] = "$Revision: 1.9 $"; extern const char *program_name; @@ -76,12 +76,12 @@ main(int argc, char **argv) extern char *optarg; disk_t *dd; - int rv, c, i, fd; + int rv, c, fd; u_int32_t currblk; u_int32_t start, end; char buf[AHDI_BSIZE]; - i = rv = 0; + rv = 0; init_toslib(*argv); while ((c = getopt(argc, argv, "Vf:ho:w")) != -1) {
CVS commit: src/sys/arch/atari/stand/tostools/file2swp
Module Name:src Committed By: dholland Date: Sat Mar 12 02:15:50 UTC 2016 Modified Files: src/sys/arch/atari/stand/tostools/file2swp: file2swp.c Log Message: Fix syntax error in previous. Hi christos :-) (PR 50944) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/sys/arch/atari/stand/tostools/file2swp/file2swp.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/atari/stand/tostools/file2swp/file2swp.c diff -u src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.7 src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.8 --- src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.7 Fri Mar 11 18:29:48 2016 +++ src/sys/arch/atari/stand/tostools/file2swp/file2swp.c Sat Mar 12 02:15:50 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: file2swp.c,v 1.7 2016/03/11 18:29:48 christos Exp $ */ +/* $NetBSD: file2swp.c,v 1.8 2016/03/12 02:15:50 dholland Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "cread.h" char *Infile = "minifs.gz"; -const char version[] = "$Revision: 1.7 $"; +const char version[] = "$Revision: 1.8 $"; extern const char *program_name; @@ -126,7 +126,7 @@ main(int argc, char **argv) case 'y': case 'Y': currblk = start; - while((c = read(fd, buf, sizeof(buf)) > 0) { + while ((c = read(fd, buf, sizeof(buf))) > 0) { if (disk_write(dd, currblk, 1, buf) < 0) { eprintf("Error writing to swap partition\n"); xexit(1);
CVS commit: src/sys/arch/atari/stand/tostools/file2swp
Module Name:src Committed By: christos Date: Fri Mar 11 18:29:48 UTC 2016 Modified Files: src/sys/arch/atari/stand/tostools/file2swp: file2swp.c Log Message: PR/50944: David Binderman: sprinkle parens To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/arch/atari/stand/tostools/file2swp/file2swp.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/atari/stand/tostools/file2swp/file2swp.c diff -u src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.6 src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.7 --- src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:1.6 Wed Mar 18 06:22:26 2009 +++ src/sys/arch/atari/stand/tostools/file2swp/file2swp.c Fri Mar 11 13:29:48 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: file2swp.c,v 1.6 2009/03/18 10:22:26 cegger Exp $ */ +/* $NetBSD: file2swp.c,v 1.7 2016/03/11 18:29:48 christos Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "cread.h" char *Infile = "minifs.gz"; -const char version[] = "$Revision: 1.6 $"; +const char version[] = "$Revision: 1.7 $"; extern const char *program_name; @@ -126,7 +126,7 @@ main(int argc, char **argv) case 'y': case 'Y': currblk = start; - while(c = read(fd, buf, sizeof(buf)) > 0) { + while((c = read(fd, buf, sizeof(buf)) > 0) { if (disk_write(dd, currblk, 1, buf) < 0) { eprintf("Error writing to swap partition\n"); xexit(1);
CVS commit: src/sys/arch/atari/stand/libsa
Module Name:src Committed By: tsutsui Date: Wed Aug 12 18:32:48 UTC 2015 Modified Files: src/sys/arch/atari/stand/libsa: Makefile.inc Removed Files: src/sys/arch/atari/stand/libsa: dev.c Log Message: No need to have errno in a MD file. It's in MI src/sys/lib/libsa/errno.c. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/libsa/Makefile.inc cvs rdiff -u -r1.4 -r0 src/sys/arch/atari/stand/libsa/dev.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/atari/stand/libsa/Makefile.inc diff -u src/sys/arch/atari/stand/libsa/Makefile.inc:1.2 src/sys/arch/atari/stand/libsa/Makefile.inc:1.3 --- src/sys/arch/atari/stand/libsa/Makefile.inc:1.2 Thu Jun 30 20:09:21 2011 +++ src/sys/arch/atari/stand/libsa/Makefile.inc Wed Aug 12 18:32:48 2015 @@ -1,9 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.2 2011/06/30 20:09:21 wiz Exp $ +# $NetBSD: Makefile.inc,v 1.3 2015/08/12 18:32:48 tsutsui Exp $ .PATH.c: ${SA_EXTRADIR} .PATH.S: ${SA_EXTRADIR} -# NetBSD/atari specific replacements: dev.c - # machine dependent routines -SRCS+= consio.S dev.c diskio.c +SRCS+= consio.S diskio.c
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: tsutsui Date: Wed Aug 12 17:59:51 UTC 2015 Modified Files: src/sys/arch/atari/stand/installboot: Makefile installboot.c Log Message: Try to shrink binary size a bit. - omit usage of options in SMALLPROG case - use bool instead of int where appropriate - rely on zero-initialized-bss To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/atari/stand/installboot/Makefile cvs rdiff -u -r1.34 -r1.35 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/Makefile diff -u src/sys/arch/atari/stand/installboot/Makefile:1.8 src/sys/arch/atari/stand/installboot/Makefile:1.9 --- src/sys/arch/atari/stand/installboot/Makefile:1.8 Mon Nov 24 08:08:23 2014 +++ src/sys/arch/atari/stand/installboot/Makefile Wed Aug 12 17:59:51 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2014/11/24 08:08:23 tsutsui Exp $ +# $NetBSD: Makefile,v 1.9 2015/08/12 17:59:51 tsutsui Exp $ WARNS= 4 PROG= installboot @@ -6,7 +6,7 @@ NOMAN= # defined SRCS= installboot.c disklabel.c BINDIR= /usr/mdec .ifndef SMALLPROG -CPPFLAGS+= -DCHECK_OS_BOOTVERSION +CPPFLAGS+= -DCHECK_OS_BOOTVERSION -DNO_USAGE LDADD= -lkvm .endif Index: src/sys/arch/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.34 src/sys/arch/atari/stand/installboot/installboot.c:1.35 --- src/sys/arch/atari/stand/installboot/installboot.c:1.34 Mon Nov 24 08:08:23 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Wed Aug 12 17:59:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.34 2014/11/24 08:08:23 tsutsui Exp $ */ +/* $NetBSD: installboot.c,v 1.35 2015/08/12 17:59:51 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -73,23 +73,26 @@ static struct ahdi_root ahdiboot; static const char mdecpath[] = PATH_MDEC; static const char stdpath[] = PATH_STD; static const char milanpath[] = PATH_MILAN; -static int nowrite = 0; -static int verbose = 0; -static int trackpercyl = 0; -static int secpertrack = 0; -static int milan = 0; +static bool nowrite; +static bool verbose; +static int trackpercyl; +static int secpertrack; +static bool milan; static void usage(void) { fprintf(stderr, "usage: installboot [options] device\n" +#ifndef NO_USAGE "where options are:\n" "\t-N do not actually write anything on the disk\n" "\t-m use Milan boot blocks\n" "\t-t number of tracks per cylinder (IDE disk)\n" "\t-u number of sectors per track (IDE disk)\n" - "\t-v verbose mode\n"); + "\t-v verbose mode\n" +#endif + ); exit(EXIT_FAILURE); } @@ -110,10 +113,10 @@ main(int argc, char *argv[]) while ((c = getopt(argc, argv, "Nmt:u:v")) != -1) { switch (c) { case 'N': - nowrite = 1; + nowrite = true; break; case 'm': - milan = 1; + milan = true; break; case 't': trackpercyl = atoi(optarg); @@ -122,7 +125,7 @@ main(int argc, char *argv[]) secpertrack = atoi(optarg); break; case 'v': - verbose = 1; + verbose = true; break; default: usage();
CVS commit: src/sys/arch/atari/stand/loadkmap
Module Name:src Committed By: tsutsui Date: Wed Aug 12 17:53:03 UTC 2015 Modified Files: src/sys/arch/atari/stand/loadkmap: loadkmap.c Log Message: Make local functions static. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/stand/loadkmap/loadkmap.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/atari/stand/loadkmap/loadkmap.c diff -u src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.10 src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.11 --- src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.10 Fri May 20 01:29:30 2011 +++ src/sys/arch/atari/stand/loadkmap/loadkmap.c Wed Aug 12 17:53:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: loadkmap.c,v 1.10 2011/05/20 01:29:30 christos Exp $ */ +/* $NetBSD: loadkmap.c,v 1.11 2015/08/12 17:53:03 tsutsui Exp $ */ #include #include @@ -11,8 +11,8 @@ #include #include -int load_kmap(const char *, int); -int dump_kmap(void); +static int load_kmap(const char *, int); +static int dump_kmap(void); int main(int argc, char *argv[]) @@ -41,7 +41,7 @@ main(int argc, char *argv[]) } -int +static int load_kmap(const char *file, int set_sysmap) { int fd; @@ -66,7 +66,7 @@ load_kmap(const char *file, int set_sysm return 1; } -int +static int dump_kmap(void) { char buf[sizeof (struct kbdmap)];
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: tsutsui Date: Mon Nov 24 07:52:04 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: Makefile Log Message: Specify -fno-strict-aliasing as a temporary workaround for gcc48. The existing abcksum() also violates strict-aliasing rule (while current gcc48 doesn't warn it) and fixing all violations strictly requires whole reorganization of boot sector structures. But it won't happen soon and this MD installboot should be integrated into MI installboot(8) in future, and it requires whole overhaul anyway. See long discussion in source-changes-d@ for details. Should be pulled up to netbsd-7 if we switches m68k to using gcc48. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/installboot/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/atari/stand/installboot/Makefile diff -u src/sys/arch/atari/stand/installboot/Makefile:1.6 src/sys/arch/atari/stand/installboot/Makefile:1.7 --- src/sys/arch/atari/stand/installboot/Makefile:1.6 Tue Nov 1 13:19:53 2011 +++ src/sys/arch/atari/stand/installboot/Makefile Mon Nov 24 07:52:04 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2011/11/01 13:19:53 chs Exp $ +# $NetBSD: Makefile,v 1.7 2014/11/24 07:52:04 tsutsui Exp $ WARNS= 4 PROG= installboot @@ -7,4 +7,7 @@ SRCS= installboot.c disklabel.c BINDIR= /usr/mdec LDADD= -lkvm +# XXX needs proper struct or union to calculate boot sector uint16_t cksums +CFLAGS+= -fno-strict-aliasing + .include
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: tsutsui Date: Mon Nov 24 07:34:45 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: Revert previous again. There are claims that it still violates strict-aliasing rule and it is no sense to just appease compiler by incorrect implementation. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.32 src/sys/arch/atari/stand/installboot/installboot.c:1.33 --- src/sys/arch/atari/stand/installboot/installboot.c:1.32 Sun Nov 16 13:47:52 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Mon Nov 24 07:34:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.32 2014/11/16 13:47:52 tsutsui Exp $ */ +/* $NetBSD: installboot.c,v 1.33 2014/11/24 07:34:45 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -467,10 +467,6 @@ mkbootblock(struct bootblock *bb, char * struct disklabel *label, u_int magic) { int fd; - union { - struct bootblock *bbp; - uint16_t *word; /* to fill cksum word */ - } bbsec; memset(bb, 0, sizeof(*bb)); @@ -502,9 +498,8 @@ mkbootblock(struct bootblock *bb, char * setIDEpar(bb->bb_xxboot, sizeof(bb->bb_xxboot)); /* set AHDI checksum */ - bbsec.bbp = bb; - bbsec.word[255] = 0; - bbsec.word[255] = 0x1234 - abcksum(bb->bb_xxboot); + *((u_int16_t *)bb->bb_xxboot + 255) = 0; + *((u_int16_t *)bb->bb_xxboot + 255) = 0x1234 - abcksum(bb->bb_xxboot); if (verbose) { printf("Primary boot loader: %s\n", xxb);
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: tsutsui Date: Sun Nov 16 13:47:52 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: Appease gcc48 -Werror=strict-aliasing warning by filling cksum via union. Discussed in source-changes-d@ thread and tested on TT030. Should be pulled up to netbsd-7 (if NetBSD/m68k 7.0 will switch to gcc48). To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.31 src/sys/arch/atari/stand/installboot/installboot.c:1.32 --- src/sys/arch/atari/stand/installboot/installboot.c:1.31 Sun Nov 16 13:38:39 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Sun Nov 16 13:47:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.31 2014/11/16 13:38:39 tsutsui Exp $ */ +/* $NetBSD: installboot.c,v 1.32 2014/11/16 13:47:52 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -467,6 +467,10 @@ mkbootblock(struct bootblock *bb, char * struct disklabel *label, u_int magic) { int fd; + union { + struct bootblock *bbp; + uint16_t *word; /* to fill cksum word */ + } bbsec; memset(bb, 0, sizeof(*bb)); @@ -498,8 +502,9 @@ mkbootblock(struct bootblock *bb, char * setIDEpar(bb->bb_xxboot, sizeof(bb->bb_xxboot)); /* set AHDI checksum */ - *((u_int16_t *)bb->bb_xxboot + 255) = 0; - *((u_int16_t *)bb->bb_xxboot + 255) = 0x1234 - abcksum(bb->bb_xxboot); + bbsec.bbp = bb; + bbsec.word[255] = 0; + bbsec.word[255] = 0x1234 - abcksum(bb->bb_xxboot); if (verbose) { printf("Primary boot loader: %s\n", xxb);
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: tsutsui Date: Sun Nov 16 13:38:39 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: Revert revs 1.29 and 1.30, to make it easier to pullup an alternative fix. Ok'ed by christos@ http://mail-index.netbsd.org/source-changes-d/2014/11/15/msg007338.html To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.30 src/sys/arch/atari/stand/installboot/installboot.c:1.31 --- src/sys/arch/atari/stand/installboot/installboot.c:1.30 Thu Nov 13 17:46:49 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Sun Nov 16 13:38:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.30 2014/11/13 17:46:49 christos Exp $ */ +/* $NetBSD: installboot.c,v 1.31 2014/11/16 13:38:39 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -467,7 +467,6 @@ mkbootblock(struct bootblock *bb, char * struct disklabel *label, u_int magic) { int fd; - uint16_t sum; memset(bb, 0, sizeof(*bb)); @@ -499,10 +498,8 @@ mkbootblock(struct bootblock *bb, char * setIDEpar(bb->bb_xxboot, sizeof(bb->bb_xxboot)); /* set AHDI checksum */ - sum = 0; - memcpy(bb->bb_xxboot + 255 * sizeof(sum), &sum, sizeof(sum)); - sum = 0x1234 - abcksum(bb->bb_xxboot); - memcpy(bb->bb_xxboot + 255 * sizeof(sum), &sum, sizeof(sum)); + *((u_int16_t *)bb->bb_xxboot + 255) = 0; + *((u_int16_t *)bb->bb_xxboot + 255) = 0x1234 - abcksum(bb->bb_xxboot); if (verbose) { printf("Primary boot loader: %s\n", xxb);
CVS commit: src/sys/arch/atari/stand/bootxx
Module Name:src Committed By: tsutsui Date: Sat Nov 15 06:30:10 UTC 2014 Modified Files: src/sys/arch/atari/stand/bootxx: bootxx.c Log Message: Expand heap to 64KB so that bootxx can load bootxxx from 32KB blocksize ffs. Tested on TT030 with 32GB SSD via SATA->IDE->SCSI converters. Should be pulled up to netbsd-7 and netbsd-6 branches.. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/stand/bootxx/bootxx.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/atari/stand/bootxx/bootxx.c diff -u src/sys/arch/atari/stand/bootxx/bootxx.c:1.15 src/sys/arch/atari/stand/bootxx/bootxx.c:1.16 --- src/sys/arch/atari/stand/bootxx/bootxx.c:1.15 Mon Aug 24 13:04:37 2009 +++ src/sys/arch/atari/stand/bootxx/bootxx.c Sat Nov 15 06:30:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.15 2009/08/24 13:04:37 tsutsui Exp $ */ +/* $NetBSD: bootxx.c,v 1.16 2014/11/15 06:30:10 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens. @@ -49,6 +49,11 @@ int bootxxx(void *, void *, struct osdsc int load_booter(struct osdsc *); int usr_info(struct osdsc *); +#define BOOTXXX_MAXSIZE (64 * 1024) +#define HEAPSIZE (64 * 1024) /* should be >32KB for ffs blocksize */ +#define HEAPSTART (LOADADDR3 + BOOTXXX_MAXSIZE) +#define HEAPEND (HEAPSTART + HEAPSIZE) + int bootxx(void *readsector, void *disklabel, int autoboot) { @@ -58,10 +63,10 @@ bootxx(void *readsector, void *disklabel bxxx_t bootxxx = (bxxx_t)(LOADADDR3); memset(edata, 0, end - edata); - setheap(end, (void*)(LOADADDR3 - 4)); + setheap((void *)HEAPSTART, (void *)HEAPEND); printf("\033v\nNetBSD/atari secondary bootloader" - " ($Revision: 1.15 $)\n\n"); + " ($Revision: 1.16 $)\n\n"); if (init_dskio(readsector, disklabel, -1)) return -1;
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: christos Date: Thu Nov 13 17:46:49 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: move to the right offset To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.29 src/sys/arch/atari/stand/installboot/installboot.c:1.30 --- src/sys/arch/atari/stand/installboot/installboot.c:1.29 Thu Nov 13 12:19:29 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Thu Nov 13 12:46:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.29 2014/11/13 17:19:29 christos Exp $ */ +/* $NetBSD: installboot.c,v 1.30 2014/11/13 17:46:49 christos Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -500,9 +500,9 @@ mkbootblock(struct bootblock *bb, char * /* set AHDI checksum */ sum = 0; - memcpy(bb->bb_xxboot + 255, &sum, sizeof(sum)); + memcpy(bb->bb_xxboot + 255 * sizeof(sum), &sum, sizeof(sum)); sum = 0x1234 - abcksum(bb->bb_xxboot); - memcpy(bb->bb_xxboot + 255, &sum, sizeof(sum)); + memcpy(bb->bb_xxboot + 255 * sizeof(sum), &sum, sizeof(sum)); if (verbose) { printf("Primary boot loader: %s\n", xxb);
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: christos Date: Thu Nov 13 17:19:29 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: fix strict aliasing violations To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.28 src/sys/arch/atari/stand/installboot/installboot.c:1.29 --- src/sys/arch/atari/stand/installboot/installboot.c:1.28 Mon Mar 31 02:32:31 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Thu Nov 13 12:19:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.28 2014/03/31 06:32:31 ozaki-r Exp $ */ +/* $NetBSD: installboot.c,v 1.29 2014/11/13 17:19:29 christos Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -467,6 +467,7 @@ mkbootblock(struct bootblock *bb, char * struct disklabel *label, u_int magic) { int fd; + uint16_t sum; memset(bb, 0, sizeof(*bb)); @@ -498,8 +499,10 @@ mkbootblock(struct bootblock *bb, char * setIDEpar(bb->bb_xxboot, sizeof(bb->bb_xxboot)); /* set AHDI checksum */ - *((u_int16_t *)bb->bb_xxboot + 255) = 0; - *((u_int16_t *)bb->bb_xxboot + 255) = 0x1234 - abcksum(bb->bb_xxboot); + sum = 0; + memcpy(bb->bb_xxboot + 255, &sum, sizeof(sum)); + sum = 0x1234 - abcksum(bb->bb_xxboot); + memcpy(bb->bb_xxboot + 255, &sum, sizeof(sum)); if (verbose) { printf("Primary boot loader: %s\n", xxb);
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: ozaki-r Date: Mon Mar 31 06:32:31 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.27 src/sys/arch/atari/stand/installboot/installboot.c:1.28 --- src/sys/arch/atari/stand/installboot/installboot.c:1.27 Sat Mar 29 05:03:43 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Mon Mar 31 06:32:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.27 2014/03/29 05:03:43 ozaki-r Exp $ */ +/* $NetBSD: installboot.c,v 1.28 2014/03/31 06:32:31 ozaki-r Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -228,7 +228,7 @@ install_fd(char *devnm, struct disklabel machpath = milanpath; else machpath = stdpath; - size_t xxboolen = strlen(mdecpath) + strlen(machpath) + 8; + size_t xxbootlen = strlen(mdecpath) + strlen(machpath) + 8; xxboot = alloca(xxbootlen); snprintf(xxboot, xxbootlen, "%s%sfdboot", mdecpath, machpath); bootxx = alloca(xxbootlen);
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: ozaki-r Date: Sat Mar 29 05:03:43 UTC 2014 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: Fix typos To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.26 src/sys/arch/atari/stand/installboot/installboot.c:1.27 --- src/sys/arch/atari/stand/installboot/installboot.c:1.26 Wed Mar 26 18:04:33 2014 +++ src/sys/arch/atari/stand/installboot/installboot.c Sat Mar 29 05:03:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.26 2014/03/26 18:04:33 christos Exp $ */ +/* $NetBSD: installboot.c,v 1.27 2014/03/29 05:03:43 ozaki-r Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -228,7 +228,7 @@ install_fd(char *devnm, struct disklabel machpath = milanpath; else machpath = stdpath; - size_t xxboolen = strlen(mdecpath) + strlen(machpath) + 8); + size_t xxboolen = strlen(mdecpath) + strlen(machpath) + 8; xxboot = alloca(xxbootlen); snprintf(xxboot, xxbootlen, "%s%sfdboot", mdecpath, machpath); bootxx = alloca(xxbootlen); @@ -369,7 +369,7 @@ install_wd(char *devnm, struct disklabel size_t xxb00tlen = strlen(mdecpath) + strlen(machpath) + 14; xxb00t = alloca(xxb00tlen); snprintf(xxb00t, xxb00tlen, "%s%swdb00t.ahdi", mdecpath, machpath); - xnxboot = alloca(xxb00tlen); + xxboot = alloca(xxb00tlen); snprintf(xxboot, xxb00tlen, "%s%sxxboot.ahdi", mdecpath, machpath); magic = AHDIMAGIC; } else {
CVS commit: src/sys/arch/atari/stand/ahdilabel
Module Name:src Committed By: ozaki-r Date: Fri Mar 28 13:35:13 UTC 2014 Modified Files: src/sys/arch/atari/stand/ahdilabel: ahdilabel.c Log Message: Fix; cts[0] => cts To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/ahdilabel/ahdilabel.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/atari/stand/ahdilabel/ahdilabel.c diff -u src/sys/arch/atari/stand/ahdilabel/ahdilabel.c:1.9 src/sys/arch/atari/stand/ahdilabel/ahdilabel.c:1.10 --- src/sys/arch/atari/stand/ahdilabel/ahdilabel.c:1.9 Wed Mar 26 18:04:33 2014 +++ src/sys/arch/atari/stand/ahdilabel/ahdilabel.c Fri Mar 28 13:35:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ahdilabel.c,v 1.9 2014/03/26 18:04:33 christos Exp $ */ +/* $NetBSD: ahdilabel.c,v 1.10 2014/03/28 13:35:13 ozaki-r Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -402,7 +402,7 @@ change_part (struct ahdi_ptable *ptable, } printf ("size [%8u (%s) (%4uM)] ", ptable->parts[part].size, - sec_to_cts (ptable, ptable->parts[part].size, cts[0], sizeof(cts)), + sec_to_cts (ptable, ptable->parts[part].size, cts, sizeof(cts)), (ptable->parts[part].size + (BLPM >> 1)) / BLPM); if (get_input (&buf[0], BUFLEN)) { sector = read_sector (ptable, buf, part, PART_END);
CVS commit: src/sys/arch/atari/stand
Module Name:src Committed By: tsutsui Date: Sun Dec 18 04:51:13 UTC 2011 Modified Files: src/sys/arch/atari/stand: Makefile.booters Log Message: Explicitly specify -m68020-60 to avoid possible 060SP instructions, especially 64 bit integer mul/div ops in standalone bootloaders. From x68k. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/Makefile.booters 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/atari/stand/Makefile.booters diff -u src/sys/arch/atari/stand/Makefile.booters:1.2 src/sys/arch/atari/stand/Makefile.booters:1.3 --- src/sys/arch/atari/stand/Makefile.booters:1.2 Sun Mar 15 11:45:30 2009 +++ src/sys/arch/atari/stand/Makefile.booters Sun Dec 18 04:51:12 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.2 2009/03/15 11:45:30 tsutsui Exp $ +# $NetBSD: Makefile.booters,v 1.3 2011/12/18 04:51:12 tsutsui Exp $ BINDIR= /usr/mdec/${BTYPE:tl} @@ -11,5 +11,6 @@ CPPFLAGS+= -D__daddr_t=int32_t CFLAGS+= -ffreestanding CFLAGS+= -Wall CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith +CFLAGS+= -m68020-60 .include
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: christos Date: Sat Nov 5 00:34:01 UTC 2011 Modified Files: src/sys/arch/atari/stand/installboot: installboot.c Log Message: make this compile again. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/installboot.c diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.24 src/sys/arch/atari/stand/installboot/installboot.c:1.25 --- src/sys/arch/atari/stand/installboot/installboot.c:1.24 Sat Mar 14 17:04:07 2009 +++ src/sys/arch/atari/stand/installboot/installboot.c Fri Nov 4 20:34:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: installboot.c,v 1.24 2009/03/14 21:04:07 dsl Exp $ */ +/* $NetBSD: installboot.c,v 1.25 2011/11/05 00:34:01 christos Exp $ */ /* * Copyright (c) 1995 Waldi Ravens @@ -78,7 +78,7 @@ static int secpertrack = 0; static int milan = 0; static void -usage () +usage(void) { fprintf(stderr, "usage: installboot [options] device\n" @@ -92,7 +92,7 @@ usage () } int -main (int argc, char *argv[]) +main(int argc, char *argv[]) { struct disklabel dl; char *dn; @@ -176,10 +176,12 @@ main (int argc, char *argv[]) } static void -oscheck () +oscheck(void) { - struct nlist kbv[] = { { "_bootversion" }, - { NULL } }; + struct nlist kbv[] = { + { .n_name = "_bootversion" }, + { .n_name = NULL } + }; kvm_t *kd_kern; char errbuf[_POSIX2_LINE_MAX]; u_short kvers; @@ -197,17 +199,16 @@ oscheck () errx(EXIT_FAILURE, "kvm_nlist: %s", kvm_geterr(kd_kern)); if (kbv[0].n_value == 0) errx(EXIT_FAILURE, "%s not in namelist", kbv[0].n_name); - if (kvm_read(kd_kern, kbv[0].n_value, (char *)&kvers, - sizeof(kvers)) == -1) + if (kvm_read(kd_kern, kbv[0].n_value, &kvers, sizeof(kvers)) == -1) errx(EXIT_FAILURE, "kvm_read: %s", kvm_geterr(kd_kern)); kvm_close(kd_kern); if (kvers != BOOTVERSION) errx(EXIT_FAILURE, "Kern bootversion: %d, expected: %d", - kvers, BOOTVERSION); + kvers, BOOTVERSION); } static void -install_fd (char *devnm, struct disklabel *label) +install_fd(char *devnm, struct disklabel *label) { const char *machpath; char *xxboot, *bootxx; @@ -261,7 +262,7 @@ install_fd (char *devnm, struct disklabe } static void -install_sd (char *devnm, struct disklabel *label) +install_sd(char *devnm, struct disklabel *label) { const char *machpath; char *xxb00t, *xxboot, *bootxx; @@ -316,16 +317,17 @@ install_sd (char *devnm, struct disklabe if (write(fd, &bootarea, sizeof(bootarea)) != sizeof(bootarea)) err(EXIT_FAILURE, "%s", devnm); if (verbose) - printf("Boot block installed on %s (sector %d)\n", devnm, -bbsec); + printf("Boot block installed on %s (sector %d)\n", + devnm, bbsec); if (xxb00t) { if (lseek(fd, (off_t)0, SEEK_SET) != 0) err(EXIT_FAILURE, "%s", devnm); - if (write(fd, &ahdiboot, sizeof(ahdiboot)) != sizeof(ahdiboot)) + if (write(fd, &ahdiboot, sizeof(ahdiboot)) != + sizeof(ahdiboot)) err(EXIT_FAILURE, "%s", devnm); if (verbose) printf("AHDI root installed on %s (0)\n", -devnm); +devnm); } if (close(fd)) err(EXIT_FAILURE, "%s", devnm); @@ -333,7 +335,7 @@ install_sd (char *devnm, struct disklabe } static void -install_wd (char *devnm, struct disklabel *label) +install_wd(char *devnm, struct disklabel *label) { const char *machpath; char *xxb00t, *xxboot, *bootxx; @@ -388,8 +390,8 @@ install_wd (char *devnm, struct disklabe if (write(fd, &bootarea, sizeof(bootarea)) != sizeof(bootarea)) err(EXIT_FAILURE, "%s", devnm); if (verbose) - printf("Boot block installed on %s (sector %d)\n", devnm, -bbsec); + printf("Boot block installed on %s (sector %d)\n", + devnm, bbsec); if (xxb00t) { if (lseek(fd, (off_t)0, SEEK_SET) != 0) err(EXIT_FAILURE, "%s", devnm); @@ -397,8 +399,8 @@ install_wd (char *devnm, struct disklabe != sizeof(ahdiboot)) err(EXIT_FAILURE, "%s", devnm); if (verbose) -printf("AHDI root installed on %s (sector 0)\n", - devnm); +printf("AHDI root installed on %s (sector 0)\n", +devnm); } if (close(fd)) err(EXIT_FAILURE, "%s", devnm); @@ -406,11 +408,8 @@ install_wd (char *devnm, struct disklabe } static void -mkahdiboot (newroot, xxb00t, devnm, bbsec) - struct ahdi_root *newroot; - char *xxb00t, - *devnm; - u_int32_t bbsec; +mkahdiboot(struct ahdi_root *newroot, char *xxb00t, char *devnm, +u_int32_t bbsec) { struct ahdi_root tmproot; struct ahdi_part *pd; @@ -455,12 +454,8 @@ gotit: /* copy code from prototype and s } static void -mkbootblock (bb, xxb, bxx, label, magic) - struct bootblock *bb; - char *xxb, - *bxx; - u_int magic; - struct disklabel *label; +mkbootblock(struct bootb
CVS commit: src/sys/arch/atari/stand/installboot
Module Name:src Committed By: chs Date: Tue Nov 1 13:19:53 UTC 2011 Modified Files: src/sys/arch/atari/stand/installboot: Makefile Log Message: use WARNS instead of mucking with CFLAGS directly. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/stand/installboot/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/atari/stand/installboot/Makefile diff -u src/sys/arch/atari/stand/installboot/Makefile:1.5 src/sys/arch/atari/stand/installboot/Makefile:1.6 --- src/sys/arch/atari/stand/installboot/Makefile:1.5 Wed Dec 12 01:49:39 2001 +++ src/sys/arch/atari/stand/installboot/Makefile Tue Nov 1 13:19:53 2011 @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.5 2001/12/12 01:49:39 tv Exp $ +# $NetBSD: Makefile,v 1.6 2011/11/01 13:19:53 chs Exp $ +WARNS= 4 PROG= installboot NOMAN= # defined SRCS= installboot.c disklabel.c BINDIR= /usr/mdec LDADD= -lkvm -CFLAGS+=-Wall - .include
CVS commit: src/sys/arch/atari/stand/loadkmap
Module Name:src Committed By: christos Date: Fri May 20 01:29:30 UTC 2011 Modified Files: src/sys/arch/atari/stand/loadkmap: loadkmap.c Log Message: add missing include To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/loadkmap/loadkmap.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/atari/stand/loadkmap/loadkmap.c diff -u src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.9 src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.10 --- src/sys/arch/atari/stand/loadkmap/loadkmap.c:1.9 Wed May 18 22:56:03 2011 +++ src/sys/arch/atari/stand/loadkmap/loadkmap.c Thu May 19 21:29:30 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: loadkmap.c,v 1.9 2011/05/19 02:56:03 christos Exp $ */ +/* $NetBSD: loadkmap.c,v 1.10 2011/05/20 01:29:30 christos Exp $ */ #include #include @@ -6,6 +6,7 @@ #include "../../dev/iteioctl.h" #include "../../dev/kbdmap.h" #include +#include #include #include #include
CVS commit: src/sys/arch/atari/stand/binpatch
Module Name:src Committed By: tsutsui Date: Mon May 10 15:10:54 UTC 2010 Modified Files: src/sys/arch/atari/stand/binpatch: Makefile Log Message: Include before ${NETBSDSRCDIR}. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/binpatch/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/atari/stand/binpatch/Makefile diff -u src/sys/arch/atari/stand/binpatch/Makefile:1.6 src/sys/arch/atari/stand/binpatch/Makefile:1.7 --- src/sys/arch/atari/stand/binpatch/Makefile:1.6 Thu Aug 20 15:14:49 2009 +++ src/sys/arch/atari/stand/binpatch/Makefile Mon May 10 15:10:54 2010 @@ -1,21 +1,21 @@ -# $NetBSD: Makefile,v 1.6 2009/08/20 15:14:49 tsutsui Exp $ +# $NetBSD: Makefile,v 1.7 2010/05/10 15:10:54 tsutsui Exp $ BINDIR?= /sbin WARNS?= 4 +NOMAN= + +.include PROG= binpatch SRCS= binpatch.c SRCS+= exec_aout.c exec_ecoff.c exec_elf32.c exec_elf64.c exec_coff.c #MAN= binpatch.8 # currently it's in src/share/man/man8/man8.atari -NOMAN= MDSETIMAGE=${NETBSDSRCDIR}/usr.sbin/mdsetimage CPPFLAGS+= -I${MDSETIMAGE} .PATH: ${MDSETIMAGE} -.include # for ${MACHINE_CPU} - .if ${MACHINE_ARCH} == "alpha" CPPFLAGS+=-DNLIST_ECOFF CPPFLAGS+=-DNLIST_ELF64
CVS commit: src/sys/arch/atari/stand/edahdi
Module Name:src Committed By: roy Date: Wed Feb 10 14:48:26 UTC 2010 Modified Files: src/sys/arch/atari/stand/edahdi: Makefile edahdi.c Log Message: Convert to terminfo so we compile. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/edahdi/Makefile cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/edahdi/edahdi.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/atari/stand/edahdi/Makefile diff -u src/sys/arch/atari/stand/edahdi/Makefile:1.6 src/sys/arch/atari/stand/edahdi/Makefile:1.7 --- src/sys/arch/atari/stand/edahdi/Makefile:1.6 Wed Feb 3 15:34:44 2010 +++ src/sys/arch/atari/stand/edahdi/Makefile Wed Feb 10 14:48:26 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.6 2010/02/03 15:34:44 roy Exp $ +# $NetBSD: Makefile,v 1.7 2010/02/10 14:48:26 roy Exp $ PROG= edahdi NOMAN= # defined -DPADD= ${LIBTERMLIB} -LDADD= -ltermlib +DPADD= ${LIBTERMINFO} +LDADD= -lterminfo BINDIR= /sbin CFLAGS+=-Wall Index: src/sys/arch/atari/stand/edahdi/edahdi.c diff -u src/sys/arch/atari/stand/edahdi/edahdi.c:1.9 src/sys/arch/atari/stand/edahdi/edahdi.c:1.10 --- src/sys/arch/atari/stand/edahdi/edahdi.c:1.9 Wed Mar 18 10:22:25 2009 +++ src/sys/arch/atari/stand/edahdi/edahdi.c Wed Feb 10 14:48:26 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: edahdi.c,v 1.9 2009/03/18 10:22:25 cegger Exp $ */ +/* $NetBSD: edahdi.c,v 1.10 2010/02/10 14:48:26 roy Exp $ */ /* * Copyright (c) 1996 Leo Weppelman, Waldi Ravens. @@ -47,7 +47,7 @@ #include #include -#include +#include #include #include #include @@ -94,11 +94,6 @@ #define T_NUMBER 5 #define T_EOF 6 -/* - * Terminal capability strings (Ok, 1 to start with ;-) ) - */ -char *Clr_screen = ""; - void ahdi_cksum(void *); u_int ahdi_getparts(int, ptable_t *, u_int, u_int); int bsd_label(int, u_int); @@ -107,7 +102,6 @@ void *disk_read(int, u_int, u_int); void disk_write(int, u_int, u_int, void *); char *get_id(void); -void get_termcap(void); int lex(int *); int show_parts(ptable_t *, int); void update_disk(ptable_t *, int, int); @@ -143,7 +137,7 @@ return (2); } - get_termcap(); + setupterm(NULL, STDOUT_FILENO, NULL); ptable.nparts = 0; ptable.parts = NULL; @@ -165,7 +159,8 @@ for (;;) { error = NULL; - tputs(Clr_screen, 1, putchar); + if (clear_screen) + tputs(clear_screen, 1, putchar); show_parts(ptable, scr_base); printf("\n\n"); @@ -532,22 +527,3 @@ if (write(fd, buf, size) != size) err(1, "Write error"); } - -void -get_termcap(void) -{ - char *term, tbuf[1024], buf[1024], *p; - - if ((term = getenv("TERM")) == NULL) - warnx("No TERM environment variable!"); - else { - if (tgetent(tbuf, term) != 1) - errx(1, "Tgetent failure."); - p = buf; - if (tgetstr("cl", &p)) { - if ((Clr_screen = malloc(strlen(buf) + 1)) == NULL) -errx(1, "Malloc failure."); - strcpy(Clr_screen, buf); - } - } -}
CVS commit: src/sys/arch/atari/stand
Module Name:src Committed By: tsutsui Date: Mon Aug 24 13:04:38 UTC 2009 Modified Files: src/sys/arch/atari/stand/bootxx: bootxx.c src/sys/arch/atari/stand/bootxxx: bootxxx.c Log Message: KNF, ANSIfy etc. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/stand/bootxx/bootxx.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/bootxxx/bootxxx.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/atari/stand/bootxx/bootxx.c diff -u src/sys/arch/atari/stand/bootxx/bootxx.c:1.14 src/sys/arch/atari/stand/bootxx/bootxx.c:1.15 --- src/sys/arch/atari/stand/bootxx/bootxx.c:1.14 Wed Mar 18 16:00:10 2009 +++ src/sys/arch/atari/stand/bootxx/bootxx.c Mon Aug 24 13:04:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.14 2009/03/18 16:00:10 cegger Exp $ */ +/* $NetBSD: bootxx.c,v 1.15 2009/08/24 13:04:37 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens. @@ -61,7 +61,7 @@ setheap(end, (void*)(LOADADDR3 - 4)); printf("\033v\nNetBSD/atari secondary bootloader" - " ($Revision: 1.14 $)\n\n"); + " ($Revision: 1.15 $)\n\n"); if (init_dskio(readsector, disklabel, -1)) return -1; @@ -191,7 +191,7 @@ } if (fd < 0) return -1; - while((bsize = read(fd, bstart, 1024)) > 0) { + while ((bsize = read(fd, bstart, 1024)) > 0) { bstart += bsize; } close(fd); @@ -201,7 +201,8 @@ void _rtt(void) { + printf("Halting...\n"); - for(;;) + for (;;) ; } Index: src/sys/arch/atari/stand/bootxxx/bootxxx.c diff -u src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.7 src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.8 --- src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.7 Wed Mar 18 16:00:10 2009 +++ src/sys/arch/atari/stand/bootxxx/bootxxx.c Mon Aug 24 13:04:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxxx.c,v 1.7 2009/03/18 16:00:10 cegger Exp $ */ +/* $NetBSD: bootxxx.c,v 1.8 2009/08/24 13:04:37 tsutsui Exp $ */ /* * Copyright (c) 2001 Leo Weppelman. @@ -47,10 +47,7 @@ void boot_BSD(struct kparamb *)__attribute__((noreturn)); int -bootxxx(readsector, disklabel, od) - void *readsector, - *disklabel; - osdsc_t *od; +bootxxx(void *readsector, void *disklabel, osdsc_t *od) { int fd; char *errmsg; @@ -61,20 +58,20 @@ /* XXX: Limit should be 16MB */ setheap(end, (void*)0x100); printf("\033v\nNetBSD/Atari tertiary bootloader " - "($Revision: 1.7 $)\n\n"); + "($Revision: 1.8 $)\n\n"); if (init_dskio(readsector, disklabel, od->rootfs)) - return(-1); + return -1; sys_info(od); if (!(od->cputype & ATARI_ANYCPU)) { printf("Unknown CPU-type.\n"); - return(-2); + return -2; } if ((fd = open(od->osname, 0)) < 0) { printf("Cannot open kernel '%s'\n", od->osname); - return (-3); + return -3; } #ifndef __ELF__ /* a.out */ @@ -82,10 +79,10 @@ #else if (elf_load(fd, od, &errmsg, 1) != 0) #endif - return(-4); + return -4; boot_BSD(&od->kp); - return(-5); + return -5; /* NOTREACHED */ } @@ -93,7 +90,8 @@ void _rtt(void) { + printf("Halting...\n"); - for(;;) + for (;;) ; }
CVS commit: src/sys/arch/atari/stand
Module Name:src Committed By: tsutsui Date: Mon Aug 24 13:03:44 UTC 2009 Modified Files: src/sys/arch/atari/stand/bootxx: filesystem.c src/sys/arch/atari/stand/bootxxx: filesystem.c Log Message: Use __arraycount(). To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/bootxx/filesystem.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/bootxxx/filesystem.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/atari/stand/bootxx/filesystem.c diff -u src/sys/arch/atari/stand/bootxx/filesystem.c:1.7 src/sys/arch/atari/stand/bootxx/filesystem.c:1.8 --- src/sys/arch/atari/stand/bootxx/filesystem.c:1.7 Sun Dec 11 12:17:00 2005 +++ src/sys/arch/atari/stand/bootxx/filesystem.c Mon Aug 24 13:03:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: filesystem.c,v 1.7 2005/12/11 12:17:00 christos Exp $ */ +/* $NetBSD: filesystem.c,v 1.8 2009/08/24 13:03:43 tsutsui Exp $ */ /* * Copyright (c) 1993 Philip A. Nelson. @@ -38,4 +38,4 @@ FS_OPS(ufs), }; -int nfsys = sizeof(file_system)/sizeof(struct fs_ops); +int nfsys = __arraycount(file_system); Index: src/sys/arch/atari/stand/bootxxx/filesystem.c diff -u src/sys/arch/atari/stand/bootxxx/filesystem.c:1.3 src/sys/arch/atari/stand/bootxxx/filesystem.c:1.4 --- src/sys/arch/atari/stand/bootxxx/filesystem.c:1.3 Sun Dec 11 12:17:00 2005 +++ src/sys/arch/atari/stand/bootxxx/filesystem.c Mon Aug 24 13:03:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: filesystem.c,v 1.3 2005/12/11 12:17:00 christos Exp $ */ +/* $NetBSD: filesystem.c,v 1.4 2009/08/24 13:03:44 tsutsui Exp $ */ /* * Copyright (c) 1993 Philip A. Nelson. @@ -38,4 +38,4 @@ FS_OPS(ufs), }; -int nfsys = sizeof(file_system) / sizeof(file_system[0]); +int nfsys = __arraycount(file_system);
CVS commit: src/sys/arch/atari/stand/tostools
Module Name:src Committed By: tsutsui Date: Tue Mar 31 11:48:15 UTC 2009 Modified Files: src/sys/arch/atari/stand/tostools/chg_pid: chg_pid.c src/sys/arch/atari/stand/tostools/libtos: bsdlabel.c cread.c elf.c Log Message: Remove extra whitespace added by a dumb tool. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/stand/tostools/libtos/bsdlabel.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/tostools/libtos/cread.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/atari/stand/tostools/libtos/elf.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/atari/stand/tostools/chg_pid/chg_pid.c diff -u src/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c:1.7 src/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c:1.8 --- src/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c:1.7 Wed Mar 18 17:06:43 2009 +++ src/sys/arch/atari/stand/tostools/chg_pid/chg_pid.c Tue Mar 31 11:48:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: chg_pid.c,v 1.7 2009/03/18 17:06:43 cegger Exp $ */ +/* $NetBSD: chg_pid.c,v 1.8 2009/03/31 11:48:15 tsutsui Exp $ */ /* * Copyright (c) 1995 L. Weppelman @@ -95,7 +95,7 @@ int write_block PROTO((void *, int, int)); void set_csum PROTO((char *)); -const char version[] = "$Revision: 1.7 $"; +const char version[] = "$Revision: 1.8 $"; char *Progname = NULL; /* What are we called */ int t_flag= 0; /* Test -- don't actually do it */ @@ -207,7 +207,7 @@ * the buffer in case of 'XGM' partitions. */ g_root = (GEM_ROOT*)buf; -memcpy( g_local, g_root->parts, NGEM_PARTS*sizeof(GEM_PART)); +memcpy(g_local, g_root->parts, NGEM_PARTS*sizeof(GEM_PART)); for (i = 0; i < NGEM_PARTS; i++) { if (!(g_local[i].p_flg & 1)) Index: src/sys/arch/atari/stand/tostools/libtos/bsdlabel.c diff -u src/sys/arch/atari/stand/tostools/libtos/bsdlabel.c:1.3 src/sys/arch/atari/stand/tostools/libtos/bsdlabel.c:1.4 --- src/sys/arch/atari/stand/tostools/libtos/bsdlabel.c:1.3 Wed Mar 18 17:06:43 2009 +++ src/sys/arch/atari/stand/tostools/libtos/bsdlabel.c Tue Mar 31 11:48:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bsdlabel.c,v 1.3 2009/03/18 17:06:43 cegger Exp $ */ +/* $NetBSD: bsdlabel.c,v 1.4 2009/03/31 11:48:15 tsutsui Exp $ */ /* * Copyright (c) 1995 Waldi Ravens. @@ -66,7 +66,7 @@ && dl->d_magic == DISKMAGIC && dkcksum(dl) == 0 ) { -memcpy( dlp, dl, sizeof(*dlp)); +memcpy(dlp, dl, sizeof(*dlp)); rv = 0; break; } Index: src/sys/arch/atari/stand/tostools/libtos/cread.c diff -u src/sys/arch/atari/stand/tostools/libtos/cread.c:1.9 src/sys/arch/atari/stand/tostools/libtos/cread.c:1.10 --- src/sys/arch/atari/stand/tostools/libtos/cread.c:1.9 Wed Mar 18 17:06:43 2009 +++ src/sys/arch/atari/stand/tostools/libtos/cread.c Tue Mar 31 11:48:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cread.c,v 1.9 2009/03/18 17:06:43 cegger Exp $ */ +/* $NetBSD: cread.c,v 1.10 2009/03/31 11:48:15 tsutsui Exp $ */ /* * Copyright (c) 1996 @@ -112,7 +112,7 @@ void zmemcpy(unsigned char *dest, unsigned char *source, unsigned int len) { - memcpy( dest, source, len); + memcpy(dest, source, len); } static int Index: src/sys/arch/atari/stand/tostools/libtos/elf.c diff -u src/sys/arch/atari/stand/tostools/libtos/elf.c:1.12 src/sys/arch/atari/stand/tostools/libtos/elf.c:1.13 --- src/sys/arch/atari/stand/tostools/libtos/elf.c:1.12 Wed Mar 18 17:06:43 2009 +++ src/sys/arch/atari/stand/tostools/libtos/elf.c Tue Mar 31 11:48:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: elf.c,v 1.12 2009/03/18 17:06:43 cegger Exp $ */ +/* $NetBSD: elf.c,v 1.13 2009/03/31 11:48:15 tsutsui Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -212,7 +212,7 @@ } } ehdr.e_shoff = sizeof(ehdr); - memcpy( symtab, &ehdr, sizeof(ehdr)); + memcpy(symtab, &ehdr, sizeof(ehdr)); } return 0;
CVS commit: src/sys/arch/atari/stand
Module Name:src Committed By: tsutsui Date: Tue Mar 31 11:42:08 UTC 2009 Modified Files: src/sys/arch/atari/stand/bootxx: Makefile.bootxx src/sys/arch/atari/stand/bootxxx: Makefile.bootxxx src/sys/arch/atari/stand/libsa: Makefile Added Files: src/sys/arch/atari/stand/libsa: Makefile.inc Log Message: Switch atari standalone bootloaders to using MI libsa and libkern. Tested by David Ross on port-at...@. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/atari/stand/bootxx/Makefile.bootxx cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/stand/libsa/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/atari/stand/libsa/Makefile.inc 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/atari/stand/bootxx/Makefile.bootxx diff -u src/sys/arch/atari/stand/bootxx/Makefile.bootxx:1.8 src/sys/arch/atari/stand/bootxx/Makefile.bootxx:1.9 --- src/sys/arch/atari/stand/bootxx/Makefile.bootxx:1.8 Tue Jan 6 13:35:30 2009 +++ src/sys/arch/atari/stand/bootxx/Makefile.bootxx Tue Mar 31 11:42:07 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootxx,v 1.8 2009/01/06 13:35:30 tsutsui Exp $ +# $NetBSD: Makefile.bootxx,v 1.9 2009/03/31 11:42:07 tsutsui Exp $ NOMAN= # defined @@ -25,7 +25,8 @@ S_MACHSAOBJ!= cd ${S_MACHSA} && ${PRINTOBJDIR} -LIBSA=${S_MACHSAOBJ}/libsa.a +LIBSA=${S_MACHSAOBJ}/lib/sa/libsa.a +LIBKERN=${S_MACHSAOBJ}/lib/kern/libkern.a .include "../../Makefile.booters" .include "../../xxboot/${BTYPE}_LOADADDR" @@ -47,7 +48,7 @@ # SRCS= start.S bootxx.c filesystem.c -LIBS= ${LIBSA} +LIBS= ${LIBSA} ${LIBKERN} beforeinstall: ${INSTALL_DIR} ${DESTDIR}${BINDIR} Index: src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx diff -u src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx:1.5 src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx:1.6 --- src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx:1.5 Tue Jan 13 13:44:01 2009 +++ src/sys/arch/atari/stand/bootxxx/Makefile.bootxxx Tue Mar 31 11:42:07 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootxxx,v 1.5 2009/01/13 13:44:01 tsutsui Exp $ +# $NetBSD: Makefile.bootxxx,v 1.6 2009/03/31 11:42:07 tsutsui Exp $ NOMAN= # defined @@ -25,7 +25,8 @@ S_MACHSAOBJ!= cd ${S_MACHSA} && ${PRINTOBJDIR} -LIBSA=${S_MACHSAOBJ}/libsa.a +LIBSA=${S_MACHSAOBJ}/lib/sa/libsa.a +LIBKERN=${S_MACHSAOBJ}/lib/kern/libkern.a .include "../../Makefile.booters" .include "../../xxboot/${BTYPE}_LOADADDR" @@ -44,7 +45,7 @@ # SRCS= start.S bootxxx.c aout.c bsdstart.s elf.c filesystem.c sysinfo.c -LIBS= ${LIBSA} +LIBS= ${LIBSA} ${LIBKERN} beforeinstall: ${INSTALL_DIR} ${DESTDIR}${BINDIR} Index: src/sys/arch/atari/stand/libsa/Makefile diff -u src/sys/arch/atari/stand/libsa/Makefile:1.29 src/sys/arch/atari/stand/libsa/Makefile:1.30 --- src/sys/arch/atari/stand/libsa/Makefile:1.29 Thu Mar 19 10:19:33 2009 +++ src/sys/arch/atari/stand/libsa/Makefile Tue Mar 31 11:42:07 2009 @@ -1,60 +1,30 @@ -# $NetBSD: Makefile,v 1.29 2009/03/19 10:19:33 tsutsui Exp $ - -LIB= sa - -NOPIC= # defined -NOPROFILE= # defined -NOLINT= # defnied - -NO_NET= +# $NetBSD: Makefile,v 1.30 2009/03/31 11:42:07 tsutsui Exp $ # Logically src/sys -S=${.CURDIR}/../../../.. -S_SA=${S}/lib/libsa -S_KERN=${S}/lib/libkern -S_MACHSA=${S}/arch/atari/stand/libsa - -.include "${S}/../common/lib/libc/Makefile.inc" +S!= cd ${.CURDIR}/../../../..; pwd .include "../Makefile.booters" -CPPFLAGS+= -I. -I${S_MACHSA} -I${S_KERN} -I${S_SA} -I${S} - -.PATH: ${S_SA} ${S_KERN} - -# -# NetBSD/atari specific replacements: dev.c -# - -# machine dependant routines -SRCS= consio.S diskio.c - -# from common/lib/libc -SRCS+= ashldi3.c ashrdi3.c bzero.c strcmp.c strlen.c +CPPFLAGS+= -I${S} -I. -# stand routines -SRCS+= alloc.c bcopy.c exec.c files.c getfile.c gets.c globals.c \ - panic.c memcmp.c memcpy.c memmove.c memset.c printf.c strerror.c \ - subr_prf.c twiddle.c +.include -# io routines -SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c ioctl.c \ - lseek.c open.c nullfs.c read.c stat.c fstat.c write.c +### find out what to use for libsa +SA_AS= library +SAMISCMAKEFLAGS= SA_INCLUDE_NET=no SA_EXTRADIR=${.CURDIR} +.include "${S}/lib/libsa/Makefile.inc" +LIBSA= ${SALIB} -.if !defined(NO_NET) -# network routines -SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c -.endif +### find out what to use for libkern +KERN_AS= library +.include "${S}/lib/libkern/Makefile.inc" +LIBKERN= ${KERNLIB} -# network info services: -SRCS+= bootp.c rarp.c bootparam.c +LIBS= ${LIBSA} ${LIBKERN} -# boot filesystems -SRCS+= ufs.c nfs.c +realall: ${LIBS} -# only needed during build -libinstall:: +cleandir distclean: cleanlibdir -.include -.undef DESTDIR -.include +cleanlibdir: + -rm -rf lib Added files: Index: src/sys/arch/atari/stand/libsa/Makefile.inc diff -u /dev/null src/sys/arch/atari/stand/libsa/