summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/ota_from_target_files
Commit message (Collapse)AuthorAgeFilesLines
* Underp releasetoolsMichael Bestas2015-10-121-1744/+1
| | | | Change-Id: I8f9752607b64555b99de317610b1e2516ec4037d
* Fix syntax issues and recovery generationStephen Bird2015-10-081-1/+1
| | | | Change-Id: I2394ffb16fa06421c5f0cc5f5ee77db72d3399ba
* build: Update install tools packaging for target-files supportBrint E. Kriebel2015-10-061-6/+5
| | | | | | | | | | Modifies "build: ota: Support for install tools in /tmp/install" to support signing steps being split from build steps. Package install files into target-files INSTALL path Read from target-files for OTA package creation Change-Id: I64f919c2a757b5474f6cc5f82bd6c33c2a8b558a
* build: ota: Support for install tools in /tmp/installTom Marshall2015-10-061-15/+15
| | | | | | | | | | * Anything in OUT/install gets packaged up into the zip and extracted to /tmp/install immediately after FullOTA_InstallBegin. * Use /tmp/install in edify scripts and remove code related to using and manipulating /system for install tools. Change-Id: I315a3238e36c8d15e26f935e272f7e27dd59c320
* releasetools: Store the build.prop file in the OTA zipBrint E. Kriebel2015-10-061-0/+3
| | | | | | | | | | This file is often used to read information about the update contained in the OTA. Place it in the update so it can be used by scripts. The file is not added to the updater-script, so it will not be placed onto the actual system. Change-Id: I88044796cbe8f199ca02df2840fd944cba2c73fa
* Fix ro.build.product not found by ota_from_target_files in some casesdhacker292015-10-061-10/+11
| | | | | | | | After I5dccba2172dade3dacc55d832a2042fce306b5f5 it was possible that if override_prop was set and override_device was not set the script was looking for a prop that did not exist. Change-Id: I444a33de5bcb59f129bdcf631c2a6540c5926545
* releasetools: ota_from_target_files: add FullOTA_PostValidateM1cha2015-10-061-0/+2
| | | | Change-Id: I152412049f90fd546d4516cc064238c3192be553
* build: Ensure /system unmounted at install startMatt Mower2015-10-061-0/+1
| | | | | | | Account for the possibility that a user has mounted system manually before installing the FullOTA package. Change-Id: I97d0540676a7ce98762545e76ecb1a7f6335d204
* build: clean up otasigcheckPawit Pornkitprasan2015-10-061-0/+5
| | | | | | | - Only mount and unmount /data if it was originally unmounted - Don't use comparison hack, just check the result of the script Change-Id: I4a22485d315cf91e95ce578907c49f5fa3a03222
* Allow devices to specify certain ro. props via TARGET_UNIFIED_DEVICEdhacker292015-10-061-27/+46
| | | | | | | | | | This modifies buildinfo.sh to not set model, name, description, and fingerprint in build.prop. These can then be set via custom init lib. This also fixes ota_from_target_files to function without these props being preset. Change-Id: I945b2c38e60b207d2d0f82b34f4f230ac21b0657
* ota: Fix recovery-script cleanups in block modeRicardo Cerqueira2015-10-061-0/+10
| | | | Change-Id: Iadb480f8062cfb7a0e6c9024e32ac0d71a7481d7
* ota_from_target_files: Validate signatures after possible data wipeBrint E. Kriebel2015-10-061-7/+7
| | | | | | | If the data is being wiped, we want to validate the signature after this step. This is also a good check that the data wipe succeeded. Change-Id: Iaecfddfb2010944de0c97e7bb21d8e581f20deec
* ota: Include copies of the recovery scripts even if shipping in block modeRicardo Cerqueira2015-10-061-0/+6
|
* ota: Make sure we don't install on top of an incompatible systemRicardo Cerqueira2015-10-061-0/+6
| | | | | | | | If the system has data present, make sure said data doesn't depend on a system signature different from our own. If we can't find our platform key, abort the installation Change-Id: I16572daf9464de326a9d0d126597cfbf03208f94
* Store the base64 release key in the OTA zipsRicardo Cerqueira2015-10-061-1/+2
| | | | | | | | This can be directly grepped in pre-existing package.xml tables to make sure we're not trying to update to a differently signed build Change-Id: I7528a8e7c484ea9209cd665b9263328ae834586a
* update ota_from_target_files to handle mounting/unmounting for backupscriptAusten Dicken2015-10-061-0/+2
| | | | | | | | | | backupscript should not be mounting/unmounting itself as it makes other scripts have unexpected results (such as modelid_cfg, which expects /system to be mounted) instead have the ota script handle the mounting/unmounting Change-Id: I94511f4147c624d975cb3ecbeaa8b0e98f63437c
* Allow override of device asserts, including multi-device support.Steve Kondik2015-10-061-2/+11
| | | | | | | Set in board file with TARGET_OTA_ASSERT_DEVICE. (cherry-picked from commit 0f452f21fc9323b9d1fe746161761cf40aaa5030) Change-Id: I3d06bdc0e3e26bde0c0e646accd050364f9713b9
* Add otapackage support for backuptoolChris Soyars2015-10-061-0/+15
| | | | Change-Id: I512554c579d444067cd3ccbb0e6946a5eb6bc964a
* fix up ota_from_target_files symlink detection.Koushik Dutta2015-10-061-1/+1
| | | | Change-Id: I2405ebee0346938c352da68ffb5385015690f52d
* ota: Remove cruft we don't care aboutRicardo Cerqueira2015-10-061-5/+4
| | | | | | | | Skip the date check (downgrade to your content), and don't include recovery in otapackages. 5.0.0 update: We want the recovery patchstuff back Change-Id: Id1d63f759315ad47d2aed6d0464cef3e448e58b5
* build: Inline kernel building as a buildtime taskRicardo Cerqueira2015-10-061-1/+1666
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make releasetools pylint clean.Dan Albert2015-03-241-1575/+1
| | | | | | | | This caught a few bugs/syntax errors (a few character classes were not escaped properly in regex patterns, some indentation was illegal, etc). Change-Id: I50637607524e68c4fb9cad7167f58a46b8d26b2c
* Fix the computation of basefilenameTao Bao2015-03-231-3/+4
| | | | Change-Id: I156b182414ef5b33611955cbc019e208c771013a
* Allow system images larger than 2GiB.Dan Albert2015-03-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | Python 2.7's zipfile implementation wrongly thinks that zip64 is required for files larger than 2GiB. We can work around this by adjusting their limit. Note that `zipfile.writestr()` will not work for strings larger than 2GiB. The Python interpreter sometimes rejects strings that large (though it isn't clear to me exactly what circumstances cause this). `zipfile.write()` must be used directly to work around this. This mess can be avoided if we port to python3. The bug (b/19364241) in original commit has been fixed. Bug: 18015246 Bug: 19364241 Bug: 19839468 (cherry picked from commit cd082d4bfe917b2e6b97436839cbbbc67c733c83) Change-Id: I7b5cc310e0a9ba894533b53cb998afd5ce96d8c6
* Restrict the verification in block-based incremental OTAsTao Bao2015-03-131-6/+26
| | | | | | | | | | | | BlockImageDiff has three versions. Only the incremental OTAs generated with the latest version (3) can be re-applied to the system that's already on the target build. Otherwise, operations like move will make unconditional changes and damage the system. During the verification phase, abort the OTA update if BlockImageDiff is less than 3 and it doesn't match the checksum of the source build. Change-Id: Ic630346eab2a993a84d0aeaacd7167ef62cc24f6 (cherry picked from commit daebaa6ed3fbf4e7943e6c8290ec6b9233b542e9)
* Revert "Allow system images larger than 2GiB."Justin Harrison2015-02-131-2/+4
| | | | | | This reverts commit cd082d4bfe917b2e6b97436839cbbbc67c733c83. Change-Id: Ie63e1ba70d907d2849164871bc7ec71c245f7af9
* Allow system images larger than 2GiB.Dan Albert2015-02-061-4/+2
| | | | | | | | | | | | | | | Python 2.7's zipfile implementation wrongly thinks that zip64 is required for files larger than 2GiB. We can work around this by adjusting their limit. Note that `zipfile.writestr()` will not work for strings larger than 2GiB. The Python interpreter sometimes rejects strings that large (though it isn't clear to me exactly what circumstances cause this). `zipfile.write()` must be used directly to work around this. This mess can be avoided if we port to python3. Bug: 18015246 Change-Id: I8a476d99c5efdef6ea408373b706e9fbd3a798be
* verify system and vendor image together before patching.Jesse Zhao2015-01-071-0/+6
| | | | Change-Id: Ia43657ed6cd8860b0edb78cc2dd6388c761e1f8b Bug: 17919909
* Add post-install verification phaseMichael Runge2014-10-291-2/+29
| | | | | | | | | Verify the SHA sum of all patched and extracted files after a file system remount. Bug: 18145574 Change-Id: I2f053d085543e10e39153a774542d37ee0a238bd
* get_stage in updater takes one param, not two.Michael Runge2014-10-231-6/+6
| | | | Change-Id: I09a77eda5a1691080b1ae074d2e94d233eca7150
* Allow info_dict from target_files to specify mount optionsMichael Runge2014-10-221-7/+12
| | | | | | | | This will allow safer mount options to be added per mount FS type, to better ensure data is written during an OTA. Bug: 18079773, 18092222 Change-Id: I1e3e4fd4639c6fd263e550b770cc3c858ef1e03b
* If oem_fingerprint_props is empty, ignore.Michael Runge2014-09-181-4/+4
| | | | | | | | There may be cases where there is an OEM partition but it has no effect on the OTA itself. In these cases, ignore an empty value from the misc_info.txt Change-Id: I5f467e873030765af12810a07ddd5f302ca8cc0b
* explicitly check the superblock for differencesDoug Zongker2014-09-111-2/+4
| | | | | | | | | | | When generating incrementals for the system and vendor partitions, check the first block (which contains the superblock) of the partition to see if it's what we expect. If this check fails, give an explicit log message about the partition having been remounted R/W (the most likely explanation) and the need to flash to get OTAs working again. Bug: 17393999 Change-Id: Ifd2132b428dbc4907527291712690204a3664ac0
* refactor BlockDifference into commonDoug Zongker2014-08-261-58/+7
| | | | | | | | | Move BlockDifference into common and make its script generation code more complete, so that it can be use by releasetools.py to do diffs on baseband images. Bug: 16984795 Change-Id: Iba9afc1c7755458ce47468b5170672612b2cb4b3
* new block OTA system toolsDoug Zongker2014-08-261-166/+101
| | | | | | | | Replace the xdelta/xz-based block OTA generation with a new system based on the existing bsdiff/imgdiff tools. Bug: 16984795 Change-Id: Ia9732516ffdfc12be86260b2cc4b1dd2d210e886
* add 5 minute timeout on binary patch constructionDoug Zongker2014-08-051-21/+31
| | | | | | | | When making bsdiff/imgdiff patches, give up after 5 minutes. (On certain large files it can take hours to build a patch, if it ever even completes.) Change-Id: I123c06f8194f85f6f4e640f7eb31c7746f76ba4d
* Merge "fall back to generating full OTA if incremental fails" into lmp-devDoug Zongker2014-08-011-29/+45
|\
| * fall back to generating full OTA if incremental failsDoug Zongker2014-08-041-29/+45
| | | | | | | | | | | | | | | | Block incremental OTA generation can currently fail on some target-files pairs. Fall back to generating a full OTA so that the script succeeds rather than failing. Change-Id: Ide70395d1f3759aa2076bd173836f6a5e5b397c0
* | store images in target-filesDoug Zongker2014-07-311-18/+68
|/ | | | | | | | | | | | | | | | | | | | | | Store sparse images in the target-files, and use those (when they're available) for building block OTAs. - New script add_img_to_target_files is added to make the images and add them to the IMAGES/ subdir in the target-files. It gets run from the Makefile when building a target-files. - img_from_target_files becomes mostly vestigial: it creates the img.zip by just copying the images out of the target-files. (It still knows how to build images for use on older target-files.) - ota_from_target_files uses images from the target-files in preference to rebuilding images from the source files. - sign_apk_target_files builds images and includes them in its output target files (even if the input target-files didn't have them). Bug: 16488065 Change-Id: I444e0d722d636978209467ffc01750a585c6db75
* resolved conflicts for merge of 240e136e to masterYing Wang2014-06-191-3/+11
|\ | | | | | | Change-Id: Ic6e2cbe593914ddb613454581964c5d3d443b9d5
| * Document the worker_threads option.Martin Blumenstingl2014-06-111-3/+11
| | | | | | | | Change-Id: I44775493bedc0c7224c2c4ef06330bdb1430a1b6
* | full support for OTA of vendor partitionsDoug Zongker2014-06-161-216/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make vendor partition a first-class member of the OTA system (for target_files that contain a VENDOR/ subdirectory). Build vendor images in a way that is compatible with block-based OTA. Support updating the vendor partition in both full and incremental, block and file OTAs. In most cases this is handled by refactoring the existing code to handle the system partition to handle either, and then calling it twice. Currently we don't support incremental OTAs from a target-files without a VENDOR subdirectory to one with one, or vice versa. To add or remove a vendor partition a full OTA will need to be done. Bug: 15544685 Change-Id: I9cb9a1267060bd9683a9bea19b43a26b5a43800d
* | test block patch more realisticallyDoug Zongker2014-06-131-8/+4
| | | | | | | | | | | | | | | | Read and write the same file when testing block patches, which can turn up errors that don't show up otherwise. (And will appear on the device.) Change-Id: Ic9b8d93ec980d13163b135f619af589f41433d7f
* | configure progress bar during block OTA script generationDoug Zongker2014-06-091-1/+3
| | | | | | | | | | | | | | | | | | Emit script commands to produce a more accurate progress bar (for full block OTAs) and a working progress bar (for incremental block OTAs) -- ones that are driven by the progress callback from the thing actually writing the system image. Change-Id: Ifca10be68cfdaab7135d23515bd0ae5be2f98a16
* | fix ota script to generate non-block commands correctlyDoug Zongker2014-05-091-1/+1
| | | | | | | | | | | | | | | | If you had a target_files without a recovery patch and specified --block (which should have no effect without a patch), it would have omitted some necessary commands from the OTA script. Change-Id: I96e79cd561ebf09cfe53792d1cc558cc71479869
* | Support block OTA + OEM partitionMichael Runge2014-05-051-3/+16
| | | | | | | | Change-Id: I9e662098569a43b05279908e6833e9552a7abe3a
* | Add support for verifying OEM properties.Michael Runge2014-05-011-15/+69
| | | | | | | | | | | | | | | | | | | | A separate OEM file must be specified to provide the expected values for these properties. The list of properties comes from the "oem_fingerprint_properties" list in misc_info.txt Bug: b/13367676 Change-Id: I1a3eaf108492132cf6f595a5d1c9f7e0c3cb3142
* | Fix variable name.Ying Wang2014-04-151-1/+1
| | | | | | | | | | Change-Id: Ie7439f71cf7fd2eeacd45a5d6625e610dad8bfbe (cherry picked from commit 1a1dfcb5fcb6eda11d8dbf5df02f0083853dd5c1)
* | Merge "test block system image patch at build time"Doug Zongker2014-03-061-3/+66
|\ \
| * | test block system image patch at build timeDoug Zongker2014-03-041-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After building a patch for the system image (for incremental block OTAs), apply it to a local copy of the file and test that it succeeds. This is an imperfect test as it's using the local client's syspatch_host, which may differ from the syspatch library actually used in the target build, but it's somewhat better than nothing. Change-Id: Ic0001b0145881e2ebd4b5b36ce9b5bcebd76deb4