Kernel source code for A13 MICRO

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

Previous topic - Next topic

elrix2004

I owned a A13 Micro and a 7" LCD with touchscreen with kernel 2.6.X (kernel give by olimex). After some works i can use my touchscreen under X : good.
Now i would like to test some personnal electronics cards. Some of them use an FTDI FT232 USB-serial converter. But the kernel didn't have the driver !
So i've dowloaded a kernel 3.X branch from linux-sunxi, recompile with my needed drivers and then test on A13 Micro... all the time the kernel crash...
After reading the olimex wiki and forum : apparently there is no 3.X kernel for this card just a 2.6.X kernel because this card doesn't have the chip for power management.

So i've two questions :
1- Where can we dowload the 2.6.X patched kernel for A13 _MICRO_ ?
2- and better : Where can we dowload the 3.X kernel for A13 _MICRO_ ?

Thanks in advance for your replies

Olivier

olimex

you are confused, A13 never used to run with Kernel 2.x
kernel sources are at linux-sunxi.org you have to build it for MICRO there is option for this
use kernel 3.0.x as other kernel branches there are still incomplete and work in progress

elrix2004

Thank you for your rapid answer !
I've just check the version of the kernel : 3.0.52+ ... so sorry for the 2.6 version, i don't know why i think it was a 2.6 kernel (well maybe as i use a 2.6 kernel on iMX233)!

I've just read again the news on the wiki :

http://olimex.wordpress.com/2012/11/30/a13-olinuxinio-micro-euro-28-open-source-single-board-computer-is-for-sale/#comments

and

http://olimex.wordpress.com/2012/10/12/building-bootable-sd-card-with-debian-linux-image-for-a13-olinuxino/

I use as cross compiler gcc4.7 (armhf) from emdebian and debian wheezy as buid station.
I've clone the u-boot from linux-sunxi and build u-boot , tested on A13 MICRO : all ok
I've clone the linux-sunxi sunxi-3.0 branch and use the default configuration for A13 (A13_defconfig) but 'i've not found a "A13_MICRO_defconfig" :
https://github.com/linux-sunxi/linux-sunxi/tree/sunxi-3.0/arch/arm/configs

The build of the kernel with A13_defconfig is OK.
U-boot launch the kernel and the kernel start for approximately 2s and then crash with error : null pointer

Quote[    1.940000] NET: Registered protocol family 15
<6>802.1Q VLAN Support v1.8
[    1.950000] 802.1Q VLAN Support v1.8
<6>VFP support v0.3: [    1.950000] VFP support v0.3: implementor 41 architectur
e 3 part 30 variant c rev 3
implementor 41 architecture 3 part 30 variant c rev 3
<5>Registering SWP/SWPB emulation handler
[    1.970000] Registering SWP/SWPB emulation handler
<6>registered taskstats version 1
[    1.980000] registered taskstats version 1
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000018
[    1.980000] Unable to handle kernel NULL pointer dereference at virtual addre
ss 00000018
<1>pgd = c0004000
[    1.990000] pgd = c0004000
<1>[00000018] *pgd=00000000[    1.990000] [00000018] *pgd=00000000

<0>Internal error: Oops: 5 [#1] PREEMPT
[    2.000000] Internal error: Oops: 5 [#1] PREEMPT
<d>Modules linked in:[    2.000000] Modules linked in:

CPU: 0    Not tainted  (3.0.52 #7)
[    2.000000] CPU: 0    Not tainted  (3.0.52 #7)

So that's the reason of my previous question. As Olimex has compiled a kernel for A13 _MICRO_ where i can find this kernel with the patches ?

On 1st december:
Fadil Berisha ask : Can you post link to kernel sources and patch for PMU removal?
Olimex said : Dimitar submited the patch to Linux-Sunxi mailing list, I don't know if it's included now in the Linux-Sunxi tree

Do you have a response ?

Or maybe i've to change the version of cross compiler (use linaro version) ?
Another solution is buying a "normal" not MICRO A13 but the price of MICRO is the right argument !
May i ask the lunix sunxi guys ?

I've a deadline for a project in July 2013 and i must choose the "right" card now...but i think A13 MICRO + lcd + touchscreen is a good choice

thanks for your awnser...

Olivier

olimex

I check and linux-sunxi indeed have no MICRO configuration which is odd as Dimitar submited the changes
nevermind you can use https://github.com/hehopmajieh/linux-sunxi to get them

elrix2004

Ok thanks for your awnser.
I will try to recompile the kernel this week.

Olivier

lordlothar

Quote from: olimex on January 07, 2013, 09:35:30 AM
I check and linux-sunxi indeed have no MICRO configuration which is odd as Dimitar submited the changes
nevermind you can use https://github.com/hehopmajieh/linux-sunxi to get them

As I have a similar problem, can you upload a working image on the wiki? The one for A13-olinuxino-micro seems not to work...Isn't it the same which comes with the bootable microSD?

olimex

just added to the Wiki MD5 chksum
make sure the image you downloaded is with same chksum
and do not forget to sync and umount after you dd your image

vinifr

#7
Well, I may be wrong. But this problem may be related to the configuration, not the kernel itself.

I am currently developing device drivers linux and I have seen many errors of the type "Unable to handle kernel NULL pointer dereference at virtual address 000000xx", is a very common error. Example: https://github.com/linux-sunxi/linux-sunxi/issues/82#issuecomment-9529037

So, you're enabling a problematic driver in .config, try disabling this driver or use other .config

I use this: http://dl.dropbox.com/u/22273442/A13/.config

lordlothar

#8
Thanks for the replies.

@viniciusfre

Is that a configuration working with A13-Micro?

Edit: just checked the md5 hash of the wiki image, seems correct.

Edit2: just compiled my own u-boot,my own kernel with a13om_defconfig,built bootable sd, still no luck...Still hangs on 'Starting Kernel...'

vinifr

#9
This config is for A13-OLinuXino-WIFI. It should also work for MICRO, because wifi driver is marked as module. Do you tried it?

If dont work, you need to make a list of devices that are not present in MICRO and disable these devices. But would not just wifi?

agross

Hello, I have the same problem.
I've bought a micro, but all the info and config on the net if for its bigger brothers.

If I build the sunxi uboot and kernel, and load them up i get :

CPU: SUNXI Family
Board: A13-OLinuXino
I2C: ready
DRAM: 512 MiB


which is clearly wrong. The board should be A13-OlinuXinoM and dram is 256.

The kernel panics with "Unable to handle kernel NULL pointer dereference at virtual address 000000xx" which seems to be related to how the memory is mapped. I think it has 512M hardcoded all over the place, from the Olinuxino "normal" configurations.

I tried to fiddle with the config in  include/configs/sunxi-common.h amd make a custom bin file with sunxi-tools from the olimex fex, to no avail.

Can anyone help ?
Thanks.

JohnS

First thing I notice is:

that is the same crash I get with my WIFI board!

I think the RAM amount is not the problem... something else is.

John

vinifr

#12
Interesting observation of agross! Really this is a big BIG problem,the kernel thinks it has 512MB but actually has only 256MB. My script.fex show:

[dram_para]
dram_baseaddr = 0x40000000
dram_clk = 408
dram_type = 3
dram_rank_num = 1
dram_chip_density = 2048
dram_io_width = 8
dram_bus_width = 16
dram_cas = 9
dram_zq = 0x7b
dram_odt_en = 0
dram_size = 512
dram_tpr0 = 0x42d899b7
dram_tpr1 = 0xa090
dram_tpr2 = 0x22a00
dram_tpr3 = 0x0
dram_tpr4 = 0x0
dram_tpr5 = 0x0
dram_emr1 = 0x0
dram_emr2 = 0x10
dram_emr3 = 0x0

Look dram_size = 512, this may be the problem! Try to generate a new script.fex with the information in your memory, considering 256MB. Tools for this: https://github.com/linux-sunxi/sunxi-tools

vinifr

#13
A possible solution:

Quote
<xman> hi, What happens if my dram_size = 512 in [dram_para], but my board have only 256MB?
<WarheadsSE> xman: which board ?
<xman> https://www.olimex.com/Products/OLinuXino/A13/A13-OLinuXino-MICRO/
...
techn_> with 256MB ram you propably need to disable mali, framebuffer and g2d.. memmap hard coded to somewhere 400-500MB
<techn_> example: https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.0/arch/arm/mach-sun5i/core.c#L222
xman> 64M and 32M is for what?
techn_> 64M mali, 32M for reserved framebuffer(for mali use)
...
<WarheadsSE> xman: then you should be enable appropriately adjust the dram para, but you might need an updated uboot that has a 256M SPL
..
<WarheadsSE> the Wifi has an AXP, which the Mirco doesn't.
<WarheadsSE> That's a big difference.
...
<xman> so, you edit fex, uptade kernel and update u-boot?
<WarheadsSE> yes, fex change, kernel source change, u-boot source change
<WarheadsSE> recompile all.
..
<WarheadsSE> For the moment, they need to use the provided kernel source repository, and the associated uboot.

Chat: http://dl.dropbox.com/u/22273442/A13/micro_fix