following wiki -> assembler errors

dragilla
Hey,

I'm following wiki on Linux:
http://code.google.com/p/friendlyarm/wiki/Linux_Tutorial

I downloaded the file-download.sh script and run it, but then I get a lot
of assembler errors.

At first I got:
{standard input}:22: Error: lo register required  ... 

many times in the uboot/mini2440/examples.
So I removed the examples directory (and the corresponding Makefile entry).

Now I get errors elsewhere:
{standard input}: Assembler messages:
{standard input}:43: Error: instruction not supported in Thumb16 mode --
`subs r2,r2,#1'
{standard input}:62: Error: instruction not supported in Thumb16 mode --
`subs r3,r3,#1'
make[1]: *** [mini2440.o] Error 1
make[1]: Leaving directory
`/home/luke/mini2440-bootstrap/uboot/mini2440/board/mini2440'
make: *** [board/mini2440/libmini2440.a] Error 2

I'm running ubuntu 11.10 and have gcc-arm-linux-gnueabi installed.
My .profile is as is should be (according to wiki) and contains entry for
CROSS_COMPILE.

Any ideas? Please help me out.

regards,
-- 
Luke

dragilla
Ok. My mistake. I shouldn't have used the ubuntu gcc-arm-linux-gnueabi.
The ones provided by the download script work just fine :)

Sorry, you can delete this thread.

dragilla
However the wiki needs updating... the busybox is no longer available as
tar.gz. It's now only in tar.bz2. 
Also the last cp is in wrong dir. 
I can provide the fixed script if there's anyone here who can put it on
wiki.

dragilla
Attachment: file-download.sh (2.13 KB)
For those interested. Here's the fixed version - fixed last cp command (to
include full paths) and the busybox archive type.

regards,
-- 
Luke

dragilla
Also the suggested confing file (../config_mini2440_n35) does not exist in
the kernel directory structure. I can only guess that I should use the
following file: arch/arm/configs/mini2440_defconfig.
Is this right?

regards,

dragilla
Damn... Now I'm stuck @ making uImage.
I do the following (as in wiki):
root@dragilla:/home/luke/mini2440-bootstrap# ./uboot/mini2440/tools/mkimage
–A arm –O linux -T kernel -C none –a 0x30008000 –e 0x30008000 -d
kernel-bin/arch/arm/boot/zImage output/uImage
Usage: ./uboot/mini2440/tools/mkimage -l image
          -l ==> list image header information
       ./uboot/mini2440/tools/mkimage [-x] -A arch -O os -T type -C comp -a
addr -e ep -n name -d data_file[:data_file...] image
          -A ==> set architecture to 'arch'
          -O ==> set operating system to 'os'
          -T ==> set image type to 'type'
          -C ==> set compression type 'comp'
          -a ==> set load address to 'addr' (hex)
          -e ==> set entry point to 'ep' (hex)
          -n ==> set image name to 'name'
          -d ==> use image data from 'datafile'
          -x ==> set XIP (execute in place)
       ./uboot/mini2440/tools/mkimage [-D dtc_options] -f fit-image.its
fit-image
root@dragilla:/home/luke/mini2440-bootstrap#

I've tried adding -n and -x, and adding apostophes to the strings, nothing.
It's like mkimage doesn't like what I give him, but I don't know what is
wring. :(

Help :(

dragilla
root@dragilla:/home/luke/mini2440-bootstrap# ls -al
kernel-bin/arch/arm/boot/zImage
-rwxrwxr-x 1 root root 2040224 2011-10-29 16:20
kernel-bin/arch/arm/boot/zImage

dragilla
Please guys, I'm really stuck here - ANY ideas?

dragilla
I'm debugging mkimage (good there are sources included). Will write here
when I find the 'error'. I wonder if I'm the only one having this
problem...

Juergen Beisert
"kernel-bin/arch/arm/boot/zImage output/uImage"? -> zImage != uImage

dragilla
ROTFL, You wouldn't believe how stupid the error was...
The mkimage checks whether the first character of the first agument
(**++argv) is '-'.
If it's not then it calls usage function (prints out usage) and exits.

The problem is that I copied the command line directly from the wiki and
the line written there has no minus signs (-)!!! It has some other signs,
like longer minus signs, that have different ascii code, thus the program
failed....

OMG!!!

I changed all the signs to '-' and it worked instantly :)

dragilla
Problems continue to bother me...
Now I can't install busybox:

luke@dragilla:~/mini2440-bootstrap/busybox-1.13.3$ sudo make ARCH=arm
CONFIG_PREFIX=/home/luke/mini2440-bootstrap/target install
[sudo] password for luke: 
  CC      networking/tcpudp.o
In file included from /usr/include/linux/sysctl.h:25:0,
                 from /usr/include/linux/netfilter.h:6,
                 from /usr/include/linux/netfilter_ipv4.h:8,
                 from networking/tcpudp.c:35:
/usr/include/linux/kernel.h:12:8: error: redefinition of ‘struct sysinfo’
include/libbb.h:92:8: note: originally defined here

Why does it use /usr/include/linux anyway?

davef
I'll sort out any errors in the next few days after I re-read this thread. 
Been away for 3 days and it looks like you have been pretty busy too!

Could you tell me exactly where you think the problem lines are?
Dave

dragilla
Until the last errors with busybox I tried to explain what I did to fix my
problems. With the busybox errors I have no idea yet.
I'm struggling with kernel compilation problems for now :)
Will probably get back to it later but as the weekend's over I'm back to my
REAL job, so I won't do as much as I did during the weekend :(

davef
Could you copy the line from the tutorial and paste it in your reply.  Then
I can focus my attention in the correct place.
Thanks,
Dave

dragilla
No need - tutorial's fine - it compiles. I see some warnings and thought
they were errors.

dragilla
Or at least it now compiles and installs for me. Previously I had the above
error. IT's possible it is connected to the .profile settings. With them on
I could not compile xenomai - had to unset them and relogin.

The line from the tutorial...
[busybox-1.13.3] # make ARCH=arm
CONFIG_PREFIX=/home/user/mini2440-bootstrap/target install

davef
Thank you.

It is near the time for me to "hit the hay", so I'll let the others take
over and I'll see what progress you have made in 8 hours :)