Linux with data2mem

2 messages, 2 authors, 2007-08-08 · open the first message on its own page

Linux with data2mem

From: <hidden>
Date: 2007-08-07 16:03:01

I have created a Linux kernel and file system into an ELF file.  I have the
bit file from my Xilinx V4 FX12LC.  According to the documentation I have
read I should be able to use data2mem to create one bit file which I can
program the FPGA with.  I have not been able to get data2mem to work
correctly.  Has anybody been able to do this?  I started with my
system_bd.bmm file from implementation directory.  Executing the command:

data2mem -2m system_bd.bmm -bt system.bit -bd zImage.initrd.elf -o b
newsys.bit

yields:

ERROR:Data2MEM:33 - Matching ADDRESS_SPACE for code segment #0 not found in
'sys
tem_bd.bmm'.
    Code segment #0 occupies [0x00400000:0x0062AFFF]



This is my linux kernel I believe, but I cannot find any documentation I
what to do.  I think I need to modify my system_bd.bmm file:



///////////////////////////////////////////////////////////////////////////////
//
// Processor 'ppc405_0', ID 100, memory map.
//
///////////////////////////////////////////////////////////////////////////////

ADDRESS_MAP ppc405_0 PPC405 100



///////////////////////////////////////////////////////////////////////////////
    //
    // Processor 'ppc405_0' address space
'plb_bram_if_cntlr_1_bram_combined' 0xFFFFC000:0xFFFFFFFF (16 KB).
    //

///////////////////////////////////////////////////////////////////////////////

    ADDRESS_SPACE plb_bram_if_cntlr_1_bram_combined RAMB16
[0xFFFFC000:0xFFFFFFFF]
        BUS_BLOCK
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_0
[63:56] PLACED = X1Y9;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_1
[55:48] PLACED = X2Y10;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_2
[47:40] PLACED = X1Y10;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_3
[39:32] PLACED = X2Y9;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_4
[31:24] PLACED = X2Y13;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_5
[23:16] PLACED = X2Y8;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_6
[15:8] PLACED = X2Y12;
            plb_bram_if_cntlr_1_bram/plb_bram_if_cntlr_1_bram/ramb16_7
[7:0] PLACED = X2Y11;
        END_BUS_BLOCK;
    END_ADDRESS_SPACE;

END_ADDRESS_MAP;

Thanks for any help you can offer.

Glenn

Re: Linux with data2mem

From: jozsef imrek <hidden>
Date: 2007-08-08 03:41:00

On Tue, 7 Aug 2007 Glenn.G.Hart@us.westinghouse.com wrote:
ERROR:Data2MEM:33 - Matching ADDRESS_SPACE for code segment #0 not found in
'sys
tem_bd.bmm'.
   Code segment #0 occupies [0x00400000:0x0062AFFF]
...
///////////////////////////////////////////////////////////////////////////////

   ADDRESS_SPACE plb_bram_if_cntlr_1_bram_combined RAMB16
[0xFFFFC000:0xFFFFFFFF]

make sure that the memory range your software wants to use is backed
by real memory. it seems that your elf expects itself to be loaded at
0x00400000:0x0062AFFF, but you block memory is at 0xFFFFC000:0xFFFFFFFF
(use readelf -l to find out what address ranges does your software want
to use).


probably what you want is a boot loader in the bram, not the kernel image
(the zImage). the boot loader would load the linux kernel into the main
memory (starting at memory address 0x00000000).



-- 
mazsi

----------------------------------------------------------------
strawberry fields forever!                       imrek@atomki.hu
----------------------------------------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help