Re: [PATCH 06/14] Pramfs: Include files

2009-06-24 Thread Marco Stornelli
2009/6/23 Arnd Bergmann a...@arndb.de: On Tuesday 23 June 2009, David Woodhouse wrote: And dd on /dev/mem would work, surely? Actually, reading from /dev/mem is only valid on real RAM. If the nvram is part of an IO memory mapping, you have to do mmap()+memcpy() rather than read(). So dd

Re: [PATCH 06/14] Pramfs: Include files

2009-06-24 Thread Marco
Arnd Bergmann wrote: On Wednesday 24 June 2009, Marco Stornelli wrote: Actually, reading from /dev/mem is only valid on real RAM. If the nvram is part of an IO memory mapping, you have to do mmap()+memcpy() rather than read(). So dd won't do it, but it's still easy to read from user space.

Re: [PATCH 06/14] Pramfs: Include files

2009-06-23 Thread Marco
Sam Ravnborg wrote: It should be possible to read a file-system on your x86 64bit box that you wrote with your small powerpc target. For a (NV)RAM-based filesystem?? WTH??? dd the full image - dig into it. Usefull is you have post-mortem info there. Sam dd? You haven't got any

Re: [PATCH 06/14] Pramfs: Include files

2009-06-23 Thread Arnd Bergmann
On Tuesday 23 June 2009, David Woodhouse wrote: And dd on /dev/mem would work, surely? Actually, reading from /dev/mem is only valid on real RAM. If the nvram is part of an IO memory mapping, you have to do mmap()+memcpy() rather than read(). So dd won't do it, but it's still easy to read from

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Marco Stornelli
2009/6/21 Arnd Bergmann a...@arndb.de: On Sunday 21 June 2009, Marco wrote: I was thinking about your comment and I think I'll use __kernel_off_t for the exported headers. I know that it will differ between 32 and 64 bit architectures, but for this kind of fs there isn't any compatibility

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Marco
Arnd Bergmann wrote: On Monday 22 June 2009, Marco Stornelli wrote: It's still a problem. You might be creating a file system image for an embedded board with a different endianess. It's not possible to create an image with pramfs, it's like tmpfs. But the data is persistant, you even

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Arnd Bergmann
On Monday 22 June 2009, Marco wrote: Sorry, I meant it's not currently possible. At the moment the only way to use it as rootfs it's to copy all the data in an already mounted (empty) ram partition and reboot. However it's not my first item on my todo list because I think that it's possible

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Chris Simmonds
Arnd Bergmann wrote: On Monday 22 June 2009, Marco wrote: Sorry, I meant it's not currently possible. At the moment the only way to use it as rootfs it's to copy all the data in an already mounted (empty) ram partition and reboot. However it's not my first item on my todo list because I think

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Sam Ravnborg
On Mon, Jun 22, 2009 at 08:31:10PM +0100, Chris Simmonds wrote: Arnd Bergmann wrote: On Monday 22 June 2009, Marco wrote: Sorry, I meant it's not currently possible. At the moment the only way to use it as rootfs it's to copy all the data in an already mounted (empty) ram partition and

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Jörn Engel
On Mon, 22 June 2009 20:31:10 +0100, Chris Simmonds wrote: I disagree: that adds an unnecessary overhead for those architectures where the cpu byte order does not match the data structure ordering. I think the data structures should be native endian and when mkpramfs is written it can

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Arnd Bergmann
On Monday 22 June 2009, Jörn Engel wrote: Four loops doing the same increment with different data types: long, u64, we32 (wrong-endian) and we64. Compile with no optimizations. Results on my i386 notebook: long: 453953 us we32: 880273 us u64: 504214 us we64:2259953 us

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Sam Ravnborg
It should be possible to read a file-system on your x86 64bit box that you wrote with your small powerpc target. For a (NV)RAM-based filesystem?? WTH??? dd the full image - dig into it. Usefull is you have post-mortem info there. Sam -- To unsubscribe from this list: send the

Re: [PATCH 06/14] Pramfs: Include files

2009-06-22 Thread Jörn Engel
On Mon, 22 June 2009 23:20:39 +0100, David Woodhouse wrote: On Mon, 2009-06-22 at 23:41 +0200, Jörn Engel wrote: Four loops doing the same increment with different data types: long, u64, we32 (wrong-endian) and we64. Compile with _no_ optimizations. That's a bit of a poor test then.

Re: [PATCH 06/14] Pramfs: Include files

2009-06-21 Thread Marco
Arnd Bergmann wrote: On Saturday 13 June 2009, Sam Ravnborg wrote: + union { + struct { + /* + * ptr to row block of 2D block pointer array, + * file block #'s 0 to (blocksize/4)^2 - 1. + */

Re: [PATCH 06/14] Pramfs: Include files

2009-06-13 Thread Sam Ravnborg
On Sat, Jun 13, 2009 at 03:21:48PM +0200, Marco wrote: From: Marco Stornelli marco.storne...@gmail.com Include files. Signed-off-by: Marco Stornelli marco.storne...@gmail.com --- diff -uprN linux-2.6.30-orig/fs/pramfs/pram_fs.h linux-2.6.30/fs/pramfs/pram_fs.h ---