Date: 23 Aug 2003 15:42:09 +0200 From: "Clemens Fischer" <ino-qc@spotteswoode.de.eu.org> To: "Luoqi Chen" <lchen@briontech.com> Cc: freebsd-stable@freebsd.org Subject: Re: kernel: locore.s doesn't assemble (fillkpt, $PAGE_SHIFT, $PTESHIFT) Message-ID: <y8xkze1a.fsf@ID-23066.news.dfncis.de> In-Reply-To: <AHEKICEOIHLOGINAFIINIEEDCBAA.lchen@briontech.com> (Luoqi Chen's message of "Fri, 22 Aug 2003 11:33:44 -0700") References: <AHEKICEOIHLOGINAFIINIEEDCBAA.lchen@briontech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Luoqi Chen: >> since august 8th, 2003 the kernel on my i386 pentiumIII won't >> compile. the problem arises in locore.s with the definition of the >> constants $PAGE_SHIFT and $PTESHIFT used in `shr' and `shl' >> instructions within the macros `fillkpt' and `fillkptphys'. >> > Did you do a make depend beforehand? The assym.s file is generated > during the make depend phase. yes, i go by the book. but while tracking RELENG_4 i use "make buildworld && make buildkernel KERNCONF=n1 && make installkernel KERNCONF=n1", just as outlined in usr/src/Makefile. i'll check assym.s right after "make depend", that's a good idea! /sys/compile/n1 1 p2 # cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -nostdinc -I- -I. -I../.. -I../../../include -I../../contrib/dev/acpica -I../../contrib/ipfilter -D_KERNEL -include opt_global.h -mpreferred-stack-boundary=2 ../../i386/i386/genassym.c 0 p2 # lt|tail 1334981 -rw-r--r-- 1 root wheel - 0 Aug 23 14:57 assym.s 1334281 -rw-r--r-- 1 root wheel - 14202 Aug 23 14:59 genassym.o 1334458 drwxr-xr-x 2 root wheel - 10752 Aug 23 14:59 ./ 0 p2 # sh ../../kern/genassym.sh genassym.o > assym.s 0 p2 # lt|tail 1334281 -rw-r--r-- 1 root wheel - 14202 Aug 23 14:59 genassym.o 1334458 drwxr-xr-x 2 root wheel - 10752 Aug 23 14:59 ./ 1334981 -rw-r--r-- 1 root wheel - 0 Aug 23 14:59 assym.s but i found something very interesting: basically genassym.sh is a boune-shell script doing "nm <object-file> | awk 'awk-script'". genassym.o is that object file, and it sure contains all the symbols needed. so i ran this line manually, and the result was correct, all the symbols needed were either on stdout or in assym.s! my question is this: why does sys/kern/genassym.sh have this funny redirection (`3>/dev/stdout >&3 3>&-') at the end? why not only write `> "$outfile"'? i tried this version, and it works perfectly fine. the original line highly depends on when the shell does redirection. i don't understand why fd-3 is used at all, why it is closed, redirected from stdout and redirected to the file which can be specified with the `-o' option to genassym.sh. the simple version would do this equaly well, without complications. i have to admit, though, that i don't understand why nobody else is experiencing this problem. i have a build running currently, but with creating assym.s manually as a workaround i think i'll be able to install world and kernel fine. clemens
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?y8xkze1a.fsf>