November 15, 2019, 05:33:05 am

News:

SMF - Just Installed!


Olinuxino A13 Micro

Started by agross, January 19, 2013, 05:52:09 pm

Previous topic - Next topic

agross

Hello,

I purchased an Olinuxino Micro but I can't get any custom kernel to boot on it ( kernel panic ).
The stuff in Sunxi Linux repo on github is hardcoded for the normal Olinuxino A13, including the UBoot.
The problem seems to be memory mappings which assume a total memory size of 512M ( I think ).

If i build the uboot and kernel, I get at starup :
CPU: SUNXI Family
Board: A13-OLinuXino
I2C: ready
DRAM: 512 MiB


which is clearly wrong.

When booting up the card that came with it :
CPU: SUNXI Family
Board: A13-OlinuXinoM
I2C: ready
DRAM: 256 MiB


Similarly, in the kernel logs I get something like
<6>Memory: 512MB = 512MB total

I've fiddeld around with the stuff in  include/configs/sunxi-common.h and the a13_olinuxino.fex to no avail.

All the blogs and articles around are using the regular Olinuxino A13 / WiFi, not the Micro.

Than you.

jwischka

There are options in u-boot and kernel for memory. I would focus your attention on u-boot, where you can set the memory option more easily. Let me know if you can't find it and I'll boot into Linux and show you where the options are.

agross

OK, the only place where memory is configured in uboot is here :

<include/configs/sunxi-common.h>

/* DRAM Base */
// ...
#define CONFIG_SYS_SDRAM_BASE           0x40000000
#define CONFIG_SYS_INIT_RAM_ADDR        0x0
#define CONFIG_SYS_INIT_RAM_SIZE        0x8000      /* 32K */
#define CONFIG_SYS_INIT_SP_OFFSET \
        (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
#define CONFIG_SYS_INIT_SP_ADDR \
        (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
#define CONFIG_NR_DRAM_BANKS            1
#define PHYS_SDRAM_1                          CONFIG_SYS_SDRAM_BASE
#define PHYS_SDRAM_1_SIZE                    (512 << 20)
// ...


I don;t know where the documentation for the Allwinner's A13 soc is, because these seem to be soc and board specific.

Adjusting the SDRAM value does not work, uboot still reports 512M.

JohnS

Using the SD card that says 256MB... what happens next?

If it doesn't boot, what does it do?

agross

The board boots with the SD card that is provided with the board, because the uboot and kernel are configured to take into account the fact that the board has 256M instead of 512M, the value hardcoded into the linux sunxi repos.

When trying to boot with a custom built kernel/uboot from linux sunxi, first it reports A3-OLinuXino, 512 DRAM" and crashes ( kernel panic ) about dereferencing a null pointer at some ( low ) address.

JohnS

I'd like to try that 256MB image - do you have a URL for it please?

jwischka

Quote from: agross on January 19, 2013, 06:13:11 pm
OK, the only place where memory is configured in uboot is here :

<include/configs/sunxi-common.h>

/* DRAM Base */
// ...
#define CONFIG_SYS_SDRAM_BASE           0x40000000
#define CONFIG_SYS_INIT_RAM_ADDR        0x0
#define CONFIG_SYS_INIT_RAM_SIZE        0x8000      /* 32K */
#define CONFIG_SYS_INIT_SP_OFFSET \
        (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
#define CONFIG_SYS_INIT_SP_ADDR \
        (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
#define CONFIG_NR_DRAM_BANKS            1
#define PHYS_SDRAM_1                          CONFIG_SYS_SDRAM_BASE
#define PHYS_SDRAM_1_SIZE                    (512 << 20)
// ...


I don;t know where the documentation for the Allwinner's A13 soc is, because these seem to be soc and board specific.

Adjusting the SDRAM value does not work, uboot still reports 512M.


Go further down in that file until you find "setargs=setenv bootargs ....."

make it look like:
"setargs=setenv bootargs mem=256M@0x40000000 console=${console} root=${root}"

In addition to changing above. Recompile. Does that change the mem val?



olimex

MICRO have two major difference : 256MB RAM and AXP209 is missing so need custom kernel configuraion with removed PMU.

Dimitar Gamishev made patch for MICRO but this patch was refused to be included back in linux-sunxi repository , so the MICRO kernel configration stays now at https://github.com/hehopmajieh/linux-sunxi
the configuration is https://github.com/hehopmajieh/linux-sunxi/blob/sunxi-3.0/arch/arm/configs/a13om_defconfig

JohnS

Oh.  Any idea if it ought to run on a WIFI board?

What happens if the AX209 isn't in the config?

olimex

of course it works with WiFi and Ethernet
missing axp209 means it runs always on 1Ghz and have no battery and power saving modes

olimex

john sorry I may not understand correctly your question
the kernel for A13-OLinuXino-MICRO is different than this one of A113-OLinuXino and A13-OLinuXino-WIFI
you can't use same SD card for MICRO and other A13 boards

JohnS

It didn't boot.  Nothing does any more :(

(Well, Android does, and as you probably saw I added md5sum to U-Boot and that shows the SD card is read OK.)

lordlothar

Quote from: JohnS on January 19, 2013, 11:07:55 pm
It didn't boot.  Nothing does any more :(

(Well, Android does, and as you probably saw I added md5sum to U-Boot and that shows the SD card is read OK.)


Are you talking about Micro? Does Android boot successfully on A13-Micro?

olimex

Android will not boot on MICRO as there is no NAND

JohnS

Quote from: lordlothar on January 21, 2013, 08:43:30 amAre you talking about Micro? Does Android boot successfully on A13-Micro?

No.  I was trying to find ANY Linux that would boot on my A13 WiFi.  It already has Android and that boots OK from its NAND.

BTW, Anyone with a bootable SD for the Micro - you can copy u-boot from that card to any others using dd
There's no need to rebuild it.  It will boot any Linux kernel (uImage) you put on the SD so you can concentrate your efforts just on rebuilding kernels for the Micro.

John