aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
Commit message (Collapse)AuthorAgeFilesLines
* build: add apend-uboot commandDavid Bauer2018-05-221-0/+4
| | | | | | | This commit adds an append-uboot command to append U-Boot from the bin-directory. Signed-off-by: David Bauer <mail@david-bauer.net>
* build: use busybox gzip compatible force optionMathew McBride2018-05-211-1/+1
| | | | | | | | | | commit 138c763 ("build: add --force option to gzip in Build/gzip") added the --force flag to the gzip invocation. Under environments with busybox gzip (e.g Alpine Linux), this fails as busybox only recognizes "-f". Signed-off-by: Mathew McBride <matt@traverse.com.au>
* build: consolidate fake uImage header build commandsMathias Kresin2018-04-201-9/+9
| | | | | | | | | | | Merge the two existing functions and use a parameter for the type header field. It updates the syntax of the former mpc85xx fake ramdisk header command to be compatible with mkimage from u-boot 2018.03 and fixes the build error spotted by the build bot. Signed-off-by: Mathias Kresin <dev@kresin.me>
* build: fix uImage fake header commandMathias Kresin2018-04-191-1/+2
| | | | | | | | | | Use a syntax compatible with mkimage from u-boot 2018.03 to fix the build errors spotted by the build bot. The images are binary identical to the ones generated with mkimage from u-boot 2014.10. Signed-off-by: Mathias Kresin <dev@kresin.me>
* build: Allow to change the FIT config section nameSven Eckelmann2018-03-171-0/+1
| | | | | | | | Some devices only boot when a special config is found in the image and completely ignore the default entry during the selection. These devices can now use the variable DEVICE_DTS_CONFIG in their device image definition. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* build: add --force option to gzip in Build/gzipStijn Tintel2018-02-191-1/+1
| | | | | | | | | | When using pigz, a parallel gzip implementation, the gzip step in the image build for some targets fails, because the image filename already has the .gz extension. This results in an emtpy image file. Fix this by adding the --force option to gzip in the Build/gzip macro. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Tested-by: Martin Schleier <drahemmaps@gmx.net>
* at91: fix image building with CONFIG_TARGET_MULTI_PROFILEJo-Philipp Wich2018-02-141-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current image build code has a number of race conditions and interface contract violations in the custom image build steps: - Build/install-zImage, solely used by at91, relies on $(PROFILE_SANITIZED) which is not available when building with CONFIG_TARGET_MULTI_PROFILE - Build/at91-sdcard, which may run concurrently, creates scratch files at fixed locations and manipulates target files directly which can lead to file corruption and other unexpected failures Rename the install-zImage macro to at91-install-zImage and move it to the at91 image Makefile since this target is the sole user. Also utilize "$@" as output file name and switch the usage of $(PROFILE_SANITIZED) to $(DEVICE_NAME) in order to fix naming under multi profile builds. Fix the at91-sdcard macro to construct scratch file paths relative to "$@", which is guaranteed to be unique and store the final artifact output in "$@" as well, instead of inside $(BIN_DIR). The generic image build code takes care of moving a build steps "$@" output to the final destination in a concurrency-safe manner. Finally remove the broken install-zImage from the generic image-commands Makefile. Fixes: d7a679a036 ("at91: Install zImage.") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: replace uses of OpenWrt with $(VERSION_DIST)Felix Fietkau2018-02-051-3/+3
| | | | | | This makes the distribution name more configurable. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add image command for CE imagesSven Eckelmann2018-01-131-0/+13
| | | | | | | | | Combined Extended Images V1 can be created easily via the new image commands using IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | combined-ext-image Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* merge: targets: update image generation and targetsZoltan HERPAI2017-12-081-3/+3
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* build: avoid failing in append-metadata if image could not be generatedFelix Fietkau2017-12-041-1/+1
| | | | | | The image build might have failed due to a size check Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: allow calling append-dtb from image build commandsFelix Fietkau2017-11-021-2/+1
| | | | | | | | | | | | mpc85xx uses this for firmware image files, since the dtb data is not directly part of the kernel image. This causes build failures in the image builder. Fix this by adding a separate build step that runs this call earlier, reusing the generated file for any calls from kernel or image build commands. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image-commands: tplink-v2-header: pass kernel loadaddr and entryAlexander Couzens2017-10-091-1/+2
| | | | | | | Initramfs images won't boot if the default loadaddr and entrypont is different. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* build: add mktplinkfw2 hardcoded values to makefileThibaut VARÈNE2017-10-061-3/+8
| | | | | | | | | | | This patch adds all the board-specific values currently hardcoded in mktplinkfw2.c back to the respective device declarations in the makefiles. The rationale is to avoid modifying the source code every time a new board or board variant is added. Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* build: add image command for installing zImage file.Sandeep Sheriker Mallikarjun2017-09-201-0/+5
| | | | Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
* build: move mktplinkfw-combined command to image-commands.mkPiotr Dymacz2017-07-221-0/+9
| | | | | | | | | | We will need "mktplinkfw-combined" command also in the "ramips" target for new MediaTek based TP-Link devices, with "safeloader" image type. Also, rename the command to "tplink-v1-header", use "VERSION_DIST" variable instead of "OpenWrt" and allow passing additional parameters. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* build: move mktplinkfw2 related commands to image-commands.mkPiotr Dymacz2017-06-291-0/+14
| | | | | | | | | There are already two targets (lantiq, ramips) which use mktplinkfw2 tool for creating images. This de-duplicates code, introduces two new build commands: tplink-v2-header, tplink-v2-image and makes use of them in place of old, (sub)target specific ones. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_IDPiotr Dymacz2017-06-291-1/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ar71xx: add AVM FRITZ!WLAN Repeater 300E supportMathias Kresin2017-06-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: AR7242 (Virian 400MHz) * RAM: 64 MB DDR (W9751G6JB-25) * Flash: 16MB SPI flash (S25FL129PIF) * WiFi: AR9382 (2.4/5GHz) + 2x SE2595L * LAN: 1x1000M (PEF7071V) To install LEDE via EVA bootloader, a FTP connection need to be established to 192.168.178.1 within the first seconds after power on: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote MEDIA FLSH ftp> put lede-ar71xx-generic-fritz300e-squashfs-sysupgrade.bin mtd1 Signed-off-by: Mathias Kresin <dev@kresin.me>
* build: move lzma2eva build step to image-commands.mkMathias Kresin2017-06-241-0/+5
| | | | | | | Move it to image-commands.mk so that it can used by other targets with eva based boards as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* build: make NETGEAR_REGION optional in netgear-chkJoseph C. Lehner2017-03-121-1/+1
| | | | | | | This patch makes specifying NETGEAR_REGION optional, in which case mkchkimage will default to region 1 (WW). Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
* build: unsilence move commandThomas Reifferscheid2017-02-221-1/+1
| | | | | | | | | The @ sign in front of the "mv" command was significantly suppressing output to stdout. When reviewing the make/build logs it was tricking me a whole lot and it mad me lose time. Removing the @ sign will get stdout and logs right about what happened when. Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
* build: centralize fakeroot codeJoseph C. Lehner2017-02-041-4/+12
| | | | | | | | | | | | | This patch moves the fakeroot code required by some devices to `image-commands.mk`. Create the fakeroot on the fly by using the undocumented -s (skip copy) parameter of mkimage. Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com> [remove unused NETGEAR_KERNEL_MAGIC, remove workarounds to have a dummy rootfs for mkimage] Signed-off-by: Mathias Kresin <dev@kresin.me>
* firmware-utils: improve tools for Buffalo DHP seriesFUKAUMI Naoki2017-01-311-0/+33
| | | | | | | | | some of Buffalo DHP series use slightly different trx magic, buffalo-enc, buffalo-tag, and factory image begin with 'bgn'. this patch adds support for building those images. Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>
* build: move append-file to image-commands.mkJoseph C. Lehner2017-01-271-0/+4
| | | | | | | Move it append-file to image-commands.mk so that it can used by other targets as well. Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
* image.mk: use LINUX_KARCH rather than ARCH for mkitsIan Pozella2017-01-131-1/+1
| | | | | | | | | | | The generated 'its' is passed to mkimage which expects linux arch strings rather than the full arch (e.g. mips not mipsel). It currently works in some cases where LINUX_KARCH == ARCH but otherwise you get an unknown arch build error. Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add image command for calling kernel2minorFelix Fietkau2017-01-071-0/+5
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add support code for appending metadata to imagesFelix Fietkau2016-11-191-0/+18
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image: remove padding parameter from append-kernel/append-rootfsMathias Kresin2016-09-131-2/+2
| | | | | | | | | | | Using pad-to instead of passing the optional padding to append-kernel or append-rootfs. It could be that the value of a variable is passed. In case the variable is empty no error is thrown. Furthermore the purpose of the extra parameter is hard to get without reading the code. Signed-off-by: Mathias Kresin <dev@kresin.me>
* octeon: use new ext4/f2fs overlay supportFelix Fietkau2016-09-101-0/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image: pass device blocksize to padjffs2Mathias Kresin2016-09-031-1/+2
| | | | | | | | | | | | | | | | | | At the moment the padding steps are hardcoded. Especially images for devices with a 4K sector size can be unnecessarily bloated using the hardcoded padding steps. It has been observed that 192Kb of padding was added to the image of a 4MB device, albeit due to the 4K sector size the minimum required extra padding for the jffs2 rootfs_data is 20Kb. In worst case it means that the image-size check could fail albeit there is enough space for all selected packages For device build code not exposing the blocksize, use the hardcoded padding further on. Signed-off-by: Mathias Kresin <dev@kresin.me>
* image: add support for k unit suffix to append-ubiMathias Kresin2016-09-041-1/+1
| | | | | | | Allows to use the same unit for all definitions of the blocksize to be consistent regardless of the used filesystem. Signed-off-by: Mathias Kresin <dev@kresin.me>
* image: add support for k unit suffix to pad-offsetMathias Kresin2016-09-031-2/+2
| | | | | | | Allows to specificy the padding and offset in kilobytes to be consistent with pad-to. Signed-off-by: Mathias Kresin <dev@kresin.me>
* scripts/ubinize-image.sh: add support for adding custom partitionsFelix Fietkau2016-08-311-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* include/image.mk: allow image code to override uImage nameJohn Crispin2016-08-031-1/+1
| | | | Signed-off-by: John Crispin <john@phrozen.org>
* build: add template for installing device .dtb filesFelix Fietkau2016-07-311-0/+8
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image: add a helper variable for getting kernel/rootfs from within image ↵Felix Fietkau2016-07-311-8/+11
| | | | | | Build/* templates Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image: add support for overriding kernel/rootfs images in sysupgrade-tar ↵Felix Fietkau2016-07-301-2/+2
| | | | | | template Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: rename sysupgrade-nand to sysupgrade-tarJo-Philipp Wich2016-07-291-2/+2
| | | | | | | Now that the "sysupgrade-nand" step is used by non-NAND targets as well, rename it to "sysupgrade-tar" to make it more generic. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* image.mk: add support for specifying the VID header offset for UBIFelix Fietkau2016-07-201-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image.mk: fix append-dtb race when multiple devices use the same .dtsFelix Fietkau2016-07-151-2/+2
| | | | | | Call Image/BuildDTB unconditionally to keep things consistent Signed-off-by: Felix Fietkau <nbd@nbd.name>
* image: allow devices to override the -E 5 ubinize optionFelix Fietkau2016-07-141-2/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: Move append-dtb to common image-commandsBen Whitten2016-06-221-0/+5
| | | | | | This build step is used by various targets, move it to a common section. Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
* image.mk: split off all Build/* commands into image-commands.mkFelix Fietkau2016-06-071-0/+150
Signed-off-by: Felix Fietkau <nbd@nbd.name>