We'll define the kernel types for standalone code.diff -r1.68 -r1.69 src/sys/arch/i386/stand/boot/Makefile.boot
(christos)
--- 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 | |||
3 | S= ${.CURDIR}/../../../../.. | 3 | S= ${.CURDIR}/../../../../.. | |
4 | 4 | |||
5 | NOMAN= | 5 | NOMAN= | |
6 | PROG?= boot | 6 | PROG?= boot | |
7 | NEWVERSWHAT?= "BIOS Boot" | 7 | NEWVERSWHAT?= "BIOS Boot" | |
8 | VERSIONFILE?= ${.CURDIR}/../version | 8 | VERSIONFILE?= ${.CURDIR}/../version | |
9 | 9 | |||
10 | AFLAGS.biosboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} | 10 | AFLAGS.biosboot.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} | |
11 | 11 | |||
12 | SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c | 12 | SOURCES?= biosboot.S boot2.c conf.c devopen.c exec.c | |
13 | SRCS= ${SOURCES} | 13 | SRCS= ${SOURCES} | |
14 | .if !make(depend) | 14 | .if !make(depend) | |
@@ -26,27 +26,27 @@ STRIPFLAG= # nothing | @@ -26,27 +26,27 @@ STRIPFLAG= # nothing | |||
26 | LIBCRT0= # nothing | 26 | LIBCRT0= # nothing | |
27 | LIBCRTI= # nothing | 27 | LIBCRTI= # nothing | |
28 | LIBCRTBEGIN= # nothing | 28 | LIBCRTBEGIN= # nothing | |
29 | LIBCRTEND= # nothing | 29 | LIBCRTEND= # nothing | |
30 | LIBC= # nothing | 30 | LIBC= # nothing | |
31 | 31 | |||
32 | BINDIR=/usr/mdec | 32 | BINDIR=/usr/mdec | |
33 | BINMODE=444 | 33 | BINMODE=444 | |
34 | 34 | |||
35 | .PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib | 35 | .PATH: ${.CURDIR}/.. ${.CURDIR}/../../lib | |
36 | 36 | |||
37 | LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start | 37 | LDFLAGS+= -nostdlib -Wl,-N -Wl,-e,boot_start | |
38 | CPPFLAGS+= -I ${.CURDIR}/.. -I ${.CURDIR}/../../lib -I ${S}/lib/libsa | 38 | CPPFLAGS+= -I ${.CURDIR}/.. -I ${.CURDIR}/../../lib -I ${S}/lib/libsa | |
39 | CPPFLAGS+= -I ${.OBJDIR} -D_KERNTYPES | 39 | CPPFLAGS+= -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 | |
41 | COPTS= -Os | 41 | COPTS= -Os | |
42 | 42 | |||
43 | .if ${MACHINE_ARCH} == "x86_64" | 43 | .if ${MACHINE_ARCH} == "x86_64" | |
44 | LDFLAGS+= -Wl,-m,elf_i386 | 44 | LDFLAGS+= -Wl,-m,elf_i386 | |
45 | AFLAGS+= -m32 | 45 | AFLAGS+= -m32 | |
46 | CPUFLAGS= -m32 | 46 | CPUFLAGS= -m32 | |
47 | LIBKERN_ARCH=i386 | 47 | LIBKERN_ARCH=i386 | |
48 | KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" | 48 | KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" | |
49 | .else | 49 | .else | |
50 | CPUFLAGS= -march=i386 -mtune=i386 | 50 | CPUFLAGS= -march=i386 -mtune=i386 | |
51 | .endif | 51 | .endif | |
52 | 52 |
--- 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 | |||
3 | S= ${.CURDIR}/../../../.. | 3 | S= ${.CURDIR}/../../../.. | |
4 | 4 | |||
5 | BASE= dosboot | 5 | BASE= dosboot | |
6 | PROG= ${BASE}.com | 6 | PROG= ${BASE}.com | |
7 | NOMAN= # defined | 7 | NOMAN= # defined | |
8 | NEWVERSWHAT= "DOS Boot" | 8 | NEWVERSWHAT= "DOS Boot" | |
9 | STARTFILE= ${DOSSTART} | 9 | STARTFILE= ${DOSSTART} | |
10 | RELOC= 0x100 | 10 | RELOC= 0x100 | |
11 | 11 | |||
12 | SRCS= main.c devopen.c exec.c | 12 | SRCS= main.c devopen.c exec.c | |
13 | 13 | |||
14 | CPPFLAGS+= -DSLOW # for libz | 14 | CPPFLAGS+= -DSLOW # for libz | |
15 | CPPFLAGS+= -DCOMPAT_386BSD_MBRPART | 15 | CPPFLAGS+= -DCOMPAT_386BSD_MBRPART | |
16 | CPPFLAGS+= -DXMS -D_KERNTYPES | 16 | CPPFLAGS+= -DXMS | |
17 | CPPFLAGS+= -DLIBSA_ENABLE_LS_OP | 17 | CPPFLAGS+= -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 | |
22 | CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main | 22 | CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main | |
23 | 23 | |||
24 | # XXX should go into library | 24 | # XXX should go into library | |
25 | SRCS+= getopt.c | 25 | SRCS+= 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 | |
29 | CPPFLAGS+= -DSTACK_START=0x10000 | 29 | CPPFLAGS+= -DSTACK_START=0x10000 |
--- 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 | |||
3 | S= ${.CURDIR}/../../../.. | 3 | S= ${.CURDIR}/../../../.. | |
4 | 4 | |||
5 | BASE?= pxeboot_ia32 | 5 | BASE?= pxeboot_ia32 | |
6 | PROG= ${BASE}.bin | 6 | PROG= ${BASE}.bin | |
7 | NOMAN= # defined | 7 | NOMAN= # defined | |
8 | NEWVERSWHAT= "PXE Boot" | 8 | NEWVERSWHAT= "PXE Boot" | |
9 | STARTFILE= ${PXESTART} | 9 | STARTFILE= ${PXESTART} | |
10 | RELOC= 0x0 | 10 | RELOC= 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 | |||
30 | AFLAGS+= -m32 | 30 | AFLAGS+= -m32 | |
31 | LIBKERN_ARCH= i386 | 31 | LIBKERN_ARCH= i386 | |
32 | KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" | 32 | KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386" | |
33 | .endif | 33 | .endif | |
34 | 34 | |||
35 | CPPFLAGS+= -DSLOW # for libz | 35 | CPPFLAGS+= -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 | |
39 | CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev | 39 | CPPFLAGS+= -DSUPPORT_SERIAL=boot_params.bp_consdev | |
40 | CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed | 40 | CPPFLAGS+= -DCONSPEED=boot_params.bp_conspeed | |
41 | CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr | 41 | CPPFLAGS+= -DCONSADDR=boot_params.bp_consaddr | |
42 | CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap | 42 | CPPFLAGS+= -DCONSOLE_KEYMAP=boot_params.bp_keymap | |
43 | CPPFLAGS+= -DDIRECT_SERIAL -D_KERNTYPES | 43 | CPPFLAGS+= -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") | |
55 | CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL | 55 | CPPFLAGS+= -DSUPPORT_SERIAL=CONSDEV_COM0 -DDIRECT_SERIAL | |
56 | .endif | 56 | .endif |