[ELDK] linux-2.6.24 on mpc8xx

Vishwanath Patil patil.vishwanath at gmail.com
Tue Mar 2 13:07:45 CET 2010


Hello there,

I am Vishwanath Patil working on a custom board that runs linux-2.4.25 fine
I am trying to port linux-2.6.24 available with the ELDK version 4.2
Build 2008-04-01
I have chosen arch/powerpc to enable booting with flat device tree (fdt)
and am successful in getting a uImage to boot
I took the dts file from arch/powerpc/boot/dts/mpc866ads.dts and
did some modifications... here is the dts file

mods...
1) dcache and i cache size to 4096 (0x1000- all values were taken in hex)
2) removed pcmcia, ethernet 1 and 2 as they are not on 852t

i am using Version: DTC 1.1.0-g2512a7eb
./dtc -b 0 -V17 -p 0x1000 -I dts mpc852.dts -O dtb > mpc852.dtb

/*
 * MPC852T
 *
 * Copyright 2006 MontaVista Software, Inc.
 * Copyright 2007 Freescale Semiconductor, Inc.
 *
 * 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.
 */

/ {
    model = "MPC852T";
    compatible = "fsl,mpc885ads";
    #address-cells = <1>;
    #size-cells = <1>;

    cpus {
        #address-cells = <1>;
        #size-cells = <0>;

        PowerPC,852 at 0 {
            device_type = "cpu";
            reg = <0>;
            d-cache-line-size = <10>;
            i-cache-line-size = <10>;
            d-cache-size = <1000>;
            i-cache-size = <1000>;
            timebase-frequency = <0>;
            bus-frequency = <0>;
            clock-frequency = <0>;
            interrupts = <f 2>; // decrementer interrupt
            interrupt-parent = <&PIC>;
        };
  };

    memory {
        device_type = "memory";
        reg = <0 0>;
    };

    localbus at ff000100 {
        compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus";
        #address-cells = <2>;
        #size-cells = <1>;
        reg = <ff000100 40>;

        ranges = <
            0 0 fe000000 00800000
            1 0 ff080000 00008000
            5 0 ff0a0000 00008000
        >;

        flash at 0,0 {
            compatible = "jedec-flash";
            reg = <0 0 800000>;
            bank-width = <4>;
            device-width = <1>;
        };

        board-control at 1,0 {
            reg = <1 0 20 5 300 4>;
            compatible = "fsl,mpc885ads-bcsr";
        };
    };
 soc at ff000000 {
        compatible = "fsl,mpc885", "fsl,pq1-soc";
        #address-cells = <1>;
        #size-cells = <1>;
        device_type = "soc";
        ranges = <0 ff000000 00004000>;
        bus-frequency = <0>;

        // Temporary -- will go away once kernel uses ranges for get_immrbase().
        reg = <ff000000 4000>;

        mdio at e80 {
            compatible = "fsl,mpc885-fec-mdio", "fsl,pq1-fec-mdio";
            reg = <e80 4>;
            #address-cells = <1>;
            #size-cells = <0>;

            PHY0: ethernet-phy at 0 {
                reg = <0>;
                device_type = "ethernet-phy";
            };
        };

        ethernet at e00 {
            device_type = "network";
            compatible = "fsl,mpc885-fec-enet",
                         "fsl,pq1-fec-enet";
            reg = <e00 188>;
            local-mac-address = [ 00 00 00 00 00 00 ];
            interrupts = <3 1>;
            interrupt-parent = <&PIC>;
            phy-handle = <&PHY0>;
            linux,network-index = <0>;
        };
   PIC: interrupt-controller at 0 {
            interrupt-controller;
            #interrupt-cells = <2>;
            reg = <0 24>;
            compatible = "fsl,mpc885-pic", "fsl,pq1-pic";
        };

        cpm at 9c0 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "fsl,mpc885-cpm", "fsl,cpm1";
            command-proc = <9c0>;
            interrupts = <0>;   // cpm error interrupt
            interrupt-parent = <&CPM_PIC>;
            reg = <9c0 40>;
            ranges;

            muram at 2000 {
                #address-cells = <1>;
                #size-cells = <1>;
                ranges = <0 2000 2000>;

                data at 0 {
                    compatible = "fsl,cpm-muram-data";
                    reg = <0 1c00>;
                };
            };

            brg at 9f0 {
                compatible = "fsl,mpc885-brg",
                             "fsl,cpm1-brg",
                             "fsl,cpm-brg";
                reg = <9f0 10>;
            };
    CPM_PIC: interrupt-controller at 930 {
                interrupt-controller;
                #interrupt-cells = <1>;
                interrupts = <5 2 0 2>;
                interrupt-parent = <&PIC>;
                reg = <930 20>;
                compatible = "fsl,mpc885-cpm-pic",
                             "fsl,cpm1-pic";
            };

            serial at a80 {
                device_type = "serial";
                compatible = "fsl,mpc885-smc-uart",
                             "fsl,cpm1-smc-uart";
                reg = <a80 10 3e80 40>;
                interrupts = <4>;
                interrupt-parent = <&CPM_PIC>;
                fsl,cpm-brg = <1>;
                fsl,cpm-command = <0090>;
            };

            serial at a90 {
                device_type = "serial";
                compatible = "fsl,mpc885-smc-uart",
                             "fsl,cpm1-smc-uart";
                reg = <a90 10 3f80 40>;
                interrupts = <3>;
                interrupt-parent = <&CPM_PIC>;
                fsl,cpm-brg = <2>;
                fsl,cpm-command = <00d0>;
            };
        };
    };
  chosen {
        linux,stdout-path = "/soc/cpm/serial at a80";
    };
};


I am working with u-boot-1.3.2 and have enabled LIB_FDT on that also
This the dump of what i get on U-boot after i try to boot with the
kernel, ramdisk and the dtb

U-Boot 1.3.2 (Feb 21 2010 - 15:49:30) B2

CPU:   MPC852TxxZPnnA at 66 MHz: 4 kB I-Cache 4 kB D-Cachebrgc1 set to 1008e
OR0 : fe000ff6
BR0 : 40000801
OR1 : 0
BR1 : 0
OR2 : f8000800
BR2 : c0
OR3 : 0
BR3 : 0
OR4 : 0
BR4 : 0
OR5 : 0
BR5 : 0
OR6 : 0
BR6 : 4000000
OR7 : 0
BR7 : 0
SCCR : 2020000
PLPRCR : 125d0000
RSR : c8000000
SMCMR : ff002e48
SMCE : ff002e58
SMCM : ff002e68
cp_simode set to 0
 FEC present
<unknown> S/N <unknown>
CPU at 66 MHz, local bus at 33 MHz
DRAM:  128 MB
Top of RAM usable for U-Boot at: 08000000
Reserving 271k for U-Boot at: 07fbc000
Reserving 132k for malloc() at: 07f9b000
Reserving 60 Bytes for Board Info at: 07f9afc4
Reserving 56 Bytes for Global Data at: 07f9af8c
Stack Pointer at: 07f9af7c
Stack Pointer at: 07f9af70
Stack Pointer at: 07f9af68
relocating the code
Now running in RAM - U-Boot at: 07fbc000
FLASH: In:    serial
Out:   serial
Err:   serial
U-Boot relocated to 07fbc000
Net:   FEC ETHERNET
BEDBUG:ready


Hit any key to stop autoboot:  0
B2> tftp 0x100000 uImage-2.6
Using FEC ETHERNET device
TFTP from server 192.168.53.13; our IP address is 192.168.53.112
Filename 'uImage-2.6'.
Load address: 0x100000
Loading: #################################################################
         #############
done
Bytes transferred = 1138454 (115f16 hex)

Abort commented eth_halt
B2> tftp 0x300000 test8.UBoot
Using FEC ETHERNET device
TFTP from server 192.168.53.13; our IP address is 192.168.53.112
Filename 'test8.UBoot'.
Load address: 0x300000
Loading: #################################################################
         #######################################################
done
Bytes transferred = 1750328 (1ab538 hex)

Abort commented eth_halt
B2> tftp 0x500000 mpc852.dtb
Using FEC ETHERNET device
TFTP from server 192.168.53.13; our IP address is 192.168.53.112
Filename 'mpc852.dtb'.
Load address: 0x500000
Loading: #
done
Bytes transferred = 7050 (1b8a hex)

Abort commented eth_halt
B2> iminfo 0x100000

## Checking Image at 00100000 ...
   Image Name:   Linux-2.6.24.2
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1138390 Bytes =  1.1 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
B2> iminfo 0x300000

## Checking Image at 00300000 ...
   Image Name:   RamdiskImage
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    1750264 Bytes =  1.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
B2> bootm 0x100000 0x300000 0x500000
## Booting image at 00100000 ...
   Image Name:   Linux-2.6.24.2
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1138390 Bytes =  1.1 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Current stack ends at 0x07F9ACD0 => set upper limit to 0x00800000
## cmdline at 0x007FFF00 ... 0x007FFF14
memstart    = 0x00000000
memsize     = 0x08000000
flashstart  = 0x40000000
flashsize   = 0x00800000
flashoffset = 0x00000000
sramstart   = 0x00000000
sramsize    = 0x00000000
immr_base   = 0xFF000000
bootflags   = 0x00000001
intfreq     =     66 MHz
busfreq     =     33 MHz
ethaddr     = 00:00:00:00:00:02
IP addr     = 192.168.53.112
baudrate    =  57600 bps
Not skipping initrd
## Loading RAMDisk Image at 00300000 ...
   Image Name:   RamdiskImage
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    1750264 Bytes =  1.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Booting using the fdt at 0x500000
## initrd at 0x00300040 ... 0x004AB537 (len=1750264=0x1AB4F8)
   Loading Ramdisk to 07dee000, end 07f994f8 ... OK
## Transferring control to Linux (at address 00000000) ...

and it stops forever
suggest me what i should be doing

regards
vish


More information about the eldk mailing list