Modular backuptool.sh. Executes backup and restore methods defined in arbitrary /system/addon.d/*.sh scripts.
* Copy backuptool.functions alongside backuptool.sh.
* Delete both from /system/bin as they are not useful there.
Patch Series
============
http://review.cyanogenmod.com/#change,13265
CyanogenMod/android_build
* edify generator
http://review.cyanogenmod.com/#change,13266
CyanogenMod/android_system_core
* permissions on /system/addon.d
http://review.cyanogenmod.com/#change,13267
CyanogenMod/android_vendor_cm
* 50-cm.sh reference backup script
* modular backuptool.sh
* support backuptool.functions used by /system/addon.d/*.sh scripts
Change-Id: I26b4907d28f49c69627699d2accd2f0fa2d1b112
Note that update-api is a lie.
Change-Id: Idc2d92630e94ccbd60b5d5447c3762db8e5096f8
roomservice delivers you lunch combos from the CyanogenMod github.
fix roomservice formatting
support product names with _ in them
fix roomservice to handle pagination
Change-Id: I4923c2f768094dbad8e06a72d9f27d46414030ab
roomservice: Add lightweight dependencies to repositories
Roomservice can already fetch your cm_<device> without the need for a
manifest entry.
However, when working with common repositories, there is no way of
actually fetching them without adding to the manifest. This patch
introduces a lightweight dependency system. Each repository can have a
cm.dependencies in the following json format:
[
{
"repository": "repository_name_on_cm_organization"
"target_path": "target/path"
},
...
]
For instance, for cm_anzu I need android_device_semc_msm7x30-common and
android_device_semc_mogami-common. I would add both to cm.dependencies
as follows:
[
{
"repository": "android_device_semc_msm7x30-common",
"target_path": "device/semc/msm7x30-common"
},
{
"repository": "android_device_semc_mogami-common",
"target_path": "device/semc/mogami-common"
}
]
Roomservice would then fetch the anzu repository, parse the dependency
files and add/fetch/sync these additional repositories if they don't
exist already.
This also adds pretty printing to the output xml.
Change-Id: I9cc847adfc717a06439bc6094213ed6492343158
roomservice: Add branch support to cm.dependencies
Allow the cm.dependencies entries to provide an optional "branch" for
the repository dependencies. Added to fully support
http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
Change-Id: I35b51920d296afa329411af6172c7bd9aeef4af8
roomservice: Fill in dependencies for already-deployed repositories
Change-Id: I01fd408c9c4bfa78097c7f848b2556d2b2b180f3
roomservice: Extend dependency-checks to devices in main manifest
CM currently keeps devices inherited from AOSP in the main manifest,
so take that into account as well when checking device paths
Change-Id: I9663f283617f237428b4eaa0cd60b5de2b86a7b9
make compatible with github v3 api
Change-Id: Iff6f1f9099cdc5d2b49e04000b5fe3d04aa5d7e4
Fixed build for full-eng
Previously
Traceback (most recent call last):
File "build/tools/roomservice.py", line 153, in <module>
repo_path = get_from_manifest(device)
NameError: name 'device' is not defined
** Don't have a product spec for: 'full'
** Do you have the right repo manifest?
Now
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76L
============================================
Change-Id: Ib513705aba9a7a52a971ab64102ecbe9fddfb97a
roomservice: Bump github request per_page to 100
Change the number of repos per page from the default 30
to 100.
We seem to be hitting the rate limit on the jenkins server.
Change-Id: Ie733feaa0414cbfebb7efcfc1e24d94e1e466d1b
roomservice: Add support for netrc
Change-Id: I1f5e11e40125abd0c4e4c8d8294d4fc09bfdc30a
roomservice: Handle missing netrc file
Change-Id: If981fe79dc3e2191434301239b0cd585be8b4730
roomservice.py: Verbose error when a branch is missing.
Also add ROOMSERVICE_BRANCHES environment variable to use fallback branches.
Change-Id: I3c2b1d79fc185c1f1e1d658e5ca4f78e688780e2
roomservice.py: Fixups around fallback branches not being used by dependencies when ROOMSERVICE_BRANCHES is defined.
Change-Id: Ifb42a023cae5f62ac8f9cf7832125b91b431169c
roomservice: Allow following up tag references
This is now needed for release builds
Change-Id: I8c5f87341059b3b15ee853312b71df73790ad0d8
build: local_manifest.xml deprecated, use local_manifests
Patch Set 2:- Use roomservice.xml instead of cm.xml.
Change-Id: I3d8a6ef3907b92808662cbba912cea5ed38d0bde
Fix fallback branch search in roomservice
If you provided a fallback branch to roomservice via the
ROOMSERVICE_BRANCHES environment var the branch search would fail
if the device repo had any tags.
Fixed this by appending the tag search results to the branch
search results instead of overwriting them
Change-Id: I73a11af1500bd04e346f08ec3f83454502f3a169
roomservice: Fix wrong assumption about path of active manifest
Change-Id: Id740ff4b848e6ccbfd658be4846197b8ca519237
roomservice: When validating the presence of a repo, check main manifest too
Change-Id: If680536484074b473458723d93e783d074d7f669
roomservice: Bump devices per page to 200
Limit was reached again when attempting to
lunch various projects, such as steelhead.
Change-Id: I2f3b9705e07e1e47b86857aeb383cf7c99fcdbdc
Signed-off-by: William Roberts <bill.c.roberts@gmail.com>
roomservice: Fix assumptions about the branch naming
We can't just split from the last slash anymore, since we're using
those to distinguish the stabilization branches
Change-Id: Ia175dd317f508e99b275b56e9c83bd4729a75ddb
roomservice: Add recursive dependencies
Dependency repositories can now have dependencies themselves
Change-Id: I33a28709170da52bc98f4a62387927e3a11b2450
roomservice: python3 support
Change-Id: I7621818ba7ed997676728fe865f37a25b3a5b8b5
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
roomservice: Improve new device retrieval
Without credentials, GitHub's search API limits requests to 60/hr.
The existing method to add a new device is to fetch JSON-formatted info
for ALL CM repositories and then search for the device. In doing so,
more than 10 pages of results are returned (i.e. more than 10 requests
per device). This is clumsy, slow, and limits use of roomservice to
only ~5 devices per hour.
Instead, only return search results for repositories that have the
device name in the repository name. Then, one device = one request.
It's faster and allows closer to 60 device setups / hr.
Additional bailouts are included to stop the script earlier than later
if a device is not found.
Change-Id: I7f914d7ede82da0f100d9fd6cf8b603177962e48
roomservice: Fix search of devices forked to CM
Commit "roomservice: Improve new device retrieval" introduced a
regression where repositories that were forked to CM were omitted from
search results. This fixes that issue.
Change-Id: I7bf54129b5da1749abe5b2b9a492cb93e6ee41a6
roomservice: Improve error handling on search
Use the relevant forms of 'except' for urllib and parsing instead of a
general except which was performed too late anyways.
Change-Id: Ia1fc89dd5a8a703fc0175aef7b6dd013a44a2c8e
roomservice: use force-sync when adding projects with roomservice
This works around the error
GitError: --force-sync not enabled; cannot overwrite a local work tree
when using roomservice.
Since this should only trigger when the device repos haven't been
checked out yet, we can use force-sync to overwrite any roomservice
device paths in the .repo directory.
Change-Id: Iac54a8a2f2913f82f8ca6497b8785a9d5769640b
Ticket: CYNGNOS-735
roomservice: check uniqueness by path, not name
For repos such as hardware/qcom/media-caf we are using the same name
with different branches for different paths.
for eg.
CyanogenMod/hardware_qcom_media-caf(branch:8994)
- fetch to : /hardware/qcom/media-caf/8994
CyanogenMod/hardware_qcom_media-caf(branch:8960)
- fetch to : /hardware/qcom/media-caf/8960
For such cases roomservice won't pick up a new path
if one already exists.
We should check for unique by target path instead.
Change-Id: I89e561ca9a2d57ede8cf782f431a8e829ea47ee5
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
add support for overriding build.prop settings.
Change-Id: Ie4224d608b7bcb0c2087bd77bc954f8f5f9b6495
build: Inline kernel building as a buildtime task
Kernel image integration is now done in the build system. The
"one true way" of doing this is to download the kernel source
into kernel/TARGET_BOOTLOADER_NAME (by usage of the cm.dependencies
mechanism or otherwise), and defining the TARGET_KERNEL_CONFIG
variable in the device's BoardConfig makefile
If the kernel's location doesn't match the automagic location
(multi-device kernel source, for instance), TARGET_KERNEL_SOURCE
can be used to specify a kernel path (i.e.,
"TARGET_KERNEL_SOURCE := kernel/shared-whatever")
If the device requires out-of-kernel-tree modules to be built,
the TARGET_KERNEL_MODULES variable can be used, pointing to a
_make target_ that will build and install such modules. Definition
of such a target is the device author's responsibility, the only
restriction is that it is a normal makefile recipe (example
below)
Optionally (or as an alternative), a prebuilt binary can also be
defined at BoardConfig, by usage of the TARGET_PREBUILT_KERNEL
variable. This binary will be used if the kernel source is absent
(or undefined).
A minimal BoardConfig.mk should look something like this:
TARGET_KERNEL_CONFIG := cyanogenmod_<device>_defconfig
TARGET_PREBUILT_KERNEL := device/<vendor>/<device>/kernel
To include, for example, the TI WLAN modules, this can be used:
-----------------------------
TIWLAN_MODULES:
make -C hardware/ti/wlan/wl1283/platforms/os/linux/ KERNEL_DIR=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" TNETW=1273 RANDOM_MAC=n REPORT_LOG=n
mv hardware/ti/wlan/wl1283/platforms/os/linux/tiwlan_drv.ko $(KERNEL_MODULES_OUT)
make -C hardware/ti/wlan/wl1283_softAP/platforms/os/linux/ KERNEL_DIR=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" TNETW=1273 REPORT_LOG=n
mv hardware/ti/wlan/wl1283_softAP/platforms/os/linux/tiap_drv.ko $(KERNEL_MODULES_OUT)
TARGET_KERNEL_MODULES := TIWLAN_MODULES
---------------------------
Change-Id: I8634fa4c788a42dc6f62e62ca170825b66db126a
build: Fix kernel module building on Darwin/OSX
Darwin/OSX build host does not have module-init-tools which is
required to generated modules.dep file. Switch to modules.order
file marker which is always generated instead.
Change-Id: I20c0fccd905fa668202c3e7284a8778db3728a65
kernel: Change path to kernel/<vendor>/<device>
Derive the kernel path from the device's own path (just replace "device"
with "kernel")
Change-Id: Idd44a0489e1ce280adf5ec4d9cfe2385c75dd115
kernel: Improve support for non-arm architectures
Remove hardwired references to the ARM arch and toolchains, and replace
them with the respective android build variables
Change-Id: Iae3eb548ca1d58ac808b5fa430d415283a809106
kernel: Fix ARM building
The default android ARM compiler, arm-androideabi-, does NOT work
for the Linux kernel. Special-case the ARM architecture to target
the ARM_EABI_TOOLCHAIN path directly
Change-Id: Ib672c99f114cb89d5fda3343d4dc68810d042d35
kernel: allow TARGET_KERNEL_MODULES to overwrite kernel modules
This is necessary to use compat-wireless since it needs to build a newer
version of cfg80211 (and sometimes mac80211) than the kernel sources version.
There are probably other instances of this type of need.
Change-Id: Ib5bf818286bc20987d8b9f9480a43f3e7690e239
kernel.mk: make use of ccache when requested
Change-Id: I9b6e28711bd5f590a76ac2b62a50b1d2de014e3e
kernel: Fix ccache inclusion logic
Builds were broken when CCACHE was missing from the environment
Change-Id: Ie8d6048f4600f1dc9c298593a50e37af04b96438
build: show accurate information on inline kernel warnings/errors
Having the variables on AndroidBoard as suggested causes errors
with mm/mmm, whereas having them on BoardConfig doesn't. Adjust
the warnings to reflect this.
Change-Id: I554c1f1073df678d36521f73bc236a1f4b02212e
This is causing generic_armv5-userdebug builds to fail. Commenting out for now to fix recovery build servers. Will fix properly later.
Change-Id: Ibe1cda8cd2b4c1914dfa3b8a29724c9069e047a6
kernel.mk: Also search PRODUCT_COPY_FILES for the kernel copy, as that is how AOSP does it now.
Change-Id: Id2d1cf079694d1996d4a85d8435c2e4562e5d444
kernel.mk: fix compiled kernel copy
Change-Id: Ifb2a3d4968e56eed236eaa2db9258cd0b8865fda
kernel.mk: workaround to fix kernel builds on darwin until the prebuilts/gcc is checked in by upstream.
Change-Id: I6321fb7f6814b207c821d974766d945351b3f546
build: fix ccache usage when building kernels
Change-Id: Id4edd4d85d9ba3ef42575f5fdebf22ed14957a99
kernel.mk: set KERNEL_OUT properly
It was hardcoded to $(ANDROID_BUILD_TOP)/$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
which wouldn't exist if OUT_DIR_COMMON_BASE was set to use another dir
(e.g. ramdisk)
Fix it so that it now points to $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
if OUT_DIR is not out
Change-Id: I1bf767d86548e41270d9cbb8f0c00512708501c5
build: add support for uncompressed kernels
build: kernel: remove hard coded darwin toolchain.
* Use latest kernel toolchain from $(ARM_EABI_TOOLCHAIN) variable.
Change-Id: I3b43408937dd5f193fcba19c034f868272de8963
envsetup: set OUT_DIR to an absolute path always
OUT_DIR was set to $(TOPDIR)out previously,
but $(TOPDIR) was null, so it was a relative path.
This broke releasetools, inline kernel building, etc
since they require absolute paths.
Fix it so that it is set to $(shell readlink -f .)/out
if $(TOPDIR) is null.
Also remove hacks which checked if (OUT_DIR) was out
and changed it to $(ANDROID_BUILD_TOP)/out to workaround
the aforementioned problem.
Change-Id: I459a3b1325a1bbea0565cd73f6acf160d4ed9b39
build: add strip on kernel modules
kernel modules are huge for prima wlan and we need to strip them
unstriped size 40mb
striped size 2mb
Change-Id: Iefd572732cad0a6f608439618673068a3586fcd5
kernel: Ignore errors with module building
Let kernel fully disable loadable modules
Change-Id: Ia37ec927b092c041ee4c68bf9fd0f28b7339c8ca
build: Add support for extra kernel build variables
* This allows specifying a variant defconfig, and an selinux defconfig
which are simply configuration fragments.
Change-Id: I97882ae3b8c2e16ff6a7dce8dd3a70d70f8aa866
s/cyanogenmod.com/cyanogenmod.org/
* And fixup a wiki link while I'm at it.
Change-Id: I0355b9a47eac1becc07e81659fbb2d11b14ece36
Fixes for Xcode 5 and OSX 10.9.
kernel.mk: Put elf.h into the include path on Darwin builds.
Change-Id: I7069b956965d27caac3b2e4c3cc2e8b4c1da7a82
Make the kernel image format parametric instead of a chain of if/elses
Change-Id: I54bfcdecb8647f7bcf744e72b2de19fcf4e4e7ac
build: Add "dtbs" target when building the kernel
* This is needed for 3.10
Change-Id: I4044ea9e67017452efc25097a3327141a6627c24
Allow specifying kernel toolchain and prefix
Change-Id: Ib75cfe772e073f2196455f3e3dfba247f6b3feff
Fix libelf path
Fixes kernel build
Change-Id: Ic6cdb1734d7b865491e8e61403d32db4acafe514
Signed-off-by: Alvin Francis <nivlafx@gmail.com>
core: More flexible kernel configuration
* Allow various combinations of kernel vs. userspace architectures
* Get rid of various assumptions about everything being ARM or 32-bit
* This adds the following target flags:
TARGET_KERNEL_ARCH
TARGET_KERNEL_HEADER_ARCH
KERNEL_HEADER_DEFCONFIG
TARGET_KERNEL_CROSS_COMPILE_PREFIX
Change-Id: If0bc202abd35c216ba3ea5707ffdb602526d8ed3
Fix kernel.mk if SELINUX or VARIANT_DEFCONFIG is defined
KERNEL_HEADER_DEFCONFIG was ignoring SELINUX_DEFCONFIG thus breaking
all selinux support
Change-Id: Idc3367d6b4b85343078e63e87dca6d6d052e7f53
build: kernel: Fix stray "@"
Nested "$(hide)"s (makefile @) don't work. There was one at the
beginning of the script, remove the inner one to prevent it from
being interpreted as a shell command
Change-Id: I08a829ee56b212366a0f5a3812f7a614667a9c2b
build: Add support for additional kernel config snippet
* Add support for TARGET_KERNEL_ADDITIONAL_CONFIG which will append a
config snippet from arch/$ARCH/configs/ to the main defconfig.
* This can be used for various things, such as including DIAG support
into debuggable builds.
Change-Id: Ifa48688a3f951dd8ecc9a13a27de3a476e7bf633
kernel: Fix kernelconfig build
* Copy the generated defconfig to the correct directory
Change-Id: Ia8e259946d67501675dd5a3433165d54df6c13c5
build: kernel: arm64 uses Image.gz as the target
Change-Id: Icc194d2a16f9ffcf5803226fc1f2a5b091b4d861
kernel: use merge-config.sh for integrating KERNEL_ADDITIONAL_CONFIG
Using 'cat' to combine defconfig fragments is not, in general,
safe. Overriding options is not correctly handled, and it's
possible to produce illegal configurations which violate Kconfig
dependency constraints.
Instead, use the merge-config.sh script from the kernel tree
which more intelligently combines defconfig fragments. An
'alldefconfig' make target is also introduced, as merge-config.sh
depends on it.
Change-Id: I91a8c5e4bcf7072a3f95651dffe17380174134e4
kernel: Don't update defconfig with KERNEL_ADDITIONAL_CONFIG options
If 'make kernelconfig' is run in an environment where
KERNEL_ADDITIONAL_CONFIG is set, the options in the additional
defconfig will be saved back to the defconfig when savedefconfig
is performed.
While not really a bug, this increases the likelihood of someone
accidentally committing these changes or getting confused by
unexpected deltas added to their defconfigs.
Fix this by skipping the merge-config.sh step for the 'kernelconfig'
make target. As a side-effect, options in KERNEL_ADDITIONAL_CONFIG
will also not be displayed in menuconfig. This is not easily
avoidable, and arguably not wrong anyway.
Change-Id: I920be0338bb8afc87f6061c55aafb27ba658974d
kernel: add `make kernelxconfig' target
kernelxconfig is identical to kernelconfig except that it launches
xconfig instead of menuconfig. xconfig easier to use if you need to
search the Kconfig tree.
Change-Id: I6d91c7e3efbc9f172b040425f2ec545e3f03b44d
(cherry picked from commit
60ca2b7897b552ce5dee2633fc84906222579763)
kernel: don't build modules or dtbs unless enabled
Build modules and dtbs only if enabled. The make commands were allowed to
fail silently to support builds that did not have these options
enabled.
This had a side effect of allowing builds to complete even if modules
failed to build. Don't suppress these error anymore.
Change-Id: I842124b465d9e14edd6a09ffe54f09da32f10632
kernel: prevent targets from being rebuilt needlessly
Fix some rules that listed directories as their dependencies.
Directories are always out-of-date because the rules that depend on
them touch file under the directories they depend on them.
Replace the directory dependencies with stamp file rules that handle
directory creation.
Change-Id: I2b36c846b6565b7f9aba5bb7583576ad300983b8
kernel: Fix usage of KERNEL_ARCH
* x86_64 defconfigs live in arch/x86/configs
* Use KERNEL_ARCH instead of TARGET_KERNEL_ARCH
Change-Id: Idc191ea658fc4100bc7ad40958023c5f936daf44
build: force .config update if additional kernel config changes
This patch forces a regeneration of the .config if either the
contents of TARGET_KERNEL_ADDITIONAL_CONFIG changes or the value
of TARGET_KERNEL_ADDITIONAL_CONFIG changes.
OPO-360
Change-Id: Ide28be3fab01b9f9ad72aa9d8706131e2b9ac0c7
build: add build module from root
Zenfone 5 have copies module to root , we use it
Change-Id: I734e45a09d445e97f2b3834c5941db27e537b803
kernel: Don't use override config in kernel(x)config
* It defeats the whole purpose of using KERNEL_CONFIG_OVERRIDE
Change-Id: Ia405562a0dcf623ae2bfca2803c2d3427d84bf0a
kernel: remove support for unused MTK Kernel
Remove unused MTK kernel build support.
Change-Id: I4f4df078ae03b1bd5edc7000e5b942bfc05c02bd
kernel: add docs for config vars
Add a header with documentation for the config vars currently in use
by the Kernel build.
Change-Id: I6930b41d716baabbb16c2f407b6b9fe6e5f2b4c8
kernel: allow toolchain prefix to be overridden
Allow the toolchain prefix defined in BoardConfig.mk to be overridden
via by setting KERNEL_TOOLCHAIN_PREFIX (alongside KERNEL_TOOLCHAIN) to
compile with an alternate toolchain.
Change-Id: If6f4f0dba9bd0b0056f76e380070cca74ea0a4df
kernel: add banner for defconfig and header install steps
Change-Id: Iddf9e1e206823573ebc38a8956a029d08dee83de
build: Add dt.img and kernel target
Change-Id: I4a266d8bd2b01ec4ec696f10f0cc7e912f25a38a
Fix libelf path for mm
Fixes kernel build on darwin
Updated for cm-13.0
Change-Id: Ic6cdb1734d7b865491e8e61403d32db4acafe514
Signed-off-by: Alvin Francis <nivlafx@gmail.com>
Merge "DO NOT MERGE Skip emma instrumentation if we're using jack." into nyc-dev