[Yocto,2/4] bootimg: Add support to install Image

Message ID 1425397584-5154-3-git-send-email-naresh.bhat@linaro.org
State New
Headers show

Commit Message

naresh.bhat@linaro.org March 3, 2015, 3:46 p.m.
Add support to install kernel image for aarch64

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
---
 meta/classes/bootimg.bbclass |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

naresh.bhat@linaro.org March 4, 2015, 6:57 a.m. | #1
On 3 March 2015 at 23:17, Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com> wrote:
> On 3 March 2015 at 16:46, Naresh Bhat <naresh.bhat@linaro.org> wrote:
>> Add support to install kernel image for aarch64
>>
>> Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
>> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
>> ---
>>  meta/classes/bootimg.bbclass |   10 +++++++++-
>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
>> index b1c03ba..a8e0c19 100644
>> --- a/meta/classes/bootimg.bbclass
>> +++ b/meta/classes/bootimg.bbclass
>> @@ -66,8 +66,16 @@ populate() {
>>         DEST=$1
>>         install -d ${DEST}
>>
>> +       SRC_KERNEL_IMAGE=bzImage
>> +       DEST_KERNEL_IMAGE=vmlinuz
>> +
>> +       if [ "${TARGET_ARCH}" = "aarch64" ]; then
>> +               SRC_KERNEL_IMAGE=Image
>> +               DEST_KERNEL_IMAGE=Image
>> +       fi
>> +
>>         # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
>> -       install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage ${DEST}/vmlinuz
>> +       install -m 0644 ${STAGING_KERNEL_DIR}/${SRC_KERNEL_IMAGE} ${DEST}/${DEST_KERNEL_IMAGE}
>
> while you touch this, I'd remove the -d above and instead -D, like:
> install -m 0644 -D ${STAGING_KERNEL_DIR}/${SRC_KERNEL_IMAGE}
> ${DEST}/${DEST_KERNEL_IMAGE}
>
> thanks,
ok,  Thank you very much.  That's a good suggestion.  I will make the
necessary changes.

Patch

diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index b1c03ba..a8e0c19 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -66,8 +66,16 @@  populate() {
 	DEST=$1
 	install -d ${DEST}
 
+	SRC_KERNEL_IMAGE=bzImage
+	DEST_KERNEL_IMAGE=vmlinuz
+
+	if [ "${TARGET_ARCH}" = "aarch64" ]; then
+		SRC_KERNEL_IMAGE=Image
+		DEST_KERNEL_IMAGE=Image
+	fi
+
 	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
-	install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage ${DEST}/vmlinuz
+	install -m 0644 ${STAGING_KERNEL_DIR}/${SRC_KERNEL_IMAGE} ${DEST}/${DEST_KERNEL_IMAGE}
 	
 	# initrd is made of concatenation of multiple filesystem images
 	if [ -n "${INITRD}" ]; then