From 30ca3d36400e7cc862a5f6cae0db1ee4f04c9fd4 Mon Sep 17 00:00:00 2001 From: Tobias Hintze Date: Thu, 12 Jul 2007 03:39:55 +0000 Subject: [PATCH] Tobias Hintze: add --gen_init_cpio parameter to rockinitramfs which allows specification of alternate g_i_c binary. (this helps in stage1 when cross-compiling) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8633 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- .../teha/rockinitramfs/libexec/mkinitramfs.sh | 46 +++++++++++++++---- package/teha/rockinitramfs/rockinitramfs.desc | 4 +- 2 files changed, 38 insertions(+), 12 deletions(-) diff --git a/package/teha/rockinitramfs/libexec/mkinitramfs.sh b/package/teha/rockinitramfs/libexec/mkinitramfs.sh index ecb88b078..14e732036 100755 --- a/package/teha/rockinitramfs/libexec/mkinitramfs.sh +++ b/package/teha/rockinitramfs/libexec/mkinitramfs.sh @@ -1,7 +1,7 @@ #!/bin/sh # create initramfs image by using gen_cpio_init -# (we do not need root privileges for this!) +# (no need for root privileges) # # see ./build.d/ to see how the content is created! @@ -13,21 +13,39 @@ usage() { cat <<-EOF mkinitramfs - create initramfs image by using gen_cpio_init + typical use: mkinitramfs [ -r KERNEL_VERSION ] [ -m MODULES_DIR ] [ -o OUTPUT_FILE ] If no options are given the following defaults apply: mkinitramfs -r $k_ver -m $mod_origin -o $outfile Options: - -r Specify kernel version to use for modules dir - -m Specify directory where to search for kernel modules - -o Specify location of output file - -p VAR=val Pass some variable definition to the build.d scripts - -O output file list to given location + -r Specify kernel version to use for modules dir - --root-dir - --build-dir - --files-dir + -m Specify directory where to search for kernel modules + + -o Specify location of output file + + -p VAR=val Pass some variable definition to the build.d scripts + + -O output file list to given location + + --build-dir alternate directory for /lib/rock_initramfs/build.d/ + providing pluggable build components (scripts) + + --files-dir alternate directory for /lib/rock_initramfs/files/ + providing a location for files needed by + build.d-scripts + + --root-dir prefix for all directory locations + (e.g. /lib/modules, --files-dir, --build-dir) + + --gen_init_cpio alternate binary for gen_init_cpio + (usefull when default binary was cross compiled) + + --add-gen-line additional line to be passed to gen_init_cpio + (usefull for small changes without modifying + the whole build.d/-directory) EOF } @@ -75,6 +93,10 @@ do additional_gen_lines="$additional_gen_lines;$2" shift ;; + --gen_init_cpio) + gen_init_cpio="$2" + shift + ;; *) usage=1 ;; @@ -140,7 +162,11 @@ then fi # create and compress cpio archive -${LIBEXEC}/${cross_compile}gen_init_cpio ${TMPDIR}/list | gzip -9 > $outfile +if [ -z "$gen_init_cpio" ] ; then + ${LIBEXEC}/gen_init_cpio ${TMPDIR}/list | gzip -9 > $outfile +else + ${gen_init_cpio} ${TMPDIR}/list | gzip -9 > $outfile +fi [ -n "$listoutfile" ] && cp -v ${TMPDIR}/list "$listoutfile" diff --git a/package/teha/rockinitramfs/rockinitramfs.desc b/package/teha/rockinitramfs/rockinitramfs.desc index 22d2f894d..636221f2e 100644 --- a/package/teha/rockinitramfs/rockinitramfs.desc +++ b/package/teha/rockinitramfs/rockinitramfs.desc @@ -34,6 +34,6 @@ [L] GPL [S] Stable -[V] 3 -[P] X ---3-----9 236.500 +[V] 4 +[P] X -X---5---9 236.500