From owner-freebsd-arm@FreeBSD.ORG Wed Nov 15 19:42:55 2006 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96FAE16A4C2; Wed, 15 Nov 2006 19:42:55 +0000 (UTC) (envelope-from jhay@meraka.csir.co.za) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [146.64.24.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9B8C43E15; Wed, 15 Nov 2006 19:41:59 +0000 (GMT) (envelope-from jhay@meraka.csir.co.za) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 7033033CAA; Wed, 15 Nov 2006 21:41:41 +0200 (SAST) Date: Wed, 15 Nov 2006 21:41:41 +0200 From: John Hay To: Olivier Houchard Message-ID: <20061115194141.GB98910@zibbi.meraka.csir.co.za> References: <20061023163650.GA30024@zibbi.meraka.csir.co.za> <20061023211342.GA75533@ci0.org> <20061113140111.GA63047@zibbi.meraka.csir.co.za> <20061113143853.GA22089@ci0.org> <20061115091005.GA72236@zibbi.meraka.csir.co.za> <20061115121521.GA38995@ci0.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061115121521.GA38995@ci0.org> User-Agent: Mutt/1.4.2.1i Cc: freebsd-arm@freebsd.org, Sam Leffler Subject: Re: Gateworks 2348 any experience with it? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 19:42:55 -0000 > > This is not John's fault, unfortunately right now the ath hal modules in > the src directory are compiled using FPA, while FreeBSD is compiled using > VFP. > You can use the small application at > http://people.freebsd.org/~sam/wackelf.c > to hack the ELF headers to make the hal binary VFP (it doesn't matter, because > it doesn't actually use FP). > Sam should update the hal modules soon. Ok, I got the kernel compiled with this and then my next step was to get the kernel in a shape that I can load it, so I tried the "make trampoline" that was mentioned on the list. That resulted in some errors because it couldn't find some include files. I ended up hacking the Makefile a bit until it compiled: ########################################### --- ../../../conf/Makefile.arm Wed Nov 15 07:56:35 2006 +++ Makefile Wed Nov 15 20:07:23 2006 @@ -77,10 +82,10 @@ -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp) && \ echo "#define KERNSIZE $$st_size" >>opt_kernname.h - ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \ + ${CC} -O -nostdlib -I. -I${S} -I/usr/include -Xlinker -T -Xlinker ldscript.$M.tramp \ $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S ${FILES_CPU_FUNC} \ -o ${KERNEL_KO}.tramp - ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ + ${CC} -O -nostdlib -I. -I${S} -I/usr/include -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S ${FILES_CPU_FUNC} -o \ ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ @@ -93,11 +98,11 @@ gzip -9 ${KERNEL_KO}.tmp eval $$(stat -s ${KERNEL_KO}.tmp.gz) && \ echo "#define KERNCOMPSIZE $$st_size" >>opt_kernname.h - ${CC} -O2 -DKZIP -I. -c $S/kern/inflate.c -o inflate-tramp.o - ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \ + ${CC} -O2 -DKZIP -I. -I${S} -c $S/kern/inflate.c -o inflate-tramp.o + ${CC} -O -nostdlib -I. -I${S} -I/usr/include -Xlinker -T -Xlinker ldscript.$M.tramp \ -DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \ ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp - ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ + ${CC} -O -nostdlib -I. -I${S} -I/usr/include -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ -DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \ ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ########################################### I didn't rewrap the lines, so that it is easier to see what I did. John -- John Hay -- John.Hay@meraka.csir.co.za / jhay@FreeBSD.org