Subject: Re: [HELP] Cann't compile hpcarm for iPAQ kernel
To: Armani Lia <armani_lia@yahoo.com.tw>
From: Antti Kantee <pooka@iki.fi>
List: port-hpcarm
Date: 09/12/2001 22:41:53
On Wed Sep 12 2001 at 09:58:56 +0800, Armani Lia wrote:
> problem, thanks. But I encounter another message:
> 
> building standard kern library
> /usr/local/cross/bin/arm-unknown-netbsdelf-gcc  -O2
> -Werror -Wall -Wcomment -Wpo
> inter-arith -Wno-uninitialized -Wno-main -I.
> -I../../../../arch -I../../../.. -n
> ostdinc -DHPCARM -DSAIP -DSAEGPIO_BASE="0x49000000"
> -DLKM -DDIAGNOSTIC -DCONSPEE
> D="0x4b00" -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT
> -Dhpcarm -Darm32  -c swapnetbsd
> .c
> sh ../../../../conf/newvers.sh
> /usr/local/cross/bin/arm-unknown-netbsdelf-gcc  -O2
> -Werror -Wall -Wcomment -Wpo
> inter-arith -Wno-uninitialized -Wno-main -I.
> -I../../../../arch -I../../../.. -n
> ostdinc -DHPCARM -DSAIP -DSAEGPIO_BASE="0x49000000"
> -DLKM -DDIAGNOSTIC -DCONSPEE
> D="0x4b00" -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT
> -Dhpcarm -Darm32  -c vers.c
> rm -f netbsd
> /usr/local/cross/bin/arm-unknown-netbsdelf-ld -Ttext
> C0040000 -e start -X -o net
> bsd ${SYSTEM_OBJ} vers.o
> arm32_machdep.o: In function `parse_mi_bootargs':
> arm32_machdep.o(.text+0xe18): undefined reference to
> `memory_disc_size'
> *** Error code 1
> 
> Stop.
> make: stopped in
> /usr/src/sys/arch/hpcarm/compile/MYCONF
> 
> Would you know how to solve it, thank you very much!

Ah, this one. I really didn't bother fixing the problem, since I don't
claim to understand how the source tree in structured at the moment, and
what it's supposed to look like in the future (if someone would point me
to a plan, I might be able to do some grunt work here, hint hint).
Instead I just hacked around the problem.

memory_disc_size is declared somewhere under arm32/rc7500, which is not
compiled into the hpcarm iPAQ kernel. So I just simply added the
declaration to some random file. Removing the keyword `extern' in
arm32_machdep.c should be enough to get the kernel linked.

ps. someone should actually fix this

-- 
Antti Kantee <pooka@iki.fi>          v          Of course he runs NetBSD
http://www.iki.fi/pooka/             i            http://www.NetBSD.org/