Jump to content
OMRON Forums

IDE dies after a few hours and the new windows won't go online (Kernel Update)


Sina.Sattari

Recommended Posts

[b]Question:[/b] 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? [b]Answer:[/b] 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[/code] 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. [b][color=#FF0000] The following steps are only for advanced users. Any mistakes through these steps can make your Power PMAC unresponsive.[/color][/b] 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. [b]How do I know if my Power Pmac has enough space for the new Kernel?[/b] if you start a telnet session with the power pmac and type in the following command at the prompt: [code]more /proc/mtd[/code] 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" [/code] or [code]dev: size erasesize name mtd0: 003e0000 00020000 "kernel" [/code] if the value in the size column is reported as [b]003e0000[/b] 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 [b]001e0000[/b] 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. [attachment=1341:name] 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. [b](A) Using a USB cable, through Windows[/b] 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 [b]powerpmac.dtb[/b] 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 [b]Hit any key to stop autoboot[/b] [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 [/code] A8. Enter the following command to detect the usb flash. [code]usb reset[/code] A9. Enter the following command to see the file you copied to the root folder using the Windows. [code]fatls usb 0:1[/code] This should give you a similar reply: [code] etc/ ppmac/ 12657 powerpmac.dtb 2113884 uimage 2 file(s), 2 dir(s) [/code] A10. This following command will load the [b]powerpmac.dtb[/b] to an empty space in RAM. [code]fatload usb 0:1 0x40000 powerpmac.dtb[/code] [b]The rest of the steps are shared between both approaches (A) and (B)[/b] [b](B) Using a tftp server[/b] B1. Copy the [b]powerpmac.dtb[/b] file plus the files included in the following zip file ([attachment=1343:name]) 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 [b]Hit any key to stop autoboot[/b] [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 [/code] B6. Type in the following command (replace the IP with your PC's IP) [code]setenv serverip 10.34.9.4 [/code] 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[/code] B8. This following command will load the [b]powerpmac.dtb[/b] to an empty space in RAM. [code]tftp 0x40000 powerpmac.dtb[/code] 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)[/code] [b]The rest of the steps are shared between both approaches (A) and (B)[/b] [b]Shared steps:[/b] 1. type is the following command. (erase the memory where we want to download the device tree) [code]erase 0xfc3e0000 0xfc3fffff[/code] 2. type in the following command based upon your original method of downloading the [b]powerpmac.dtb[/b] file. The [b]12657[/b] is the size of the file which was reported after the [b]tftp[/b] or [b]fatload[/b] command. (A) Using USB: [code]cp.b 0x40000 0xfc3e0000 12657[/code] (B) Using tftp server: [code]cp.b ${fileaddr} 0xfc3e0000 ${filesize}[/code] 3. type in the following commands: [code]setenv fdt_addr 0xfc3e0000 save[/code] 4. After the save is complete, type in the following command which will reboot the system with new device tree. [code]boot[/code] 5. let the system boot normally and start a telnet session to the Power PMAC and query the [b]/proc/mtd[/b] again using the following command. [code]more /proc/mtd[/code] 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" [/code] 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 ftp://SUPPORT.DELTATAU.COM/DT-USA/Power%20PMAC%20Suite/
Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

[quote='DT-Europe' pid='203' dateline='1251969926'] 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!!! [/quote] Thanks. The problem is fixed now.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...