Difference between revisions of "Flameman/dht-walnut"

From eLinux.org
Jump to: navigation, search
Line 120: Line 120:
== 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.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
(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 ====
=> printenv
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}
update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;cp.b 100000 fffc0000 40000;setenv filesize;saveenv
preboot=echo "ide.part.1th stores kernel rawimage"
bootcmd=run boot-disk ; bootm
setconsole_uart=setenv myconsole ${myuart},${baudrate}
setconsole_video=setenv myconsole tty video=${myvideofb}
setbootargs=setenv bootargs console=${myconsole} root=${myroot} init=${myinit}
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}
ramrootfs=setenv bootargs console=ttyS0,9600 rdinit=/sbin/init init=/bin/bash
ver=U-Boot 1.2.0-g7882751c-dirty (Apr 14 2007 - 16:44:37)
Environment size: 1405/16379 bytes
=== 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
* 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
| 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 =
= Project: do something useful with the board =

Revision as of 11:42, 23 September 2019

For more interesting projects done by Flameman, be sure to check out his project index



This project is deprecated, RIP. Jtag software is also deprecated, vendor removed the support for amcc44x.

== New projects, 2017-2019, at DTB

See here


The Target-goal of this page is

  • install gentoo-ppc32 into harddisk
  • make the board able to boot from it
  • describe how to build a jtag cable (to debug and recover from "Brickage")
  • describe something useful with you can do with the board
  • describe other Operating System available for the board

logical steps about installing gentoo

  • 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

Please let me know of any success or issues you encounter. carlojpisani@gmail.com

About the board

DHT-Walnut is a shortened name for the Digital Home Technologies PCB 01070201 Rev. 1.1.

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")


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)

Images of the board


see more detailed photo dht-walnut-ppc405-top


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


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)


about issues, and ideas, they are also reported here Flameman/dht-walnut/rootfs#firmware_issues_with

about uboot



storage device: HardDisk, microdrive or Compact Flash, put a rootfs on it



Operating System available for this board


  • 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


Project: do something useful with the board


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.