Cramfs Bad Block Patch

Posted on by
Cramfs Bad Block Patch 4,5/5 2109reviews

Linux Kernel Archive Re PATCH 2. Linear XIPFrom Jared Hulbert. Date Wed Jun 0. 6 2. EST. On 640. 7, Carsten Otte lt cottexxxxxxxxxx wrote. Nick Piggin wrote The question is, why is that not enough I havent looked at these patches enough to work out if there is anything more they provide. I think, it just takes trying things out. From reading the code, Ithink this should work well for the filemapxip code with no struct page. Also, we need eliminate nopage to get rid of the struct page. Cramfs Bad Block Patch' title='Cramfs Bad Block Patch' />PATCH Make the mtdblock readwrite skip the bad nand sector. When readwrite the nandblock device, it will abort writing if theres a bad block, its reasonable to. PATCH 2. 6. 21 cramfs add cramfs Linear XIP From. KERNERR cramfs bad compressed blocksize. Problem using cramfs as rootfs in. The Linux kernel has version 2. Montavista patch 2030. NAND Bad Block Algorithm, JFFS2, and CRAMFS. CRAMFS. We wanted to run with the bad block algorithm on CRAMFS and without it on the JFFS2 one. Unfortunately I dont find time to try this out for now, and on 3. In contrast to theembedded platforms, the memmep array gets swapped out to disk by ourhypervisor. File Extension Cramfs' title='File Extension Cramfs' />Carsten. Okay, so here is a patch that implements the filemapxip. XIP binaries from block. Ive been messing withthose patches for a long time and I couldnt stand all the ifdefs anylonger I have two system 1 UML which populates cramfssbinfo. PXA2. 70 which populates cramfssbinfo. I run two test A cmp mntcramfsbinbusybox binbusyboxB execute mntcramfsbinbusyboxOn both systems A works fine. Remove Stinger Program. B works on 1 but not on 2. This wasnt really busybox. It was xxd, not statically link, hence the issue with ld. Inconsistency detected by ld. Bad pte a. 4c. 6d. Assertionrtldlocal. C3. 80. 68. 20lt c. F0. 0 r. 7 C0. 33. C3. ECB3. D4 r. 5 C0. C3. ECB3. A0lt c. C3. ECB3. A0lt c. F0. 0lt c. 00. F7. So whats going on Kconfig afsKconfigTue Jun 0. KconfigWed Jun 0. FSXIPconfig FSXIP execute in placebooldepends on EXT2FSXIPdefault yconfig EXT3FS 1. CRAMFSTo compile this as a module, choose M here the module will be calledcramfs. Note that the root file system the one containing thedirectory cannot be compiled as a module. The Cram. Fs driver can load data directly from a linear addressed memory range usually non volatile memory like flash instead of going through the block device layer. This saves some memory since no intermediate buffering is necessary. The location of the Cram. Fs image in memory is board dependent. Therefore you must know the proper physical address where to store the Cram. Fs image and specify it using the physaddr0x mount option. With UML kernels iomem can be used instead after having passed the kernel a parameter such as iomembob,cramfs. To mount as the root pass the command line parameter rootdevnull rootflagsphysaddr0x or rootdevnull rootflagsiomem to the kernel Replace 0x with the physical address location of the linear Cram. Fs image to boot with. CRAMFSXIPbool Support XIP on cramfsdepends on FSXIPhelp You must say Y to this option if you want to be able to run applications directly from non volatile memory. XIP applications are marked by setting the sticky bit ie, chmod t lt app name. A Cram. Fs file system then needs to be created using mkcramfs with XIP cramfs support in it. Applications marked for XIP execution will not be compressed since they have to run directly from flash. This will also allow mounting an XIP binary on a block device. If unsure, say N. Tue Jun 0. 5 1. 1 3. Wed Jun 0. 6 0. 3 2. These are the VFS interfaces to the compressed rom filesystem. The actual compression is based on zlib, see the other files. Linear Addressing code Copyright C 2. Shane Nay. Allows you to have a linearly addressed cramfs filesystem. Saves the need for buffer, and the munging of the buffer. Savings a bit over 3. PAGESIZE, BUFFERSIZE etc. Usefull on embedded platform with ROM. Downsides Currently linear addressed cramfs partitions dont co exist with block cramfs partitions. Dec 2. 00. 0 XIP mode for linear cramfs Copyright C 2. Robert Leslie lt robxxxxxxxx This program is free software you can redistribute it andor modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 2 of the License, or at your option any later version. This program 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 this program if not, write to the Free Software Foundation, Inc., 5. Temple Place, Suite 3. Boston, MA 0. 21. USA filemapxip. Jared Hulbert 2. Jared Hulbert 2. 00. Kyungmin Park of Samsung and others at Motorola from the EZX phones include lt linuxmodule. CONFIGUMLinclude lt memuser. DEFINEMUTEXreadmutex These two macros may change in future, to provide better stinosemantics. CRAMINOxx offset x sizex offsetlt lt 2 1define OFFSETxx iino static int cramfsiget. CRAMFSSBinode isb if vma vmflags VMSHARED vma vmflags VMMAYWRITEreturn EINVAL if CRAMFSINODEISXIPinode vma vmflags VMWRITE LINEARCRAMFSsbireturn xipfilemmapfile, vma return genericfilemmapfile, vma struct page ramfsgetxippagestruct addressspace apping,sectort offset, int create unsigned long address unsigned long offs offset struct inode node mapping host struct superblock b inode isb struct cramfssbinfo bi CRAMFSSBsb address PAGEALIGNunsigned longsbi linearvirtaddr OFFSETinode offs 5. FIXME This shouldnt be hard coded address offs return virttopageaddress ssizet cramfsfilereadstruct file ile, char user buf, sizet len, lofft pposstruct inode node file fdentry dinode struct cramfssbinfo bi CRAMFSSBinode isb if CRAMFSINODEISXIPinode LINEARCRAMFSsbireturn xipfilereadfile, buf, len, ppos return dosyncreadfile, buf, len, ppos static struct fileoperations cramfslinearxipfops aioreadgenericfileaioread,readcramfsfileread,mmapcramfsmmap, static struct backingdevinfo cramfsbackingdevinfo . No readahead static struct inode etcramfsinodestruct superblock b,struct cramfsinode cramfsinodestruct cramfssbinfo bi CRAMFSSBsb struct inode node iget. CRAMINOcramfsinode,cramfsiget. INEW if LINEARCRAMFSsbiinode imapping backingdevinfo cramfsbackingdevinfo ifdef CONFIGCRAMFSXIPifSISREGinode imodeinode ifop CRAMFSINODEISXIPinode cramfslinearxipfops genericrofops endifunlocknewinodeinode return inode 1.