From 7628e81215c6fe2bd3bff9005676fd13dce6a9c5 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 15 Feb 2008 20:09:27 +0000 Subject: [PATCH] Adapted target/early/build-initramfs.in to the current function names and hooks of the initramfs output format --- target/early/build-initramfs.in | 45 ++++++++++----------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/target/early/build-initramfs.in b/target/early/build-initramfs.in index 36d8697..915961a 100644 --- a/target/early/build-initramfs.in +++ b/target/early/build-initramfs.in @@ -1,29 +1,30 @@ # --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# +# # Filename: target/early/build-initramfs.in -# Copyright (C) 2007 The OpenSDE Project -# +# Copyright (C) 2007 - 2008 The OpenSDE Project +# # More information can be found in the files COPYING and README. -# +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. A copy of the # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- -INITRD_POSTFLIST_HOOK='early_adjust_initrd' +INITRAMFS_POSTINSTALL_HOOK='early_adjust_initrd' # flatten -ln -s . ${initrddir}/usr +ln -s . ${rootfs}/usr # don't break /tmp when flattening -INITRD_FLIST_PATTERN="$INITRD_FLIST_PATTERN -e '/ usr\/tmp/d;'" +INITRAMFS_INSTALL_PATTERN="$INITRD_FLIST_PATTERN -e '/ usr\/tmp/d;'" -INITRD_EMPTY_PATTERN="-e '/\.\/rootfs/d;'" +INITRAMFS_EMPTY_PATTERN="-e '/\.\/rootfs/d;'" -initrd_flist_install_filter() { - local root="build/${SDECFG_ID}/" +# initramfs_install +initramfs_install() { + local root="$2" initrddir="$3" case "$1" in udev) cp -a "$root/lib/udev/devices"/* "$initrddir/dev/" return 0 ;; @@ -51,31 +52,13 @@ early_adjust_initrd() { for x in var/state/pkgtool var/spool/{locks,mail} \ usr/{doc,info,man,opt,spool} etc/{rc.d/,}init.d usr do - rm ${initrddir}/$x + rm ${rootfs}/$x done - mkdir "${initrddir}/rootfs" + mkdir "${rootfs}/rootfs" # HACK: bb's modprobe needs insmod on PATH, but udev clears it # HACK: additionaly bb's modprobe doesn't handle MODALIAS properly # HACK: so we use our own wrapper on top of bb's - rm ${initrddir}/sbin/modprobe - - for x in $( ls -1 target/$target/initrd/*.exec 2> /dev/null ); do - y="${x##*/}"; y="$( echo ${y%.exec} | tr '_%' '/_' )" - echo_status "injecting $y*" - cp -f "$x" "${initrddir}/$y" - chmod +x "${initrddir}/$y" - done - - for x in $( ls -1 target/$target/initrd/*.txt 2> /dev/null ); do - y="${x##*/}"; y="$( echo ${y%.txt} | tr '_%' '/_' )" - echo_status "injecting $y" - cp -f "$x" "${initrddir}/$y" - done - - for x in $( ls -1 target/$target/initrd/*.patch 2> /dev/null ); do - echo_status "$(patch -p1 -d "${initrddir}" 2>&1 < $x )" - done - + rm ${rootfs}/sbin/modprobe }