What is the minimum amount of RAM required to run Linux Kernel in ARM cortex-a5?

1

I want to know what is the minimum amount of RAM required to run Linux Kernel (4.6) in ARM cortex-a5.

Now I am using 32MB PSRAM but whenever I am loading vmlinux (elf format) through debugger to PSRAM there memcpy() is not working which is located internally in printk.

My PSRAM starting address is 0x20000000. So, for making the entry point of elf I modified arch/arm/Kconfig as below,

config PAGE_OFFSET
    hex
    default PHYS_OFFSET if !MMU
    default 0x40000000 if VMSPLIT_1G
    default 0x80000000 if VMSPLIT_2G
    default 0xB0000000 if VMSPLIT_3G_OPT
 (-)default 0xC0000000
 (+)default 0x20000000

So, whenever memcpy() is getting it is stucking. Plz let me know where I am doing wrong here.

Vmlinux size with debug symbols: 10.9 MB. Loading_DTB @ higher memory location.

Anindya

Posted 2016-06-28T06:14:06.477

Reputation: 19

"I am loading vmlinux" -- No, you should be loading the Image or zImage. What SoC are you using? Isn't there support from the chip manufacturer? Study http://lxr.free-electrons.com/source/Documentation/arm/Booting BTW your edit to PAGE_OFFSET is misguided. – sawdust – 2016-06-28T06:35:03.747

Actually I also need the debug symbol support for linux kernel. So, if I use binary I will not get debug symbols supports. I am using JTAG interface with segger JLink debugger. Bringing up kernel in FPGA with custom SOC. For loading the elf there elf entry address is required. For linux kernel this is default 0xC0000000 if I select vmsplit 3G/1G. But for my case RAM is starting from 0x20000000. So, I need to replace the value of C0000000 with my ram base addr. So, is there any alternate way? – Anindya – 2016-06-28T09:47:55.663

Are you going to argue with Russell King, who wrote that you should boot a zImage or Image? (If you don't know who he is, then read http://armlinux.simtec.co.uk/whoswho.html ) The ELF format is a no-go; you have to boot a raw Image. You can still get debug symbols. The conventional load and start address for an ARM kernel is start-of-phys-mem plus 32KB; for your board that would be 0x20008000. Do not modify PAGE_OFFSET config; it's not what you think it is.

– sawdust – 2016-06-28T18:30:14.197

Can you plz provide some info regarding how to debug the linux kernel binary. I am using eclipse with segger debugger but whenever I am loading my kernel binary instead of getting line by line code it is showing only function names and assembly(@ dissembler). – Anindya – 2016-06-30T09:22:02.453

Stop writing "kernel binary". These files have names: Image zImage, vmlinux etc. They are all "binary" (i.e. not text) files. Exactly which one are you referring to? You didn't follow the instructions correctly. The TS guide does not say to load/boot a vmlinux on the target board. The vmlinux is loaded into gdbserver. The target is loaded/booted *as usual* with the zImage. Read Setup process: – sawdust – 2016-06-30T19:58:35.507

No answers