Kernel source code for A13 MICRO

Started by elrix2004, January 04, 2013, 09:03:41 PM

Previous topic - Next topic

Cure

Has anyone been able to build their own kernel yet?  If so what exactly did you do to get uboot to show up as 256MB?

JohnS

I don't think you actually need u-boot to know.  You need the kernel command line to be right.

You can fix u-boot fairly easily: look in board/allwinner/a13_olinuxino
make a similar target and change dram.c so size is 256 instead of 512

I think you'll find hno has already done this and the result is part of Olimex's Linux image.  You can of course copy the part of that image to extract a (binary, ready-made) copy of u-boot.  Look at the u-boot sources to see where it's stored and its length.  But you can avoid all this if you just use Olimex image and replace the kernel on it if you build your own (replace modules and so on as you make changes).

The kernel boot line contains a string like 512@... so you want 256@...

See the earlier posts about this and the page(s) on google such as https://groups.google.com/forum/?fromgroups=#!topic/linux-sunxi/ojjdt4EzH48

Cure

I tried just now and it booted up, but unfortunatley just replacing the kernel wasn't enough.  The provided image does not not support "every feature", it's still missing UVC video support.  I guess the struggle goes on.

vinifr

Hi,

WarheadsSE said that successfully booted your olimex-micro, after the changes that he himself made.

He said is needed change uboot(done), kernel(lack) and script.fex. He has not had time to submit the kernel patch...

Cure

I finally got the uboot to show 256MB.  I'm not familiar with .fex files, can you explain where it goes?  Is there a special way to build it or can I just copy from the /script_GPIO_VGA_800x600 folder?

I compared the boot results from the Olimex image and mine, mine stops booting at the part where it loads SWP/SWPB:


<5>Registering SWP/SWPB emulation handler
[    1.850000] Registering SWP/SWPB emulation handler
<6>registered taskstats version 1
[    1.860000] registered taskstats version 1
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000018
[    1.860000] Unable to handle kernel NULL pointer dereference at virtual address 00000018
<1>pgd = c0004000
[    1.870000] pgd = c0004000
<1>[00000018] *pgd=00000000[    1.870000] [00000018] *pgd=00000000
<0>Internal error: Oops: 5 [#1] PREEMPT
[    1.880000] Internal error: Oops: 5 [#1] PREEMPT
<d>Modules linked in:[    1.880000] Modules linked in:
CPU: 0    Not tainted  (3.0.57 #12)
[    1.880000] CPU: 0    Not tainted  (3.0.57 #12)
PC is at mutex_lock+0x10/0x4c
[    1.880000] PC is at mutex_lock+0x10/0x4c
LR is at axp_clr_bits+0x2c/0xb8
[    1.880000] LR is at axp_clr_bits+0x2c/0xb8
pc : [<c05146c8>]    lr : [<c0398bd8>]    psr: a0000013
sp : cf82bd38  ip : cf82bd48  fp : cf82bd44
[    1.880000] pc : [<c05146c8>]    lr : [<c0398bd8>]    psr: a0000013
[    1.880000] sp : cf82bd38  ip : cf82bd48  fp : cf82bd44
r10: 00000a68  r9 : 00000006  r8 : 00000092
[    1.880000] r10: 00000a68  r9 : 00000006  r8 : 00000092
r7 : 00000092  r6 : 00000018  r5 : 00000000  r4 : cf82bdd0
[    1.880000] r7 : 00000092  r6 : 00000018  r5 : 00000000  r4 :


JohnS

Make sure you do NOT have config for AXP209.  There is a post on here about where to find the kernel source that Olimex used for the Micro and it allows for the board properly.

There is a guide to FEX on the net if you google for it.

John

Cure


JohnS

I don't have Micro but I recall reading about this on here so just look and read.
Or copy working uboot from Olimex SD image for Micro.

jwischka

Quote from: Cure on January 25, 2013, 01:51:55 PM
Can you tell me which uboot git we're supposed to use?

git clone https://github.com/hno/uboot-allwinner.git
or
git clone git://github.com/linux-sunxi/u-boot-sunxi.git

Thanks,
Rob

The second one is newer, and is probably the one to use going forward.

Nico

The second one is the one to use, I successfully compile uboot using a13_olinuxino_micro configuration and make it work on my A13 Micro.
I was also able to compile a running kernel for the A13 Micro using the hehopmajieh git repository.
Only doing:
git clone https://github.com/hehopmajieh/linux-sunxi
make ARCH=arm a13om_defconfig
After that I was able to follow the "how to build a bootable debian sd card" of the wiki.
In order to do so I used the script.bin I found on the Debian prebuild image.
And if I boot without the 7 inches being plugged I get to the login part and it works fine.

Now I'd like to make it work with the 7 inches LCD Screen, but that's another story  ;D