Hi Darren, > I've succesfully built and booted the osarm-gate in qemu. I want to > play around with ZFS and CZFS on it but I can't work out how to add more > disk images that will be seen by format (and thus ZFS).
NE1 emulator does not implement IDE (SATA) and NIC devices yet, so you cannot use hard disk images in QEMU. However you can try CZFS with regular files instead of block devices. Please note that NE1 platform has limited environment such as hard coded 256MB DRAM and 2MB /tmp. Also CZFS disables some basic ZFS features by default. Here are steps to prepare CZFS demo: 1. Modify ON kernel sources. $SRC/uts/ne1/sys/platform_mach.h: -#define ARMMACH_SDRAM0_SIZE UINT32_C(0x08000000) /* 128MB */ -#define ARMMACH_SDRAM1_PADDR UINT32_C(0x88000000) -#define ARMMACH_SDRAM1_SIZE UINT32_C(0x08000000) /* 128MB */ +#define ARMMACH_SDRAM0_SIZE UINT32_C(0x10000000) /* 256MB */ +#define ARMMACH_SDRAM1_PADDR UINT32_C(0x90000000) +#define ARMMACH_SDRAM1_SIZE UINT32_C(0x10000000) /* 256MB */ $SRC/uts/arm/tune/modtune: option int VFS_TMP_SIZE { - default: 2048; + default: 0; $SRC/uts/ne1/czfs/modtune: option boolean CZFS_NO_UFSFILE { - default: true; + default: false; 2. Rebuild ON. $ cd $SRC/uts; make tune-init $ cd $SRC; make install 3. Modify QEMU source. $SRC/qemu/qemu-0.9.1/hw/naviengine.c: -#define NE1_DDR2_SIZE 0x10000000 /* 256MB */ +#define NE1_DDR2_SIZE 0x20000000 /* 512MB */ 4. Rebuild QEMU. $ cd $SRC/qemu/qemu-0.9.1; gmake 5. Add mkfile command to ramdisk image. $SRC/qemu/rdimage/filelist/core_usr: l none usr/sbin/allocate usr/sbin/list_devices +f none usr/sbin/mkfile 555 root bin s none ./clri usr/sbin/mkfs 6. Rebuild ramdisk image. $ cd $SRC/qemu/rdimage; pfexec make 7. Modify ne1.sh script. $SRC/qemu/ne1/ne1.sh: -MEMSIZE=320 # DRAM:256MB + NORFLASH:64MB +MEMSIZE=576 # DRAM:512MB + NORFLASH:64MB 8. Copy ramdisk image to ne1 directory and run ne1.sh. $ cd $SRC/qemu/ne1; make $ ./ne1.sh Here is sample output of CZFS: # df -h /tmp Filesystem size used avail capacity Mounted on swap 377M 4K 377M 1% /tmp # mkfile 100m /tmp/file1 /tmp/file2 # czpool create mypool /tmp/file1 /tmp/file2 # czpool status mypool pool: mypool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM mypool ONLINE 0 0 0 /tmp/file1 ONLINE 0 0 0 /tmp/file2 ONLINE 0 0 0 errors: No known data errors # df -h /tmp /mypool Filesystem size used avail capacity Mounted on swap 363M 200M 163M 56% /tmp mypool 160M 9K 160M 1% /mypool Thanks, -sasa