Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by mail.openembedded.org (Postfix) with ESMTP id 56F2360600 for ; Sun, 19 Oct 2014 19:15:56 +0000 (UTC) Received: from mail.nefkom.net (unknown [192.168.8.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3jLW652xlQz3hjZZ; Sun, 19 Oct 2014 21:15:57 +0200 (CEST) X-Auth-Info: jFm2m25Y/0swamia77F7h0PbCJckFzRAsboO+UiqNFs= Received: from chi.lan (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3jLW6503GKzvdWR; Sun, 19 Oct 2014 21:15:56 +0200 (CEST) From: Marek Vasut To: openembedded-core@lists.openembedded.org Date: Sun, 19 Oct 2014 21:15:45 +0200 Message-Id: <1413746147-7120-6-git-send-email-marex@denx.de> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1413746147-7120-1-git-send-email-marex@denx.de> References: <1413746147-7120-1-git-send-email-marex@denx.de> Cc: Marek Vasut , Paul Eggleton , Koen Kooi Subject: [PATCH 5/7] kernel: Separate out uboot_prep_kimage X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2014 19:16:01 -0000 Separate the function which prepares the kernel for packing into uImage into separate class, so this function can be reused by the fitImage class. Signed-off-by: Marek Vasut Cc: Richard Purdie Cc: Koen Kooi Cc: Paul Eggleton --- meta/classes/kernel-uboot.bbclass | 25 +++++++++++++++++++++++++ meta/classes/kernel-uimage.bbclass | 26 +------------------------- 2 files changed, 26 insertions(+), 25 deletions(-) create mode 100644 meta/classes/kernel-uboot.bbclass diff --git a/meta/classes/kernel-uboot.bbclass b/meta/classes/kernel-uboot.bbclass new file mode 100644 index 0000000..57bb950 --- /dev/null +++ b/meta/classes/kernel-uboot.bbclass @@ -0,0 +1,25 @@ +inherit kernel + +DEPENDS += " u-boot-mkimage-native " + +uboot_prep_kimage() { + if test -e arch/${ARCH}/boot/compressed/vmlinux ; then + vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux" + linux_suffix="" + linux_comp="none" + else + vmlinux_path="vmlinux" + linux_suffix=".gz" + linux_comp="gzip" + fi + + ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin + + if [ "${linux_comp}" != "none" ] ; then + rm -f linux.bin + gzip -9 linux.bin + mv -f "linux.bin${linux_suffix}" linux.bin + fi + + echo "${linux_comp}" +} diff --git a/meta/classes/kernel-uimage.bbclass b/meta/classes/kernel-uimage.bbclass index f51321b..1ea0400 100644 --- a/meta/classes/kernel-uimage.bbclass +++ b/meta/classes/kernel-uimage.bbclass @@ -1,28 +1,4 @@ -inherit kernel - -DEPENDS += " u-boot-mkimage-native " - -uboot_prep_kimage() { - if test -e arch/${ARCH}/boot/compressed/vmlinux ; then - vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux" - linux_suffix="" - linux_comp="none" - else - vmlinux_path="vmlinux" - linux_suffix=".gz" - linux_comp="gzip" - fi - - ${OBJCOPY} -O binary -R .note -R .comment -S "${vmlinux_path}" linux.bin - - if [ "${linux_comp}" != "none" ] ; then - rm -f linux.bin - gzip -9 linux.bin - mv -f "linux.bin${linux_suffix}" linux.bin - fi - - echo "${linux_comp}" -} +inherit kernel-uboot do_uboot_mkimage() { if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then -- 2.1.1