From 4fae2dfe37b12d08688fe41fea4c45bb85d6acee Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Wed, 18 May 2011 01:16:47 +0200 Subject: [PATCH] new package: add package 'initramfs' for building a shared linked initramfs Signed-off-by: Stephan Raue --- packages/initramfs/meta | 40 ++++++++++++++++++++++++++++++++++++++++ packages/linux/build | 9 +++++++-- packages/linux/unpack | 3 ++- 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 packages/initramfs/meta diff --git a/packages/initramfs/meta b/packages/initramfs/meta new file mode 100644 index 0000000000..06f1b882a8 --- /dev/null +++ b/packages/initramfs/meta @@ -0,0 +1,40 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# 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; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="initramfs" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="eglibc-initramfs busybox-initramfs plymouth-lite diskdev_cmds-initramfs" +PKG_BUILD_DEPENDS="toolchain eglibc-initramfs busybox-initramfs plymouth-lite" +PKG_PRIORITY="optional" +PKG_SECTION="initramfs" +PKG_SHORTDESC="initramfs: Metapackage for installing initramfs" +PKG_LONGDESC="debug is a Metapackage for installing initramfs" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +if [ "$HFSTOOLS" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS diskdev_cmds-initramfs" +fi diff --git a/packages/linux/build b/packages/linux/build index ed0d622184..e83c67c093 100755 --- a/packages/linux/build +++ b/packages/linux/build @@ -22,8 +22,13 @@ . config/options $1 -export INSTALL=$(kernel_path)/initramfs -$SCRIPTS/install busybox-initramfs +# export INSTALL=$(kernel_path)/initramfs +export INSTALL=$ROOT/$BUILD/image/initramfs/root-image +$SCRIPTS/install initramfs + +cd $INSTALL + find . | cpio -H newc -ov -R 0:0 > $ROOT/$BUILD/image/initramfs.cpio +cd - if [ "$BOOTLOADER" = "u-boot" ]; then $SCRIPTS/build u-boot diff --git a/packages/linux/unpack b/packages/linux/unpack index 37fe003e97..9523cd3a1a 100755 --- a/packages/linux/unpack +++ b/packages/linux/unpack @@ -37,7 +37,8 @@ sed -i -e "s|^HOSTCC[[:space:]]*=.*$|HOSTCC = $HOST_CC|" \ $LINUX/Makefile cp $KERNEL_CFG_FILE $LINUX/.config -sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$ROOT/$PKG_DIR/config/initramfs\"|" \ +#sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$ROOT/$PKG_DIR/config/initramfs\"|" \ +sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$ROOT/$BUILD/image/initramfs.cpio\"|" \ $LINUX/.config # copy some extra firmware to linux tree