From patchwork Mon Nov 9 22:35:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 56272 Delivered-To: patches@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp438720lbb; Mon, 9 Nov 2015 14:35:48 -0800 (PST) X-Received: by 10.68.173.5 with SMTP id bg5mr524536pbc.104.1447108548044; Mon, 09 Nov 2015 14:35:48 -0800 (PST) Return-Path: Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com. [2607:f8b0:400e:c03::233]) by mx.google.com with ESMTPS id wh3si320279pbc.142.2015.11.09.14.35.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 14:35:48 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::233 as permitted sender) client-ip=2607:f8b0:400e:c03::233; Authentication-Results: mx.google.com; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c03::233 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dkim=pass header.i=@linaro_org.20150623.gappssmtp.com Received: by pasz6 with SMTP id z6so218894572pas.2 for ; Mon, 09 Nov 2015 14:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Lgg05bLRexbyKRcTPFjwVEyW/5HHosKfzUe8JyG4gQs=; b=GBW+sX14Sf8efEtPQUoaun2AdWrFwjdaaC6R3LZCLHqjFP2yPeVel3N56X/xdCyOo4 EsPwgvTY2WgficGYCxtziuNcbr+6GLpDfmLldFPP4ZqgxT5wP5iCatF1bIstrHmgixtl dHWpJEo/G7QZPK0UbU8QA4g/3j8f9nwjpeXHIwd20QEc7fAgXDUDBrQ0UbH2DuNQ502W 7+4jG71G3LPL7KZhNubJ3Ydx1D22pd7/iXOKOY+ZJY4a7I1lc6rLUdRC/taQMdJlHtKq BKhCVtPB5tQZZPCW+NQkJ7vom8d+p2mhjCb7NmTJnestYsPBjkcWJ4xLR5syaYSS0/DV 7HKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Lgg05bLRexbyKRcTPFjwVEyW/5HHosKfzUe8JyG4gQs=; b=aBSf/aBdChloUGqqZfVJgbyH+w22kjtf9Gp2Kv2h9DDF7fiKO3g6Q5sq2L650izDNZ 4DcBPSrRJoMvZXoBLJcnuNWZMz/ERRZE1h4osbE5g+iplyaxppxyQU6EAe2p/E5vxcfF SiUp+iT+jBj8Efi4OqoyGXwRj7mwG4eKXqGfb1+3AP7aDKtXjoleuwud/DjC12pZVkvr 3O71/Ru0ecbcJNVLQ8j//dNWn2X3WLq4edHaTZdwnxb4hEcitXbeJTkjDwla8vUD7Lx7 nVWlQOtmaOhsBVsAV9fMprhtTp9BtJsIPeC2ceBytH5d6QApVv/H35yS/7IyZLZ4VmYP AVUQ== X-Gm-Message-State: ALoCoQmZOS8b4WQIFasYZS1qKt174rAwcuEa/OVQMd7k048UCJY6Ka4oMbK8XLbDolh58kRPn5lm X-Received: by 10.66.63.37 with SMTP id d5mr449428pas.103.1447108547647; Mon, 09 Nov 2015 14:35:47 -0800 (PST) Return-Path: Received: from localhost.localdomain (c-76-115-103-22.hsd1.or.comcast.net. [76.115.103.22]) by smtp.gmail.com with ESMTPSA id ck9sm151798pad.28.2015.11.09.14.35.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Nov 2015 14:35:46 -0800 (PST) From: John Stultz To: Vishal Bhoj Cc: John Stultz , Guodong Xu Subject: [PATCH] boot_fat.mk: Rework boot partition creation to use mtools Date: Mon, 9 Nov 2015 14:35:40 -0800 Message-Id: <1447108540-29733-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 Use mtools rather then mounting the partition, in order to avoid requiring root permissions to build. Cc: Vishal Bhoj Cc: Guodong Xu Signed-off-by: John Stultz --- boot_fat.mk | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) -- 1.9.1 diff --git a/boot_fat.mk b/boot_fat.mk index 5d3a0d4..c5cba1e 100644 --- a/boot_fat.mk +++ b/boot_fat.mk @@ -2,14 +2,10 @@ REALTOP=$(realpath $(TOP)) boot_fatimage: bootimage dd if=/dev/zero of=$(PRODUCT_OUT)/boot_fat.uefi.img bs=512 count=98304 mkfs.fat -n "BOOT IMG" $(PRODUCT_OUT)/boot_fat.uefi.img - mkdir -p $(PRODUCT_OUT)/boot_tmp && sudo mount -o umask=000,loop,rw,sync $(PRODUCT_OUT)/boot_fat.uefi.img $(PRODUCT_OUT)/boot_tmp - cp $(PRODUCT_OUT)/kernel $(PRODUCT_OUT)/boot_tmp/Image - cp $(PRODUCT_OUT)/hi6220-hikey.dtb $(PRODUCT_OUT)/boot_tmp/hi6220-hikey.dtb - cp -r device/linaro/hikey/bootloader/* $(PRODUCT_OUT)/boot_tmp/ - cp $(PRODUCT_OUT)/ramdisk.img $(PRODUCT_OUT)/boot_tmp/ - mkdir -p $(PRODUCT_OUT)/boot_tmp/grub/ - sync - sudo umount -f $(PRODUCT_OUT)/boot_fat.uefi.img + mcopy -i $(PRODUCT_OUT)/boot_fat.uefi.img $(PRODUCT_OUT)/kernel ::Image + mcopy -i $(PRODUCT_OUT)/boot_fat.uefi.img $(PRODUCT_OUT)/hi6220-hikey.dtb ::hi6220-hikey.dtb + mcopy -s -i $(PRODUCT_OUT)/boot_fat.uefi.img device/linaro/hikey/bootloader/* :: + mcopy -i $(PRODUCT_OUT)/boot_fat.uefi.img $(PRODUCT_OUT)/ramdisk.img ::ramdisk.img droidcore: boot_fatimage