Browse Source

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
rocklinux
Tobias Hintze 17 years ago
parent
commit
30ca3d3640
2 changed files with 38 additions and 12 deletions
  1. +36
    -10
      package/teha/rockinitramfs/libexec/mkinitramfs.sh
  2. +2
    -2
      package/teha/rockinitramfs/rockinitramfs.desc

+ 36
- 10
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"

+ 2
- 2
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

Loading…
Cancel
Save