Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Nov 2006 11:50:37 -0800
From:      Sam Leffler <sam@errno.com>
To:        John Hay <jhay@meraka.org.za>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Gateworks 2348 any experience with it?
Message-ID:  <455B6F8D.90307@errno.com>
In-Reply-To: <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> <FBD13236-9CC9-436C-9CE6-D474C583ADE9@netgate.com> <20061115121521.GA38995@ci0.org> <20061115194141.GB98910@zibbi.meraka.csir.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
John Hay wrote:
>> 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, if you can be patient a little longer you'll be able to build
working systems from CVS HEAD w/o any hacks.  I've been booting with an
NFS-mounted root over the onboard Ethernet for a while.  The ath driver
is known to work and I've recently gotten the CF-IDE slot and several
other bits and pieces working.  I was waiting to commit to CVS before
posting about things but the main parts that are not yet working are:

1. 2nd Ethernet port.
2. Flash.
3. RTC (working on that now)
4. I2C sensors for temp and voltage (trivial once we have i2c working
properly).
5. NPE crypto acceleration (may be a while; still waiting for Intel to
release stuff to me).

Past that we haven't ironed out how to boot from CF.  We can either
stick a bootstrap in flash and have redboot load that or we can stick a
kernel in flash.  Once flash can be r/w from freebsd I have a tool for
reading and writing redboot config parameters that can be used to
simplify some of this.

	Sam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?455B6F8D.90307>