OpenWrt Forum Archive

Topic: Openwrt for Freescale MPC8241

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Does anyone know if openwrt has been ported to the MPC82xx.  Can the MPC52xx or MPC83xx kernels be used with the MPC8241?

Thanks

i have a router based  on MPC8241( cisco Aironet 1000), and ported  openwrt on it. The system can boot. and hardwares likes wireless and ethernet card  work fine. Now it looks more like a booted embeded system others than a wireless router. becuase i am not  familiar with how openwrt works and  its' configuration . but i am sure it will be sucessed in near future. by the way. the NSLU2 projects http://www.nslu2-linux.org/ have ported openwrt on its powerpc platform which are based on mpc8241.

Thanks for the response.  I can't find any information on the nslu2 powerpc porting openwrt to the mpc8241.  I see information on porting to the Intel XScale.  Can you give me a link to where you found information on the nslu2 port to mpc8241.  Are you planning on posting your work on the cisco Aironet 1000 anytime soon?

my codes is dirty, so i don't want to check it in openwrt's svn.  i am pleasure  to sent a copy if someone need it. As general, if you have good bootloader,  thanks to new OF feature on  powerpc platform,  porting work become  simpler than ever. only thing left is writing the dts file which discribes and config your hardware.

(Last edited by nmtr on 4 Jun 2010, 23:51)

Can you PM me a copy of your code.  What bootloader does the cisco use?
Thanks for your help.

I replaced the original cisco's bootloader to U-boot.
with the tips and help from Flameman, my porting work on MPC8241 do the same steps likes Flameman's porting work on ppc405 http://elinux.org/Flameman/dht-walnut
my codes can be divided in to 5 groups;
1) recover scripts. those are used by OCDcommander.  using A wiggler cable and those scripts, OCDcommander can initialize hardwares,and download the programs like uboots. OCDcommander is also used to read Register values  setuped by the original bootloader like registers value of Memcontorler 
2) u-boot code. it is  based on existed 8241 boards in u-boot. it uses readed register value from original cisco bootloader by using ocdcommander  to initialize hardware. it also contains a flash utilitys used by uboots.
3) patchs on linux kernel. those includes: a) a  modified dp83815 ethernet card driver. it use OF configurations to setup missing MAC address. b) Makefile patchs.   
4) patchs on backfire. those make backfire support my ap. 
5) a dts files.  it describes  board's hardware resource, register maps, irq maps and flash partitions. thanks to dts file and kernel's OF feature on Powerpc platform, various Powerpc soc platforms and boards  can be supports by almost same kernel,without any modification on kernel sources.
which parts are you interested in?
my router:
http://img06.taobaocdn.com/imgextra/i6/42606869/T2.HReXfbUSdNXXXXX_!!42606869.jpg
http://img07.taobaocdn.com/imgextra/i7/42606869/T2ebVeXffZSdNXXXXX_!!42606869.jpg

(Last edited by nmtr on 10 Jun 2010, 01:16)

My router has uboot as the bootloader, so I really just want the patches to the kernel and makefile that will allow me to build a basic openwrt image to load.  If I can get a kernel that just works enough so i can login via a serial port, I will be able to figure out the rest.

No i think that is not possible.

PM me and give your email. i will sent your the files. btw. whether or not does your uboot support the FDT feature? if it is not,  my patchs and Makefile may not work for you.   as mentioned above, my codes is dirty. and it is directly patched on the storcenter board in original kernel source. and thanks the dts files. only a few line are patched. this is my router's boot info.

U-Boot 2009.11 (Jun 07 2010 - 23:43:57)

CPU:   MPC8245 Revision 1.2 at 150 MHz: 16 kB I-Cache 16 kB D-Cache
Board: AP1200 8245 for CISCO Aironet 1000 by nmtrmail@gmail.com
Author:byang @ Microelectronic center of HIT P.R.C
DRAM:  16 MB
FLASH: protect monitor fff00000 @ 40000
flash_protect ON: from 0xFFF00000 to 0xFFF3FFFF
protect on 48
protect on 49
protect on 50
protect on 51
protect environtment ffffe000 @ 2000
flash_protect ON: from 0xFFFFE000 to 0xFFFFFFFF
protect on 70
 4 MB
In:    serial
Out:   serial
Err:   serial
Net:   natsemi: EEPROM contents:
 ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff ffff
dp83815#0
Warning: dp83815#0 MAC addresses don't match:
Address in SROM is         ff:ff:ff:ff:ff:ff
Address in environment is  00:11:22:33:44:55

Press SPACE to abort autoboot in 2 seconds
## Booting kernel from FIT Image at 00400000 ...
   Using 'conf@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  AP1200 kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x004000e4
     Data Size:    1465960 Bytes =  1.4 MB
     Architecture: PowerPC
     OS:           Linux
     Load Address: 0x00000000
     Entry Point:  0x00000000
   Verifying Hash Integrity ... OK
## Flattened Device Tree from FIT Image at 00400000
   Using 'conf@1' configuration
   Trying 'fdt@1' FDT blob subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x00566000
     Data Size:    3010 Bytes =  2.9 kB
     Architecture: PowerPC
   Verifying Hash Integrity ... OK
   Booting using the fdt blob at 0x566000
   Uncompressing Kernel Image ... OK
Using Airespace AP1200 machine description
Linux version 2.6.32.10 (byang@byd) (gcc version 4.4.3 (GCC) ) #22 Mon Jun 7 22:
10:09 CST 2010
bootconsole [udbg0] enabled
Adding PCI host bridge /pci@fe800000
PCI host bridge /pci@fe800000 (primary) ranges:
  IO 0x00000000fe000000..0x00000000febfffff -> 0x0000000000000000
 MEM 0x0000000080000000..0x00000000efffffff -> 0x0000000080000000
IOMEGA StorCenter
Zone PFN ranges:
  DMA      0x00000000 -> 0x00001000
  Normal   0x00001000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00001000
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: root=/dev/mtdblock0 rootfstype=squashfs noinitrd
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 12972k/16384k available (2984k kernel code, 3412k reserved, 156k data, 9
7k bss, 156k init)
Kernel virtual memory layout:
  * 0xffffe000..0xfffff000  : fixmap
  * 0xfd3fc000..0xfe000000  : early ioremap
  * 0xc2000000..0xfd3fc000  : vmalloc & ioremap
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512
mpic: Setting up MPIC " OpenPIC  " version 1.2 at fc040000, max 1 CPUs
mpic: ISU size: 16, shift: 4, mask: f
mpic: Initializing for 32 sources
clocksource: timebase mult[d555555] shift[22] registered
Console: colour dummy device 80x25
Mount-cache hash table entries: 512
devtmpfs: initialized
NET: Registered protocol family 16
PCI: Probing PCI hardware
pci 0000:00:1d.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:1d.0: PME# disabled
pci 0000:00:1e.0: PME# supported from D0 D1 D2 D3hot D3cold
pci 0000:00:1e.0: PME# disabled
PCI: Cannot allocate resource region 0 of device 0000:00:1d.0, will remap
bio: create slab <bio-0> at 0
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  ? 2001-2006 Red Hat, Inc.
msgmni has been set to 25
io scheduler noop registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xfc004500 (irq = 25) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xfc004600 (irq = 26) is a 16550A
ffc00000.flash: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
ffc00000.flash: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Creating 6 MTD partitions on "ffc00000.flash":
0x000000000000-0x000000220000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=1B0000, len=70000
0x0000001b0000-0x000000220000 : "rootfs_data"
0x000000220000-0x000000300000 : "kernel"
0x000000300000-0x000000330000 : "U-Boot"
0x000000330000-0x0000003f0000 : "kernel2"
0x0000003f0000-0x0000003fe000 : "kernel3"
0x0000003fe000-0x000000400000 : "U-boot Env"
natsemi dp8381x driver, version 2.1, Sept 11, 2006
  originally by Donald Becker <becker@scyld.com>
  2.4.x kernel port by Jeff Garzik, Tjeerd Mulder
natsemi 0000:00:1d.0: enabling device (0006 -> 0007)
set Mac from bootloader env
natsemi eth0: NatSemi DP8381[56] at 0x80000000 (0000:00:1d.0), 00:11:22:33:44:55
, IRQ 17, port TP.
i2c /dev entries driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
lib80211: common routines for IEEE802.11 drivers
VFS: Mounted root (squashfs filesystem) readonly on device 31:0.
devtmpfs: mounted
Freeing unused kernel memory: 156k init
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
switching to jffs2
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
- init -

Please press Enter to activate this console. eth0: DSPCFG accepted after 0 usec.
eth0: link up.
eth0: Setting full-duplex based on negotiated link capability.
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
Generic kernel compatibility enabled based on linux-next next-20100113
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
ath5k 0000:00:1c.0: enabling device (0000 -> 0002)
ath5k 0000:00:1c.0: registered as 'phy0'
ath5k phy0: Atheros AR5212 chip found (MAC: 0x56, PHY: 0x41)
ath5k phy0: RF5112B multiband radio found (0x36)
b43-phy1: Broadcom 4306 WLAN found (core revision 5)
Registered led device: b43-phy1::tx
Registered led device: b43-phy1::rx
Registered led device: b43-phy1::assoc
Registered led device: b43-phy1::radio
Broadcom 43xx driver loaded [ Features: PL, Firmware-ID: FW13 ]
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (205 buckets, 820 max)
b43-phy1: Loading firmware version 410.2160 (2007-05-26 15:32:10)
ADDRCONF(NETDEV_UP): wlan2: link is not ready
ADDRCONF(NETDEV_CHANGE): wlan2: link becomes ready



BusyBox v1.15.3 (2010-06-02 01:00:28 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03, unknown) --------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua
  * 1/3 shot Bailey's  on the bottom, then Bailey's,
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@OpenWrt:/# cat /proc/cpuinfo
processor : 0
cpu       : 82xx
clock     : 150.000000MHz
revision  : 1.4 (pvr 8081 1014)
bogomips  : 37.50
timebase  : 18750000
platform  : Airespace AP1200
model     : StorCenter
Memory    : 16 MB
root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:192.168.100.1  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::88cf:7eff:fe61:35a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:907 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:225685 (220.3 KiB)  TX bytes:870 (870.0 B)

eth0      Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet6 addr: fe80::211:22ff:fe33:4455/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:913 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:240156 (234.5 KiB)  TX bytes:1248 (1.2 KiB)
          Interrupt:17 Base address:0xc000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:191 (191.0 B)  TX bytes:191 (191.0 B)

wlan2     Link encap:Ethernet  HWaddr 00:13:D4:51:AA:79
          inet addr:192.168.1.102  Bcast:255.255.255.255  Mask:255.255.255.0
          inet6 addr: fe80::213:d4ff:fe51:aa79/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2007 (1.9 KiB)  TX bytes:3770 (3.6 KiB)

root@OpenWrt:/# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

br-lan    no wireless extensions.

wlan0     IEEE 802.11abg  Mode:Managed  Access Point: Not-Associated
          Tx-Power=0 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

wlan1     IEEE 802.11bg  Mode:Managed  Access Point: Not-Associated
          Tx-Power=20 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

wlan2     IEEE 802.11bg  ESSID:"HIT-MEC"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:23:CD:E7:D4:CA
          Bit Rate=48 Mb/s   Tx-Power=20 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=41/70  Signal level=-69 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

(Last edited by nmtr on 18 Jun 2010, 17:23)

this is my kernel patchs

diff -ur linux-2.6.32.10.org/arch/powerpc/boot/dts/storcenter.dts linux-2.6.32.10/arch/powerpc/boot/dts/storcenter.dts
--- linux-2.6.32.10.org/arch/powerpc/boot/dts/storcenter.dts    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/arch/powerpc/boot/dts/storcenter.dts    2010-06-18 22:50:54.000000000 +0800
@@ -22,6 +22,7 @@
     aliases {
         serial0 = &serial0;
         serial1 = &serial1;
+        ethernet0 =&enet0;
         pci0 = &pci0;
     };

@@ -32,9 +33,9 @@
         PowerPC,8241@0 {
             device_type = "cpu";
             reg = <0>;
-            clock-frequency = <200000000>;
-            timebase-frequency = <25000000>;
-            bus-frequency = <0>;    /* from bootwrapper */
+            clock-frequency = <150000000>;
+            timebase-frequency = <18750000>;
+            bus-frequency = <75000000>;    /* from bootwrapper */
             i-cache-line-size = <32>;
             d-cache-line-size = <32>;
             i-cache-size = <16384>;
@@ -44,7 +45,7 @@

     memory {
         device_type = "memory";
-        reg = <0x00000000 0x04000000>;    /* 64MB @ 0x0 */
+        reg = <0x00000000 0x01000000>;    /* 64MB @ 0x0 */
     };

     soc@fc000000 {
@@ -53,9 +54,9 @@
         device_type = "soc";
         compatible = "fsl,mpc8241", "mpc10x";
         store-gathering = <0>; /* 0 == off, !0 == on */
-        ranges = <0x0 0xfc000000 0x100000>;
+    bus-frequency = <25000000>;        /* fixed by loader */
+      ranges = <0x0 0xfc000000 0x100000>;
         reg = <0xfc000000 0x100000>;    /* EUMB */
-        bus-frequency = <0>;        /* fixed by loader */

         i2c@3000 {
             #address-cells = <1>;
@@ -64,11 +65,6 @@
             reg = <0x3000 0x100>;
             interrupts = <17 2>;
             interrupt-parent = <&mpic>;
-
-            rtc@68 {
-                compatible = "dallas,ds1337";
-                reg = <0x68>;
-            };
         };

         serial0: serial@4500 {
@@ -76,8 +72,8 @@
             device_type = "serial";
             compatible = "ns16550";
             reg = <0x4500 0x20>;
-            clock-frequency = <97553800>; /* Hz */
-            current-speed = <115200>;
+            clock-frequency = <75000000>; /* Hz */
+            current-speed = <9600>;
             interrupts = <25 2>;
             interrupt-parent = <&mpic>;
         };
@@ -87,7 +83,7 @@
             device_type = "serial";
             compatible = "ns16550";
             reg = <0x4600 0x20>;
-            clock-frequency = <97553800>; /* Hz */
+            clock-frequency = <75000000>; /* Hz */
             current-speed = <9600>;
             interrupts = <26 2>;
             interrupt-parent = <&mpic>;
@@ -110,32 +106,71 @@
         #interrupt-cells = <1>;
         device_type = "pci";
         compatible = "mpc10x-pci";
-        reg = <0xfe800000 0x1000>;
-        ranges = <0x01000000 0x0        0x0 0xfe000000 0x0 0x00c00000
-              0x02000000 0x0 0x80000000 0x80000000 0x0 0x70000000>;
-        bus-range = <0 0xff>;
-        clock-frequency = <97553800>;
+      reg = <0xfec00000 0x400000>;
+      //pci_space 1     pci_addr 2 cpu_addr 1,  size 2
+        ranges = <0x1000000 0x0   0x0 0xfe000000 0x0 0xc00000
+                  0x2000000 0x0 0x80000000 0x80000000 0x0 0x70000000>;
+        clock-frequency = <25000000>;
         interrupt-parent = <&mpic>;
         interrupt-map-mask = <0xf800 0 0 7>;
+    bus-range = <0 0xff>;
         interrupt-map = <
-            /* IDSEL 13 - IDE */
-            0x6800 0 0 1 &mpic 0 1
-            0x6800 0 0 2 &mpic 0 1
-            0x6800 0 0 3 &mpic 0 1
-            0x6800 0 0 4 &mpic 0 1
-            /* IDSEL 14 - USB */
-            0x7000 0 0 1 &mpic 0 1
-            0x7000 0 0 2 &mpic 0 1
-            0x7000 0 0 3 &mpic 0 1
-            0x7000 0 0 4 &mpic 0 1
-            /* IDSEL 15 - ETH */
-            0x7800 0 0 1 &mpic 0 1
-            0x7800 0 0 2 &mpic 0 1
-            0x7800 0 0 3 &mpic 0 1
-            0x7800 0 0 4 &mpic 0 1
+            /* IDSEL 1d - DS83815 */
+            0xe800 0 0 1 &mpic 2 1
+            /* IDSEL 1c - SlotA */
+            0xe000 0 0 1 &mpic 3 1
+            /* IDSEL 1e - SlotB */
+          0xf000 0 0 1 &mpic 4 1
         >;
+        /*xxxx represents the bus, device, function numbers as appropriate
+            hhhhhhhh represents the high 32 bits of a PCI domain address
+            llllllll represents the low 32 bits of a PCI domain address8*/
+        enet0: nasemi@1d{
+            device_type="network";
+            vendor-id = <0x0000100b>;
+            device-id = <0x00000020>;
+            reg = <0xe800 0 0>;
+            local-mac-address = [00 00 00 00 00 00];
+        };
     };

+  localbus@0xffc00000{
+        #address-cells = <2>;
+        #size-cells = <1>;
+        compatible = "simple-bus";
+        ranges = <0 0 0xffc00000 0x400000 >;
+        flash@0 {
+            compatible = "cfi-flash";
+            bank-width = <1>;
+            reg = <0 0 0x400000>;
+            #address-cells = <1>;
+            #size-cells = <1>;
+            partition@0 {
+                label = "rootfs";
+                reg = <0x00000000 0x220000>;
+            };
+            partition@220000 {
+                label = "kernel";
+                reg = <0x220000 0xE0000>;
+            };
+            partition@300000 {
+                label = "U-Boot";
+                reg = <0x300000 0x30000>;
+            };
+            partition@330000 {
+                label = "kernel2";
+                reg = <0x330000 0xc0000>;
+            };
+            partition@3F0000 {
+                label = "kernel3";
+                reg = <0x3F0000 0xE000>;
+            };
+            partition@3FE000 {
+                label = "U-boot Env";
+                reg = <0x3FE000 0x2000>;
+            };
+       };
+        };
     chosen {
         linux,stdout-path = &serial0;
     };
diff -ur linux-2.6.32.10.org/arch/powerpc/boot/Makefile linux-2.6.32.10/arch/powerpc/boot/Makefile
--- linux-2.6.32.10.org/arch/powerpc/boot/Makefile    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/arch/powerpc/boot/Makefile    2010-06-02 00:58:39.000000000 +0800
@@ -251,7 +251,8 @@
 image-$(CONFIG_KSI8560)            += cuImage.ksi8560

 # Board ports in arch/powerpc/platform/embedded6xx/Kconfig
-image-$(CONFIG_STORCENTER)        += cuImage.storcenter
+image-$(CONFIG_STORCENTER)        += uImage
+#image-$(CONFIG_STORCENTER)        += cuImage.storcenter
 image-$(CONFIG_MPC7448HPC2)        += cuImage.mpc7448hpc2
 image-$(CONFIG_PPC_C2K)            += cuImage.c2k

diff -ur linux-2.6.32.10.org/arch/powerpc/boot/wrapper linux-2.6.32.10/arch/powerpc/boot/wrapper
--- linux-2.6.32.10.org/arch/powerpc/boot/wrapper    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/arch/powerpc/boot/wrapper    2010-06-02 00:58:39.000000000 +0800
@@ -172,10 +172,10 @@
     *5200*|*-motionpro)
         platformo=$object/cuboot-52xx.o
         ;;
-    *-pq2fads|*-ep8248e|*-mpc8272*|*-storcenter)
+    *-pq2fads|*-ep8248e|*-mpc8272*)
         platformo=$object/cuboot-pq2.o
         ;;
-    *-mpc824*)
+    *-mpc824*|*-storcenter)
         platformo=$object/cuboot-824x.o
         ;;
     *-mpc83*|*-asp834x*)
diff -ur linux-2.6.32.10.org/arch/powerpc/configs/storcenter_defconfig linux-2.6.32.10/arch/powerpc/configs/storcenter_defconfig
--- linux-2.6.32.10.org/arch/powerpc/configs/storcenter_defconfig    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/arch/powerpc/configs/storcenter_defconfig    2010-06-02 00:58:39.000000000 +0800
@@ -273,7 +273,7 @@
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE="console=ttyS0,115200"
+CONFIG_CMDLINE="console=ttyS0,9600"
 CONFIG_EXTRA_TARGETS=""
 # CONFIG_PM is not set
 # CONFIG_SECCOMP is not set

diff -ur linux-2.6.32.10.org/arch/powerpc/platforms/embedded6xx/storcenter.c linux-2.6.32.10/arch/powerpc/platforms/embedded6xx/storcenter.c
--- linux-2.6.32.10.org/arch/powerpc/platforms/embedded6xx/storcenter.c    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/arch/powerpc/platforms/embedded6xx/storcenter.c    2010-06-05 04:11:07.000000000 +0800
@@ -27,6 +27,7 @@

 static __initdata struct of_device_id storcenter_of_bus[] = {
     { .name = "soc", },
+    { .compatible = "simple-bus", },
     {},
 };

@@ -87,7 +88,7 @@
     const void *prop;
     int size;
     phys_addr_t paddr;
-
+
     dnp = of_find_node_by_type(NULL, "open-pic");
     if (dnp == NULL)
         return;
@@ -101,6 +102,7 @@
     paddr = (phys_addr_t)of_translate_address(dnp, prop);
     mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
             16, 32, " OpenPIC  ");
+    //mpic_set_serial_int(mpic,0);

     of_node_put(dnp);

@@ -110,9 +112,9 @@
      * 16 Serial Interrupts followed by 16 Internal Interrupts.
      * I2C is the second internal, so it is at 17, 0x11020.
      */
-    mpic_assign_isu(mpic, 0, paddr + 0x10200);
+     mpic_assign_isu(mpic, 0, paddr + 0x10200);
     mpic_assign_isu(mpic, 1, paddr + 0x11000);
-
+
     mpic_init(mpic);
 }

@@ -135,7 +137,7 @@
 }

 define_machine(storcenter){
-    .name             = "IOMEGA StorCenter",
+    .name             = "Airespace AP1200",
     .probe             = storcenter_probe,
     .setup_arch         = storcenter_setup_arch,
     .init_IRQ         = storcenter_init_IRQ,
diff -ur linux-2.6.32.10.org/arch/powerpc/sysdev/Makefile linux-2.6.32.10/arch/powerpc/sysdev/Makefile
--- linux-2.6.32.10.org/arch/powerpc/sysdev/Makefile    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/arch/powerpc/sysdev/Makefile    2010-06-02 01:13:32.000000000 +0800
@@ -1,4 +1,5 @@
-subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+#subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
+subdir-ccflags-$(CONFIG_PPC_WERROR) :=

 ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS            += -mno-minimal-toc

diff -ur linux-2.6.32.10.org/drivers/net/natsemi.c linux-2.6.32.10/drivers/net/natsemi.c
--- linux-2.6.32.10.org/drivers/net/natsemi.c    2010-03-15 23:52:04.000000000 +0800
+++ linux-2.6.32.10/drivers/net/natsemi.c    2010-06-02 00:58:39.000000000 +0800
@@ -26,7 +26,6 @@
     TODO:
     * big endian support with CFG:BEM instead of cpu_to_le32
 */
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -52,6 +51,10 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
+#ifdef CONFIG_PPC
+#include <asm/prom.h>
+#endif
+

 #define DRV_NAME    "natsemi"
 #define DRV_VERSION    "2.1"
@@ -808,7 +811,12 @@
     const int pcibar = 1; /* PCI base address register */
     int prev_eedata;
     u32 tmp;
-
+#ifdef CONFIG_PPC
+    struct device_node * dp =NULL;
+    const unsigned char *fixed_MAC=NULL;
+    int maclen;
+#endif
+
 /* when built into the kernel, we only print version if device is found */
 #ifndef MODULE
     static int printed_version;
@@ -851,16 +859,28 @@
         i = -ENOMEM;
         goto err_ioremap;
     }
-
+#ifdef CONFIG_PPC
+    dp = pci_device_to_OF_node(pdev);
+    if(dp){
+        fixed_MAC= of_get_property(dp, "local-mac-address", &maclen);
+    }
+    if(fixed_MAC!=NULL){
+        memcpy(dev->dev_addr, fixed_MAC, 6);
+        printk("set Mac from bootloader env\n");
+    }
+    else{
+#endif
     /* Work around the dropped serial bit. */
-    prev_eedata = eeprom_read(ioaddr, 6);
-    for (i = 0; i < 3; i++) {
-        int eedata = eeprom_read(ioaddr, i + 7);
-        dev->dev_addr[i*2] = (eedata << 1) + (prev_eedata >> 15);
-        dev->dev_addr[i*2+1] = eedata >> 7;
-        prev_eedata = eedata;
+        prev_eedata = eeprom_read(ioaddr, 6);
+        for (i = 0; i < 3; i++) {
+            int eedata = eeprom_read(ioaddr, i + 7);
+            dev->dev_addr[i*2] = (eedata << 1) + (prev_eedata >> 15);
+            dev->dev_addr[i*2+1] = eedata >> 7;
+            prev_eedata = eedata;
+        }
+#ifdef CONFIG_PPC
     }
-
+#endif
     dev->base_addr = (unsigned long __force) ioaddr;
     dev->irq = irq;

if your uboot does not support  FDT feature. you should read some documents in kernel source tree.( Kernel_dir/Documentation/powerpc ) like bootwrapper.txt booting-without-of.txt.  i believe you can make your kernel  boot with little efforts . good luck.

(Last edited by nmtr on 18 Jun 2010, 17:27)

The discussion might have continued from here.