From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 28 Jan 2010 08:30:44 +0100 Subject: [U-Boot] [PATCH 1/2 v2] cramfs: make cramfs usable on non NOR flash In-Reply-To: <20100127192831.32327D334C9@gemini.denx.de> References: <4B459395.2050301@denx.de> <20100117235121.5E479C88AE@gemini.denx.de> <4B5FE9EC.6090909@denx.de> <4B5FEB9E.3040908@denx.de> <20100127192831.32327D334C9@gemini.denx.de> Message-ID: <4B613D24.7060604@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Wolfgang, Wolfgang Denk wrote: > In message <4B5FEB9E.3040908@denx.de> you wrote: >> [PATCH 1/2] cramfs: make cramfs usable without a NOR flash > > I'm afraid I still don't understand how this is supposed to work. > > Where would you store the cramfs on a system "without a NOR flash"? > Are we talking about - say - a NAND storage device then? The cramfs image is located in RAM (where it first was copied from whenever), and then files are read from it with the "cramfsload" command ... >> @@ -119,7 +121,11 @@ int do_cramfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) >> dev.id = &id; >> part.dev = &dev; >> /* fake the address offset */ >> +#if !defined(CONFIG_SYS_NO_FLASH) >> part.offset = addr - flash_info[id.num].start[0]; >> +#else >> + part.offset = addr; >> +#endif > > I understand that we now can have the cramfs image either in NOR flash > _or_ in NAND. No, we can have it in ROM or in RAM. > What about systems that have both NOR _and_ NAND? Are there such systems, with cramfs support? Actual cramfs support in mainline is only for NOR devices ... But, I think, it should work to extract a file from a cramfs stored on a NAND on such systems with the "cramfsload" command ... if not, the cramfs image could be copied from NAND to RAM, and then it works ... bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany