SysACE on the ML605

Having gotten linux to run on my ML605, I next decided to get the compact flash card working.  The compact flash card itself is actually connected to a SysACE controller, which is then connected to the FPGA.

Adding Interrupts

Adding Interrupts

This wasn’t a hard task overall.  I added the SysACE interrupt to xps_intc_0.  Next I rebuilt the .bit file, the .dts file, and kernel.  I had to ensure there was support for both SysACE and ext2 in the kernel config, as well as partition the compact flash card to have an ext2 partition.

I then used JTAG to load the FPGA bitstream and kernel image.  The interesting thing is that the second partition was not added to /dev automatically.  Looking at the output of dmesg, it showed that both partitions were detected.  It also gave the major device ID of SysACE as 254.  It was simple enough to do:

> mknod /dev/xsa2 b 254 2
> mount -t ext2 /dev/xsa2 /mnt

The device information is also in /sys/block/xsa/.  The file /sys/block/xsa/xsa2/dev contains simply “254:2” which is the required info.

The next step is to update the initramfs to use this node.  The initramfs is somewhat like a compressed tarball, except it uses cpio instead of tar.  Place the initramfs file in an empty, desired directory and run:

> gunzip *.cpio.gz
> cat *.cpio | cpio -i
> rm *.cpio

The next step is to add the devices to /dev:

## Notice this is dev/xsa2, not /dev/xsa2
> mknod dev/xsa2 b 254 2

The initramfs needs to be rebuilt.  This can be done with the following:

> find . | cpio -H newc -o > ../initramfs_minimal.cpio
> gzip ../initramfs_minimal.cpio

The kernel now needs to be rebuilt with the new image, and then reloaded onto the ML605.  If you want, you can also set up the initramfs to do other things, like automatically mount xsa2.

This entry was posted in Embedded. Bookmark the permalink.

Comments are closed.