aboutsummaryrefslogtreecommitdiffstats
path: root/usr
Commit message (Collapse)AuthorAgeFilesLines
* Standalone recovery kernel build for galaxysmtdreplicant-4.2-0002replicant-4.2-0001Paul Kocialkowski2013-12-272-0/+89
| | | | Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
* initramfs: use freshly compiled utilitiesChirayu Desai2013-05-128-5/+5
| | | | | Change-Id: I78571f2c3cedd02f263454076edc60ca22065208 Signed-off-by: Chirayu Desai <chirayudesai1@gmail.com>
* add support for p1Chirayu Desai2013-05-053-0/+126
| | | | | | | Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org> Signed-off-by: Humberto Borba <humberos@gmail.com> Signed-off-by: Koudai Aono <koxudaxi@gmail.com> Change-Id: I2dcbaee7f17852ed3ea4a5db2d103704027fe259
* stage1: generalize mmc waitingPawit Pornkitprasan2012-12-222-2/+2
| | | | | | | | Use major-minor number to check if mmc is initialized. This improves compatibility for Captivate users who use microSD in lieu of their bricked internal mmc. Change-Id: Ib55f2870fa40de583a7b06e7afba0ce0578ee113
* aries: stage1: wait for mmc0 to initializePawit Pornkitprasan2012-12-052-0/+10
| | | | | | | | Compiling bcmdhd as a module causes there to not be enough delay before stage1 init is called causing it to try and mount /system before mmc0 is initialized. It thinks that there is no system and enters recovery. Change-Id: Ie6ff14507f56f725bf8649c01d1d199b9d48b335
* Merge 3.0.52Pawit Pornkitprasan2012-11-201-20/+23
|\ | | | | | | | | | | | | | | | | | | Merge branch 'linux-3.0.y' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into jellybean-next Conflicts: drivers/net/tun.c kernel/time/timekeeping.c Change-Id: Iba7fc59ca05114d9e7bade8dfc5bb45229ebf075
| * gen_init_cpio: avoid stack overflow when expandingKees Cook2012-10-311-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 20f1de659b77364d55d4e7fad2ef657e7730323f upstream. Fix possible overflow of the buffer used for expanding environment variables when building file list. In the extremely unlikely case of an attacker having control over the environment variables visible to gen_init_cpio, control over the contents of the file gen_init_cpio parses, and gen_init_cpio was built without compiler hardening, the attacker can gain arbitrary execution control via a stack buffer overflow. $ cat usr/crash.list file foo ${BIG}${BIG}${BIG}${BIG}${BIG}${BIG} 0755 0 0 $ BIG=$(perl -e 'print "A" x 4096;') ./usr/gen_init_cpio usr/crash.list *** buffer overflow detected ***: ./usr/gen_init_cpio terminated This also replaces the space-indenting with tabs. Patch based on existing fix extracted from grsecurity. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Michal Marek <mmarek@suse.cz> Cc: Brad Spengler <spender@grsecurity.net> Cc: PaX Team <pageexec@freemail.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | use logical volumes for system and data, bring back datadatajt11342012-09-258-7/+1596
| | | | | | | | | | | | | | | | | | | | | | * use lvm to split eMMC into 2 logical partitions * use entire available space on OneNAND for /datadata based on information from: http://bit.ly/OMny8Z WARNING: WILL WIPE DEVICE Change-Id: Iea6c08f462a88686860e4a1d926a984790378a37
* | Use OneNAND for /dataPawit Pornkitprasan2012-08-166-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Writing on MoviNAND is very slow and so we use it on /system and use the space of /system for /data instead. Need corresponding modification on device tree Patch Set 2: fascinatemtd has a spare partition on MoviNAND, ~190MB use it for cache and remove cache from OneNAND Change-Id: Ife77bcda275970044a5abd448a6e853807d2a85d
* | fascinatemtd: start recovery if /data/.startrecovery existsjt11342012-08-041-0/+4
| | | | | | | | | | | | | | | | | | this allows a decoy kernel on the recovery partition to clear the bootmode and set .startrecovery flag on data, fixing 3 button recovery for fascinatemtd; param module no longer does the trick Change-Id: I6e21b6147e9a4b740e6a5009b9363dd2b4cca78d
* | aries: adjust ramdisk for built in stage2Pawit Pornkitprasan2012-07-2121-382/+24
| | | | | | | | | | | | also remove duplicate ramdisks for ease of maintenance Change-Id: Ie101d47db1120a059ea03e1a52b5da0c2151df93
* | Prepare for CM integrated kernel buildingPawit Pornkitprasan2012-04-165-20/+20
| | | | | | | | | | | | | | - Renamed defconfig to cyanogenmod standard - Removed build.sh - Change initramfs paths for out-of-tree building - Include CM_README for building instructions
* | aries: Bring back /cache/.startrecovery for compatibilityPawit Pornkitprasan2012-01-075-15/+26
| | | | | | | | | | | | ROM Manager hardcoded the usage of /cache/.startrecovery, so bring that back for compatibility. (Updating ROM Manager would break support for old versions.)
* | aries: Add bootmode injection supportPawit Pornkitprasan2012-01-075-26/+15
| | | | | | | | | | | | Allows reboot recovery to work without /cache/.startrecovery hack - Renames s3c_usb_set_serial to aries_inject_cmdline
* | Added support for ariesPawit Pornkitprasan2011-12-2425-0/+580
|/ | | | | Reverts "S5PC11X : FIMC apply v4l2 standard for asynchronous dequeue/queue" 5f4b037e6ebb18d65a3ac896032eb559d7fe2baf
* initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entriesMichal Marek2011-04-181-13/+40
| | | | | | | | | gen_init_cpio gets the current time and uses it for each symlink, special file, and directory. Grab the current time once and make it possible to override it with the KBUILD_BUILD_TIMESTAMP variable for reproducible builds. Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERTDavid Rientjes2011-01-201-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option is used to configure any non-standard kernel with a much larger scope than only small devices. This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes references to the option throughout the kernel. A new CONFIG_EMBEDDED option is added that automatically selects CONFIG_EXPERT when enabled and can be used in the future to isolate options that should only be considered for embedded systems (RISC architectures, SLOB, etc). Calling the option "EXPERT" more accurately represents its intention: only expert users who understand the impact of the configuration changes they are making should enable it. Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: David Woodhouse <david.woodhouse@intel.com> Signed-off-by: David Rientjes <rientjes@google.com> Cc: Greg KH <gregkh@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jens Axboe <axboe@kernel.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Robin Holt <holt@sgi.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* decompressors: add boot-time XZ supportLasse Collin2011-01-132-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This implements the API defined in <linux/decompress/generic.h> which is used for kernel, initramfs, and initrd decompression. This patch together with the first patch is enough for XZ-compressed initramfs and initrd; XZ-compressed kernel will need arch-specific changes. The buffering requirements described in decompress_unxz.c are stricter than with gzip, so the relevant changes should be done to the arch-specific code when adding support for XZ-compressed kernel. Similarly, the heap size in arch-specific pre-boot code may need to be increased (30 KiB is enough). The XZ decompressor needs memmove(), memeq() (memcmp() == 0), and memzero() (memset(ptr, 0, size)), which aren't available in all arch-specific pre-boot environments. I'm including simple versions in decompress_unxz.c, but a cleaner solution would naturally be nicer. Signed-off-by: Lasse Collin <lasse.collin@tukaani.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Alain Knaff <alain@knaff.lu> Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com> Cc: Phillip Lougher <phillip@lougher.demon.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'kbuild' of ↵Linus Torvalds2011-01-101-6/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: mkuboot.sh: Fail if mkimage is missing gen_init_cpio: checkpatch fixes gen_init_cpio: Avoid race between call to stat() and call to open() modpost: Fix address calculation in reloc_location() Make fixdep error handling more explicit checksyscalls: Fix stand-alone usage modpost: Put .zdebug* section on white list kbuild: fix interaction of CONFIG_IKCONFIG and KCONFIG_CONFIG kbuild: export linux/{a.out,kvm,kvm_para}.h on headers_install_all kbuild: introduce HDR_ARCH_LIST for headers_install_all headers_install: check exit status of unifdef gen_init_cpio: remove leading `/' from file names scripts/genksyms: fix header usage fixdep: use hash table instead of a single array
| * gen_init_cpio: checkpatch fixesAndrew Morton2011-01-051-2/+2
| | | | | | | | | | | | | | Cc: Jesper Juhl <jj@chaosbits.net> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * gen_init_cpio: Avoid race between call to stat() and call to open()Jesper Juhl2010-12-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | In usr/gen_init_cpio.c::cpio_mkfile() a call to stat() is made based on pathname, subsequently the file is open()'ed and then the value of the initial stat() call is used to allocate a buffer. This is not safe since the file may change between the call to stat() and the call to open(). Safer to just open() the file and then do fstat() using the filedescriptor returned by open. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * Merge commit 'v2.6.37-rc1' into kbuild/kbuildMichal Marek2010-12-142-4/+4
| |\
| * | gen_init_cpio: remove leading `/' from file namesThomas Chou2010-12-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we extracted the generated cpio archive using "cpio -id" command, it complained, cpio: Removing leading `/' from member names var/run cpio: Removing leading `/' from member names var/lib cpio: Removing leading `/' from member names var/lib/misc It is worse with the latest "cpio" or "pax", which tries to overwrite the host file system with the leading '/'. So the leading '/' of file names should be removed. This is consistent with the initramfs come with major distributions such as Fedora or Debian, etc. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Mike Frysinger<vapier@gentoo.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | | initramfs: Really fix build break on symbol-prefixed archsHendrik Brueckner2010-12-011-2/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Define the __initramfs_size variable using VMLINUX_SYMBOL() to take care of symbol-prefixed architectures, for example, blackfin. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>, Cc: Michal Marek <mmarek@suse.cz> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> [mmarek: leave out Makefile change, since d63f6d1 already takes care of the SYMBOL_PREFIX define] Signed-off-by: Michal Marek <mmarek@suse.cz>
* | initramfs: Fix initramfs size for 32-bit archesGeert Uytterhoeven2010-10-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ffe8018c3424 ("initramfs: fix initramfs size calculation") broke 32-bit big-endian arches like (on ARAnyM): VFS: Cannot open root device "hda1" or unknown-block(3,1) Please append a correct "root=" boot option; here are the available partitions: fe80 1059408 nfhd8 (driver?) fe81 921600 nfhd8p1 00000000-0000-0000-0000-000000000nfhd8p1 fe82 137807 nfhd8p2 00000000-0000-0000-0000-000000000nfhd8p2 0200 3280 fd0 (driver?) 0201 3280 fd1 (driver?) 0300 1059408 hda driver: ide-gd 0301 921600 hda1 00000000-0000-0000-0000-000000000hda1 0302 137807 hda2 00000000-0000-0000-0000-000000000hda2 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,1) As pointed out by Kerstin Jonsson <kerstin.jonsson@ericsson.com>, this is due to CONFIG_32BIT not being defined, so the initramfs size field is done as a 64-bit quad. On little-endian (like x86) this doesn matter, but on a big-endian machine the 32-bit reads will see the (zero) high bits. Only mips, s390, and score set CONFIG_32BIT for 32-bit builds, so fix it for all other 32-bit arches by inverting the logic and testing for CONFIG_64BIT, which should be defined on all 64-bit arches. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> [ I think we should just make it "u64" on all architectures and get rid of the whole #ifdef CONFIG_xxBIT - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'kbuild' of ↵Linus Torvalds2010-10-286-125/+18
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: initramfs: Fix build break on symbol-prefixed archs initramfs: fix initramfs size calculation initramfs: generalize initramfs_data.xxx.S variants scripts/kallsyms: Enable error messages while hush up unnecessary warnings scripts/setlocalversion: update comment kbuild: Use a single clean rule for kernel and external modules kbuild: Do not run make clean in $(srctree) scripts/mod/modpost.c: fix commentary accordingly to last changes kbuild: Really don't clean bounds.h and asm-offsets.h
| * initramfs: fix initramfs size calculationHendrik Brueckner2010-09-291-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of a built-in initramfs is calculated in init/initramfs.c by "__initramfs_end - __initramfs_start". Those symbols are defined in the linker script include/asm-generic/vmlinux.lds.h: #define INIT_RAM_FS \ . = ALIGN(PAGE_SIZE); \ VMLINUX_SYMBOL(__initramfs_start) = .; \ *(.init.ramfs) \ VMLINUX_SYMBOL(__initramfs_end) = .; If the initramfs file has an odd number of bytes, the "__initramfs_end" symbol points to an odd address, for example, the symbols in the System.map might look like: 0000000000572000 T __initramfs_start 00000000005bcd05 T __initramfs_end <-- odd address At least on s390 this causes a problem: Certain s390 instructions, especially instructions for loading addresses (larl) or branch addresses must be on even addresses. The compiler loads the symbol addresses with the "larl" instruction. This instruction sets the last bit to 0 and, therefore, for odd size files, the calculated size is one byte less than it should be: 0000000000540a9c <populate_rootfs>: 540a9c: eb cf f0 78 00 24 stmg %r12,%r15,120(%r15), 540aa2: c0 10 00 01 8a af larl %r1,572000 <__initramfs_start> 540aa8: c0 c0 00 03 e1 2e larl %r12,5bcd04 <initramfs_end> (Instead of 5bcd05) ... 540abe: 1b c1 sr %r12,%r1 To fix the problem, this patch introduces the global variable __initramfs_size, which is calculated in the "usr/initramfs_data.S" file. The populate_rootfs() function can then use the start marker of the .init.ramfs section and the value of __initramfs_size for loading the initramfs. Because the start marker and size is sufficient, the __initramfs_end symbol is no longer needed and is removed. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: Michal Marek <mmarek@suse.cz> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
| * initramfs: generalize initramfs_data.xxx.S variantsHendrik Brueckner2010-09-296-120/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove initramfs_data.{lzo,lzma,gz,bz2}.S variants and use a common implementation in initramfs_data.S. The common implementation expects the file name of the initramfs to be defined in INITRAMFS_IMAGE. Change the Makefile to set the INITRAMFS_IMAGE define symbol according to the selected compression method. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: Michal Marek <mmarek@suse.cz> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | Kconfig: delete duplicate wordStephan Sperber2010-08-231-1/+1
|/ | | | | | | Deleted a word which apeared twice. Signed-off-by: Stephan Sperber <sperberstephan@googlemail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* initramfs: add support for in-kernel initramfs compressed with LZOAlbin Tonnerre2010-05-272-1/+33
| | | | | | | | | | | Add the necessary parts to be enable the use of LZO-compressed initramfs build into the kernel. Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add LZO compression support for initramfs and old-style initrdAlbin Tonnerre2010-01-111-5/+21
| | | | | | | | | | | | | Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Tested-by: Wu Zhangjin <wuzhangjin@gmail.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Tested-by: Russell King <rmk@arm.linux.org.uk> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* gen_init_cpio: fixed fwrite warningMike Frysinger2009-12-121-1/+4
| | | | | | | | | | | | | On compilers with security warnings enabled by default, we get: usr/gen_init_cpio.c: In function ‘cpio_mkfile’: usr/gen_init_cpio.c:357: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result So check the return value and handle errors accordingly. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-nextLinus Torvalds2009-09-232-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits) Use macros for .data.page_aligned section. Use macros for .bss.page_aligned section. Use new __init_task_data macro in arch init_task.c files. kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts. arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 kbuild: add static to prototypes kbuild: fail build if recordmcount.pl fails kbuild: set -fconserve-stack option for gcc 4.5 kbuild: echo the record_mcount command gconfig: disable "typeahead find" search in treeviews kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling checkincludes.pl: add option to remove duplicates in place markup_oops: use modinfo to avoid confusion with underscored module names checkincludes.pl: provide usage helper checkincludes.pl: close file as soon as we're done with it ctags: usability fix kernel hacking: move STRIP_ASM_SYMS from General gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma kbuild: Check if linker supports the -X option kbuild: introduce ld-option ... Fix trivial conflict in scripts/basic/fixdep.c
| * gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzmaJaswinder Singh Rajput2009-09-201-0/+2
| | | | | | | | | | | | | | | | | | usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma are binary files should be ignored Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: correct initramfs compression commentRobert P. J. Day2009-09-201-1/+1
| | | | | | | | | | | | | | Fix the Makefile comment since bzip2 is now supported. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* | Fix all -Wmissing-prototypes warnings in x86 defconfigTrevor Keith2009-09-231-1/+1
|/ | | | | | | Signed-off-by: Trevor Keith <tsrk@tsrk.net> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* bzip2/lzma: quiet Kconfig warning for INITRAMFS_COMPRESSION_NONEH. Peter Anvin2009-03-312-17/+1
| | | | | | | | | | | | Impact: quiet Kconfig warning It appears that Kconfig simply has no way to provide defaults for entries that exist inside a conditionalized choice block. Fortunately, it turns out we don't actually ever use CONFIG_INITRAMFS_COMPRESSION_NONE, so we can just drop it for everything outside the choice block. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bzip2/lzma: don't ask for compression mode for the default initramfsH. Peter Anvin2009-03-281-10/+22
| | | | | | | | | | | | | Impact: Kconfig noise reduction, documentation The default initramfs is so small that it makes no sense to worry about the additional memory taken by not double-compressing it. Therefore, don't bug the user with it. Also, improve the description of the option, which was downright incorrect. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bzip2/lzma: consistently capitalize LZMA in KconfigH. Peter Anvin2009-03-281-3/+3
| | | | | | | | | Impact: message formatting Consistently spell LZMA in all capitals, since it (unlike gzip or bzip2) is an acronym. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bzip2/lzma: clarify the meaning of the CONFIG_RD_ optionsH. Peter Anvin2009-03-281-3/+3
| | | | | | | | | Impact: Kconfig clarification Make it clear that the CONFIG_RD_* options are about what formats are supported, not about what formats are actually being used. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDEDH. Peter Anvin2009-03-281-8/+8
| | | | | | | | | | | Impact: reduce Kconfig noise Move the options that control possible initramfs/initrd compressions underneath CONFIG_EMBEDDED. The only impact of leaving these options set to y is additional code in the init section of the kernel; there is no reason to burden non-embedded users with these options. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bzip2/lzma: make internal initramfs compression configurableAlain Knaff2009-02-192-12/+68
| | | | | | | | | | | | | Impact: Avoids silent environment dependency Make builtin initramfs compression an explicit configurable. The previous version would pick a compression based on the binaries which were installed on the system, which could lead to unexpected results. It is now explicitly configured, and not having the appropriate binaries installed on the build host is simply an error. Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* bzip2/lzma: fix built-in initramfs vs CONFIG_RD_GZIPAlain Knaff2009-01-075-13/+118
| | | | | | | | | | | | | | | | | | Impact: Resolves build failures in some configurations Makes it possible to disable CONFIG_RD_GZIP . In that case, the built-in initramfs will be compressed by whatever compressor is available (bzip2 or lzma) or left uncompressed if none is available. It also removes a couple of warnings which occur when no ramdisk compression at all is chosen. It also restores the select ZLIB_INFLATE in drivers/block/Kconfig which somehow came missing. This is needed to activate compilation of the stuff in zlib_deflate. Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* bzip2/lzma: move initrd/ramfs options out of BLK_DEVH. Peter Anvin2009-01-071-0/+27
| | | | | | | | | | Impact: Partial resolution of build failure Move the initrd/initramfs configuration options from drivers/block/Kconfig to usr/Kconfig, since they do not and should not depend on CONFIG_BLK_DEV. This fixes builds when CONFIG_BLK_DEV=n. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* kbuild: gen_init_cpio expands shell variables in file namesSally, Gene2008-12-031-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify gen_init_cpio so that lines that specify files can contain what looks like a shell variable that's expanded during processing. For example: file /sbin/kinit ${RFS_BASE}/usr/src/klibc/kinit/kinit 0755 0 0 given RFS_BASE is "/some/directory" in the environment would be expanded to file /sbin/kinit /some/directory/usr/src/klibc/kinit/kinit 0755 0 0 If several environment variables appear in a line, they are all expanded with processing happening from left to right. Undefined variables expand to a null string. Syntax errors stop processing, letting the existing error handling show the user offending line. This patch helps embedded folks who frequently create several RFS directories and then switch between them as they're tuning an initramfs. Signed-off-by: gene.sally@timesys.com Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: add support for reading stdin with gen_init_cpioMike Frysinger2007-07-161-1/+3
| | | | | | | | | Treat an argument of "-" as meaning "read stdin for cpio files" so gen_init_cpio can be piped into. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* .gitignore updateAlexey Dobriyan2007-07-161-0/+1
| | | | | | | | | | | | headers_install by default puts headers into usr/include/ . They're auto-generated, so should be ignored. Same for *.orig, *.rej . Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usr/Kconfig: fix typoAlexander E. Patrakov2007-05-021-1/+1
| | | | | Signed-off-by: Alexander E. Patrakov Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* [PATCH] usr/gen_init_cpio.c: support for hard linksLuciano Rocha2007-02-111-36/+86
| | | | | | | | | | | | | | | | | | | | | | Extend usr/gen_init_cpio.c "file" entry, adding support for hard links. Previous format: file <name> <location> <mode> <uid> <gid> New format: file <name> <location> <mode> <uid> <gid> [<hard links>] The hard links specification is optional, keeping the previous behaviour. All hard links are defined sequentially in the resulting cpio and the file data is present only in the last link. This is the behaviour of GNU's cpio and is supported by the kernel initramfs extractor. Signed-off-by: Luciano Rocha <strange@nsk.no-ip.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] disable init/initramfs.cJean-Paul Saman2007-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file init/initramfs.c is always compiled and linked in the kernel vmlinux even when BLK_DEV_RAM and BLK_DEV_INITRD are disabled and the system isn't using any form of an initramfs or initrd. In this situation the code is only used to unpack a (static) default initial rootfilesystem. The current init/initramfs.c code. usr/initramfs_data.o compiles to a size of ~15 kbytes. Disabling BLK_DEV_RAM and BLK_DEV_INTRD shrinks the kernel code size with ~60 Kbytes. This patch avoids compiling in the code and data for initramfs support if CONFIG_BLK_DEV_INITRD is not defined. Instead of the initramfs code and data it uses a small routine in init/noinitramfs.c to setup an initial static default environment for mounting a rootfilesystem later on in the kernel initialisation process. The new code is: 164 bytes of size. The patch is separated in two parts: 1) doesn't compile initramfs code when CONFIG_BLK_DEV_INITRD is not set 2) changing all plaforms vmlinux.lds.S files to not reserve an area of PAGE_SIZE when CONFIG_BLK_DEV_INITRD is not set. [deweerdt@free.fr: warning fix] Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>