Hi dear list,
I have to make run openvpn on on my custom board based on a MCF5272C3 having
only 4MB RAM. But there is not enough RAM to launch openvpn when I execute
kernel from RAM with a RAM ROMfs.
So I'm trying to execute kernel (2.6) from ROM with ROM mtd partion.
The first issue I have encountered is about the generation of the image.bin
: due to the memory mapping, my first address in FLASH is 0xffc00000, so
objcopy generates a image.bin of 4GB. To solve this problem I modified the
vmlinux.lds.S by adding :
#define DATA_ADDRESS AT (ADDR(.text) + SIZEOF(.text))
#define INIT_ADDRESS AT (ADDR(.text) + SIZEOF(.text) + SIZEOF(.data))
#define BSS_ADDRESS AT (ADDR(.text) + SIZEOF(.text) + SIZEOF(.data) +
SIZEOF(.init))
...
.data DATA_ADDR : DATA_ADDRESS {
...
.init : INIT_ADDRESS {
...
.bss : BSS_ADDRESS {
...
Now, the image.bin size seems corrects :
freescale-coldfire-4.2/bin/m68k-uclinux-objdump -h linux/linux
linux/linux: file format elf32-m68k
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 000d10fc ffc10000 ffc10000 00002000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 0000cc00 00000400 ffce10fc 000d4400 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .init 0000c000 0000d000 ffcedcfc 000e1000 2**2
CONTENTS, ALLOC, LOAD, CODE
3 .bss 0000d994 00019000 ffcf9cfc 000ed000 2**4
ALLOC
4 .comment 000030e8 00000000 00000000 000ed000 2**0
CONTENTS, READONLY
I'm surprised because there is no specific startup code for kernels that run
from ROM like head-rom.S (to copy data segment to RAM, ...). Is that normal
?
I have even tried to boot this kernel without success (no traces) and I have
absolutely no idea how to debug that.
So someone has already to tried to execute 2.6-kernel from ROM on this kind
of platforms ? Or have you an other idea to make run a VPN ?
Thanks for your answers.
Jean-François.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev