Difference between revisions of "Flameman/dht-walnut"

From eLinux.org
Jump to: navigation, search
(about the memory & the MMU)
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
For more interesting projects done by Flameman, be sure to check out his [[Flameman#master_index|project index]]
+
Attached is the photo of what we got from a Paypal private deal with a dude who names himself "'''Stelios-k'''" on eBay. You can judge by yourself.
  
= DHT-Walnut-Flameman =
+
[[File:Parcel-walnuts.jpg]]
  
== Note ==
+
Stelios-k asked 30 euro as postage.
 +
To skimps out on properly packing was not a good idea, ain't it?
 +
Let's check it out!
  
This project is deprecated, RIP. Jtag software is also deprecated, vendor removed the support for amcc44x.
+
* board#0  board#1
 +
* board#2  board#3
 +
Status of each board in the picture
  
== New projects, 2017-2019, at DTB
+
'''board#0'''
 +
* defect: broken DIMM connector with two pins bent, scratches on the PCB
 +
* status: faulty
 +
* repairable: dunno, probably no
  
See [http://www.downthebunker.com here]
+
'''board#1'''
 +
* defect: no defects
 +
* status: working
  
== Introduction ==
+
'''board#2'''
 +
* defect: scratches on the PCB, RJ45 crushed
 +
* status: faulty
 +
* repairable: yes -> it's back to working condition
  
The Target-goal of this page is
+
'''board#3'''
* install gentoo-ppc32 into harddisk
+
* defect: broken DIMM connector with one pin bent, scratches on the PCB
* make the board able to boot from it
+
* status: faulty
* describe how to build a jtag cable (to debug and recover from "Brickage")
+
* repairable: dunno, probably no
* describe  something useful with you can do with the board
 
* describe other Operating System available for the board
 
  
 +
We spent a lot of time to repair the board#2. After unboxing it looked apparently fine, but the networking was not properly working, it randomly manifested weird and unexplained disconnections. Inspecting the PCB we found the plastic of the RJ45 connector and the PHY are both cracked so the cable didn't make good and reliable contact and they PHY always fails its 100Mbps autonegotiation.
  
logical steps about installing gentoo
+
After some struggling, now this board is back in working condition! All test passed!
* add the JTAG connector at J10 (you could skip it, it is suggested)
 
* build the JTAG cable (you could skip it, it is suggested))
 
* replace the bootloader with ppcboot 1.1.6/U-boot 1.1.4
 
* make partitions on the Hard Disk
 
* populate them
 
* set the bootloader environment to boot from the Hard Disk
 
  
=== People you could contact if you need help ===
+
'''We are a group of five students working on a funny project. We are still need to find more boards so each person in our small group can develop alone. we currently have three working boards, so we are looking for two/three other boards.
  
Please let me know of any success or issues you encounter. carlojpisani@gmail.com
+
if you have one for sale and don't need it, please contact us!'''
  
=== About the board ===
+
email: downthebunker dot team at gmail dot com
  
DHT-Walnut is a shortened name for the Digital Home Technologies PCB 01070201 Rev. 1.1.
+
You will receive our eternal gratitude! Thank you!
 
 
The DHT-Walnut board is based on the AMCC-Walnut (still available, and still expensive :P). It is a more improved board described at www.amcc.com.
 
 
 
A "walnut" searching will inform about schematic and software.
 
 
 
Also keep  attention @ DENX: they  have developed a lot for the AMCC-Walnut board, and you could find a linux patch for your problem, prettier documentation, developer suit, and much more: in case, you are suggested to have a look to their web pages.
 
 
 
 
 
you could find it on ebay, search for "walnut", or "powerpc"
 
 
 
 
 
MIND UP  the differences between "DHT WALNUT" and "AMCC WALNUT" (ALSO CALLED "IBM WALNUT")
 
 
 
 
 
=== Overview ===
 
 
 
The board consists of:
 
 
 
* '''CPU''' PowerPC 405GP running at 266mhz
 
* '''RAM''' PC133 SDRAM slot, currently, only supports single sidded DIMMs
 
* '''LAN''' On-chip 405GP ethernet, board doesn't have an ethernet MAC address (the monitor/bootloader is able to fix it)
 
* '''UART''' DCE serial port, speeds up to 230k, only tested to 115200bps
 
* '''PCI''' two pci slots, keyed for 5V only cards
 
* '''IDE''' Promise Technologies PDC20265 IDE
 
* '''ROM''' 512k of boot flash, AMD 29LV040B (amd29lv040b.pdf), soldered on the PCB, if you like to use a socket you have to consider the bootloader will check for the flash manufactor ID, so or you replace the 29LV040B with an other socked-29LV040B, or you have to modify the bootloader
 
* '''POWER''' the board need to be 12v dc powered 2A max, it is able to feed the hard disk
 
* '''System PCB '''6.00" x 7.5" board size
 
* '''RTC''' the real time clock chip is missing
 
* '''RAM''' 32M PC133 SDRAM DIMM, the board has issues with more than 128M: if you inspect the pcb, you will see that the DIMM connector has same pin missing, this is the reason why you can't use DIMM bigger than 128M
 
* '''PCI IEEE-1394 card''' supported by OHCI driver
 
* '''PCI additional ethernet board''' needed cause the on board ethernet is implemented by the IBM-ppc-405GP, for example netbsd is not able to drive it, so in case you need an additional board, the one provided with DHT is good enough
 
* '''FIRMWARE''' PPCBoot v.1.1.2 in flash (it has issues with environment, it need to be replaced with a gooder one)
 
 
 
=== Problems ===
 
 
 
* uboot (tested on 1.1.4) has issues in PCI/DMA initialization. More will be post in the future
 
<pre>
 
hi,
 
i found a problem using a pci sound card in the DHT-WALNUT.
 
It has been correctly recognized by the kernel, the DMA feature (ppc405-dma) is setted, but the card is not working.
 
 
 
somebody says it is a bug, somebody says ppcboot solves the problem inizializing the pci in the correct way. I don't know, i'm using the uboot v1.1.4 and it is not working
 
 
 
also have a look to this
 
 
 
<> but i already thought so when i saw the "pci long" output
 
<> no BAR was assigned with an address
 
<> this was different some time ago
 
<> could be something changed in the last few months in the common pci support
 
<> i'll check with an ex-kollegue and let you know
 
<> this will take till beginning of next week though
 
<> hey, i just checked the source (sometimes helpful)
 
<> you just need to enable the host bridge configuration via an env variable
 
<> => setenv pciconfighost yes
 
<> then
 
<> => saveenv
 
<> => reset
 
<> after this reset the BAR1 will be configured:
 
<> => pci long
 
<> Scanning PCI devices on bus 0
 
<> Found PCI device 00.00.00:
 
<>  vendor ID =                  0x1014
 
<>  device ID =                  0x0156
 
<>  command register =            0x0006
 
<>  status register =            0x2210
 
<>  revision ID =                0x01
 
<>  class code =                  0x0b (Processor)
 
<>  sub class code =              0x20
 
<>  programming interface =      0x00
 
<>  cache line =                  0x00
 
<>  latency time =                0x87
 
<>  header type =                0x00
 
<>  BIST =                        0x00
 
<>  base address 0 =              0x00000000
 
<>  base address 1 =              0x80000008
 
 
 
could you help me to understand how to plug a soundcard ?
 
:)
 
</pre>
 
 
 
=== Images of the board ===
 
 
 
[[Image:dht-walnut-ppc405-board.jpg]]
 
 
 
see more detailed photo  [[dht-walnut-ppc405-top]]
 
 
 
= JTAG =
 
 
 
The BEST solution is to equip your lab with the bdi2000. This hardware is expensive a lot, 'cause it is not a simple download cable, it's a professional debugger
 
 
 
For this dht-walnut project it has been used "OCD Commander is macraigor's free debugger software", that i'm going to illustrate
 
 
 
[[Flameman/dht-walnut/jtag]]
 
 
 
= Firnware and Bootloaders =
 
 
 
* ppcboot (not suggested)
 
* U-Boot (it can't load kernel >=2.5.25)
 
* U-Boot-kanojio (under development, it will be able to boot kernel >2.6.25, see below)
 
 
 
[[Flameman/dht-walnut/firmware]]
 
 
 
about issues, and ideas, they are also reported here [[Flameman/dht-walnut/rootfs#firmware_issues_with]]
 
 
 
 
 
== about uboot ==
 
 
 
[[Flameman/uboot]]
 
 
 
= rootfs =
 
 
 
storage device: HardDisk, microdrive or Compact Flash, put a rootfs on it
 
 
 
[[Flameman/dht-walnut/rootfs]]
 
 
 
= OS =
 
Operating System available for this board
 
 
 
== NetBSD ==
 
* [http://www.netbsd.org/Ports/evbppc/ Netbsd] has a port for "IBM PowerPC 405GP based Walnut evaluation board", this is not the DHT-Walnut, this is an other way to call the AMCC-Walnut (yes just to be confusing). Ok, it is not for DHT-Walnut, but this port could be (easealy / hardly) adapted to the DHT-Walnut with some work / over work
 
 
 
=== Hardware that is known to work with ===
 
* see netbsd web, the hw could be (easealy / hardly) adapted to the DHT-Walnut with some work / over work
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.
 
 
 
== Gentoo-PPC/32 ==
 
 
 
* Version 2.4 (Mostly) working kernel binary and config from jbevren with matrox fbcon and usb input support. Current issues: USB keyboard input doesnt seem to work, but events reach /dev/input/event0
 
* Version 2.6 working ... tested vanilla kernel 2.6.16.3, 2.6.24 (actually running)
 
 
 
=== boot from HD ===
 
 
 
'''Work In Progress'''
 
 
 
ppcboot/U-Boot provides only basic functionality to access Hard disks: you can print the partition table and read and write blocks (addressed by absolute block number), but there is no support to create new partitions or to read files from any type of filesystem. The current version of ppcboot-1.1.6 has a problem with writing to hdd, however, once the Linux kernel is loaded and the userland initialized, the hdd can be accesses normally through PIO and DMA modes. This may or may-not be fixed in the future.
 
 
 
As usual, you can get some information about the available IDE commands using the help command in ppcboot:
 
 
 
 
 
<pre>  => help ide     
 
ide reset - reset IDE controller
 
ide info  - show available IDE devices
 
ide device [dev] - show or set current device
 
ide part [dev] - print partition table of one or all IDE devices
 
ide read  addr blk# cnt
 
ide write addr blk# cnt - read/write `cnt' blocks starting at block `blk#'
 
    to/from memory address `addr' </pre>
 
 
 
 
 
You may create the needed partitions by tftpbooting Linux and an appropriate userland, then use fdisk to partition the disk. Then reboot back to ppcboot.
 
 
 
ppcboot can be configured for DOS and Mac OS? type partition tables. Since ppcboot cannot read files from a filesystem you should create one (or more) small partitions (maybe 1 or 2 MB) if you want to boot from the "disk". (The size of these partitions will depend on how large your kernel and userland images are)
 
 
 
You should create the following partiton table:
 
 
 
<pre> # fdisk /dev/hdx
 
hde: hdx1 hdx2 hdx3 hdx4
 
 
 
/dev/hde1  ID=83  Linux <---- 2Mb, boot kernel, dd if=kernel of=here
 
/dev/hde2  ID=83  Linux
 
/dev/hde3  ID=83  Linux <----  root & usr
 
/dev/hde4  ID=82  Swap  <---- 32Mb, swap
 
 
 
You should also initialized /dev/hdx4 as swap space.
 
# mkswap /dev/hdx4
 
Setting up swapspace
 
 
 
check how ppcboot/U-Boot will recognize this partition table:
 
<pre> => ide part
 
 
 
* dd if=kernel.img of=/dev/hdx1
 
 
 
To boot from a disk you can use the diskboot command:
 
 
 
<pre> => help diskboot
 
diskboot loadAddr dev:part </pre>
 
 
 
The diskboot command expects a load address in RAM, and a combination of device and partition numbers, separated by a colon. It then reads the image from disk and stores it in memory. We can now boot it using the bootm command [to automatically boot the image define the ppcboot environment autostart with the value =yes=].
 
 
 
<pre> => diskboot 400000 0:1
 
ide_read dev 0 start 0, blocks 1 buffer at 3F9F8C0
 
## Valid DOS partition found ##
 
 
 
Loading from IDE device 0, partition 1: Name: hda1
 
  Type: PPCBoot
 
First Block: 63,  # of blocks: 8001, Block Size: 512
 
ide_read dev 0 start 3F, blocks 1 buffer at 400000
 
  Image Name:  DHT Kernel
 
  ..
 
 
 
=> bootm 400000 c00000
 
## Booting image at 00400000 ...
 
  Image Name:  DHT Walnut Kernel
 
  Image Type:  PowerPC Linux Kernel Image (gzip compressed)
 
  ... </pre>
 
 
 
 
 
<pre>=> setenv bootargs root=/dev/ram0
 
=> setenv autostart yes
 
=> disk 400000 0:1 \;\ diskboot c00000 0:2 \;\ bootm 400000 c00000
 
=> bootd
 
</pre>
 
(i will post all my setenv)
 
 
 
 
 
The above procedure puts the userland image from the second partition into a ramdisk. If you would like the userland to be an ext2/3/rieser/xfs partition on the hdd do the following:
 
 
 
* make the partiton table as above
 
* put the kernel and small userland onto the first partitions as above
 
* populate the root&usr partition with the appropriate files (gentoo-ppc32 distro)
 
* change bootargs to "bootargs root=/def/hda3"
 
* bootd to try out the new root, if it works ok, reboot back to ppcboot, change the bootargs again and saveenv
 
* bootd and enjoy your new system.
 
 
 
 
 
 
 
 
 
 
 
==== env ====
 
 
 
<pre>
 
=> printenv
 
bootdelay=5
 
loads_echo=1
 
netdev=eth0
 
ramargs=setenv bootargs root=/dev/ram rw
 
addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
 
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
 
kernel_addr=fff80000
 
ramdisk_addr=fff80000
 
update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;cp.b 100000 fffc0000 40000;setenv filesize;saveenv
 
ethact=ppc_4xx_eth0
 
hostname=walnut-ppc405
 
ethaddr=DE:AD:BE:EF:DE:AD
 
preboot=echo "ide.part.1th stores kernel rawimage"
 
myroot=/dev/hda4
 
myinit=/sbin/init
 
fileaddr=800000
 
netmask=255.255.255.0
 
bootcmd=run boot-disk ; bootm
 
myboot_diskpart=0:1
 
myboot_kernel_addr=800000
 
baudrate=9600
 
myuart=ttyS0
 
setconsole_uart=setenv myconsole ${myuart},${baudrate}
 
setconsole_video=setenv myconsole tty video=${myvideofb}
 
myvideofb=matroxfb:800x600-16@60
 
setbootargs=setenv bootargs console=${myconsole} root=${myroot} init=${myinit}
 
myconsole=ttyS0,9600
 
bootargs=console=ttyS0,9600 root=/dev/hda4 init=/sbin/init
 
boot-tftp=tftpboot ${myboot_kernel_addr} ${myboot_file}
 
boot-disk=diskboot ${myboot_kernel_addr} ${myboot_diskpart}
 
ipaddr=192.168.1.5
 
serverip=192.168.1.14
 
gatewayip=192.168.1.1
 
myboot_file=gentoo-walnut-ramrootfs.img
 
ramrootfs=setenv bootargs console=ttyS0,9600 rdinit=/sbin/init init=/bin/bash
 
stdin=serial
 
stdout=serial
 
stderr=serial
 
ver=U-Boot 1.2.0-g7882751c-dirty (Apr 14 2007 - 16:44:37)
 
 
 
Environment size: 1405/16379 bytes
 
</pre>
 
 
 
=== Hardware that is known to work with ===
 
There is a list of the Hardware that is known to work (and not to work) with this board. Feel free to add, comment, feedback about it.
 
 
 
 
 
 
 
 
 
 
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
 
! device
 
! class
 
! devname
 
! tested on
 
! note
 
|-
 
| matrox millennium I/II
 
| framebuffer
 
| matroxfb
 
| 2.6.16, 2.6.19, 2.6.22
 
| pretty working
 
|-
 
| 3com-netcard
 
| net-wiredlan
 
|
 
|
 
|
 
|-
 
| adaptec 2940
 
| diskctrl/scsi
 
|
 
| 2.6.16, 2.6.19, 2.6.22
 
| pretty working, a bit issue with DMA
 
|}
 
 
 
=== Compile from sources ===
 
 
 
kernel 2.6 has issues in the source's tree: the dht-Walnut has been originally ported to arch=ppc, while the new kernel tree is around arch=powerpcc, for this reason you need to specify the right arch or your compiler will have issues. Developers will port everything to arch=powerppc in the future
 
 
 
 
 
01-2010:
 
* kernel >2.6.25 can't compile with ARCH=PPC, they need ARCH=POWERPC, they compile fine but they do not boot in uImage format cause of uBoot needs new style
 
* kernel <=2.6.25 can be compiled with ARCH=PPC and they boot fine with my uboot-1.2-hack
 
 
 
=== kernel ===
 
 
 
==== report ====
 
 
 
{| border="1" cellspacing="0" cellpadding="5" align="center"
 
! version
 
! host
 
! target
 
! toolchain
 
! note
 
! boot format
 
|-
 
| 2.6.15.4
 
| compiled on ppc-7410, minerva
 
| arch=ppc, target=ppc 603/4 core
 
| gcc-4.1.2-glibc binutils-2.17
 
| ramrootfs (uclibc) works great! no issues, no NPTL kernel
 
| uImage old style
 
|-
 
| 2.6.19
 
| compiled on ppc-7410, minerva
 
| arch=ppc, target=ppc 603/4 core
 
| gcc-4.1.2-glibc binutils-2.17
 
| ramrootfs (uclibc) works great! no issues
 
| uImage old style
 
|-
 
| 2.6.22
 
| compiled on ppc-7410, minerva
 
| arch=ppc, target=ppc 603/4 core
 
| gcc-4.1.2-glibc binutils-2.17
 
| ramrootfs (uclibc) works great! no issues
 
| uImage old style
 
|-
 
| 2.6.26
 
| compiled on ppc-7410, minerva
 
| arch=ppc/powerpc, target=ppc 603/4 core
 
| gcc-4.1.2-glibc binutils-2.17
 
| it does not compile!
 
| uImage new style ???
 
|-
 
| 2.6.30
 
| compiled on ppc-7410, minerva
 
| arch=powerpc, target=ppc 603/4 core
 
| gcc-4.1.2-glibc binutils-2.17
 
| it does not compile!
 
| uImage new style ???
 
|-
 
| 2.6.32
 
| compiled on ppc-7410, minerva
 
| arch=powerpc, target=ppc 603/4 core
 
| gcc-4.1.2-glibc binutils-2.17
 
| it compiles
 
| uImage new style = treeImage.walnut
 
|}
 
 
 
 
 
29-01-2010: i am using 2.6.22 for production
 
* 2.6.25 ARCH=ppc -- boots
 
* 2.6.25 ARCH=powerpc -- hangs before any output
 
 
 
* 28..31 have ARCH issues (probably case it was not properly ported from PPC to POWERPC)
 
* 32..33 unchecked, but they should have device name inversion bug + LZMA bug
 
 
 
==== download ====
 
 
 
2007: kernel 2.6.19 full tested and working (suggested for production, there are issue with this wiki upload page, so if you need this kernel, you could email me, i will send by emaul)
 
 
 
compiled with gcc-3.4.6, basically it is a vanilla, with a bit of my patches i added in order to avoid myself from the differences between a common "ppc" platform and .. the 405GP/walnut.
 
 
 
 
 
14-06-2009: new kernel 2.6.30 needs to be hardly tested (with gcc-4.3.*) and (maybe) patched
 
anyway, advantages about
 
 
 
* the new supported pci/usb hw
 
* the new dynamic tickless
 
* the ext4
 
* the new networking stack and congestion mechanisms
 
 
 
30-10-2010: new kernel (>=2.6.25 need new bootloader)
 
 
 
= Project: do something useful with the board =
 
 
 
== development ==
 
 
 
thinking new things ... but it should be compatible with "free time constraints" =P
 
 
 
See also [[Flameman/dht-walnut/develop]]
 
 
 
 
 
 
 
== if you need pci-riser ==
 
 
 
PCI Riser Card 5V 32-bit 2 Slot passive Edge connector X1 of the riser card is inserted in a free 5 V 32-bit slot on the PC motherboard. Slot X2 is then connected and ready for use. The second PCI slot X3 receives its special signals for bus arbitration and interrupt control via the cable from card X4, which is inserted in any other slot on the PCI motherboards. The assembly does not contain any active components. This means that the board is suitable for operation with V(I/O) = 5 V as well as V(I/O) = 3.3 V. The coding of connectors X2 and X3 with this variant is for V(I/O) = 5 V.
 
 
 
== Misc ==
 
 
 
* See also [[Flameman/dht-walnut/proof]]
 
 
 
[[Category:DHT-Walnut]]
 
[[Category:PowerPC]]
 

Revision as of 02:49, 17 May 2021

Attached is the photo of what we got from a Paypal private deal with a dude who names himself "Stelios-k" on eBay. You can judge by yourself.

Parcel-walnuts.jpg

Stelios-k asked 30 euro as postage. To skimps out on properly packing was not a good idea, ain't it? Let's check it out!

  • board#0 board#1
  • board#2 board#3

Status of each board in the picture

board#0

  • defect: broken DIMM connector with two pins bent, scratches on the PCB
  • status: faulty
  • repairable: dunno, probably no

board#1

  • defect: no defects
  • status: working

board#2

  • defect: scratches on the PCB, RJ45 crushed
  • status: faulty
  • repairable: yes -> it's back to working condition

board#3

  • defect: broken DIMM connector with one pin bent, scratches on the PCB
  • status: faulty
  • repairable: dunno, probably no

We spent a lot of time to repair the board#2. After unboxing it looked apparently fine, but the networking was not properly working, it randomly manifested weird and unexplained disconnections. Inspecting the PCB we found the plastic of the RJ45 connector and the PHY are both cracked so the cable didn't make good and reliable contact and they PHY always fails its 100Mbps autonegotiation.

After some struggling, now this board is back in working condition! All test passed!

We are a group of five students working on a funny project. We are still need to find more boards so each person in our small group can develop alone. we currently have three working boards, so we are looking for two/three other boards.

if you have one for sale and don't need it, please contact us!

email: downthebunker dot team at gmail dot com

You will receive our eternal gratitude! Thank you!