summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2017-11-06 13:37:30 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2017-11-06 13:39:44 +0100
commit468b05357d38a21506ed6c999a3088c1d2916a35 (patch)
treeefd91d8efac7bb2f9ab110f9139c9f127b471dfb
parent09fbb91f89e48d9a618dd897fc926dcab6b68f2c (diff)
downloadmeta-updater-468b05357d38a21506ed6c999a3088c1d2916a35.tar.gz
Copy repo manifest to the device.
Helpful for debugging, etc. Mostly copied from here: https://github.com/openivimobility/meta-oim/blob/master/classes/image-repo-manifest.bbclass
-rw-r--r--classes/image_repo_manifest.bbclass23
-rw-r--r--classes/sota.bbclass2
2 files changed, 25 insertions, 0 deletions
diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass
new file mode 100644
index 0000000..d508574
--- /dev/null
+++ b/classes/image_repo_manifest.bbclass
@@ -0,0 +1,23 @@
1# Writes the repo manifest to the target filesystem in /etc/manifest.xml
2#
3# Author: Phil Wise <phil@advancedtelematic.com>
4# Usage: add "inherit image_repo_manifest" to your image file
5# To reproduce a build, copy the /etc/manifest.xml to .repo/manifests/yourname.xml
6# then run:
7# repo init -m yourname.xml
8# repo sync
9# For more information, see:
10# https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests
11
12HOSTTOOLS_NONFATAL += " repo "
13
14# Write build information to target filesystem
15buildinfo () {
16 if [ $(which repo) ]; then
17 repo manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml
18 else
19 echo "Android repo tool not food; manifest not copied."
20 fi
21}
22
23IMAGE_PREPROCESS_COMMAND += "buildinfo;"
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index f191cee..1865356 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -35,3 +35,5 @@ SOTA_MACHINE_qemux86-64 ?= "qemux86-64"
35SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi" 35SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi"
36 36
37inherit sota_${SOTA_MACHINE} 37inherit sota_${SOTA_MACHINE}
38
39inherit image_repo_manifest