Hi Jean-Francois,
NICOLAS Jean-François wrote:
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 haven't actually tried a boot direct from flash for any 2.6
ColdFire targets. Although the "design" of the startup should
allow for it without too much trouble.
The idea is that the FPLATFORM_SETUP macro can do all the extra
work required for a FLASH startup - while still using the rest of
the standard starup code in arch/m68knommu/platform/coldfire/head.S.
It will need to init DRAM, setup any relevant chips selects,
set any relevant GPIO states, maybe init a PLL, and copy the
RAM section to DRAM. (Look at an example of extra setup for
the 5249 in include/asm-m68knommu/m5249sim.h)
I have even tried to boot this kernel without success (no traces) and I
have absolutely no idea how to debug that.
On real hardware use the BDM. Or get the serial port setup
early and output to that from within the head code.
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 ?
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED]
Secure Computing Corporation PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
_______________________________________________
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