Ok I am done. Both EXT4 and ZFS works.
If people just want the binaries, they can be located here:
http://lundman.net/ftp/cubox/u-boot-cubox_hynix_cubox_zfs_ext4_spi.binhttp://lundman.net/ftp/cubox/u-boot-cubox_hynix_cubox_zfs_ext4_uart.binTo try it out, download u-boot-cubox_hynix_cubox_zfs_ext4_spi.bin and put it on a USB stick, mine is ext2, but you can change to FAT if you want.
Reboot cubox and stop uboot from auto-booting, then enter:
Code:
usb start
sf protect off
sf erase 0 0x00080000
if ext2load usb 0:1 0x00200000 u-boot-cubox_hynix_cubox_zfs_ext4_spi.bin; then sf write 0x00200000 0 0x00080000; fi
resetenv
setenv mmc_started 0
setenv usb_started 0
setenv ide_started 0
setenv ipaddr 192.168.15.223
setenv serverip 192.168.15.100
saveenv
sf protect on
Change "usb start" and "usb" after ext2load, to "mmcinfo" and "mmc" if you use MMC instead of USB.
Change "ext2load" to "fatload" if you use FAT32 instead.
Rabeeh: Is it smart to have the "sf erase" outside of the "if ext2load" ? If it can't find the file, it has already erased the flash, no?
I am currently working on checking everything into github, should people prefer to build it themselves.
Code:
CuBox>> zfsls usb 0:2 /ROOT/@/
zfs reading label 0 at sector 0 (byte 0)
ZFS Pool GUID: 8349310002080761692 (73deb535d9a3c75c) Label: GUID: 1229383784885
2426185 (aa9c7c635319edc9), txg: 1348, SPA v28, ashift: 9
zfs endian set to little
ZPOOL label 'rpool'
zfs fsname = '/ROOT/' snapname='<NULL>' filename = '/'
<DIR> lib
<DIR> sbin
<DIR> var
<DIR> bin
<DIR> dev
<DIR> selinux
<DIR> usr
<DIR> root
<DIR> home
<DIR> srv
<DIR> ttt
<DIR> proc
<DIR> tmp
<DIR> mnt
<DIR> etc
<DIR> media
<DIR> boot
<DIR> opt
<DIR> sys
<DIR> .old-root
<DIR> src
rootfile.txt
<DIR> rpool
CuBox>> zfsload usb 0:2 0x00200000 /ROOT/@/boot/uImage
Loading file "/ROOT/@/boot/uImage" from usb device 0:2 usbda2
zfs reading label 0 at sector 0 (byte 0)
...........
ZFS Pool GUID: 8349310002080761692 (73deb535d9a3c75c) Label: GUID: 12293837848852426185 (aa9c7c635319edc9), txg: 1348, SPA v28, ashift: 9
zfs endian set to little
zfs fsname = '/ROOT/' snapname='<NULL>' filename = '/boot/uImage'
3623192 bytes read
CuBox>> bootm
## Booting kernel from Legacy Image at 00200000 ...
Image Name: Linux-2.6.32.9-dove-5.4.2
Created: 2012-01-07 10:23:53 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3623128 Bytes = 3.5 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
[ 0.000000] Linux version 2.6.32.9-dove-5.4.2 (rabeeh@kossay-desktop) (gcc version 4.3.2 (sdk3.2rc1-ct-ng-1.4.1) ) #46 PREEMPT Sat Jan 7 12:23:38 IST 2012