Page 1 of 2
Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Fri Apr 17, 2009 8:15 am
by ppppp
Hello,
hope somebody can give me a hint. I'm compiling kernel 2.6.29 for mini2440 (the one that was delivered with the update on 2009-04-15). Then, if i want to load kernel with uBoot 1.3.2 on mini2440, an error message occurs that ID is not known with following output:
Code: Select all
NAND read: device 0 offset 0x100000, size 0x1b2108
1777928 bytes read: OK
## Booting kernel from Legacy Image at 32000000 ...
Image Name: Linux-2.6.29
Created: 2009-04-16 15:44:44 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1777864 Bytes = 1.7 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux................................................................................................................... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x000007cf).
Available machine support:
ID (hex) NAME
000000c1 SMDK2410
0000015b IPAQ-H1940
0000039f Acer-N35
00000290 Acer-N30
0000014b Simtec-BAST
000002a8 Nex Vision - Otom 1.1
00000400 AML_M5900
000001db Thorcom-VR1000
00000454 QT2410
000003fe SMDK2413
000003f1 SMDK2412
00000377 S3C2413
00000474 VSTMS
000002de Simtec-Anubis
0000034a Simtec-OSIRIS
00000250 IPAQ-RX3715
000002a9 NexVision - Nexcoder 2440
0000043c SMDK2443
Please check your kernel config and/or bootloader.
Can someone give me an advice?
Thanks, Peter
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Fri Apr 17, 2009 11:22 am
by cvetanovic
Exactly the same thing has happened to me when I was upgrading from kernel 2.6.13 to 2.6.28.2. I guess that machine ID in the bootloader does not match ID in the kernel.
I've looked into 2.6.13 sources and found that ID used in /arch/arm/tools/mach-types was:
sbc2440 ARCH_SBC2440 SBC2440 782
And in 2.6.28.2 it is:
s3c2440 ARCH_S3C2440 S3C2440 362
So I modified /arch/arm/mach-s3c2440/mach-qq2440.c near the end of the file (PNX4008 is 782 in 2.6.28.2):
//MACHINE_START(S3C2440, "QQ2440V3")
//travesty because our QQ2440V3 board reports machine type 782 instead of 362
MACHINE_START(PNX4008, "QQ2440V3")
/* Maintainer: Ben Dooks <
ben@fluff.org>, LeshaK <
leshak@leshak.ru> */
Rebuilt the kernel and presto, it boots fine.
I guess that right thing to do is to modify bootloader to have right machine ID, but I'm not building my own loader yet. In fact, I'm using that god forsaken Vivi that came with the board.
Which brings me to the question for you, Peter, or anybody else using uBoot: how to flash uBoot image from Vivi?
Thanks in advance.
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Fri Apr 17, 2009 11:34 am
by ppppp
Hello, thanks for the answer, ill dig a bit...
Your Q regarding uBoot:
Leshak (also active here) posted some nice tutorials regarding 2440:
http://blog.leshak.ru/english/pages/how ... nd-qq2440/
uBoot 1.3.2:
http://blog.leshak.ru/2009/02/25/obnovl ... rc6-patch/
some of them are in russian, but there is a menu "english", too for some articles. He also posted much useful information here in the board regarding kernel/uboot.
edit:, copied from his ite:
Code: Select all
U-Boot
Change standart vivi bootloader on u-boot (bin file: u-boot.bin 174 KB)
– Install driver secbulk (from CD) for load files throw USB
– Turn on board and press ’space’ for enter in command line of vivi
– If you enter in vivi menu, press “q”
– Run DNW (from CD)
– in vivi command line enter:
load flash 0 0x2c000 u
– and transfer u-boot.bin
– reset and we have u-boot as bootloader
When i compiled uBoot132, i had to adapt the size from 0x2c000 to 0x3100
/edit
greetz
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Fri Apr 17, 2009 1:24 pm
by cvetanovic
Thanks very much, Peter, that is exactly what I'm looking for.
The only thing that I was really missing on this board was uBoot. Ability to boot kernel via tftp is essential.
Best regards.
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Sat Apr 18, 2009 12:43 am
by buserror
You need to use the kernel official board IDs for MINI2440 and QQ2440, they exists. You can load u-boot and run it without necessarily flash it by loading it in RAM at 0x33f80000 and using "go" in vivi. Then you can use that u-boot to flash itself in nand.
I made a page there
http://code.google.com/p/mini2440/wiki/MiniBringup that explains how to scrub the nand clean.
I made that u-boot BTW.
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Sat Apr 18, 2009 5:37 am
by ppppp
Hi Michel,
Great work doing and sharing this u-boot for mini2440. I just posted the site where i found it for downloading...
but I'm afraid i didnt get your hint yet correctly:
You need to use the kernel official board IDs for MINI2440 and QQ2440
Do i have to adapt the board type in kernel or in u-boot or even both to match? Where would i have to start, if so?
I looked in the arch/arm/tools/mach-types from the kernel and there the most reasonable entry was
Code: Select all
mini2440 MACH_MINI2440 MINI2440 1999
Thank you in advance;)
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Sat Apr 18, 2009 5:45 am
by buserror
I don't know about the 2.6.29 chinese kernel, I only work with mine -- u-boot will work straight with it, it's been designed for that :>
I had a look at what they did and it's quite a bit of spaghetti plate :>
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Sat Apr 18, 2009 6:10 am
by ppppp
Ok thank you for the fast reply,
When using their kernel and config_N35 as .config, i cannot even start the kernel boot shows only uncompressingLinux....Done, and nothing happens (nevertheless,I'm pretty sure its my fault

)
When using your kernel (patches), or the ones from Leshak (i understood you have two separate branches?),
are there devices included, like e.g. leds/buttons and so on from the mini2440?
When using the 2.6.29 kernel from kernel.org and the patch from Leshak's site (20090326), i do not see any of them under /dev.
Not with the the basic root-jff2 provided by leshak and not with a lenny-installation on SD card (udev).
Can i get your kernel patches or can you tell me if sth is not right with the setup above?
Edit:
Oh, i just saw your blog/wiki and the git repo... wow... Ill get back later when the next problems arise, ok?
/Edit
Thanks alot and again

Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Sat Apr 18, 2009 11:06 am
by ppppp
Hello Michel,
so, I'm back again
I compiled your kernel, works great with uboot.
Now im writing a helloworld.c, but the mini2440 cannot run it. Output is "nothing" whe executed via './hello' and "cannot exec binary file" whe doing 'sh hello'
I have used these different crosscompilers and none of them work:
- CrosstoolsNG1.1.3
- the 4.3.2 and 3.4.1 provided by esky
"file" gives me:
Code: Select all
debian:/home/p/1# file main
main: ELF 32-bit LSB executable, ARM, version 1, statically linked, for GNU/Linux 2.4.3, not stripped
Do you have more hints in your pocket?
Thanks, Peter
Re: Kernel 2.6.29 and uBoot 1.3.2 possible?
Posted: Sat Apr 18, 2009 1:55 pm
by buserror
make sure to use -march=armv4t -mtune=arm920t when compiling.
You should switch to some other forum too, join the #mini2440 irc on freenode, or use the blog for example. I dislike giving information here, as it's private and all my typing is wasted :>