From 13c0a0c319524012c2b6cc7aa92d6b5f487d4d58 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 25 Mar 2014 13:41:19 +0200 Subject: Create boot.tar.gz as part of the image build Each machine config defines what is included in the boot.tar.gz package. For beaglebone, include the uEnv.txt u-boot script that is used to start up the device. Change-Id: Ia509dd61c789fda53889cea8ea9221cfa8b469a9 Reviewed-by: Andy Nichols --- classes/bootfs-image.bbclass | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 classes/bootfs-image.bbclass (limited to 'classes/bootfs-image.bbclass') diff --git a/classes/bootfs-image.bbclass b/classes/bootfs-image.bbclass new file mode 100644 index 0000000..9218bd3 --- /dev/null +++ b/classes/bootfs-image.bbclass @@ -0,0 +1,51 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://qt.digia.com/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +BOOTFS_NAME = "${IMAGE_BASENAME}-boot-${MACHINE}-${DATETIME}" +BOOTFS_LINK_NAME = "${IMAGE_BASENAME}-boot-${MACHINE}" + +BOOTFS_DEPENDS ?= "" + +do_bootfs () { + if [ -n ${BOOTFS_CONTENT} ]; then + exit 0 + fi + + mkdir -p ${S}/bootfs + + for item in ${BOOTFS_CONTENT}; do + src=`echo $item | awk -F':' '{ print $1 }'` + dst=`echo $item | awk -F':' '{ print $2 }'` + + install -m 0755 ${DEPLOY_DIR_IMAGE}/$src ${S}/bootfs/$dst + done + + cd ${S}/bootfs + rm -f ${DEPLOY_DIR_IMAGE}/${BOOTFS_NAME}.tar.gz ${DEPLOY_DIR_IMAGE}/${BOOTFS_LINK_NAME}.tar.gz + + tar czvf ${DEPLOY_DIR_IMAGE}/${BOOTFS_NAME}.tar.gz . + ln -s ${BOOTFS_NAME}.tar.gz ${DEPLOY_DIR_IMAGE}/${BOOTFS_LINK_NAME}.tar.gz +} + +addtask bootfs before do_rootfs + +do_bootfs[depends] += "${BOOTFS_DEPENDS}" -- cgit v1.2.3-54-g00ecf From cadcb919c9cb71cfe994f9924bc3ddec0890fc99 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 28 Mar 2014 10:01:58 +0200 Subject: bootfs: need to use fakeroot for tar'ing Unpacking the boot.tar.gz file using sudo caused error: "Cannot change ownership to uid 1000, gid 1000: Operation not permitted" Now using fakeroot to not record my uid to the files. Change-Id: I1a953e5e363a0d9fbb914cfa8837d888421d8e14 Reviewed-by: Samuli Piippo --- classes/bootfs-image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/bootfs-image.bbclass') diff --git a/classes/bootfs-image.bbclass b/classes/bootfs-image.bbclass index 9218bd3..5292965 100644 --- a/classes/bootfs-image.bbclass +++ b/classes/bootfs-image.bbclass @@ -25,7 +25,7 @@ BOOTFS_LINK_NAME = "${IMAGE_BASENAME}-boot-${MACHINE}" BOOTFS_DEPENDS ?= "" -do_bootfs () { +fakeroot do_bootfs () { if [ -n ${BOOTFS_CONTENT} ]; then exit 0 fi -- cgit v1.2.3-54-g00ecf