Commit Graph

34 Commits (34bbbbf9c3b39e7b2d81df590aad5cdbd00280d6)

Author SHA1 Message Date
Felix Fietkau e23ff063d3 build: avoid failing in append-metadata if image could not be generated
The image build might have failed due to a size check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 986d9deb3b build: allow calling append-dtb from image build commands
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>
7 years ago
Alexander Couzens 49b84624eb image-commands: tplink-v2-header: pass kernel loadaddr and entry
Initramfs images won't boot if the default loadaddr and entrypont is
different.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
7 years ago
Thibaut VARÈNE 254061ee97 build: add mktplinkfw2 hardcoded values to makefile
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>
7 years ago
Sandeep Sheriker Mallikarjun feb1907270 build: add image command for installing zImage file.
Signed-off-by: Sandeep Sheriker Mallikarjun <sandeepsheriker.mallikarjun@microchip.com>
7 years ago
Piotr Dymacz f08f754993 build: move mktplinkfw-combined command to image-commands.mk
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>
7 years ago
Piotr Dymacz 5b7f592251 build: move mktplinkfw2 related commands to image-commands.mk
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>
7 years ago
Piotr Dymacz 7d6c63d875 build: rename TPLINK_BOARD_NAME to TPLINK_BOARD_ID
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
7 years ago
Mathias Kresin e7cd6f5d66 ar71xx: add AVM FRITZ!WLAN Repeater 300E support
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>
7 years ago
Mathias Kresin 8e0d7d6574 build: move lzma2eva build step to image-commands.mk
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>
7 years ago
Joseph C. Lehner 2c2fc50d06 build: make NETGEAR_REGION optional in netgear-chk
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>
7 years ago
Thomas Reifferscheid 1d49b534f5 build: unsilence move command
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>
7 years ago
Joseph C. Lehner 7d00cfe9bb build: centralize fakeroot code
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>
7 years ago
FUKAUMI Naoki 7faee1bc9f firmware-utils: improve tools for Buffalo DHP series
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>
7 years ago
Joseph C. Lehner aeba0fe466 build: move append-file to image-commands.mk
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>
7 years ago
Ian Pozella 859693509f image.mk: use LINUX_KARCH rather than ARCH for mkits
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>
7 years ago
Felix Fietkau c2e6ca26e5 build: add image command for calling kernel2minor
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 77265e00c7 build: add support code for appending metadata to images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Mathias Kresin 61c2a7339a image: remove padding parameter from append-kernel/append-rootfs
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>
8 years ago
Felix Fietkau d2a7df0792 octeon: use new ext4/f2fs overlay support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Mathias Kresin ddd259b0d5 image: pass device blocksize to padjffs2
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>
8 years ago
Mathias Kresin 3e7524c184 image: add support for k unit suffix to append-ubi
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>
8 years ago
Mathias Kresin b99a93ebaf image: add support for k unit suffix to pad-offset
Allows to specificy the padding and offset in kilobytes to be
consistent with pad-to.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Felix Fietkau a84a74f618 scripts/ubinize-image.sh: add support for adding custom partitions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin 4df2011794 include/image.mk: allow image code to override uImage name
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Felix Fietkau 94dec60d75 build: add template for installing device .dtb files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 63b525dd6b image: add a helper variable for getting kernel/rootfs from within image Build/* templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 84718d8736 image: add support for overriding kernel/rootfs images in sysupgrade-tar template
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich db49dd894e build: rename sysupgrade-nand to sysupgrade-tar
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>
8 years ago
Felix Fietkau 9a50a213d2 image.mk: add support for specifying the VID header offset for UBI
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 7bdc21de72 image.mk: fix append-dtb race when multiple devices use the same .dts
Call Image/BuildDTB unconditionally to keep things consistent

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau b8fddb8912 image: allow devices to override the -E 5 ubinize option
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Ben Whitten b7baaaf782 kernel: Move append-dtb to common image-commands
This build step is used by various targets, move it to a common section.

Signed-off-by: Ben Whitten <ben.whitten@gmail.com>
8 years ago
Felix Fietkau 4c33bbf8f4 image.mk: split off all Build/* commands into image-commands.mk
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago