summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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