Subject: RE: compiling ramdisk contents for arm
To: Maestri, Jason <JMaestri@netopia.com>
From: Kamal R. Prasad <kamalpr@yahoo.com>
List: port-arm
Date: 01/13/2005 03:18:35
--- "Maestri, Jason" <JMaestri@netopia.com> wrote:

> Kamal,
>   The problem here is that your arm build
> environment is being polluted by
> i386 instructions from somewhere.  When you used the
> build.sh script, did
> you tell it what architecture you were building? 

Yes -it was getting polluted by i386 instructions. I
built the cross-compilation tools for arm, but the
make had a problem.

> That script will build all
> of the cross compiler tools you'll need, and then
> build the NetBSD sources
> using those tools.  If you invoke make directly, you
> will have to set that
> environment up by hand.  It's usually best to use
> the build.sh script (as
> documented in
>
http://www.netbsd.org/Documentation/cross/#compile-kernel)
> until you really have a handle on the build process.

I added my own sub-type to evbarm and wasn't sure how
it integrates. I managed to cross-compile the kernel
but when I did 
#build.sh -m evbarm distribution

it builds a really huge set of binaries which won't
fit into my space constrained device. I wanted the
smallest set of binaries and building the
instkernel/ramdisk was about the only way I could
think of.

>  If you really want to
> be able to just type 'make' at the prompt, then you
> will have to either set
> up your shell environment or the Makefile itself for
> a cross compiling
> environment.  I would advise against this.
> 
Martin gave an idea to use
$(TOOLDIR)/bin/nmbake-evbarm which worked fine for me.

> Anyway, the short answer is use build.sh.  Good luck
> with this, and feel
> free to ask for more help if you still have
> questions.
> 
> --Jason Maestri
> 
thanks a lot.

regards
-kamal

> -----Original Message-----
> From: port-arm-owner@NetBSD.org
> [mailto:port-arm-owner@NetBSD.org] On Behalf
> Of Kamal R. Prasad
> Sent: Wednesday, January 12, 2005 11:46 PM
> To: port-arm@netbsd.org
> Subject: compiling ramdisk contents for arm
> 
> Hello,
> 
>  For the purpose of building a ramdisk, I have
> chdir'ed to
> /usr/src/distrib/evbarm/instkernel/ramdisk
> and done
> #export MACHINE_ARCH=arm
> #export MACHINE=evbarm
> 
> (on my x86 build machine)
> and did
> #make
> 
> I am getting the error below [and similar ones in
> optional utilities which I
> have skipped for now]. Can someone tell me why this
> problem shows up? Do I
> need to setup any more environment variables? My
> kernel compiles and runs
> correctly -but I invoked the make from build.sh and
> not directly as I am
> doing here.
> 
> thanks
> -kamal
> 
> ---------------------------------------------
> #   compile  evbarm/aout2elf.o
>
/usr/src/obj/tooldir.NetBSD-2.0-i386/bin/arm--netbsdelf-gcc
> -Os  -Werror     -I.
> -I/usr/src/distrib/utils/sysinst/arch/evbarm/../..
> -I/usr/src/distrib/utils/sysinst/arch/evbarm
> -DREL=\"2.0\" -DMACH=\"evbarm\"  -nostdinc -isystem
> /usr/include -c   
> /usr/src/distrib/utils/sysinst/aout2elf.c
> /var/tmp//cc7x3PZg.s: Assembler messages:
> /var/tmp//cc7x3PZg.s:105: Error: bad instruction
> `rorw $8,r3'
> /var/tmp//cc7x3PZg.s:106: Error: bad instruction
> `rorl $16,r3'
> /var/tmp//cc7x3PZg.s:107: Error: bad instruction
> `rorw $8,r3'
> /var/tmp//cc7x3PZg.s:122: Error: bad instruction
> `rorw $8,r1'
> /var/tmp//cc7x3PZg.s:123: Error: bad instruction
> `rorl $16,r1'
> /var/tmp//cc7x3PZg.s:124: Error: bad instruction
> `rorw $8,r1'
> *** Error code 1
> ----------------------------------
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Easier than ever with enhanced search.
> Learn more.
> http://info.mail.yahoo.com/mail_250
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Easier than ever with enhanced search.
> Learn more.
> http://info.mail.yahoo.com/mail_250
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com