Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IDE dies after a few hours and the new windows won't go online (Kernel Update)
#1
Question: The IDE fails to communicate with the Power PMAC after a while, but the other windows (such as terminal and watch window) are still communicating with the Power PMAC. What is the cause and how can we fix it?

Answer: The problem is caused by a memory leak in the kernel which causes the Power PMAC to run out of memory, hence no more applications can be executed under Linux. You can check this by sending the following command in a terminal window:
Code:
more /proc/xenomai/heap
and the problem can be seen if the used size is approaching the memory size available.
This problem can be fixed and the following steps will explain how to fix this.

The following steps are only for advanced users. Any mistakes through these steps can make your Power PMAC unresponsive.


Usually if there is something wrong with the kernel, we should be able to just use the kernel download tool from Delta Tau>Configure menu of the IDE to upgrade it, but this may not be possible for some users. The reason is the allocated space in the boot loader for Kernel. During the development of Power PMAC, the Kernel size is increasing and it was getting close to the original envisioned allocated space, so the developers decide to increase this allocated space in the memory too.

How do I know if my Power Pmac has enough space for the new Kernel?
if you start a telnet session with the power pmac and type in the following command at the prompt:

Code:
more /proc/mtd

What we are interested in the response is the first line of the table which is something like this:

Code:
dev:    size   erasesize  name
mtd0: 001e0000 00020000 "kernel"
or
Code:
dev:    size   erasesize  name
mtd0: 003e0000 00020000 "kernel"

if the value in the size column is reported as 003e0000 then you do have enough space and you can just use the Kernel Download tool from the Delta Tau>Configure menu of the IDE. If the size is being reported as 001e0000 then the following steps are necessary before enough space is made available for new Kernel.

In the following steps we will be updating the device tree of the Power PMAC. The device tree is called powerpmac.dtb and you can download it from this link.

.zip   powerpmac.zip (Size: 2.37 KB / Downloads: 15)
This file needs to be copied to Power PMAC's internal flash. This can be done in two ways. (A) using a USB cable and through windows (B) using a tftp server. Once the file is downloaded to the flash, the rest of the steps would be the same.

(A) Using a USB cable, through Windows
A1. Power down the system and remove the CPU from the rack.
A2. Remove 2 screws holding the memory card to the main CPU board and disconnect the daughter card.
A3. Connect the daughter card to your Windows PC using a mini-USB cable.
A4. Copy the extracted powerpmac.dtb to the root folder of the flash memory.
A5. disconnect the memory module from the PC and connect it back to the Power PMAC CPU board and plug it back to the rack.
A6. Connect your PC to the Power PMAC using a serial port (115200, 8bit, Parity None, Stop bits 1, Flow control None).
A7. Once your serial console program is running, power up the Power PMAC and you would see the following text show up. Be ready to break into the boot loader when prompted with Hit any key to stop autoboot
Code:
U-Boot 2008.10 (Jan  5 2009 - 10:45:32)

CPU:   AMCC PowerPC 460EX Rev. A at 1000 MHz (PLB=200, OPB=100, EBC=100 MHz)
       Security/Kasumi support
       Bootstrap Option H - Boot ROM Location I2C (Addr 0x52)
       32 kB I-Cache 32 kB D-Cache
Board: Canyonlands - AMCC PPC460EX Evaluation Board, 1*PCIe/1*SATA, Rev. 13
I2C:   ready
DTT:   1 is 34 C
DRAM:   2 GB (ECC enabled, 400 MHz, CL3)
FLASH: 64 MB
Net:   ppc_4xx_eth0, ppc_4xx_eth1

Type run flash_nfs to mount root filesystem over NFS

Hit any key to stop autoboot:  0

A8. Enter the following command to detect the usb flash.
Code:
usb reset

A9. Enter the following command to see the file you copied to the root folder using the Windows.
Code:
fatls usb 0:1
This should give you a similar reply:
Code:
etc/                                                                
            ppmac/                                                              
    12657   powerpmac.dtb                                                      
  2113884   uimage                                                              
                                                                                
2 file(s), 2 dir(s)

A10. This following command will load the powerpmac.dtb to an empty space in RAM.
Code:
fatload usb 0:1  0x40000 powerpmac.dtb

The rest of the steps are shared between both approaches (A) and (B)

(B) Using a tftp server
B1. Copy the powerpmac.dtb file plus the files included in the following zip file (
.zip   tftpsrv.zip (Size: 23.57 KB / Downloads: 4) ) into a shared folder on your hard drive. ( for example C:\Shared) Make sure you give the folder network share read/write permissions.
B2. Run the tftpsrv.bat file.
B3. You need to know the IP of your PC. Lets assume the IP of your PC is 10.34.9.4 and it is on the same subnet as the Power PMAC. You need this IP value later to set a variable in the boot loader.
B4. Connect your PC to the Power PMAC using a serial port (115200, 8bit, Parity None, Stop bits 1, Flow control None).
B5. Once your serial console program is running, power up the Power PMAC and you would see the following text show up. Be ready to break into the boot loader when prompted with Hit any key to stop autoboot
Code:
U-Boot 2008.10 (Jan  5 2009 - 10:45:32)

CPU:   AMCC PowerPC 460EX Rev. A at 1000 MHz (PLB=200, OPB=100, EBC=100 MHz)
       Security/Kasumi support
       Bootstrap Option H - Boot ROM Location I2C (Addr 0x52)
       32 kB I-Cache 32 kB D-Cache
Board: Canyonlands - AMCC PPC460EX Evaluation Board, 1*PCIe/1*SATA, Rev. 13
I2C:   ready
DTT:   1 is 34 C
DRAM:   2 GB (ECC enabled, 400 MHz, CL3)
FLASH: 64 MB
Net:   ppc_4xx_eth0, ppc_4xx_eth1

Type run flash_nfs to mount root filesystem over NFS

Hit any key to stop autoboot:  0

B6. Type in the following command (replace the IP with your PC's IP)
Code:
setenv serverip 10.34.9.4

B7. Type in the following command (replace the IP with your Power PMAC's IP, which should be in the same subnet as your PC. Obviously they should be physically be connected to the same network too.)
Code:
setenv ipaddr 10.34.9.212

B8. This following command will load the powerpmac.dtb to an empty space in RAM.
Code:
tftp 0x40000 powerpmac.dtb
the reply should look like this:
Code:
Waiting for PHY auto negotiation to complete... done
ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)
Using ppc_4xx_eth0 device
TFTP from server 10.34.9.4; our IP address is 10.34.9.212
Filename 'powerpmac.dtb'.
Load address: 0x40000
Loading: ###
done
Bytes transferred = 12657 (3171 hex)

The rest of the steps are shared between both approaches (A) and (B)

Shared steps:

1. type is the following command. (erase the memory where we want to download the device tree)
Code:
erase 0xfc3e0000 0xfc3fffff

2. type in the following command based upon your original method of downloading the powerpmac.dtb file. The 12657 is the size of the file which was reported after the tftp or fatload command.
(A) Using USB:
Code:
cp.b 0x40000 0xfc3e0000 12657

(B) Using tftp server:
Code:
cp.b ${fileaddr} 0xfc3e0000 ${filesize}

3. type in the following commands:
Code:
setenv fdt_addr 0xfc3e0000
save

4. After the save is complete, type in the following command which will reboot the system with new device tree.
Code:
boot

5. let the system boot normally and start a telnet session to the Power PMAC and query the /proc/mtd again using the following command.

Code:
more /proc/mtd

We want to see is the following:
Code:
dev:    size   erasesize  name
mtd0: 003e0000 00020000 "kernel"
mtd1: 00020000 00020000 "dtb"
mtd2: 01500000 00020000 "ramdisk"
mtd3: 00800000 00020000 "jffs2"
mtd4: 01e60000 00020000 "user"
mtd5: 00040000 00020000 "env"
mtd6: 00060000 00020000 "u-boot"

Now you can use the Kernel Download tool from the Delta Tau>Configure menu of the IDE.

The latest released firmware and kernel are at http://ftp.SUPPORT.DELTATAU.COM/DT-USA/P...C%20Suite/
Sina Sattari
Hardware Engineering Manager
Delta Tau Data Systems, Inc.
Reply
#2
There is an error in the batch file of the tftp server...

This is the attached batch file: c:\shared\tftpsrv w dc:\shared

But it should be like this: c:\shared\tftpsrv w dc:\shared\

Otherwise GREAT JOB!!!
Reply
#3
(09-03-2009, 02:25 AM)DT-Europe Wrote: There is an error in the batch file of the tftp server...

This is the attached batch file: c:\shared\tftpsrv w dc:\shared

But it should be like this: c:\shared\tftpsrv w dc:\shared\

Otherwise GREAT JOB!!!

Thanks. The problem is fixed now.
Sina Sattari
Hardware Engineering Manager
Delta Tau Data Systems, Inc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)