From 9e85a77231cabd341bbd9320bce4c24a0f314244 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 8 Mar 2008 11:30:16 +0000 Subject: linux-handhelds-2.6: Fix some initramfs support issues. * Be sure to clean up any possible old initramfs. * Fix bashism. --- packages/linux/linux-handhelds-2.6.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/linux/linux-handhelds-2.6.inc') diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc index 3bd9f78ea2..998711fe76 100644 --- a/packages/linux/linux-handhelds-2.6.inc +++ b/packages/linux/linux-handhelds-2.6.inc @@ -55,7 +55,9 @@ do_configure() { } do_compile_prepend() { - if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" == "glibc" ]; then + # Clean up any stale initramfs archive + rm usr/initramfs_data.cpio.gz + if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" = "glibc" ]; then if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately" exit 1 -- cgit v1.2.3 From 3a72ecb96ca9fb28af957a0b0c0a47d24bf0977b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 8 Mar 2008 17:23:07 +0000 Subject: linux-handhelds-2.6: Use rm -f for stale initramfs cleanup. --- packages/linux/linux-handhelds-2.6.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/linux/linux-handhelds-2.6.inc') diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc index 998711fe76..9a783aa6de 100644 --- a/packages/linux/linux-handhelds-2.6.inc +++ b/packages/linux/linux-handhelds-2.6.inc @@ -56,7 +56,7 @@ do_configure() { do_compile_prepend() { # Clean up any stale initramfs archive - rm usr/initramfs_data.cpio.gz + rm -f usr/initramfs_data.cpio.gz if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" = "glibc" ]; then if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately" -- cgit v1.2.3 From 17bf608c0fd9b147f403940b0f666b61d915afd5 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 8 Mar 2008 23:48:52 +0000 Subject: linux-handhelds-2.6: Remove broken keep-initramfs.patch. * Doesn't work with the no-initramfs case. * Added explicit touch after cp instead. --- packages/linux/linux-handhelds-2.6.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/linux/linux-handhelds-2.6.inc') diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc index 9a783aa6de..a2efdc955a 100644 --- a/packages/linux/linux-handhelds-2.6.inc +++ b/packages/linux/linux-handhelds-2.6.inc @@ -63,6 +63,8 @@ do_compile_prepend() { exit 1 fi cp ${KERNEL_INITRAMFS_PATH} usr/initramfs_data.cpio.gz + # touch is for broken Koen's cp + touch usr/initramfs_data.cpio.gz fi } -- cgit v1.2.3 From ec185d92295b475fa4e8ce62da27f37cc4666fcb Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 12 Mar 2008 00:03:21 +0000 Subject: linux-handhelds-2.6: Use official external interface for initramfs addition. * I.e., CONFIG_INITRAMFS_SOURCE. Instead of neat, but still hack of dropping initramfs where kernel Makefile expects it - this was reported to not work under some unknown circumstances. --- packages/linux/linux-handhelds-2.6.inc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'packages/linux/linux-handhelds-2.6.inc') diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc index a2efdc955a..5970ace054 100644 --- a/packages/linux/linux-handhelds-2.6.inc +++ b/packages/linux/linux-handhelds-2.6.inc @@ -37,6 +37,11 @@ do_configure() { die "No default configuration for ${MACHINE} available." fi + if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" = "glibc" ]; then + # Kernel expects non-compressed cpio + gzip -d -c ${KERNEL_INITRAMFS_PATH} >${WORKDIR}/initramfs.cpio + echo "CONFIG_INITRAMFS_SOURCE=\"${WORKDIR}/initramfs.cpio\"" >> ${S}/.config + fi if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then echo "CONFIG_AEABI=y" >> ${S}/.config @@ -48,26 +53,13 @@ do_configure() { sed -e '/CONFIG_AEABI/d' \ -e '/CONFIG_OABI_COMPAT=/d' \ + -e '/CONFIG_INITRAMFS_SOURCE=/d' \ '${WORKDIR}/defconfig' >>'${S}/.config' yes '' | oe_runmake oldconfig } -do_compile_prepend() { - # Clean up any stale initramfs archive - rm -f usr/initramfs_data.cpio.gz - if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" = "glibc" ]; then - if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then - echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately" - exit 1 - fi - cp ${KERNEL_INITRAMFS_PATH} usr/initramfs_data.cpio.gz - # touch is for broken Koen's cp - touch usr/initramfs_data.cpio.gz - fi -} - do_deploy() { install -d ${DEPLOY_DIR_IMAGE} install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_FILENAME} -- cgit v1.2.3 From 21af76526a4c0ad05348de8a7fb10c6b0d226f95 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 14 Mar 2008 08:27:48 +0000 Subject: linux/linux-handhelds-2.6: Readd check that ${KERNEL_INITRAMFS_PATH} exists. --- packages/linux/linux-handhelds-2.6.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/linux/linux-handhelds-2.6.inc') diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc index 5970ace054..48e49115f0 100644 --- a/packages/linux/linux-handhelds-2.6.inc +++ b/packages/linux/linux-handhelds-2.6.inc @@ -38,6 +38,11 @@ do_configure() { fi if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" = "glibc" ]; then + if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then + echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately" + exit 1 + fi + # Kernel expects non-compressed cpio gzip -d -c ${KERNEL_INITRAMFS_PATH} >${WORKDIR}/initramfs.cpio echo "CONFIG_INITRAMFS_SOURCE=\"${WORKDIR}/initramfs.cpio\"" >> ${S}/.config -- cgit v1.2.3