[U-Boot] [PATCH v3 0/1] zfs: Add ZFS filesystem support

2012-05-23 Thread Jorgen Lundman
Patch to add ZFS filesystem support to u-boot, based on GRUB sources.
Thank you for your patience.

Jorgen Lundman (1):
  Add ZFS filesystem support

 Makefile |2 +-
 common/Makefile  |1 +
 common/cmd_zfs.c |  236 +
 fs/Makefile  |3 +-
 fs/{ => zfs}/Makefile|   39 +-
 fs/zfs/dev.c |  137 +++
 fs/zfs/zfs.c | 2396 ++
 fs/zfs/zfs_fletcher.c|   84 ++
 fs/zfs/zfs_lzjb.c|   94 ++
 fs/zfs/zfs_sha256.c  |  145 +++
 include/config_cmd_all.h |1 +
 include/zfs/dmu.h|  119 +++
 include/zfs/dmu_objset.h |   43 +
 include/zfs/dnode.h  |   80 ++
 include/zfs/dsl_dataset.h|   52 +
 include/zfs/dsl_dir.h|   48 +
 include/zfs/sa_impl.h|   34 +
 include/zfs/spa.h|  311 ++
 include/zfs/uberblock_impl.h |   57 +
 include/zfs/vdev_impl.h  |   69 ++
 include/zfs/zap_impl.h   |  112 ++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +++
 include/zfs/zfs_acl.h|   55 +
 include/zfs/zfs_znode.h  |   70 ++
 include/zfs/zil.h|   56 +
 include/zfs/zio.h|   92 ++
 include/zfs/zio_checksum.h   |   49 +
 include/zfs_common.h |   94 ++
 29 files changed, 4687 insertions(+), 17 deletions(-)
 create mode 100644 common/cmd_zfs.c
 copy fs/{ => zfs}/Makefile (56%)
 create mode 100644 fs/zfs/dev.c
 create mode 100644 fs/zfs/zfs.c
 create mode 100644 fs/zfs/zfs_fletcher.c
 create mode 100644 fs/zfs/zfs_lzjb.c
 create mode 100644 fs/zfs/zfs_sha256.c
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h
 create mode 100644 include/zfs_common.h

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/1] Add ZFS filesystem support

2012-05-24 Thread Jorgen Lundman

..

A README entry in the doc folder would be very much helpful for
the users to use ZFS..



Oh hey, there is a whole bunch of READMEs in there. Good idea, I'll add to v4 
tomorrow.


Lund

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 0/1] zfs: Add ZFS filesystem support

2012-05-24 Thread Jorgen Lundman
Patch to add ZFS filesystem support to u-boot, based on GRUB sources.
Thank you for your patience.

Jorgen Lundman (1):
  zfs: Add ZFS filesystem support

 Makefile |2 +-
 common/Makefile  |1 +
 common/cmd_zfs.c |  236 +
 doc/README.zfs   |   30 +
 fs/Makefile  |3 +-
 fs/{ => zfs}/Makefile|   39 +-
 fs/zfs/dev.c |  137 +++
 fs/zfs/zfs.c | 2396 ++
 fs/zfs/zfs_fletcher.c|   84 ++
 fs/zfs/zfs_lzjb.c|   94 ++
 fs/zfs/zfs_sha256.c  |  145 +++
 include/config_cmd_all.h |1 +
 include/zfs/dmu.h|  119 +++
 include/zfs/dmu_objset.h |   43 +
 include/zfs/dnode.h  |   80 ++
 include/zfs/dsl_dataset.h|   52 +
 include/zfs/dsl_dir.h|   48 +
 include/zfs/sa_impl.h|   34 +
 include/zfs/spa.h|  311 ++
 include/zfs/uberblock_impl.h |   57 +
 include/zfs/vdev_impl.h  |   69 ++
 include/zfs/zap_impl.h   |  112 ++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +++
 include/zfs/zfs_acl.h|   55 +
 include/zfs/zfs_znode.h  |   70 ++
 include/zfs/zil.h|   56 +
 include/zfs/zio.h|   92 ++
 include/zfs/zio_checksum.h   |   49 +
 include/zfs_common.h |   94 ++
 30 files changed, 4717 insertions(+), 17 deletions(-)
 create mode 100644 common/cmd_zfs.c
 create mode 100644 doc/README.zfs
 copy fs/{ => zfs}/Makefile (56%)
 create mode 100644 fs/zfs/dev.c
 create mode 100644 fs/zfs/zfs.c
 create mode 100644 fs/zfs/zfs_fletcher.c
 create mode 100644 fs/zfs/zfs_lzjb.c
 create mode 100644 fs/zfs/zfs_sha256.c
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h
 create mode 100644 include/zfs_common.h

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/8] EXT2 cleanup

2012-06-08 Thread Jorgen Lundman



Marek Vasut wrote:

Now I'm angry ...

So, I cleaned up the ext2 filesystem code a bit. I tried to separate the changes
to increase the reviewability.



If you are angry, that makes me not want to comment, especially since I 
don't belong here.


But one question that springs to mind is, the EXT4 patches by Samsung, that 
I (maybe others) are waiting for, includes the EXT2->EXT4 code merge, as 
requested by this list. This suggests that either your EXT2 changes are to 
be ignored, or that of EXT4.




--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/1] zfs: Add ZFS filesystem support

2012-07-04 Thread Jorgen Lundman


Do I have to do anything special at this point, or can I assume everything 
is going according to plan?


Lund

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/1] zfs: Add ZFS filesystem support

2012-07-18 Thread Jorgen Lundman


... but it looks like you still have some GPL-3 gremlins lurking.  this must
be sorted out before we can consider the code for merging.  i suspect simply
changing "version 3" to "version 2" isn't the right answer, otherwise i wonder
where you copied this code from such that i has "version 3" in the first place.
-mike


The code submitted by Sun to GRUB is version 2, and you can see that in the 
first GRUB version with ZFS (0.97 - I posted the url earlier).


However, GRUB opted to go higher ("or at your option any later version") 
sometime before the GRUB 2 release. I took the latest version available or 
the sources at the time of porting.


However, there is only one functional source change between the versions, 
and that is adding ashift support, which was supplied as a patch.


That "ZFS" and "license" produces a knee-jerk reaction is a little tedious. 
It is not the problem everyone thinks, and I invite you to run ZFS on Linux 
native. http://zfsonlinux.org/


Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/1] zfs: Add ZFS filesystem support

2012-07-18 Thread Jorgen Lundman



Mike Frysinger wrote:

i could care less about ZFS.  i think you missed the entire point i
highlighted: we cannot accept GPLv3 code.  u-boot is currently GPLv2, so
adding GPLv3 simply won't work.
-mike


Very well, to attempt to go around this I would then have to use the 
original file, and port it forward to u-boot;



Original Sun Version;
: solaris11/usr/src/grub/grub-0.97/stage2/zfs_fletcher.c

 *  the Free Software Foundation; either version 2 of the License, or

fletcher_2_native(const void *buf, uint64_t size, zio_cksum_t *zcp)
fletcher_2_byteswap(const void *buf, uint64_t size, zio_cksum_t *zcp)



Current u-boot patch version;

 *  the Free Software Foundation; either version 3 of the License, or

fletcher_2(const void *buf, uint64_t size, grub_zfs_endian_t 
endian,zio_cksum_t *zcp)
fletcher_4(const void *buf, uint64_t size, grub_zfs_endian_t endian, 
zio_cksum_t *zcp)



Which _effectively_ changes the "3" to "2", and renames two functions. The 
file only contains 2 functions, and refers to the "checksumming algorithm 
the user can chose to use on a filesystem".



Then, it is acceptable?


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/1] zfs: Add ZFS filesystem support

2012-07-18 Thread Jorgen Lundman



Mike Frysinger wrote:


i just picked out the first "version 3" i saw in your patch.  going back to it
and searching again shows more than just one file.
-mike



You are correct, 3 files to be precise:

zfs_fletcher.c zfs_lzjb.c zfs_sha256.c

but the other two are functionally not changed.

Syntactically, they have gone through a "unsigned char *" to "grub_uint8_t 
*" to "uint8_t *".


Not entirely sure how I would "re-write" my "uint8_t *" change to be more 
clearly from "unsigned char *", as opposed to "grub_uint_8 *", to show it 
is based on the version 2 of the license.





--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v5 0/1] zfs: Add ZFS filesystem support

2012-07-19 Thread Jorgen Lundman
Took a few hours to go back and start from GPL2 versions, but in the end
we got rid of the grub_ defines as a bonus.

Patch to add ZFS filesystem support to u-boot, based on GRUB sources.
Thank you for your patience.

Jorgen Lundman (1):
  Add ZFS support

 Makefile |2 +-
 common/Makefile  |1 +
 common/cmd_zfs.c |  236 +
 doc/README.zfs   |   30 +
 fs/Makefile  |1 +
 fs/{ => zfs}/Makefile|   39 +-
 fs/zfs/dev.c |  137 +++
 fs/zfs/zfs.c | 2396 ++
 fs/zfs/zfs_fletcher.c|   88 ++
 fs/zfs/zfs_lzjb.c|   97 ++
 fs/zfs/zfs_sha256.c  |  148 +++
 include/config_cmd_all.h |1 +
 include/zfs/dmu.h|  120 +++
 include/zfs/dmu_objset.h |   43 +
 include/zfs/dnode.h  |   81 ++
 include/zfs/dsl_dataset.h|   53 +
 include/zfs/dsl_dir.h|   49 +
 include/zfs/sa_impl.h|   35 +
 include/zfs/spa.h|  292 +
 include/zfs/uberblock_impl.h |   57 +
 include/zfs/vdev_impl.h  |   70 ++
 include/zfs/zap_impl.h   |  111 ++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +++
 include/zfs/zfs_acl.h|   55 +
 include/zfs/zfs_znode.h  |   71 ++
 include/zfs/zil.h|   57 +
 include/zfs/zio.h|   92 ++
 include/zfs/zio_checksum.h   |   50 +
 include/zfs_common.h |  109 ++
 30 files changed, 4730 insertions(+), 16 deletions(-)
 create mode 100644 common/cmd_zfs.c
 create mode 100644 doc/README.zfs
 copy fs/{ => zfs}/Makefile (56%)
 create mode 100644 fs/zfs/dev.c
 create mode 100644 fs/zfs/zfs.c
 create mode 100644 fs/zfs/zfs_fletcher.c
 create mode 100644 fs/zfs/zfs_lzjb.c
 create mode 100644 fs/zfs/zfs_sha256.c
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h
 create mode 100644 include/zfs_common.h

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] uboot and ZFS

2012-05-01 Thread Jorgen Lundman


Sorry if I am posting some kind of FAQ here,

I recently picked up a Cubox (arm) which uses uboot. Added ZFS to Linux and 
made it have a ZFS root filesystem. The only drawback is the small boot 
partition of ext2/fat to read uImage and initrd.


So I am curious about adding ZFS support to uboot. Looking at the sources 
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=tree

in particular, the ext2 work, I see it was once imported from GRUB.

Comparing that with 
https://github.com/pendor/grub-zfs/tree/master/grub-core/fs/zfs which is a 
fork for ZFS support to GRUB.


At first glance, it would suggest that it should be feasible to add ZFS to 
uboot. But since I only have 'usage-level knowledge' of both boot systems, 
I am unaware of any show-stoppers.


Perhaps memory/object-size is an issue? The ext2 code is some ~1100 lines 
in uboot, but ZFS is 2700 lines in GRUB. Or any of a thousand other issues 
I am unaware about.


Anyone already attempted such a project? Any resources available for such 
porting? Will I even be able to run my own version of uboot on the Cubox?


Lund


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] uboot and ZFS

2012-05-02 Thread Jorgen Lundman

At first glance, it would suggest that it should be feasible to add ZFS to
uboot. But since I only have 'usage-level knowledge' of both boot systems,
I am unaware of any show-stoppers.


Oh please study this and submit a patch, I believe at least Pavel (CCed) would
be glad to see it in :-)


Well the porting might be quite a long run indeed, but basic booting from this
should not be that hard. Besides the code would be fairy separate, so it should
be OK.


I took the existing CuBox u-boot, and compiled. Then found the EXT4 patches 
done by Siemens, and practised merging that in, compiling, and flashing the 
cubox. I can now boot EXT4. So that is encouraging.


Looking at GRUB zfs, it defines similar functions, namely open(), mount(), 
read(), close() and list(). So perhaps I can get something done. Is there 
quicker ways to test uboot than to flash the hardware every time?


What is the general patch acceptance around, I see ext4 wasn't accepted, 
what are the chances my patches would be?


Lund





--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] uboot and ZFS

2012-05-02 Thread Jorgen Lundman




done by Siemens, and practised merging that in, compiling, and flashing the


Samsung! My bad, credits where due!


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] uboot and ZFS

2012-05-07 Thread Jorgen Lundman

If you correctly skip the HW init, you can try booting u-boot from u-boot ...
(now, WD will hate me for bringing this up :-) ). It's possible, but unsupported
operation. You might need to do some research on this matter :-)



I was thinking more along the lines of;  Since I am testing a filesystem 
driver, to have a small test binary I can run and just feed a patch to (be 
it block device, or raw file) to test it can traverse, and read the contents.


But it would not be so bad to simulate that with some #ifdefs I guess.



What is the general patch acceptance around, I see ext4 wasn't accepted,
what are the chances my patches would be?


Why wasn't ext4 accepted?


I have no idea. I found the patches back in Dec, and it is not in the 
repository. Although, I have patched it into my tree on github, it might 
help merging it into uboot. It does appear to work, whereas my zfs does not :)


CuBox>> zfsls usb 0:2
** Bad partition - usb 0:2 **
CuBox>> zfsls usb 0:1
** Bad partition - usb 0:1 **
CuBox>> zfsls usb 0:0
data abort
pc : [<0063ea0c>]  lr : [<0060eef0>]
sp : 005ffe40  ip :  fp : 
r10:   r9 : 00652a4c r8 : 005fffcc
r7 :   r6 :  r5 : 007104b0  r4 : 006444a7
r3 :   r2 : 006f7b80 r1 :   r0 : ea12
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Dang :)

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] uboot and ZFS

2012-05-07 Thread Jorgen Lundman



Did you miss my message of Wed, 02 May?

See
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/130638/focus=130671

Unfortunately there is no legal (license-conforming) way to include
ZFS code into U-Boot and distribute it.

That means, there is no chance to get this added to mainline.




My apologies, I did mean to reply to that.

The reason the GRUB boot loader can only handle single/mirror device root 
pool (ie, no raidz) is because Sun did not want to commit "any more than 
they had to" to GRUB, which would force the source to GPL.


The source that was written by Sun, for GRUB, is indeed GPL license 
(version 2).


I do not see this as a problem, unless suddenly you do not accept GPL 
licenses. (like 95% of your existing sources). (2000 .c files out of 2412).


Please advice if this is this not acceptable to u-boot. It does not change 
that I want it, so I will simply have to maintain a fork.


Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] uboot and ZFS

2012-05-09 Thread Jorgen Lundman


Technically, U-Boot is GPLv2+ so GPLv2 only code _may_ not be accepted That
is for Wolfgang to decide, but you have been warned :)



Naturally, he is king after all. There will be a thousand reasons to reject 
it, but hopefully not due to license.




I based my GITHUB after the CuBox fork of u-boot. I will leave it up to 
those guys to submit their patches separately.



My fork of u-boot is here:

** https://github.com/lundman/u-boot


To see only the change set for adding ZFS:

** https://github.com/lundman/u-boot/compare/zfs


Since I merged in EXT4 patches to get a feel for u-boot, they are here:

** https://github.com/lundman/u-boot/compare/ext4

Only minor strings changes of "ext2" -> "ext4", otherwise the Samsung patch 
V4 posted in here.




Lund



Useless sample output:


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

ZPOOL label 'rpool'

zfs fsname = '/ROOT/' snapname='' filename = '/'
  lib
  sbin
  var
  bin
  dev
  selinux
  usr
  root
  home
  srv
  ttt
  proc
  tmp
  mnt
  etc
  media
  boot
  opt
  sys
  .old-root
  src
   rootfile.txt
  rpool



CuBox>> zfsload usb 0:2 0x0020 /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='' filename = '/boot/uImage'
3623192 bytes read

CuBox>> bootm
## Booting kernel from Legacy Image at 0020 ...
   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: 8000
   Entry Point:  8000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[0.00] 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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] uboot and ZFS

2012-05-13 Thread Jorgen Lundman


Yay, so the ext4 works for you? Why wasn't ext4 merged? Can you post the
reasoning (maybe links to gmane or something?)



I have no idea. I just needed ext4 support, and saw someone had done the 
hard work back in Dec. I took the patches and applied them.


I have been informed that ext4 can't read volumes over 1TB. I could take a 
look at fixing that too, if there is enough interest.


ZFS pools over 1TB appears to work.

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] uboot and ZFS

2012-05-13 Thread Jorgen Lundman





I suppose the question would be how big the code change is versus how
many people will actually benefit. If it result in a 'big' increase in
.text or .data then it may need to be a compile time option
(CONFIG_SYS_HUGE_EXT4 or something)



I was guess that the issue lies in that the sector offset is a signed 32bit 
int, and that is what goes wrong. I think it should make no size difference 
at all, but would take a while to track down all calls that pass them along.






--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ZFS

2012-05-21 Thread Jorgen Lundman


Work based on current u-boot repository;

https://github.com/lundman/u-boot/compare/upstream...upstream-zfs

As previously discussed, all sources are GPLv2.

This patchs supports ZPOOL v28 (including ashift patches) on Single or 
Mirror VDEVs.


It does not work with RAIDZ and higher VDEVs.


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] EXT4

2012-05-21 Thread Jorgen Lundman


Slowly getting the hang of github and u-boot. I took a fork of u-boot 
20120520, and merged in the EXT4 patched.


In addition to Samsung's work;

 * Fix minor string ext2->ext4
 * 'unsigned' sectors for volumes over 1TB
 * changed to fit with current u-boot compile env

https://github.com/lundman/u-boot/compare/upstream...upstream-ext4



There is a new limit of 2TB with 512 byte blocks. To go beyond that would 
require "disk_partition_t" to go bigger than 32bit. I think that is outside 
of my access permissions.






--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] EXT4

2012-05-21 Thread Jorgen Lundman

These patches will likely not get reviewed and definitely will not get
merged unless that are posted to the mailing list


Ok, is it better if I use "git format-patch" and send them on the list?





There is a new limit of 2TB with 512 byte blocks. To go beyond that would
require "disk_partition_t" to go bigger than 32bit. I think that is outside
of my access permissions.


What do you mean by this?



I just assumed that I, new to the use of u-boot, should not tinker with 
core structs, and core API functionality. I merely wish to mention the 
issue in case it has already been addressed by the gurus.


It could very well be that u-boot developers don't want to go larger. 
(presumably, majority of u-boot devices aren't booting from > 2TB devices..)


Or, it has already been discussed and I just missed it.


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ZFS

2012-05-21 Thread Jorgen Lundman


Does that imply the possibility that a ZFS driver might one day get
added to the Linux kernel proper?



ZOL http://zfsonlinux.org/ already exists and runs very well. But it should 
be noted that the license prohibits the *distribution* of Linux with ZFS. 
Which is why it is a separate kernel module. Read more about license on the 
ZOL pages from people who know more about it than I.


So *I* don't think we will see a kernel with ZFS already in it, but you can 
already "apt-get install zfs" for many distributions. I use initrd to load 
ZFS then boot my pool.


However, that is a separate issue here, since ZOL is based on the Solaris 
kernel sources, which are CDDL.


GRUB ZFS "booting" sources are based on the GRUB GPL sources, provided by 
Sun to GRUB.


They are very stripped down, and can only read files, on single/mirror. No 
RAIDZ etc logic was released as GPL, so GRUB sources can not boot from 
those volumes (a limitation from day one).


I did notice that Illumos (OpenIndiana) have work started on extending GRUB 
boot, and ZFS crypto. But that is currently futureware.


Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ZFS

2012-05-21 Thread Jorgen Lundman
GRUB 0.96 (2005) which received the initial ZFS GRUB sources was probably 
GPLv2. The ZFS sources files contributed are all tagged with GPLv2. I have 
left all header license chunks untouched.




Hmm, I know that GRUB is GPLv3+ - Is the ZFS code GPLv3+ or was that
released under a different version?
(I know the ZFS license was discussed before, but I can't recall if
the explicit GPL version was referred to)

Regards,

Graeme



--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] EXT4

2012-05-21 Thread Jorgen Lundman

Yes, that is exactly what you should do.

But before you post them, make sure you run them through checkpatch.pl
first and resolve/explain any errors or warnings


Wow, ohhweee this will take a little while.

How set in stone is the output of checkpatch.pl ? Specifically;

ERROR: do not initialise globals to 0 or NULL
#596: FILE: fs/zfs/zfs.c:33:
+block_dev_desc_t *zfs_dev_desc = NULL;

That strikes me as dangerous. One lets you fail gracefully (Sorry, X has 
not been initialised) and the other is just a plain crash. I find crashes 
to be very ugly, even if it is only reachable by other developers.





WARNING: do not add new typedefs
#728: FILE: fs/zfs/zfs.c:165:
+typedef struct decomp_entry

I'm seriously not allowed to make new typedefs? ouch.


So yeah, should it always pass without a single problem, or may I employ 
some measure of moderation?





--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] EXT4

2012-05-21 Thread Jorgen Lundman




Uninitialized global and static variables reside in .bss and are set
to zero during relocation. Initialised globals and static variables go
into .data


Alas, I know from experience that Microsoft's C compiler does not 
initialise global variables (to make it faster one assumes) which has led 
to hours of debugging.


If u-boot has decided that going without Microsoft compiling support is 
A-OK, then that is A-OK with me too. :)



> Oh and remember, just because you can find a prior art in the U-Boot
> code does not mean it will be allowed to be used as a backing argument
> ;)

This I understand. Even if what came in from legacy has yet to be cleaned, 
there is no reason to allow more filth in :)




Only one way to find out ;) But try to make it as clean as you believe
reasonable and explain what's left



Understood, clean enough to eat of is the goal.

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ZFS

2012-05-21 Thread Jorgen Lundman


I stand corrected, going over the files now for the patching, nearly all 
ZFS related files (headers, and internals) are GPLv3. The GRUB specific 
files (the files interfacing with the GRUB API) appear to be GPLv2.


Lund

Jorgen Lundman wrote:

GRUB 0.96 (2005) which received the initial ZFS GRUB sources was probably
GPLv2. The ZFS sources files contributed are all tagged with GPLv2. I have
left all header license chunks untouched.



Hmm, I know that GRUB is GPLv3+ - Is the ZFS code GPLv3+ or was that
released under a different version?
(I know the ZFS license was discussed before, but I can't recall if
the explicit GPL version was referred to)

Regards,

Graeme





--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ZFS

2012-05-22 Thread Jorgen Lundman


That is a problem. U-Boot is nominally GPLv2+ which would allow inclusion
of GPLv3 code but there are significant portions of U-Boot which are GPLv2
(Linux kernel code for example) which is a blocker :(



Originally the first checking has GPLv2. So GRUB bumped up the version 
somewhere along the way. I can go back to GPLv2 source, as there are no 
differences.


Lund


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/2] zfs: Add filesystem ZFS support

2012-05-22 Thread Jorgen Lundman
ZFS filesystem support from GRUB. Adding 'zfsload' and 'zfsls' commands
for ZFS filesystem support. ZFS pool notation syntax is in the format
'/POOLNAME/@/directory/directory/file', also explained in help output.

Initial revision given to GRUB is found:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/grub/grub-0.97/stage2/zfs-include/zfs.h

Using "either version 2 of the License, or (at your option) any later version."


Jorgen Lundman (2):
  ZFS header files
  zfs: Add ZFS filesystem support

 Makefile |2 +-
 common/Makefile  |1 +
 common/cmd_zfs.c |  244 +
 fs/Makefile  |1 +
 fs/{ => zfs}/Makefile|   43 +-
 fs/zfs/dev.c |  139 +++
 fs/zfs/zfs.c | 2414 ++
 fs/zfs/zfs_fletcher.c|   84 ++
 fs/zfs/zfs_lzjb.c|   94 ++
 fs/zfs/zfs_sha256.c  |  145 +++
 include/config_cmd_all.h |1 +
 include/zfs/dmu.h|  119 +++
 include/zfs/dmu_objset.h |   43 +
 include/zfs/dnode.h  |   80 ++
 include/zfs/dsl_dataset.h|   52 +
 include/zfs/dsl_dir.h|   48 +
 include/zfs/sa_impl.h|   34 +
 include/zfs/spa.h|  311 ++
 include/zfs/uberblock_impl.h |   57 +
 include/zfs/vdev_impl.h  |   69 ++
 include/zfs/zap_impl.h   |  112 ++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +++
 include/zfs/zfs_acl.h|   55 +
 include/zfs/zfs_znode.h  |   70 ++
 include/zfs/zil.h|   56 +
 include/zfs/zio.h|   92 ++
 include/zfs/zio_checksum.h   |   49 +
 include/zfs_common.h |   94 ++
 29 files changed, 4718 insertions(+), 16 deletions(-)
 create mode 100644 common/cmd_zfs.c
 copy fs/{ => zfs}/Makefile (52%)
 create mode 100644 fs/zfs/dev.c
 create mode 100644 fs/zfs/zfs.c
 create mode 100644 fs/zfs/zfs_fletcher.c
 create mode 100644 fs/zfs/zfs_lzjb.c
 create mode 100644 fs/zfs/zfs_sha256.c
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h
 create mode 100644 include/zfs_common.h

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] ZFS header files

2012-05-22 Thread Jorgen Lundman
---
 include/zfs/dmu.h|  119 
 include/zfs/dmu_objset.h |   43 ++
 include/zfs/dnode.h  |   80 +++
 include/zfs/dsl_dataset.h|   52 +++
 include/zfs/dsl_dir.h|   48 +++
 include/zfs/sa_impl.h|   34 +
 include/zfs/spa.h|  311 ++
 include/zfs/uberblock_impl.h |   57 
 include/zfs/vdev_impl.h  |   69 +
 include/zfs/zap_impl.h   |  112 +++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +
 include/zfs/zfs_acl.h|   55 
 include/zfs/zfs_znode.h  |   70 ++
 include/zfs/zil.h|   56 
 include/zfs/zio.h|   92 +
 include/zfs/zio_checksum.h   |   49 +++
 17 files changed, 1472 insertions(+), 0 deletions(-)
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h

diff --git a/include/zfs/dmu.h b/include/zfs/dmu.h
new file mode 100644
index 000..bee317e
--- /dev/null
+++ b/include/zfs/dmu.h
@@ -0,0 +1,119 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see .
+ */
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef_SYS_DMU_H
+#define_SYS_DMU_H
+
+/*
+ * This file describes the interface that the DMU provides for its
+ * consumers.
+ *
+ * The DMU also interacts with the SPA.  That interface is described in
+ * dmu_spa.h.
+ */
+typedef enum dmu_object_type {
+   DMU_OT_NONE,
+   /* general: */
+   DMU_OT_OBJECT_DIRECTORY,/* ZAP */
+   DMU_OT_OBJECT_ARRAY,/* UINT64 */
+   DMU_OT_PACKED_NVLIST,   /* UINT8 (XDR by nvlist_pack/unpack) */
+   DMU_OT_PACKED_NVLIST_SIZE,  /* UINT64 */
+   DMU_OT_BPLIST,  /* UINT64 */
+   DMU_OT_BPLIST_HDR,  /* UINT64 */
+   /* spa: */
+   DMU_OT_SPACE_MAP_HEADER,/* UINT64 */
+   DMU_OT_SPACE_MAP,   /* UINT64 */
+   /* zil: */
+   DMU_OT_INTENT_LOG,  /* UINT64 */
+   /* dmu: */
+   DMU_OT_DNODE,   /* DNODE */
+   DMU_OT_OBJSET,  /* OBJSET */
+   /* dsl: */
+   DMU_OT_DSL_DIR, /* UINT64 */
+   DMU_OT_DSL_DIR_CHILD_MAP,   /* ZAP */
+   DMU_OT_DSL_DS_SNAP_MAP, /* ZAP */
+   DMU_OT_DSL_PROPS,   /* ZAP */
+   DMU_OT_DSL_DATASET, /* UINT64 */
+   /* zpl: */
+   DMU_OT_ZNODE,   /* ZNODE */
+   DMU_OT_OLDACL,  /* OLD ACL */
+   DMU_OT_PLAIN_FILE_CONTENTS, /* UINT8 */
+   DMU_OT_DIRECTORY_CONTENTS,  /* ZAP */
+   DMU_OT_MASTER_NODE, /* ZAP */
+   DMU_OT_UNLINKED_SET,/* ZAP */
+   /* zvol: */
+   DMU_OT_ZVOL,/* UINT8 */
+   DMU_OT_ZVOL_PROP,   /* ZAP */
+   /* other; for testing only! */
+   DMU_OT_PLAIN_OTHER, /* UINT8 */
+   DMU_OT_UINT64_OTHER,/* UINT64 */
+   DMU_OT_ZAP_OTHER,   /* ZAP */
+   /* new object types: */
+   DMU_OT_ERROR_LOG,   /* ZAP */
+   DMU_OT_SPA_HISTORY, /* UINT8 */
+   DMU_OT_SPA_HISTORY_OFFSETS, /* spa_his_phys_t */
+   DMU_OT_POOL_PROPS,  /* ZAP */
+   DMU_OT_DSL_PERMS,   /* ZAP */
+   DMU_OT_ACL, /* ACL */
+   DMU_OT_SYSACL,  /* SYSACL */
+   DMU_OT_FUID,  

Re: [U-Boot] [PATCH 2/2] zfs: Add ZFS filesystem support

2012-05-22 Thread Jorgen Lundman




What are all these commit references? Are they from an external git-repo?
If so I think the commit message might make more sense if you simply
summarise what you have done to adapt the original source code in order to
integrate it into U-Boot


Hmm I assumed --squash would git rid of that history, I guess not. I'll 
find a way.




Please keep list sorted


I didn't even notice it was sorted. Of course this leave the issue of:

COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o
COBJS-$(CONFIG_CMD_ZFS) += cmd_zfs.o
COBJS-$(CONFIG_CMD_SPL) += cmd_spl.o

Not sure if I was supposed to go before or after that dangling spl.



Don't include changelogs in source files - We have git for that :)



Can this be aligned better? Personally I prefer to put each parameter on
it's own line once I hit the 80 character limit



Keep sorted


All done.


Please don't mess with other devs copyright lines


Oops.


This looks to be an unrelated change - If needed, move this into a seperate
patch


Actually, git noticed I copied the ../Makefile and changed it for 
zfs/Makefile. That's pretty neat.




Insert a blank line



Put the || operator on the previous line and fix vertical alignment of
subsequent lines



Ewww, that's a very ugly split


Lesson here is don't assume file taken from ext2/dev.c to be ok :)


'ported to' versus 'implementation' ?


Ah of course.



Is this an identical copyright attribution from the original source?


Changed it to only have original license.


Once I test compile and compliance again, I will resend for your scrutiny.

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 0/2] zfs: Add filesystem ZFS support

2012-05-22 Thread Jorgen Lundman
ZFS filesystem support from GRUB. Adding 'zfsload' and 'zfsls' commands
for filesystem access. ZFS pool notation syntax is in the format
'/POOLNAME/@/directory/directory/file', also explained in help output.

Initial revision given to GRUB is found:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/grub/grub-0.97/stage2/zfs-include/zfs.h

Using "either version 2 of the License, or (at your option) any later version."

Jorgen Lundman (2):
  ZFS header files
  zfs: Add ZFS support

 Makefile |2 +-
 common/Makefile  |1 +
 common/cmd_zfs.c |  236 +
 fs/Makefile  |3 +-
 fs/{ => zfs}/Makefile|   39 +-
 fs/zfs/dev.c |  137 +++
 fs/zfs/zfs.c | 2396 ++
 fs/zfs/zfs_fletcher.c|   84 ++
 fs/zfs/zfs_lzjb.c|   94 ++
 fs/zfs/zfs_sha256.c  |  145 +++
 include/config_cmd_all.h |1 +
 include/zfs/dmu.h|  119 +++
 include/zfs/dmu_objset.h |   43 +
 include/zfs/dnode.h  |   80 ++
 include/zfs/dsl_dataset.h|   52 +
 include/zfs/dsl_dir.h|   48 +
 include/zfs/sa_impl.h|   34 +
 include/zfs/spa.h|  311 ++
 include/zfs/uberblock_impl.h |   57 +
 include/zfs/vdev_impl.h  |   69 ++
 include/zfs/zap_impl.h   |  112 ++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +++
 include/zfs/zfs_acl.h|   55 +
 include/zfs/zfs_znode.h  |   70 ++
 include/zfs/zil.h|   56 +
 include/zfs/zio.h|   92 ++
 include/zfs/zio_checksum.h   |   49 +
 include/zfs_common.h |   94 ++
 29 files changed, 4687 insertions(+), 17 deletions(-)
 create mode 100644 common/cmd_zfs.c
 copy fs/{ => zfs}/Makefile (56%)
 create mode 100644 fs/zfs/dev.c
 create mode 100644 fs/zfs/zfs.c
 create mode 100644 fs/zfs/zfs_fletcher.c
 create mode 100644 fs/zfs/zfs_lzjb.c
 create mode 100644 fs/zfs/zfs_sha256.c
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h
 create mode 100644 include/zfs_common.h

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/2] ZFS header files

2012-05-22 Thread Jorgen Lundman
Signed-off-by: Jorgen Lundman 
---
 include/zfs/dmu.h|  119 
 include/zfs/dmu_objset.h |   43 ++
 include/zfs/dnode.h  |   80 +++
 include/zfs/dsl_dataset.h|   52 +++
 include/zfs/dsl_dir.h|   48 +++
 include/zfs/sa_impl.h|   34 +
 include/zfs/spa.h|  311 ++
 include/zfs/uberblock_impl.h |   57 
 include/zfs/vdev_impl.h  |   69 +
 include/zfs/zap_impl.h   |  112 +++
 include/zfs/zap_leaf.h   |  103 ++
 include/zfs/zfs.h|  122 +
 include/zfs/zfs_acl.h|   55 
 include/zfs/zfs_znode.h  |   70 ++
 include/zfs/zil.h|   56 
 include/zfs/zio.h|   92 +
 include/zfs/zio_checksum.h   |   49 +++
 17 files changed, 1472 insertions(+), 0 deletions(-)
 create mode 100644 include/zfs/dmu.h
 create mode 100644 include/zfs/dmu_objset.h
 create mode 100644 include/zfs/dnode.h
 create mode 100644 include/zfs/dsl_dataset.h
 create mode 100644 include/zfs/dsl_dir.h
 create mode 100644 include/zfs/sa_impl.h
 create mode 100644 include/zfs/spa.h
 create mode 100644 include/zfs/uberblock_impl.h
 create mode 100644 include/zfs/vdev_impl.h
 create mode 100644 include/zfs/zap_impl.h
 create mode 100644 include/zfs/zap_leaf.h
 create mode 100644 include/zfs/zfs.h
 create mode 100644 include/zfs/zfs_acl.h
 create mode 100644 include/zfs/zfs_znode.h
 create mode 100644 include/zfs/zil.h
 create mode 100644 include/zfs/zio.h
 create mode 100644 include/zfs/zio_checksum.h

diff --git a/include/zfs/dmu.h b/include/zfs/dmu.h
new file mode 100644
index 000..bee317e
--- /dev/null
+++ b/include/zfs/dmu.h
@@ -0,0 +1,119 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef_SYS_DMU_H
+#define_SYS_DMU_H
+
+/*
+ * This file describes the interface that the DMU provides for its
+ * consumers.
+ *
+ * The DMU also interacts with the SPA.  That interface is described in
+ * dmu_spa.h.
+ */
+typedef enum dmu_object_type {
+   DMU_OT_NONE,
+   /* general: */
+   DMU_OT_OBJECT_DIRECTORY,/* ZAP */
+   DMU_OT_OBJECT_ARRAY,/* UINT64 */
+   DMU_OT_PACKED_NVLIST,   /* UINT8 (XDR by nvlist_pack/unpack) */
+   DMU_OT_PACKED_NVLIST_SIZE,  /* UINT64 */
+   DMU_OT_BPLIST,  /* UINT64 */
+   DMU_OT_BPLIST_HDR,  /* UINT64 */
+   /* spa: */
+   DMU_OT_SPACE_MAP_HEADER,/* UINT64 */
+   DMU_OT_SPACE_MAP,   /* UINT64 */
+   /* zil: */
+   DMU_OT_INTENT_LOG,  /* UINT64 */
+   /* dmu: */
+   DMU_OT_DNODE,   /* DNODE */
+   DMU_OT_OBJSET,  /* OBJSET */
+   /* dsl: */
+   DMU_OT_DSL_DIR, /* UINT64 */
+   DMU_OT_DSL_DIR_CHILD_MAP,   /* ZAP */
+   DMU_OT_DSL_DS_SNAP_MAP, /* ZAP */
+   DMU_OT_DSL_PROPS,   /* ZAP */
+   DMU_OT_DSL_DATASET, /* UINT64 */
+   /* zpl: */
+   DMU_OT_ZNODE,   /* ZNODE */
+   DMU_OT_OLDACL,  /* OLD ACL */
+   DMU_OT_PLAIN_FILE_CONTENTS, /* UINT8 */
+   DMU_OT_DIRECTORY_CONTENTS,  /* ZAP */
+   DMU_OT_MASTER_NODE, /* ZAP */
+   DMU_OT_UNLINKED_SET,/* ZAP */
+   /* zvol: */
+   DMU_OT_ZVOL,/* UINT8 */
+   DMU_OT_ZVOL_PROP,   /* ZAP */
+   /* other; for testing only! */
+   DMU_OT_PLAIN_OTHER, /* UINT8 */
+   DMU_OT_UINT64_OTHER,/* UINT64 */
+   DMU_OT_ZAP_OTHER,   /* ZAP */
+   /* new object types: */
+   DMU_OT_ERROR_LOG,   /* ZAP */
+   DMU_OT_SPA_HISTORY, /* UINT8 */
+   DMU_OT_SPA_HISTORY_OFFSETS, /* spa_his_phys_t */
+   DMU_OT_POOL_PROPS,  /* ZAP */
+   DMU_OT_DSL_PERMS,   /* ZAP */
+   DMU_OT_ACL, /* ACL */
+   DMU_OT_SYSACL,  /* 

Re: [U-Boot] [PATCH] ZFS

2012-05-22 Thread Jorgen Lundman



Wolfgang Denk wrote:


As previously discussed, all sources are GPLv2.


How would this be possible?  My understanding is that ZFS comes
only under a GPL incompatible license.  Please elucidate.


Perhaps a more visual answer is in order, to my other two replies, on the 
license situation.


If you look in Solaris sources, for ZFS, you will find 94 files, of which 
94 files are of CDDL license. That is some:


(/usr/src/solaris11/usr/src)  wc -l ./uts/common/fs/zfs/*.[ch] 
./common/zfs/*.[ch] ./uts/common/sys/fs/z*

  103993 total

So, about 100k worth of source. But Sun had no way to boot intel platform. 
So they wrote a subset "ZFS boot" sources for GRUB, under GPL v2 license.




Ie, 22 files, all GPLv2.

(/usr/src/grub-0.97/) wc -l include/zfs/* fs/zfs/*.[ch]
  4328 total

At no point is the GRUB/u-boot ZFS sources the same as the actual 
file-system files. (Although, some of the headers overlap). As Sun wanted 
GRUB support, they were forced to release GRUB ZFS subset sources as GPLv2.


Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] ZFS header files

2012-05-23 Thread Jorgen Lundman

In message<1337744719-27487-2-git-send-email-lund...@lundman.net>  you wrote:

Signed-off-by: Jorgen Lundman
---


Please provide a useful commit message.


Graeme has been schooling me on this and I believe I know what to do in V3. 
He also recommend I wait a day or so, so that others can't have a chance to 
comment.





Finally, it makes little sense to add the headers separately.  Please
squash both patches into on.


The wiki mention a strict 100KB limit per mail, so I made 2 patches to 
avoid it. The headers split was just an arbitrary logical split I made.



And please add information where _exactly_ the code has been copied
from; for an example how to do this please see
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
i. e. pleaseinclude information about download resp. reposity URL plus
exact version that was used as base for this work.



Understood.


--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Updating ZFS for U-boot

2017-12-07 Thread Jorgen Lundman

Hello list,

The ZFS support in U-boot is in need of updating, so I have done so now.
Which enables support for feature pools, LZ4 and raidz.

One thing that raidz support does, is iterate all the devices looking for
the other devices needed to read the raid set. Currently I put in the code:

debug("Iterating for devices\n");
for (
uclass_first_device(UCLASS_BLK, &dev);
dev;
uclass_next_device(&dev)
) {
struct blk_desc *desc = dev_get_uclass_platdata(dev);

debug("   testing device %d: type 0x%x vendor '%s' product 
'%s'\n",
desc->devnum, desc->if_type, desc->vendor, 
desc->product);


if (part_get_info_whole_disk(desc, &info) == 0) {

debug("  testing whole disk: %p\n", desc->bdev->ops->read);
dev.part_info = &info;
err = scan_disk(&dev, data, 0, &inserted);



But to my surprise, fs_devread() of any device other than the one given on
command line, will fail. Most likely because blk_dread() ops->read is NULL?
Maybe?

Am I using the API wrong, or do I simply need to call a probe function first?

Thanks,

Lund
-- 
Jorgen Lundman   | 
Unix Administrator   | +81 (0)90-5578-8500
Shibuya-ku, Tokyo| Japan

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Updating ZFS for U-boot

2017-12-07 Thread Jorgen Lundman
>   for (
>   uclass_first_device(UCLASS_BLK, &dev);
>   dev;
>   uclass_next_device(&dev)
>   ) {
>   struct blk_desc *desc = dev_get_uclass_platdata(dev);
>   if (part_get_info_whole_disk(desc, &info) == 0) {
> But to my surprise, fs_devread() of any device other than the one given on
> command line, will fail. Most likely because blk_dread() ops->read is NULL?
> Maybe?

That was not it at all. Turns out the problem is that os_read() would
return a partition read request, and fs_devread() calling blk_dread() does
not handle a partial read at all. But that is fine,

The issue is that when fs_devread() converts my 131072 byte_len, into
131072 block_len, because blk->log2blksz == 0.

Turns out that blk->log2blksz is only set in blk_get_device_part_str() so
this function has to be called before using a device.

So I can change my code to call uclass_first_device() then;

1) Convert the device info to strings, and call blk_get_device_part_str().
2) Set blk->log2blksz myself and hope there are no other surprises.

Lund

-- 
Jorgen Lundman   | 
Unix Administrator   | +81 (0)90-5578-8500
Shibuya-ku, Tokyo| Japan

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Updating ZFS for U-boot

2017-12-10 Thread Jorgen Lundman

The draft update for ZFS is ready, and is available here:
https://github.com/lundman/u-boot/commit/c2727e5004fe011d19156d728babdf968515b28d

I will refresh myself on U-boot commit procedures, and start the proper
method soon.

I did a question though, to be able to test file reading, I had to add the
code:

#ifdef CONFIG_SANDBOX
char *bufx = map_sysmem((phys_addr_t)(uint64_t)buf, movesize);

memmove(bufx, data->file_buf + file->offset + red
- data->file_start, movesize);
unmap_sysmem(bufx);
#else
memmove(buf, data->file_buf + file->offset + red
- data->file_start, movesize);
#endif

Should I keep that as #ifdef SANDBOX, or is there a preferred method?

I have tried to follow checkcommit.pl rules, and changed a few things to
"const" etc, to make it cleaner.

Example output:

Hit any key to stop autoboot:  0
=> host bind 0 ./raid1.raw
=> host bind 1 ./raid2.raw
=> host bind 2 ./raid3.raw
=> zfsls host 0:0 /@/
zfs: adding device 'host' dev 0
zfs: couldn't find a necessary member device of multi-device filesystem
zfs: couldn't find a necessary member device of multi-device filesystem
zfs: looking for devices...
zfs: adding device 'host' dev 1
zfs: adding device 'host' dev 2
zfs: device scan completed.
zfs fsname = '/' snapname='' filename = '/'
  hello.world
   file.txt


The device scan function ended up looking like:

for (
uclass_first_device(UCLASS_BLK, &dev);
dev;
uclass_next_device(&dev)
) {
struct blk_desc *desc = dev_get_uclass_platdata(dev);
for (part = 0; part <= MAX_SEARCH_PARTITIONS; part++) {
snprintf(dev_str, sizeof(dev_str), "%u:%u", desc->devnum, part);
part = 
blk_get_device_part_str(blk_get_if_type_name(desc->if_type),
   dev_str,
   &dev.disk, &dev.part_info, 1);
    if (part < 0)
continue;


Hopefully that is acceptable.

Any other cleanups requested in the ZFS area?

Lund
-- 
Jorgen Lundman   | 
Unix Administrator   | +81 (0)90-5578-8500
Shibuya-ku, Tokyo| Japan

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [GIT PULL] ZFS: lundman/master

2018-01-09 Thread Jorgen Lundman

Hello,
I didn't hear back about the changes, so I'll proceed to this stage. :)
Please find additional ZFS boot features, and fixes. Please advise if
outside git repositories are not allowed.

The following changes since commit ab61e175713a0400c6ece6348e8f655998cf574d:

  ARM: rmobile: Rework the ULCB CPLD driver (Sun Nov 26 20:32:44 2017 +0100)

are available in the git repository at:

  https://github.com/lundman/u-boot.git master

for you to fetch changes up to c2727e5004fe011d19156d728babdf968515b28d:

  Update ZFS support to latest (Thu Dec 7 16:09:26 2017 +0900)
--------
Jorgen Lundman (1):
  Update ZFS support to latest

 cmd/zfs.c|   22 +-
 fs/zfs/Makefile  |4 +-
 fs/zfs/dev.c |   20 +-
 fs/zfs/zfs.c | 3223 +++---
 fs/zfs/zfs_fletcher.c|6 +-
 fs/zfs/zfs_lz4.c |  286 
 fs/zfs/zfs_sha256.c  |   14 +-
 include/zfs/dmu.h|   48 +-
 include/zfs/sa_impl.h|5 +-
 include/zfs/spa.h|   18 +
 include/zfs/uberblock_impl.h |   15 +-
 include/zfs/zap_leaf.h   |4 +-
 include/zfs/zfs.h|   22 +-
 include/zfs/zio.h|9 +-
 include/zfs_common.h |   27 +-
 15 files changed, 2819 insertions(+), 904 deletions(-)


-- 
Jorgen Lundman   | 
Unix Administrator   | +81 (0)90-5578-8500
Shibuya-ku, Tokyo| Japan

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [GIT PULL] ZFS: lundman/master

2018-01-10 Thread Jorgen Lundman
> 
> I'm reluctant to just take this as-is.  That's a lot of code changes in
> a single commit that was not posted (as far as I can see) to the mailing
> list.  Can you break that down into a series of changes that can be
> reviewed and post that?  Thanks!
> 

I received an email that ZFS U-boot booting was tricky to get to work,
since it required old pool version, and didn't work at all with big endian.

When I first did ZFS, I took the GRUB sources in 2012. So this time around,
I collected the commits from 2012 to now, and merged them into u-boot. Some
~50 commits or so. It makes U-boot work with modern pools, and current
default compression (lz4) as well as raidz/mirror boots.

It is a large change, I agree. But I'm unsure how to split it into smaller
commits. It is mostly bring it up to current with its upstream.

If it is preferred to post to the ML, I will do so - I thought "git pull"
was an alternate. Please advice,

Lund

-- 
Jorgen Lundman   | 
Unix Administrator   | +81 (0)90-5578-8500
Shibuya-ku, Tokyo| Japan

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/1] zfs: Add ZFS filesystem support

2012-08-10 Thread Jorgen Lundman


Applied, thanks.

Best regards,



That is the best news ever, thanks! Also thanks to Graeme for all the help.

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Seeking ARM development platform suggestions

2012-08-20 Thread Jorgen Lundman



Graeme Russ wrote:

Hi Guys,

Now that I _finally_ have an ARM toolchain up and running (ELDK 5.2),
it's time to play, and for that, I need something to play with :)

I have a HP TouchPad which I've been compiling CyangenMod for (it has
it's own toolchain) and a Raspberry Pi which I have built U-Boot for
(using ELDK), but I don't have the necessary hardware for serial
console yet.

I'm looking for something:
  a) I can purchase locally (Australia)
  b) Is reasonably priced
  c) Has a mainline port of U-Boot already
  d) Is 'useful' (media player, NAS, firewall, machine that goes 'ping')
  e) Has lots of 'things' to play with (network, USB, video, SD/MMC,
SATA, LEDs, GPIO, Alphanumeric LCD) - Not all have to be currently
supported (actually, it would be great if some aren't so I can work on
adding them)


1)
I have a Cubox (http://www.solid-run.com/products/cubox) which is quite 
decent for development, I don't know about support from the Company itself, 
as we don't hear from them often. Great for Linux work and similar 
development, but Android support is poor. Not ready to be a full mediaplayer.


I used this to do the ZFS port to ARM, and eventually uboot. Alas, not 
mainline port of u-boot. Ships with USB serial console.



2)
I have a Mele A2000 
(http://www.cnx-software.com/2012/04/04/mele-a2000-android-2-3-media-player-powered-by-allwinner-a10/) 
which fancier in the Android department (JB4.1 available) and have Linux 
images, but needs extra dongle for serial. Could "just about" be a 
mediaplayer for locally attached media (maybe) but once you add network 
play and a greater selection of codecs, it moves into "not ready to be a 
full mediaplayer".


Also not in mainline u-boot, but the u-boot available is less hacky.

Neither run XBMC enough to be useful.

The general "mood" of the embedded dev community seems to be, to me, to 
move away from these Companies, as the promised source releases has not 
been sufficient. The current interest seems to be AM.logic's dualcore 
board. 
(http://ao2.it/en/blog/2012/08/10/amlogic-aml8726-mx-linux-kernel-code-released)


The last paragraph is just my take on things. All coloured from the 
"mediaplayer" point of view, as that is currently what I am fiddling with.


Lund





--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Seeking ARM development platform suggestions

2012-08-20 Thread Jorgen Lundman




[1] and [2] have a jtag adapter on the side, and the adpater can be
bought with the device [4].  [3] just needs a micro-usb cable and is
"unbrickable" even when replacing u-boot.  I have yet to test this. ;-)



I gave that a whirl, by, uh, accident. But I could xmodem send the SPL over 
again to get it back, and reprogram the u-boot with the proper version 
again. (Using 'screen' and sx, minicom does not work).


So it does seem "unbrickable".

Lund

--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Seeking ARM development platform suggestions

2012-08-20 Thread Jorgen Lundman


There was promise between XBMC and Allwinner for a bit, which looked good 
for everyone.


Then there was a delay, and when files were delivered they were binary 
identical to old files, so that looked bad.


XBMC got a bit pissy, and decided to stop work on Allwinner.

Yesterday, Allwinner explained about #ifdef around new code, and missed the 
compile time flag, hence wrong version, promised of new files soon.


XBMC uncertain, everyone waiting to see if we get files.

So, your average teenage TV sitcom I suppose. :)


You can read about it here: 
http://forum.xbmc.org/showthread.php?tid=126995&page=85



My own findings are here:

http://lundman.net/wiki/index.php/MeLe_A2000


I got mine from cubie's at aliexpress, the shipping took forever, but all 
arrived as expected. The debug board comes with pinouts, so real easy install.


The F10 remote I bought afterwards and I think is real neat. It works just 
about as well as Wiimotes, but works are regular mouse/keyboard (with 
Windows, OSX support). So I currently use it with straight Win7 running 
XBMC. I think F10 is worth getting, even if you don't end up using the mele.


At the moment though, my Mele is doing nothing (just waiting for wip to 
mature). I believe latest XBMC can play SD content. Current lack of audio 
support is a concern.


Hardware that actually supported XBMC ARM port, are the Pivos players 
http://www.pivosgroup.com/  I don't personally have one as they (didn't) 
sell to Japan. I tried to get one for the support they did though.


Lund



Graeme Russ wrote:

Hi Jorgen,

I've had a really good poke around looking into the Mele A2000. This
looks to have really impressive specifications and the manufacturer
apparently has a strong open source agenda.

I'm pretty sure I'll get one of these. There will probably be even
more capable ARM based media players in the next few years (like the
Trim-Slice which looks gorgeous), but what I'll do is relegate the
A2000 to a disk-less workstation once I get my thunking Linux home
server up and running :)

So the next decision is whether or not to buy one just with the debug
board (~US$95 delivered), or get one with the debug board and F10
remote ($US125 delivered) from Aliexpress


Regards,

Graeme



--
Jorgen Lundman   | 
Unix Administrator   | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo| +81 (0)90-5578-8500  (cell)
Japan| +81 (0)3 -3375-1767  (home)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v1] ZFS: Clean up cppcheck warnings where relevant, leaked memory etc

2014-11-06 Thread Jorgen Lundman
In a message from Wolfgang Denk highlighting warnings from cppcheck,
the patch will address those that are correctly diagnosed. Some are
false-positives:

> [fs/zfs/zfs.c:937]: (error) Memory leak: l
dmu_read() allocates "l" if successful, so error-case should not free
it.
> [fs/zfs/zfs.c:1141]: (error) Memory leak: dnbuf
dmu_read() allocates "dnbuf" if successful, so error-case should not
free it.
> [fs/zfs/zfs.c:1372]: (error) Memory leak: osp
zio_read() allocates "osp" if successful, so error-case should
not free it.
> [fs/zfs/zfs.c:1726]: (error) Memory leak: nvlist
int_zfs_fetch_nvlist() allocates "nvlist" if successful, so error-case
should not free it.

Signed-off-by: Jorgen Lundman 
---
 fs/zfs/zfs.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/fs/zfs/zfs.c b/fs/zfs/zfs.c
index 818d3d9..fb2b3ee 100644
--- a/fs/zfs/zfs.c
+++ b/fs/zfs/zfs.c
@@ -736,7 +736,7 @@ zap_hash(uint64_t salt, const char *name)
uint64_t crc = salt;
 
if (table[128] == 0) {
-   uint64_t *ct;
+   uint64_t *ct = NULL;
int i, j;
for (i = 0; i < 256; i++) {
for (ct = table + i, *ct = i, j = 8; j > 0; j--)
@@ -1060,6 +1060,7 @@ zap_lookup(dnode_end_t *zap_dnode, char *name, uint64_t 
*val,
}
 
printf("unknown ZAP type\n");
+   free(zapbuf);
return ZFS_ERR_BAD_FS;
 }
 
@@ -1094,6 +1095,7 @@ zap_iterate(dnode_end_t *zap_dnode,
return ret;
}
printf("unknown ZAP type\n");
+   free(zapbuf);
return 0;
 }
 
@@ -1865,6 +1867,7 @@ zfs_mount(device_t dev)
 
ubbest = malloc(sizeof(*ubbest));
if (!ubbest) {
+   free(ub_array);
zfs_unmount(data);
return 0;
}
@@ -1953,6 +1956,7 @@ zfs_mount(device_t dev)
if (err) {
printf("couldn't zio_read object directory\n");
zfs_unmount(data);
+   free(osp);
free(ubbest);
return 0;
}
@@ -2052,6 +2056,9 @@ zfs_open(struct zfs_file *file, const char *fsfilename)
 
hdrsize = SA_HDR_SIZE(((sa_hdr_phys_t *) sahdrp));
file->size = *(uint64_t *) ((char *) sahdrp + hdrsize + 
SA_SIZE_OFFSET);
+   if ((data->dnode.dn.dn_bonuslen == 0) &&
+   (data->dnode.dn.dn_flags & DNODE_FLAG_SPILL_BLKPTR))
+   free(sahdrp);
} else {
file->size = zfs_to_cpu64(((znode_phys_t *) 
DN_BONUS(&data->dnode.dn))->zp_size, data->dnode.endian);
}
-- 
2.0.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot