Consolidate more ramdisk and disk-image code.

RAMDISK_ELEMENT is a spurious difference, to merge the code we need
only semantic difference to exist.

Change-Id: I7d38b2457b6fc838d1a536406bb3c34c00f2b1f9
This commit is contained in:
Robert Collins 2013-06-20 14:58:14 +12:00
parent 539e8e2e69
commit 9b01f2b129
3 changed files with 7 additions and 7 deletions

View file

@ -53,15 +53,15 @@ while true ; do
*) echo "Internal error!" ; exit 1 ;;
esac
done
for arg do RAMDISK_ELEMENT="$RAMDISK_ELEMENT $arg" ; done
for arg do IMAGE_ELEMENT="$IMAGE_ELEMENT $arg" ; done
source $_LIB/ramdisk-defaults
source $_LIB/common-functions
source $_LIB/ramdisk-functions
RAMDISK_ELEMENT=$($SCRIPT_HOME/element-info --expand-dependencies $RAMDISK_ELEMENT)
IMAGE_ELEMENT=$($SCRIPT_HOME/element-info --expand-dependencies $IMAGE_ELEMENT)
echo "Building element(s): ${RAMDISK_ELEMENT}"
echo "Building element(s): ${IMAGE_ELEMENT}"
echo "Discovering binary dependencies"
ensure_binaries

View file

@ -52,7 +52,7 @@ function save_image () {
function generate_hooks () {
mkdir -p $TMP_HOOKS_PATH
for _ELEMENT in $IMAGE_ELEMENT $RAMDISK_ELEMENT ; do
for _ELEMENT in $IMAGE_ELEMENT ; do
for dir in $(echo $ELEMENTS_PATH | tr ":" " ") ; do
[ -d $dir/$_ELEMENT ] || continue
cp -t $TMP_HOOKS_PATH -a $dir/$_ELEMENT/* ;

View file

@ -31,7 +31,7 @@ function cleanup () {
function ensure_binaries() {
BINARY_DEPS="${BUSYBOX}"
for _FLVR in ${RAMDISK_ELEMENT} ; do
for _FLVR in ${IMAGE_ELEMENT} ; do
for dir in $(echo $ELEMENTS_PATH | tr ":" " ") ; do
[ -d $dir/$_FLVR ] || continue
_FILE="${dir}/${_FLVR}/binary-deps"
@ -202,7 +202,7 @@ function populate_init () {
done
# Append /init with any element fragments that are present
for _FLVR in ${RAMDISK_ELEMENT} ; do
for _FLVR in ${IMAGE_ELEMENT} ; do
for dir in $(echo $ELEMENTS_PATH | tr ":" " ") ; do
[ -d $dir/$_FLVR ] || continue
_FILE="${dir}/${_FLVR}/init"
@ -228,7 +228,7 @@ function finalise_image () {
function populate_udev () {
echo "Installing udev rules"
for _FLVR in ${RAMDISK_ELEMENT} ; do
for _FLVR in ${IMAGE_ELEMENT} ; do
for dir in $(echo $ELEMENTS_PATH | tr ":" " ") ; do
[ -d $dir/$_FLVR ] || continue
_DIR="${dir}/${_FLVR}/udev"