[PATCH] Use MACHINE_ARCH for boot loader
Xin LI
delphij at delphij.net
Fri Aug 27 00:50:27 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
The attached patch changes FreeBSD/x86 back to FreeBSD/i386 on i386 and
FreeBSD/amd64 on amd64.
Comments welcome! I'll commit it in by the weekend if there is no
objection on this.
Cheers,
- --
Xin LI <delphij at delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)
iQEcBAEBCAAGBQJMdwu5AAoJEATO+BI/yjfBe+4H/i/LVqSlVP4XbQ8Xfzs2x0Xr
pv+sOtSMOKOBmtKb6KrTxyZ/GyLTAxxERlJCDLuxFZ1fVZ+E+q3BrhNRyJGcCjYx
6B3gdFwgiOlZbbFw/FGrI0W32xbeTnzd4oHqZWli4Nn6L7h+smX+O11aFaAg4ktG
y8E3ngJrG3ublbUskJ6/Vbi2xIbkTt0iPPa7jZlGGU2rTrLGTtB7E/5GNIXbiOWe
NwfKW+c2vaNCWTzwrUM/jHAkVgM3ZFXVEwx0BFGuhY4Rc2z5sGLwvpbueNT7xkTv
Y6goyuw6vwxnxA6ps2eka38Dz1JsoDNXsdFgpkgEF57c1hROSHF39lJhIfEB5t8=
=HL2J
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: sys/boot/i386/boot2/boot2.c
===================================================================
--- sys/boot/i386/boot2/boot2.c (revision 211847)
+++ sys/boot/i386/boot2/boot2.c (working copy)
@@ -283,7 +283,7 @@ main(void)
for (;;) {
if (!autoboot || !OPT_CHECK(RBX_QUIET))
- printf("\nFreeBSD/x86 boot\n"
+ printf("\nFreeBSD/" MACHINE_ARCH " boot\n"
"Default: %u:%s(%u,%c)%s\n"
"boot: ",
dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit,
Index: sys/boot/i386/boot2/Makefile
===================================================================
--- sys/boot/i386/boot2/Makefile (revision 211847)
+++ sys/boot/i386/boot2/Makefile (working copy)
@@ -34,6 +34,7 @@ CFLAGS= -Os \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-D${BOOT2_UFS} \
-DFLAGS=${BOOT_BOOT1_FLAGS} \
+ -DMACHINE_ARCH=\"${MACHINE_ARCH}\" \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
Index: sys/boot/i386/zfsboot/zfsboot.c
===================================================================
--- sys/boot/i386/zfsboot/zfsboot.c (revision 211847)
+++ sys/boot/i386/zfsboot/zfsboot.c (working copy)
@@ -731,7 +731,7 @@ main(void)
for (;;) {
if (!autoboot || !OPT_CHECK(RBX_QUIET))
- printf("\nFreeBSD/x86 boot\n"
+ printf("\nFreeBSD/" MACHINE_ARCH " boot\n"
"Default: %s:%s\n"
"boot: ",
spa->spa_name, kname);
Index: sys/boot/i386/zfsboot/Makefile
===================================================================
--- sys/boot/i386/zfsboot/Makefile (revision 211847)
+++ sys/boot/i386/zfsboot/Makefile (working copy)
@@ -26,6 +26,7 @@ CFLAGS= -Os -g \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-DBOOT2 \
-DFLAGS=${BOOT_BOOT1_FLAGS} \
+ -DMACHINE_ARCH=\"${MACHINE_ARCH}\" \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
Index: sys/boot/i386/zfsloader/Makefile
===================================================================
--- sys/boot/i386/zfsloader/Makefile (revision 211847)
+++ sys/boot/i386/zfsloader/Makefile (working copy)
@@ -3,7 +3,7 @@
.PATH: ${.CURDIR}/../loader
LOADER= zfsloader
-NEWVERSWHAT= "ZFS enabled bootstrap loader" i386
+NEWVERSWHAT= "ZFS enabled bootstrap loader" ${MACHINE_ARCH}
LOADER_ZFS_SUPPORT=yes
LOADER_ONLY= yes
NO_MAN= yes
Index: sys/boot/i386/loader/Makefile
===================================================================
--- sys/boot/i386/loader/Makefile (revision 211847)
+++ sys/boot/i386/loader/Makefile (working copy)
@@ -6,7 +6,7 @@ MK_SSP= no
LOADER?= loader
PROG= ${LOADER}.sym
INTERNALPROG=
-NEWVERSWHAT?= "bootstrap loader" i386
+NEWVERSWHAT?= "bootstrap loader" ${MACHINE_ARCH}
# architecture-specific loader code
SRCS= main.c conf.c vers.c
Index: sys/boot/i386/gptboot/gptboot.c
===================================================================
--- sys/boot/i386/gptboot/gptboot.c (revision 211847)
+++ sys/boot/i386/gptboot/gptboot.c (working copy)
@@ -281,7 +281,7 @@ main(void)
for (;;) {
if (!autoboot || !OPT_CHECK(RBX_QUIET))
- printf("\nFreeBSD/x86 boot\n"
+ printf("\nFreeBSD/" MACHINE_ARCH " boot\n"
"Default: %u:%s(%up%u)%s\n"
"boot: ",
dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit,
Index: sys/boot/i386/gptboot/Makefile
===================================================================
--- sys/boot/i386/gptboot/Makefile (revision 211847)
+++ sys/boot/i386/gptboot/Makefile (working copy)
@@ -27,6 +27,7 @@ CFLAGS= -Os \
-mrtd \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
-D${GPTBOOT_UFS} \
+ -DMACHINE_ARCH=\"${MACHINE_ARCH}\" \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
More information about the freebsd-current
mailing list