cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
6,476 Views
Registered: ‎03-06-2009

Linux Boot Problem (kernel memory)

Jump to solution

Forgive my ignorance on the topic, but I am having problems getting Linux to boot on an ML310 dev kit.  I am using the latest kernel tree from Xilinx git site.  I have generated the appropriate device-tree and copied it into the kernel source in the appropriate location.  The elf file builds successfully, but the when loaded generates an error in my minicom session:

 

zImage starting: loaded at 0x00400000 (sp: 0x00767efc)
Allocating 0x4a528c bytes for kernel ...
Insufficient memory for kernel at address 0! (_start=00400000, uncompressed size=0042c1f0)

 

Any suggestions? 

 

The dts file is as follows:

 

/*
 * Device Tree Generator version: 1.2
 *
 * (C) Copyright 2007-2008 Xilinx, Inc.
 * (C) Copyright 2007-2008 Michal Simek
 *
 * Michal SIMEK <monstr@monstr.eu>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 *
 * CAUTION: This file is automatically generated by libgen.
 * Version: Xilinx EDK 10.1.03 EDK_K_SP3.6
 *
 * XPS project directory: ML310
 */

/dts-v1/;
/ {
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "xlnx,virtex405", "xlnx,virtex";
    model = "testing";
    DDR_SDRAM: memory@0 {
        device_type = "memory";
        reg = < 0x0 0x10000000 >;
    } ;
    alias {
        serial0 = &RS232_Uart;
    } ;
    chosen {
        bootargs = "console=ttyUL0 root=/dev/ram";
        linux,stdout-path = "/plb@0/serial@84000000";
    } ;
    cpus {
        #address-cells = <1>;
        #cpus = <0x1>;
        #size-cells = <0>;
        ppc405_0: cpu@0 {
            clock-frequency = <300000000>;
            compatible = "PowerPC,405", "ibm,ppc405";
            d-cache-line-size = <0x20>;
            d-cache-size = <0x4000>;
            dcr-access-method = "native";
            dcr-controller ;
            device_type = "cpu";
            i-cache-line-size = <0x20>;
            i-cache-size = <0x4000>;
            model = "PowerPC,405";
            reg = <0>;
            timebase-frequency = <300000000>;
            xlnx,dcr-resync = <0x0>;
            xlnx,deterministic-mult = <0x0>;
            xlnx,disable-operand-forwarding = <0x1>;
            xlnx,fastest-plb-clock = "DPLB0";
            xlnx,generate-plb-timespecs = <0x1>;
            xlnx,mmu-enable = <0x1>;
        } ;
    } ;
    plb0: plb@0 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "xlnx,plb-v46-1.03.a", "simple-bus";
        ranges ;
        DDR_SDRAM: mpmc@84800000 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "xlnx,mpmc-4.03.a";
            reg = < 0x84800000 0x10000 >;
        } ;
        IIC_Bus: i2c@81600000 {
            compatible = "xlnx,xps-iic-2.00.a";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 4 2 >;
            reg = < 0x81600000 0x10000 >;
            xlnx,clk-freq = <0x5f5e100>;
            xlnx,family = "virtex2p";
            xlnx,gpo-width = <0x1>;
            xlnx,iic-freq = <0x186a0>;
            xlnx,scl-inertial-delay = <0x0>;
            xlnx,sda-inertial-delay = <0x0>;
            xlnx,ten-bit-adr = <0x0>;
        } ;
        LCD_OPTIONAL: gpio@81420000 {
            compatible = "xlnx,xps-gpio-1.00.a";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 6 2 >;
            reg = < 0x81420000 0x10000 >;
            xlnx,all-inputs = <0x0>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,dout-default = <0x0>;
            xlnx,dout-default-2 = <0x0>;
            xlnx,family = "virtex2p";
            xlnx,gpio-width = <0xc>;
            xlnx,interrupt-present = <0x1>;
            xlnx,is-bidir = <0x1>;
            xlnx,is-bidir-2 = <0x1>;
            xlnx,is-dual = <0x0>;
            xlnx,tri-default = <0xffffffff>;
            xlnx,tri-default-2 = <0xffffffff>;
        } ;
        LEDs_8Bit: gpio@81400000 {
            compatible = "xlnx,xps-gpio-1.00.a";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 7 2 >;
            reg = < 0x81400000 0x10000 >;
            xlnx,all-inputs = <0x0>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,dout-default = <0x0>;
            xlnx,dout-default-2 = <0x0>;
            xlnx,family = "virtex2p";
            xlnx,gpio-width = <0x8>;
            xlnx,interrupt-present = <0x1>;
            xlnx,is-bidir = <0x0>;
            xlnx,is-bidir-2 = <0x1>;
            xlnx,is-dual = <0x0>;
            xlnx,tri-default = <0xffffffff>;
            xlnx,tri-default-2 = <0xffffffff>;
        } ;
        PCI32_BRIDGE: plbv46-pci@85e00000 {
            compatible = "xlnx,plbv46-pci-1.02.a";
            reg = < 0x85e00000 0x10000 >;
            xlnx,bridge-idsel-addr-bit = <0x10>;
            xlnx,class-code = <0x60000>;
            xlnx,dev-dphase-timeout = <0xff>;
            xlnx,device-id = <0x300>;
            xlnx,family = "virtex2p";
            xlnx,idelayctrl-loc = "NOT_SET";
            xlnx,include-baroffset-reg = <0x0>;
            xlnx,include-devnum-reg = <0x0>;
            xlnx,include-gnt-delay = <0x0>;
            xlnx,include-intr-a-buf = <0x0>;
            xlnx,include-pci-config = <0x1>;
            xlnx,include-req-n-buf = <0x0>;
            xlnx,ipif-highaddr-0 = <0xbfffffff>;
            xlnx,ipif-highaddr-1 = <0x97ffffff>;
            xlnx,ipif-highaddr-2 = <0x0>;
            xlnx,ipif-highaddr-3 = <0x0>;
            xlnx,ipif-highaddr-4 = <0x0>;
            xlnx,ipif-highaddr-5 = <0x0>;
            xlnx,ipif-spacetype-0 = <0x1>;
            xlnx,ipif-spacetype-1 = <0x0>;
            xlnx,ipif-spacetype-2 = <0x1>;
            xlnx,ipif-spacetype-3 = <0x1>;
            xlnx,ipif-spacetype-4 = <0x1>;
            xlnx,ipif-spacetype-5 = <0x1>;
            xlnx,ipif2pci-fifo-abus-width = <0x9>;
            xlnx,ipifbar-0 = <0xa0000000>;
            xlnx,ipifbar-1 = <0x94000000>;
            xlnx,ipifbar-2 = <0xffffffff>;
            xlnx,ipifbar-3 = <0xffffffff>;
            xlnx,ipifbar-4 = <0xffffffff>;
            xlnx,ipifbar-5 = <0xffffffff>;
            xlnx,ipifbar-num = <0x2>;
            xlnx,ipifbar2pcibar-0 = <0x0>;
            xlnx,ipifbar2pcibar-1 = <0x0>;
            xlnx,ipifbar2pcibar-2 = <0x0>;
            xlnx,ipifbar2pcibar-3 = <0x0>;
            xlnx,ipifbar2pcibar-4 = <0x0>;
            xlnx,ipifbar2pcibar-5 = <0x0>;
            xlnx,max-lat = <0x54>;
            xlnx,min-gnt = <0x32>;
            xlnx,mplb-awidth = <0x20>;
            xlnx,mplb-dwidth = <0x40>;
            xlnx,mplb-native-dwidth = <0x20>;
            xlnx,mplb-smallest-slave = <0x20>;
            xlnx,num-idelayctrl = <0x2>;
            xlnx,num-idsel = <0x10>;
            xlnx,num-pci-prds-betwn-retries-in-writes = <0x1>;
            xlnx,num-pci-retries-in-writes = <0xfa>;
            xlnx,pci-abus-width = <0x20>;
            xlnx,pci-dbus-width = <0x20>;
            xlnx,pci-discard-timer = <0xa>;
            xlnx,pci-init-rd-burst-length = <0x10>;
            xlnx,pci2ipif-fifo-abus-width = <0x9>;
            xlnx,pcibar-len-0 = <0x1c>;
            xlnx,pcibar-len-1 = <0x10>;
            xlnx,pcibar-len-2 = <0x10>;
            xlnx,pcibar-num = <0x1>;
            xlnx,pcibar2ipifbar-0 = <0x0>;
            xlnx,pcibar2ipifbar-1 = <0x0>;
            xlnx,pcibar2ipifbar-2 = <0x0>;
            xlnx,rev-id = <0x1>;
            xlnx,subsystem-id = <0xbeef>;
            xlnx,subsystem-vendor-id = <0xb0de>;
            xlnx,trig-ipif-wrburst-occ-level = <0x8>;
            xlnx,trig-pci-data-xfer-occ-level = <0x8>;
            xlnx,vendor-id = <0x10ee>;
        } ;
        RS232_Uart: serial@84000000 {
            clock-frequency = <100000000>;
            compatible = "xlnx,xps-uartlite-1.00.a";
            current-speed = <9600>;
            device_type = "serial";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 9 0 >;
            port-number = <0>;
            reg = < 0x84000000 0x10000 >;
            xlnx,baudrate = <0x2580>;
            xlnx,data-bits = <0x8>;
            xlnx,family = "virtex2p";
            xlnx,odd-parity = <0x0>;
            xlnx,use-parity = <0x0>;
        } ;
        SPI_EEPROM: xps-spi@8cf08000 {
            compatible = "xlnx,xps-spi-2.00.b";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 8 2 >;
            reg = < 0x8cf08000 0x80 >;
            xlnx,family = "virtex2p";
            xlnx,fifo-exist = <0x1>;
            xlnx,num-ss-bits = <0x1>;
            xlnx,num-transfer-bits = <0x8>;
            xlnx,sck-ratio = <0x80>;
        } ;
        SysACE_CompactFlash: sysace@83600000 {
            compatible = "xlnx,xps-sysace-1.00.a";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 5 2 >;
            reg = < 0x83600000 0x10000 >;
            xlnx,family = "virtex2p";
            xlnx,mem-width = <0x8>;
        } ;
        xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffffc000 {
            compatible = "xlnx,xps-bram-if-cntlr-1.00.a";
            reg = < 0xffffc000 0x4000 >;
            xlnx,family = "virtex2p";
        } ;
        xps_central_dma_0: xps-central-dma@80200000 {
            compatible = "xlnx,xps-central-dma-2.00.b";
            interrupt-parent = <&xps_intc_0>;
            interrupts = < 3 2 >;
            reg = < 0x80200000 0x10000 >;
            xlnx,family = "virtex2p";
            xlnx,fifo-depth = <0x10>;
            xlnx,mplb-awidth = <0x20>;
            xlnx,mplb-dwidth = <0x40>;
            xlnx,mplb-native-dwidth = <0x20>;
            xlnx,rd-burst-size = <0x10>;
            xlnx,wr-burst-size = <0x10>;
        } ;
        xps_intc_0: interrupt-controller@81800000 {
            #interrupt-cells = <0x2>;
            compatible = "xlnx,xps-intc-1.00.a";
            interrupt-controller ;
            reg = < 0x81800000 0x10000 >;
            xlnx,num-intr-inputs = <0xa>;
        } ;
    } ;
    ppc405_0_dplb1: plb@1 {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "xlnx,plb-v46-1.03.a", "simple-bus";
        ranges ;
    } ;
}  ;

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
7,416 Views
Registered: ‎09-10-2008

I have seen this problem also when I got a lot of stuff built into the kernel. I haven't decided if I should try to do something about it or not as it seems common to Linux powerpc. 

 

From the Linux ppc kernel mailing list....

 

On Mon, Jan 26, 2009 at 11:17:05AM +0100, Jean-Michel Hautbois wrote:
> I have a working Kernel with a NFS mounted root filesystem.
> I am trying to use my root file system, but with the use of initramfs.
>
> Compiling the kernel is not a problem, but when booting, I have the
> following error:
>
> "Insufficient memory for kernel at address 0! (_start=00400000, uncompressed
> size=005a0b0c)"
>
> I understand that my load address is 0x400000 and that the image is too big,
> but I can't find where this load adress is defined.
> It seems (from the .../arch/powerpc/boot/wrapper file) that this adress is
> calculated from the _start adress in the objfile.
>
> Is it possible to change this adress ?
> What can I do (with the idea of not reducing the size of my rootfs) ?

You can change link_address in arch/powerpc/boot/wrapper, or provide a
vmlinux_alloc method in the wrapper ops struct.

-Scott

View solution in original post

3 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,417 Views
Registered: ‎09-10-2008

I have seen this problem also when I got a lot of stuff built into the kernel. I haven't decided if I should try to do something about it or not as it seems common to Linux powerpc. 

 

From the Linux ppc kernel mailing list....

 

On Mon, Jan 26, 2009 at 11:17:05AM +0100, Jean-Michel Hautbois wrote:
> I have a working Kernel with a NFS mounted root filesystem.
> I am trying to use my root file system, but with the use of initramfs.
>
> Compiling the kernel is not a problem, but when booting, I have the
> following error:
>
> "Insufficient memory for kernel at address 0! (_start=00400000, uncompressed
> size=005a0b0c)"
>
> I understand that my load address is 0x400000 and that the image is too big,
> but I can't find where this load adress is defined.
> It seems (from the .../arch/powerpc/boot/wrapper file) that this adress is
> calculated from the _start adress in the objfile.
>
> Is it possible to change this adress ?
> What can I do (with the idea of not reducing the size of my rootfs) ?

You can change link_address in arch/powerpc/boot/wrapper, or provide a
vmlinux_alloc method in the wrapper ops struct.

-Scott

View solution in original post

Highlighted
Contributor
Contributor
6,451 Views
Registered: ‎03-06-2009

Any suggestions as to what address I should change link_address to?

 

Thanks

 

David 

0 Kudos
Highlighted
Contributor
Contributor
6,444 Views
Registered: ‎03-06-2009

Never mind.  Did a little research and found that changing link_address from 0x40000 to 0x80000.

 

-David 

0 Kudos