Module Name: src Committed By: tsutsui Date: Tue Oct 11 13:07:06 UTC 2011
Modified Files: src/sys/arch/x68k/stand: Makefile.booters src/sys/arch/x68k/stand/boot_ufs: Makefile src/sys/arch/x68k/stand/boot_ustar: Makefile src/sys/arch/x68k/stand/libsa: Makefile Log Message: Fix "Error occurs, please reset" boot problem on X68030 + 060turbo in 060 mode, found on NetBSD booth at OSC 2011 Hiroshima: - use -D__daddr_t=int32_t for all bootloader files to avoid 64 bit ops in FFS - explicitly specify -m68020-60 to avoid 64 bit mulsl/mulul instructions which need to be handled by 060SP emulation but not available in 060turbo IPL ROM (LFS still has uint64_t members even with 32bit daddr_t) The problem was investigated (at least 1.6.2 bootloaders worked) by Yasushi Oshima at OSC booth, and fixes have been confirmed by Y.Sugahara on his 060turbo. Thanks everyone! Should also be pulled up to netbsd-5. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/stand/Makefile.booters cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x68k/stand/boot_ufs/Makefile cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x68k/stand/boot_ustar/Makefile cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x68k/stand/libsa/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x68k/stand/Makefile.booters diff -u src/sys/arch/x68k/stand/Makefile.booters:1.6 src/sys/arch/x68k/stand/Makefile.booters:1.7 --- src/sys/arch/x68k/stand/Makefile.booters:1.6 Mon Apr 11 15:20:30 2011 +++ src/sys/arch/x68k/stand/Makefile.booters Tue Oct 11 13:07:06 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.6 2011/04/11 15:20:30 tsutsui Exp $ +# $NetBSD: Makefile.booters,v 1.7 2011/10/11 13:07:06 tsutsui Exp $ S?= ${.CURDIR}/../../../.. @@ -7,6 +7,8 @@ CFLAGS+= -Wall -Wmissing-prototypes -Wst CFLAGS+= -Wno-pointer-sign CFLAGS+= -Werror +CPPFLAGS+= -D__daddr_t=int32_t + .include <bsd.klinks.mk> # XXX SHOULD NOT NEED TO DEFINE THESE! Index: src/sys/arch/x68k/stand/boot_ufs/Makefile diff -u src/sys/arch/x68k/stand/boot_ufs/Makefile:1.25 src/sys/arch/x68k/stand/boot_ufs/Makefile:1.26 --- src/sys/arch/x68k/stand/boot_ufs/Makefile:1.25 Sat Jan 22 19:19:24 2011 +++ src/sys/arch/x68k/stand/boot_ufs/Makefile Tue Oct 11 13:07:06 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2011/01/22 19:19:24 joerg Exp $ +# $NetBSD: Makefile,v 1.26 2011/10/11 13:07:06 tsutsui Exp $ NOMAN= # defined @@ -38,12 +38,13 @@ vers.c: ${VERSIONFILE} ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT} CFLAGS= -Os -fomit-frame-pointer +CFLAGS+= -m68020-60 CFLAGS+= -W -Wall -Wstrict-prototypes -Wmissing-prototypes CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)" CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\" CPPFLAGS+= -DSCSI_ADHOC_BOOTPART #CPPFLAGS+= -DBOOT_DEBUG -CPPFLAGS+= -DUSE_FFS -DUSE_LFS -DUSE_UFS1 -DUSE_UFS2 -D__daddr_t=int32_t +CPPFLAGS+= -DUSE_FFS -DUSE_LFS -DUSE_UFS1 -DUSE_UFS2 CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE AFLAGS= ${CFLAGS:M-[ID]*} LINKFLAGS= -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M Index: src/sys/arch/x68k/stand/boot_ustar/Makefile diff -u src/sys/arch/x68k/stand/boot_ustar/Makefile:1.18 src/sys/arch/x68k/stand/boot_ustar/Makefile:1.19 --- src/sys/arch/x68k/stand/boot_ustar/Makefile:1.18 Sat Jan 22 19:19:24 2011 +++ src/sys/arch/x68k/stand/boot_ustar/Makefile Tue Oct 11 13:07:06 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2011/01/22 19:19:24 joerg Exp $ +# $NetBSD: Makefile,v 1.19 2011/10/11 13:07:06 tsutsui Exp $ NOMAN= # defined @@ -35,6 +35,7 @@ vers.c: ${VERSIONFILE} CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)" CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\" CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE +CFLAGS+= -m68020-60 AFLAGS= ${CFLAGS:M-[ID]*} AFLAGS+= -Wa,-mc68000 LINKFLAGS= -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M Index: src/sys/arch/x68k/stand/libsa/Makefile diff -u src/sys/arch/x68k/stand/libsa/Makefile:1.26 src/sys/arch/x68k/stand/libsa/Makefile:1.27 --- src/sys/arch/x68k/stand/libsa/Makefile:1.26 Tue Apr 12 14:07:35 2011 +++ src/sys/arch/x68k/stand/libsa/Makefile Tue Oct 11 13:07:06 2011 @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.26 2011/04/12 14:07:35 tsutsui Exp $ +# $NetBSD: Makefile,v 1.27 2011/10/11 13:07:06 tsutsui Exp $ S= ${.CURDIR}/../../../.. +CFLAGS+= -m68020-60 + CPPFLAGS+= -nostdinc -I${.OBJDIR} -I. -I${S} CPPFLAGS+= -I${.CURDIR}/../libiocs -I${.CURDIR}/../common CPPFLAGS+= -D_STANDALONE