Skip to content
Snippets Groups Projects
Commit c20b8d69 authored by Sander Vanheule's avatar Sander Vanheule Committed by Adrian Schmutzler
Browse files

build: add UIMAGE_MAGIC to device variables


Allow a device recipe to specify a custom UIMAGE_MAGIC value, as used by
OpenWrt's -M flag for mkimage. This allows to automatically customize
the magic bytes in all calls to Build/uImage for this device, similar to
the behaviour of UIMAGE_NAME. Since the -M argument is inserted before
the user arguments, it can be overriden.

The following example would use 0x87654321 for the KERNEL image, but
0x12345678 for the KERNEL_INITRAMFS image:

  define Device/MyDevice
    UIMAGE_MAGIC := 0x87654321
    KERNEL := ... | uImage lzma
    KERNEL_INITRAMFS := ... | uImage lzma -M 0x12345678
    ...
  endef

Fixes: df8e6be5 ("rtl838x: add new architecture")
[UIMAGE_MAGIC was not declared as a device variable]

Signed-off-by: default avatarSander Vanheule <sander@svanheule.net>
[rebase, improve formatting of "Fixes"]
Signed-off-by: default avatarAdrian Schmutzler <freifunk@adrianschmutzler.de>
parent 9f574b1b
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment