Sat Jan 23 22:29:29 2016 UTC ()
We'll define the kernel types for standalone code.


(christos)
diff -r1.68 -r1.69 src/sys/arch/i386/stand/boot/Makefile.boot
diff -r1.29 -r1.30 src/sys/arch/i386/stand/dosboot/Makefile
diff -r1.23 -r1.24 src/sys/arch/i386/stand/pxeboot/Makefile

cvs diff -r1.68 -r1.69 src/sys/arch/i386/stand/boot/Makefile.boot (expand / switch to unified diff)

--- src/sys/arch/i386/stand/boot/Makefile.boot 2016/01/23 21:22:47 1.68
+++ src/sys/arch/i386/stand/boot/Makefile.boot 2016/01/23 22:29:29 1.69
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.boot,v 1.68 2016/01/23 21:22:47 christos Exp $ 1# $NetBSD: Makefile.boot,v 1.69 2016/01/23 22:29:29 christos Exp $
2 2
3S= ${.CURDIR}/../../../../.. 3S= ${.CURDIR}/../../../../..
4 4
5NOMAN= 5NOMAN=
6PROG?= boot 6PROG?= boot
7NEWVERSWHAT?= "BIOS Boot" 7NEWVERSWHAT?= "BIOS Boot"
8VERSIONFILE?= ${.CURDIR}/../version 8VERSIONFILE?= ${.CURDIR}/../version
9 9
10AFLAGS.biosboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} 10AFLAGS.biosboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:}
11 11
12SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c 12SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c
13SRCS= ${SOURCES} 13SRCS= ${SOURCES}
14.if !make(depend) 14.if !make(depend)
@@ -26,27 +26,27 @@ STRIPFLAG= # nothing @@ -26,27 +26,27 @@ STRIPFLAG= # nothing
26LIBCRT0= # nothing 26LIBCRT0= # nothing
27LIBCRTI= # nothing 27LIBCRTI= # nothing
28LIBCRTBEGIN= # nothing 28LIBCRTBEGIN= # nothing
29LIBCRTEND= # nothing 29LIBCRTEND= # nothing
30LIBC= # nothing 30LIBC= # nothing
31 31
32BINDIR=/usr/mdec 32BINDIR=/usr/mdec
33BINMODE=444 33BINMODE=444
34 34
35.PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib 35.PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib
36 36
37LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start 37LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start
38CPPFLAGS+= -I ${.CURDIR}/.. -I ${.CURDIR}/../../lib -I ${S}/lib/libsa 38CPPFLAGS+= -I ${.CURDIR}/.. -I ${.CURDIR}/../../lib -I ${S}/lib/libsa
39CPPFLAGS+= -I ${.OBJDIR} -D_KERNTYPES 39CPPFLAGS+= -I ${.OBJDIR}
40# Make sure we override any optimization options specified by the user 40# Make sure we override any optimization options specified by the user
41COPTS= -Os 41COPTS= -Os
42 42
43.if ${MACHINE_ARCH} == "x86_64" 43.if ${MACHINE_ARCH} == "x86_64"
44LDFLAGS+= -Wl,-m,elf_i386 44LDFLAGS+= -Wl,-m,elf_i386
45AFLAGS+= -m32 45AFLAGS+= -m32
46CPUFLAGS= -m32 46CPUFLAGS= -m32
47LIBKERN_ARCH=i386 47LIBKERN_ARCH=i386
48KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" 48KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
49.else 49.else
50CPUFLAGS= -march=i386 -mtune=i386 50CPUFLAGS= -march=i386 -mtune=i386
51.endif 51.endif
52 52

cvs diff -r1.29 -r1.30 src/sys/arch/i386/stand/dosboot/Makefile (expand / switch to unified diff)

--- src/sys/arch/i386/stand/dosboot/Makefile 2016/01/23 21:22:47 1.29
+++ src/sys/arch/i386/stand/dosboot/Makefile 2016/01/23 22:29:29 1.30
@@ -1,29 +1,29 @@ @@ -1,29 +1,29 @@
1# $NetBSD: Makefile,v 1.29 2016/01/23 21:22:47 christos Exp $ 1# $NetBSD: Makefile,v 1.30 2016/01/23 22:29:29 christos Exp $
2 2
3S= ${.CURDIR}/../../../.. 3S= ${.CURDIR}/../../../..
4 4
5BASE= dosboot 5BASE= dosboot
6PROG= ${BASE}.com 6PROG= ${BASE}.com
7NOMAN= # defined 7NOMAN= # defined
8NEWVERSWHAT= "DOS Boot" 8NEWVERSWHAT= "DOS Boot"
9STARTFILE= ${DOSSTART} 9STARTFILE= ${DOSSTART}
10RELOC= 0x100 10RELOC= 0x100
11 11
12SRCS= main.c devopen.c exec.c 12SRCS= main.c devopen.c exec.c
13 13
14CPPFLAGS+= -DSLOW # for libz 14CPPFLAGS+= -DSLOW # for libz
15CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 15CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
16CPPFLAGS+= -DXMS -D_KERNTYPES 16CPPFLAGS+= -DXMS
17CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 17CPPFLAGS+= -DLIBSA_ENABLE_LS_OP
18#uncomment if there are problems with memory detection 18#uncomment if there are problems with memory detection
19#CPPFLAGS+= -DCONSERVATIVE_MEMDETECT 19#CPPFLAGS+= -DCONSERVATIVE_MEMDETECT
20 20
21#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 21#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
22CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 22CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main
23 23
24# XXX should go into library 24# XXX should go into library
25SRCS+= getopt.c 25SRCS+= getopt.c
26.PATH: ${.CURDIR}/../libsa 26.PATH: ${.CURDIR}/../libsa
27 27
28# XXX these should depend on the size of the image 28# XXX these should depend on the size of the image
29CPPFLAGS+= -DSTACK_START=0x10000 29CPPFLAGS+= -DSTACK_START=0x10000

cvs diff -r1.23 -r1.24 src/sys/arch/i386/stand/pxeboot/Makefile (expand / switch to unified diff)

--- src/sys/arch/i386/stand/pxeboot/Makefile 2016/01/23 21:22:47 1.23
+++ src/sys/arch/i386/stand/pxeboot/Makefile 2016/01/23 22:29:29 1.24
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.23 2016/01/23 21:22:47 christos Exp $ 1# $NetBSD: Makefile,v 1.24 2016/01/23 22:29:29 christos Exp $
2 2
3S= ${.CURDIR}/../../../.. 3S= ${.CURDIR}/../../../..
4 4
5BASE?= pxeboot_ia32 5BASE?= pxeboot_ia32
6PROG= ${BASE}.bin 6PROG= ${BASE}.bin
7NOMAN= # defined 7NOMAN= # defined
8NEWVERSWHAT= "PXE Boot" 8NEWVERSWHAT= "PXE Boot"
9STARTFILE= ${PXESTART} 9STARTFILE= ${PXESTART}
10RELOC= 0x0 10RELOC= 0x0
11 11
12.if (${BASE} != "pxeboot_ia32") 12.if (${BASE} != "pxeboot_ia32")
13.PATH.c: ${.CURDIR}/../pxeboot 13.PATH.c: ${.CURDIR}/../pxeboot
14.PATH.S: ${.CURDIR}/../pxeboot 14.PATH.S: ${.CURDIR}/../pxeboot
@@ -30,27 +30,27 @@ LDFLAGS+= -Wl,-m,elf_i386 @@ -30,27 +30,27 @@ LDFLAGS+= -Wl,-m,elf_i386
30AFLAGS+= -m32 30AFLAGS+= -m32
31LIBKERN_ARCH= i386 31LIBKERN_ARCH= i386
32KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" 32KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
33.endif 33.endif
34 34
35CPPFLAGS+= -DSLOW # for libz 35CPPFLAGS+= -DSLOW # for libz
36 36
37.if (${BASE} == "pxeboot_ia32") 37.if (${BASE} == "pxeboot_ia32")
38# Take config values from patchable header 38# Take config values from patchable header
39CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev 39CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev
40CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed 40CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed
41CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr 41CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr
42CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap 42CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap
43CPPFLAGS+= -DDIRECT_SERIAL -D_KERNTYPES 43CPPFLAGS+= -DDIRECT_SERIAL
44# Various serial line configurations 44# Various serial line configurations
45#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL 45#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_PC -DDIRECT_SERIAL
46# or 46# or
47#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD 47#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0KBD
48# or 48# or
49#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO  49#CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_AUTO
50# and maybe  50# and maybe
51#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600 51#CPPFLAGS+= -DDIRECT_SERIAL -DCOMCONS_KEYPRESS -DCONSPEED=57600
52.endif 52.endif
53 53
54.if (${BASE} == "pxeboot_ia32_com0") 54.if (${BASE} == "pxeboot_ia32_com0")
55CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL 55CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL
56.endif 56.endif