MPC5200b MMC over SPI into PSC6
Subsystems (2)
Hello, I have an embedded system with an on-board processor powerpc MPC5200B and Linux kernel 2.6.22,
I must turn over to MMC SPI on the PSC6.
First, I
have enabled PSC6:
in ../arch/ppc/platforms/lite5200.c added PSC6 in SPI mode
struct mpc52xx_psc_func mpc52xx_psc_functions[] = {
{ .id = 3,
.func = "uart",
},
{ .id = 4,
.func = "uart",
},{ .id = 5,
.func = "spi",
},
};in ..
/arch/powerpc/boot/dts/lite5200b.dts enabled PSC6 in SPI mode
// PSC6 in spi mode example
spi@2c00 { // PSC6device_type = "spi";
compatible = "mpc5200b-psc-spi\0mpc5200-psc-spi";
cell-index = <5>;
reg =
<2c00 100>;
interrupts = <2 4 0>;
interrupt-parent = <&mpc5200_pic>;
};
Now on the menuconfig enabling these options:
$ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- menuconfig
Platform support --->
[*]
MPC5200 (L25R) bugfix support
[*] Freescale Lite5200 Eval Board
Device
Drivers ---> SPI Support --->
[*] SPI support
<*> Freescale MPC52xx
PSC SPI controller
this options settings the CONFIG_SPI_MPC52xx_PSC=y variable into .config
When linux booting, if I debug ../driver/spi/mpc52xx_psc_spi.c, see that:
bus platform: add driver mpc52xx-psc-
spi
bus platform: remove driver mpc52xx-psc-spidrivers/spi/mpc52xx_psc_spi.c:of_register_platform_driver failed (-19)
why??
any idea??
Someone knows how
to enable mmc over spi on PSC6?
thanks Fabio
Quoted 8 lines · Fabio Tosetto
Hello, I have an embedded system with an on-board processor powerpc MPC5200B
and Linux kernel 2.6.22,
I must turn over to MMC SPI on the PSC6.First, I
have enabled PSC6:in
../arch/ppc/platforms/lite5200.cadded PSC6 in SPI mode
You're using arch/ppc which is depreciated. You should move to using arch/powerpc (set ARCH=powerpc when compiling). Devices are then enabled in the device tree source file arch/powerpc/boot/dts/lite5200b.dts.
Many things have changed with MPC5200 support in the last year, you should also use the latest kernel release (2.6.25.2 when it is released. If you use 2.6.25.1, then there is a trivial bug in the psc serial port driver that you'll need to fix. I'll include the link to the patch below)
Cheers,
g.
http://ozlabs.org/pipermail/linuxppc-dev/2008-April/055495.html
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
I've tried to port my exesting configurations to the powerpc tree but some configurations files are missing.
I need to set PSC3 - PSC4 in uart mode:
before in file *arch/ppc/platforms/lite5200.c* I added
struct mpc52xx_psc_func mpc52xx_psc_functions[] = {
{ .id = 3,
.func = "uart",
},
{ .id = 4,
.func = "uart",
},
{ .id = -1, /* End entry */
.func = NULL,
}
};I need to set PSC4 as a low level debug: * *before in file *arch/ppc/platforms/lite5200.h *I added
#define MPC52xx_PF_CONSOLE_PORT 4 /* PSC4 */
Finally I need to set the virtual memory translation on a range of 128 MB:
before in file *arch/ppc/kernel/head.S *I added
/*ori r11,r11,BL_128M<<2|0x2 set up BAT registers for 604 */
ori r11,r11,BL_128M<<2|0x2 /* set up BAT registers for 604 */
could you please explain me how to do the same operations in powerpc tree??
thanks Fabio
Grant Likely ha scritto:
Quoted 29 lines · Fabio Tosetto
Quoted 10 lines
Hello, I have an embedded system with an on-board processor powerpc MPC5200B
and Linux kernel 2.6.22,
I must turn over to MMC SPI on the PSC6.First, I
have enabled PSC6:in
../arch/ppc/platforms/lite5200.cadded PSC6 in SPI modeYou're using
arch/ppcwhich is depreciated. You should move to usingarch/powerpc(set ARCH=powerpc when compiling). Devices are then enabled in the device tree source filearch/powerpc/boot/dts/lite5200b.dts.Many things have changed with MPC5200 support in the last year, you should also use the latest kernel release (2.6.25.2 when it is released. If you use 2.6.25.1, then there is a trivial bug in the psc serial port driver that you'll need to fix. I'll include the link to the patch below)
Cheers,
g.http://ozlabs.org/pipermail/linuxppc-dev/2008-April/055495.html
Quoted 3 lines · Fabio Tosetto
I've tried to port my exesting configurations to the powerpc tree but some
configurations files are missing.
First, create a new .dts file for your board in arch/powerpc/boot/dts. (just copy the lite5200.dts file). Modify the .dts to have your board's name (in the form "<vendor>,<boardname>") in the compatible and model properties.
Next, add your boards name to the list of boards in arch/powerpc/platforms/52xx/mpc5200_simple.c.
Quoted 13 lines
I need to set PSC3 - PSC4 in uart mode:
before in file *arch/ppc/platforms/lite5200.c* I addedstruct mpc52xx_psc_func mpc52xx_psc_functions[] = { { .id = 3, .func = "uart", }, { .id = 4, .func = "uart", }, { .id = -1, /* End entry */ .func = NULL, }
Quoted 1 line
};
Edit your boards .dts file and uncomment PSCs 3 and 4. Comment out PSC1 if you aren't using it.
Quoted 4 lines
I need to set PSC4 as a low level debug: * *before in file
*arch/ppc/platforms/lite5200.h*I added#define
MPC52xx_PF_CONSOLE_PORT4 /* PSC4 */
I don't think we have any early debug enabled yet in arch/powerpc for the mpc5200.
Quoted 8 lines
Finally I need to set the virtual memory translation on a range of 128 MB:
before in file*arch/ppc/kernel/head.S*I added/*ori r11,r11,BL_128M<<2|0x2 set up BAT registers for 604 */
ori r11,r11,BL_128M<<2|0x2 /* set up BAT registers for 604 */
could you please explain me how to do the same operations in powerpc tree??
New file is arch/powerpc/kernel/head_32.S. I don't think that is the cleanest way to do it though. Why do you need to change the BAT mapping from 256 to 128?
Cheers,
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Ok, maybe it's better to start from the beginning.
Now I'm using a Lite5200b board, just to avoid problems with my hardware, and I'm trying to have a bootable kernel.
With kernel version 2.6.24.6 I do the following commands
$ make ARCH=powerpc lite5200_defconfig $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- uImage
then I copy the arch/powerpc/boot/uImage and a rootfs.uimage on the board, but uBoot stops at the beginning:
============================================
U-Boot 1.3.0-g98e2867c-dirty (Feb 7 2008 - 13:26:28)
CPU: MPC5200B v2.2, Core v1.4 at 198 MHz
Bus 132 MHz, IPB 132 MHz, PCI 33
MHz Board: Freescale Lite5200B I2C: 85 kHz, ready DRAM: 256 MB FLASH: 32 MB PCI: Bus Dev VenId DevId Class Int
00 1a 1057 5809 0680 00 In: serial Out: serial Err: serial Net: FEC ETHERNET IDE: Bus 0: OK
Device 0: not
available
Device 1: not
available
Type "run flash_nfs" to mount root filesystem over NFS
Hit any key to stop autoboot: 0 =>
=> usb start (Re)start USB... USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 1 Storage Device(s)
found => usb scan
NOTE: this command is obsolete and will be phased
out
please use 'usb storage' for USB storage devices
information
Device 0: Vendor: USB 2.0 Prod.: Flash Disk Rev:
0.00
Type: Removable Hard
Disk
Capacity: 963.9 MB = 0.9 GB (1974271 x
512) => fatload usb 0 0x03000000 uImage reading uImage ................................................................................
..........................
1091680 bytes read => fatload usb 0 0x04000000 rootfs.uimage reading rootfs.uimage ................................................................................
.......... 924722 bytes read
=> bootm 0x03000000 0x04000000
---------------------
## Booting image at 03000000 ...
Image Name:
Linux-2.6.24.4
Created: 2008-05-08 14:21:24
UTC
Image Type: PowerPC Linux Kernel Image (gzip
compressed)
Data Size: 1091616 Bytes = 1
MB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Uncompressing Kernel Image ...
OK ## Loading RAMDisk Image at 04000000 ...
Image Name: RamDisk Image
RadioNav
Created: 2007-12-14 16:18:56
UTC
Image Type: PowerPC Linux RAMDisk Image (gzip
compressed)
Data Size: 924658 Bytes = 903
kB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Loading Ramdisk to 0fe68000, end 0ff49bf2 ... OK
============================================
So I tried using the deprecated ppc
$ make ARCH=ppc lite5200_defconfig $ make ARCH=ppc CROSS_COMPILE=powerpc-linux-gnu- uImage
It still doesn't work, but it goes a little further:
=> bootm 0x03000000 0x04000000 ## Booting image at 03000000 ...
Image Name:
Linux-2.6.24.6
Created: 2008-05-08 14:39:04
UTC
Image Type: PowerPC Linux Kernel Image (gzip
compressed)
Data Size: 776322 Bytes = 758.1
kB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Uncompressing Kernel Image ...
OK ## Loading RAMDisk Image at 04000000 ...
Image Name: RamDisk Image
RadioNav
Created: 2007-12-14 16:18:56
UTC
Image Type: PowerPC Linux RAMDisk Image (gzip
compressed)
Data Size: 924658 Bytes = 903
kB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Loading Ramdisk to 0fe68000, end 0ff49bf2 ...
OK id mach(): done MMU:enter
MMU:hw init MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter setup_arch: bootmem arch: exit
============================================
The only way I was able to get something working, even though it sounds a little strange to me, is loading the config from powerpc folder but compiling in ppc
$ make ARCH=powerpc lite5200_defconfig $ make ARCH=ppc CROSS_COMPILE=powerpc-linux-gnu- uImage
=> bootm 0x03000000 0x04000000 ## Booting image at 03000000 ...
Image Name:
Linux-2.6.24.4
Created: 2008-05-08 14:03:26
UTC
Image Type: PowerPC Linux Kernel Image (gzip
compressed)
Data Size: 1073349 Bytes = 1
MB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Uncompressing Kernel Image ...
OK ## Loading RAMDisk Image at 04000000 ...
Image Name: RamDisk Image
RadioNav
Created: 2007-12-14 16:18:56
UTC
Image Type: PowerPC Linux RAMDisk Image (gzip
compressed)
Data Size: 924658 Bytes = 903
kB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Loading Ramdisk to 0fe68000, end 0ff49bf2 ...
OK id mach(): done MMU:enter
MMU:hw init MMU:mapin
MMU:setio
MMU:exit
setup_arch: enter setup_arch: bootmem arch: exit [ 0.000000] Linux version 2.6.24.4 (ftosetto@osstlab-build1) (gcc version 4.1 .2 (Sourcery G++ Lite 4.1-51)) #3 Thu May 8 16:03:21 CEST 2008 [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0 -> 65536 [ 0.000000] Normal 65536 -> 65536 [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[1] active PFN ranges [ 0.000000] 0: 0 -> 65536 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pag es: 65024 [ 0.000000] Kernel command line: [ 0.000000] PID hash table entries: 1024 (order: 10, 4096 bytes) [ 91.768263] console [ttyPSC0] enabled ...
Do you have any idea about how to make it working doing all the stuff with ARCH=powerpc?
Best regards,
Fabio
Grant Likely ha scritto:
Quoted 63 lines · Fabio Tosetto
Quoted 4 lines
I've tried to port my exesting configurations to the powerpc tree but some
configurations files are missing.First, create a new .dts file for your board in
arch/powerpc/boot/dts. (just copy thelite5200.dtsfile). Modify the .dts to have your board's name (in the form "<vendor>,<boardname>") in the compatible and model properties.Next, add your boards name to the list of boards in
arch/powerpc/platforms/52xx/mpc5200_simple.c.Quoted 13 lines
I need to set PSC3 - PSC4 in uart mode:
before in file *arch/ppc/platforms/lite5200.c* I addedstruct mpc52xx_psc_func mpc52xx_psc_functions[] = { { .id = 3, .func = "uart", }, { .id = 4, .func = "uart", }, { .id = -1, /* End entry */ .func = NULL, }Quoted 2 lines
};
Edit your boards .dts file and uncomment PSCs 3 and 4. Comment out PSC1 if you aren't using it.
Quoted 5 lines
I need to set PSC4 as a low level debug: * *before in file
*arch/ppc/platforms/lite5200.h*I added#define
MPC52xx_PF_CONSOLE_PORT4 /* PSC4 */I don't think we have any early debug enabled yet in
arch/powerpcfor the mpc5200.Quoted 9 lines
Finally I need to set the virtual memory translation on a range of 128 MB:
before in file*arch/ppc/kernel/head.S*I added/*ori r11,r11,BL_128M<<2|0x2 set up BAT registers for 604 */
ori r11,r11,BL_128M<<2|0x2 /* set up BAT registers for 604 */
could you please explain me how to do the same operations in powerpc tree??
New file is
arch/powerpc/kernel/head_32.S. I don't think that is the cleanest way to do it though. Why do you need to change the BAT mapping from 256 to 128?Cheers,
g.
Quoted 11 lines · Fabio Tosetto
Ok, maybe it's better to start from the beginning.
Now I'm using a Lite5200b board, just to avoid problems with my hardware,
and I'm trying to have a bootable kernel.With kernel version 2.6.24.6 I do the following commands
$ make ARCH=powerpc lite5200_defconfig $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- uImagethen I copy the
arch/powerpc/boot/uImageand a rootfs.uimage on the board,
but uBoot stops at the beginning:
Right; some concepts need to be explained now... There is a major difference between arch/ppc and arch/powerpc. In arch/ppc, the kernel is hard coded with the list of devices in the system. In arch/powerpc, the list of devices is captured in a data structure called the Flattened Device Tree (FDT). fdt data structures are generated from the .dts (device tree source) files in arch/powerpc/boot/dts/.
When you build a uImage with arch/ppc, you get a hard coded kernel that works with u-boot: "bootm <kernel_addr> <ramdisk_addr>"
When you build a uImage with arch/powerpc, you get a dynamic kernel that needs to be passed the device tree blob on boot. Newer u-boot supports dts booting: "bootm <kernel_addr> <ramdisk_addr> <dt_addr>" or "bootm <kernel_addr> - <dt_addr>" if you're not using a ramdisk.
However, if you've got an older u-boot version installed on your board, you need to create an image that binds the device tree into the kernel image. This is called a "cuImage". So, instead of doing "make ARCH=powerpc uImage", you should do "make ARCH=powerpc cuImage.<boardname>". This 'wraps' the kernel with a boot wrapper that includes the device tree blob but maintains compatibility with the old style uImage format.
For example, use "make ARCH=powerpc cuImage.lite5200b" to build an image for the lite5200b board. The build scripts will use the lite5200b.dts file in the dts directory for building the image. If you add "fabios-fantastic-board.dts" to arch/powerpc/boot/dts, then you can build "cuImage.fabios-fantastic-board". :-)
Quoted 6 lines
The only way I was able to get something working, even though it sounds a
little strange to me, is loading the config from powerpc folder but compiling in ppc$ make ARCH=powerpc lite5200_defconfig $ make ARCH=ppc CROSS_COMPILE=powerpc-linux-gnu- uImage
ARCH=ppc and ARCH=powerpc are completely different beasts. Forget that you even know about ARCH=ppc for this entire exercise.
Cheers,
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Hello!
I've seen you guys are playing with a Lite5200b board, so I've decided to do another attempt with mine.
Quoted 3 lines · Grant Likely
For example, use "make ARCH=powerpc cuImage.lite5200b" to build an image for the lite5200b board. The build scripts will use the
lite5200b.dtsfile in the dts directory for building the image.
If I'm not wrong, the right sequence of commands should be the following:
$ make ARCH=powerpc mpc5200_defconfig $ make ARCH=powerpc menuconfig ... [customizations]... $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- cuImage.lite5200b
and this is the output:
...
CHK include/linux/version.h CHK include/linux/utsrelease.h CALL scripts/checksyscalls.sh CHK include/linux/compile.h CALL arch/powerpc/kernel/systbl_chk.sh WRAP arch/powerpc/boot/cuImage.lite5200b DTC: dts->dtb on file "/home/fgaretto/linux-2.6.25.2-lite5200/arch/powerpc/boot/dts/lite5200b.dts" Image Name: Linux-2.6.25.2 Created: Fri May 9 14:46:22 2008 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1518744 Bytes = 1483.15 kB = 1.45 MB Load Address: 0x00400000 Entry Point: 0x00400550
At this point I've loaded the cuImage and rootfs.uimage on the board:
=> usb start
=> usb scan
=> fatload usb 0 0x03000000 cuImage.lite5200b
=> fatload usb 0 0x04000000 rootfs.uimage
=> bootm 0x03000000 0x04000000
but it still hangs after this:
## Booting image at 03000000 ...
Image Name: RadioNav-Linux 2.6.22.1 Created: 2008-05-09 13:11:43 UTC Image Type: PowerPC Linux Kernel Image (uncompressed) Data Size: 1518808 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
OK
## Loading RAMDisk Image at 04000000 ...
Image Name: RamDisk Image Lite5200b Created: 2008-03-04 11:28:40 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1135278 Bytes = 1109 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Ramdisk to 0fe68000, end 0ff7d2ae ... OK
I've looked at Load Address and Entry Point of the cuImage and it sounds a little strange to me that these values are not zero, so I've manually changed them both to 0x00000000 using mkimage, but the result is always the same: no boot at all.
Errage corrige: Excuse me, bad cut and paste :)
This is the right output of the first try
## Booting image at 03000000 ...
Image Name: Linux-2.6.25.2 Created: 2008-05-09 12:46:22 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1518744 Bytes = 1.4 MB
Load Address: 00400000
Entry Point: 00400550
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 04000000 ...
Image Name: RamDisk Image Lite5200b Created: 2008-03-04 11:28:40 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1135278 Bytes = 1109 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Ramdisk to 0fe68000, end 0ff7d2ae ... OK
By the way, Grant, you seem to be very expert in making a kernel with ARCH=powerpc. Can you tell me how to find some docs to improve my knowledge in this field? I've found something interesting in Documentation/powerpc, but they are not too explicative about the differences between PPC/Powerpc building, and about how to make the last one.
See if this patch makes any difference for you:
arch/powerpc/boot/dts/lite5200b.dts +4 -0
@@ -342,4 +342,8 @@ 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>; }; + + chosen { + linux,stdout-path = "/soc5200@f0000000/serial@2000"; + }; };
Oh, and the fix I told you about (fixing the unterminated list) didn't make it into 2.6.25.2. You still need to manually apply it. It should be in 2.6.25.3.
Cheers,
g.
Quoted 29 lines · Fabri
Errage corrige: Excuse me, bad cut and paste :)
This is the right output of the first try## Booting image at 03000000 ...
Image Name: Linux-2.6.25.2 Created: 2008-05-09 12:46:22 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1518744 Bytes = 1.4 MBLoad Address: 00400000
Entry Point: 00400550
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 04000000 ...Image Name: RamDisk Image Lite5200b Created: 2008-03-04 11:28:40 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1135278 Bytes = 1109 kBLoad Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Ramdisk to0fe68000, end0ff7d2ae... OKBy the way, Grant, you seem to be very expert in making a kernel with ARCH=powerpc. Can you tell me how to find some docs to improve my knowledge in this field? I've found something interesting in
Documentation/powerpc, but they are not too explicative about the differences between PPC/Powerpc building, and about how to make the last one.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Thanks for the patches, now some more rows are printed after RamDisk loading:
Verifying Checksum ... OK
Loading Ramdisk to 0fe68000, end 0ff49bf2 ... OK
Memory <- <0x0 0x10000000> (256MB)
CPU clock-frequency <- 0xbcd3d80 (198MHz) CPU timebase-frequency <- 0x1f78a40 (33MHz) CPU bus-frequency <- 0x7de2900 (132MHz)
zImage starting: loaded at 0x00400000 (sp: 0x0ff4a958) Allocating 0x32d410 bytes for kernel ...
gunzipping (0x00000000 <- 0x0040d000:0x00730fd4)...done 0x30d150 bytes Using loader supplied ramdisk at 0xfe68000-0xff49bf2
initrd head: 0x1f8b0808
Linux/PowerPC load:
Finalizing device tree... flat tree at 0x73d300
-----------------------------------------------------------------------------------------------------
and then it stops. Maybe are there some problems related to my rootfs.uimage?
Quoted 61 lines · Grant Likely
See if this patch makes any difference for you:
arch/powerpc/boot/dts/lite5200b.dts +4
-0@@ -342,4 +342,8 @@ 0x02000000 0 0xa0000000 0xa0000000 0 0x10000000 0x01000000 0 0x00000000 0xb0000000 0 0x01000000>; }; + + chosen { + linux,stdout-path = "/soc5200@f0000000/serial@2000"; + }; };Oh, and the fix I told you about (fixing the unterminated list) didn't make it into 2.6.25.2. You still need to manually apply it. It should be in 2.6.25.3.
Cheers,
g.Quoted 22 lines · Fabri
Errage corrige: Excuse me, bad cut and paste :)
This is the right output of the first try## Booting image at 03000000 ...
Image Name: Linux-2.6.25.2 Created: 2008-05-09 12:46:22 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1518744 Bytes = 1.4 MBLoad Address: 00400000
Entry Point: 00400550
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 04000000 ...Image Name: RamDisk Image Lite5200b Created: 2008-03-04 11:28:40 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1135278 Bytes = 1109 kBLoad Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Ramdisk to0fe68000, end0ff7d2ae... OKQuoted 7 lines
By the way, Grant, you seem to be very expert in making a kernel with ARCH=powerpc. Can you tell me how to find some docs to improve my knowledge in this field? I've found something interesting in
Documentation/powerpc, but they are not too explicative about the differences between PPC/Powerpc building, and about how to make the last one.--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Quoted 9 lines · Fabri
Thanks for the patches, now some more rows are printed after RamDisk loading:
Verifying Checksum ... OK
Loading Ramdisk to0fe68000, end0ff49bf2... OK
Memory <- <0x00x10000000> (256MB)
CPU clock-frequency <-0xbcd3d80(198MHz) CPU timebase-frequency <-0x1f78a40(33MHz) CPU bus-frequency <-0x7de2900(132MHz)
Quoted 7 lines
zImage starting: loaded at
0x00400000(sp:0x0ff4a958) Allocating0x32d410bytes for kernel ...
gunzipping (0x00000000<- 0x0040d000:0x00730fd4)...done0x30d150bytes Using loader supplied ramdisk at 0xfe68000-0xff49bf2
initrd head:0x1f8b0808Linux/PowerPC load:
^^^^^^^^^^^^^^^^^^
Doesn't look like you are passing a kernel parameters line. The kernel probably is booting, but doesn't know where to output the console. Try adding "console=ttyPSC0,115200".
Cheers,
g.
Quoted 1 line
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Nice to hear that, next week I'll try and let you know.
Thank you again for your support,
Fabrizio
Quoted 32 lines · Grant Likely
Quoted 9 lines · Fabri
Thanks for the patches, now some more rows are printed after RamDisk loading:
Verifying Checksum ... OK
Loading Ramdisk to0fe68000, end0ff49bf2... OK
Memory <- <0x00x10000000> (256MB)
CPU clock-frequency <-0xbcd3d80(198MHz) CPU timebase-frequency <-0x1f78a40(33MHz) CPU bus-frequency <-0x7de2900(132MHz)Quoted 7 lines
zImage starting: loaded at
0x00400000(sp:0x0ff4a958) Allocating0x32d410bytes for kernel ...
gunzipping (0x00000000<- 0x0040d000:0x00730fd4)...done0x30d150bytes Using loader supplied ramdisk at 0xfe68000-0xff49bf2
initrd head:0x1f8b0808Linux/PowerPC load:
^^^^^^^^^^^^^^^^^^Doesn't look like you are passing a kernel parameters line. The kernel probably is booting, but doesn't know where to output the console. Try adding "console=ttyPSC0,115200".
Cheers,
g.Quoted 1 line
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Hello,
in uboot i have setting the bootargs variable:
=> bootargs debug console=ttyPSC0,115200 root=/dev/ram => saveenv
If I'm not wrong, the right sequence of commands should be the following:
$ make ARCH=powerpc mpc5200_defconfig $ make ARCH=powerpc menuconfig .. [customizations]... $ make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- cuImage.lite5200b
and this is the output:
..
CHK include/linux/version.h CHK include/linux/utsrelease.h CALL scripts/checksyscalls.sh CHK include/linux/compile.h CALL arch/powerpc/kernel/systbl_chk.sh WRAP arch/powerpc/boot/cuImage.lite5200b DTC: dts->dtb on file "/home/ftosetto/linux-2.6.25.2-lite5200/arch/powerpc/boot/dts/lite5200b.dts" Image Name: Linux-2.6.25.2 Created: Mon May 12 10:29:40 2008 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1518744 Bytes = 1483.15 kB = 1.45 MB Load Address: 0x00400000 Entry Point: 0x00400550
At this point I've loaded the cuImage and rootfs.uimage on the board:
=> usb start
=> usb scan
=> fatload usb 0 0x03000000 cuImage.lite5200b
=> fatload usb 0 0x04000000 rootfs.uimage
=> bootm 0x03000000 0x04000000
but it still hangs after this:
## Booting image at 03000000 ...
Image Name:
Linux-2.6.25.2
Created: 2008-05-12 7:39:07
UTC
Image Type: PowerPC Linux Kernel Image (gzip
compressed)
Data Size: 1589091 Bytes = 1.5
MB
Load Address:
00400000
Entry Point:
00400550
Verifying Checksum ...
OK
Uncompressing Kernel Image ...
OK ## Loading RAMDisk Image at 04000000 ...
Image Name: RamDisk Image
RadioNav
Created: 2007-10-24 15:48:39
UTC
Image Type: PowerPC Linux RAMDisk Image (gzip
compressed)
Data Size: 1839123 Bytes = 1.8
MB
Load Address:
00000000
Entry Point:
00000000
Verifying Checksum ...
OK
Loading Ramdisk to 0fd89000, end 0ff4a013 ...
OK Memory <- <0x0 0x10000000> (256MB) CPU clock-frequency <- 0xbcd3d80 (198MHz) CPU timebase-frequency <- 0x1f78a40 (33MHz) CPU bus-frequency <- 0x7de2900 (132MHz)
zImage starting: loaded at 0x00400000 (sp: 0x0ff4a958) Allocating 0x34d42c bytes for kernel ... gunzipping (0x00000000 <- 0x0040d000:0x007510f0)...done 0x32d150 bytes Using loader supplied ramdisk at 0xfd89000-0xff4a013 initrd head: 0x1f8b0808
Linux/PowerPC load: debug console=ttyPSC0,115200 root=/dev/ram Finalizing device tree... flat tree at 0x75e300
Where is the problem? The problem is the my rootfs.uimage?
Do you have any idea?
Best regards,
Fabio
Grant Likely ha scritto:
Quoted 31 lines · Fabri
Quoted 10 lines
Thanks for the patches, now some more rows are printed after RamDisk loading:
Verifying Checksum ... OK
Loading Ramdisk to0fe68000, end0ff49bf2... OK
Memory <- <0x00x10000000> (256MB)
CPU clock-frequency <-0xbcd3d80(198MHz) CPU timebase-frequency <-0x1f78a40(33MHz) CPU bus-frequency <-0x7de2900(132MHz)Quoted 8 lines
zImage starting: loaded at
0x00400000(sp:0x0ff4a958) Allocating0x32d410bytes for kernel ...
gunzipping (0x00000000<- 0x0040d000:0x00730fd4)...done0x30d150bytes Using loader supplied ramdisk at 0xfe68000-0xff49bf2
initrd head:0x1f8b0808Linux/PowerPC load:
^^^^^^^^^^^^^^^^^^Doesn't look like you are passing a kernel parameters line. The kernel probably is booting, but doesn't know where to output the console. Try adding "console=ttyPSC0,115200".
Cheers,
g.
Quoted 3 lines
Doesn't look like you are passing a kernel parameters line. The kernel probably is booting, but doesn't know where to output the console. Try adding "console=ttyPSC0,115200".
Hi Grant,
I've tried to add that with this commands
=> bootargs debug console=ttyPSC0,115200 root=/dev/ram => saveenv
but the result is not so different. It still stops after printing these lines
Quoted 2 lines
Linux/PowerPC load: debug console=ttyPSC0,115200 root=/dev/ram Finalizing device tree... flat tree at
0x75e300
What should I see after that, in case of successful boot? Thanks for your help.