Merge "Add a ramdisk-install.d hook path."

This commit is contained in:
Jenkins 2014-07-30 01:31:29 +00:00 committed by Gerrit Code Review
commit e6c9ba3d1b
3 changed files with 9 additions and 3 deletions

View File

@ -382,6 +382,10 @@ Ramdisk elements support the following files in their element directories:
* init.d : POSIX shell script fragments that will be appended to the default
script executed as the ramdisk is booted (/init).
* ramdisk-install.d : called to copy files into the ramdisk. The variable
TMP\_MOUNT\_PATH points to the root of the tree that will be packed into
the ramdisk.
* udev.d : udev rules files that will be copied into the ramdisk.
### Element coding standard ###

View File

@ -26,15 +26,17 @@ IMAGE_ELEMENT=
mk_build_dir
mkdir -p $TMP_BUILD_DIR/mnt
TMP_MOUNT_PATH=$TMP_BUILD_DIR/mnt
export TMP_HOOKS_PATH=/tmp
export TMP_MOUNT_PATH=$TMP_BUILD_DIR/mnt
echo "working in $TMP_MOUNT_PATH"
echo "building ramdisk in $TMP_MOUNT_PATH"
create_ramdisk_base
populate_lib
populate_busybox
populate_init
populate_udev
SCRIPT_HOME=/tmp/in_target.d/bin TMP_HOOKS_PATH=/tmp/in_target.d run_d ramdisk-install
finalise_image
save_image /tmp/ramdisk
cp /boot/vmlinuz-${KERNEL_VERSION} /tmp/kernel

View File

@ -192,7 +192,7 @@ function cleanup_dirs () {
rm -rf $TMP_BUILD_DIR $TMP_IMAGE_DIR
}
# Run a directory of hooks outside the target.
# Run a directory of hooks outside the target (that is, no chrooting).
function run_d() {
check_element
check_break before-$1 bash