aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-07-04 06:39:05 +0200
committerMathias Kresin <dev@kresin.me>2018-07-07 21:07:40 +0200
commit5260c1003cee20b004f4628c72ef3985885ca901 (patch)
tree12df1dd3469ee3948582531ccae1721c25adbb35 /target
parent0b83a235602dace3de116a10de9515cda5b76be4 (diff)
downloadupstream-5260c1003cee20b004f4628c72ef3985885ca901.tar.gz
upstream-5260c1003cee20b004f4628c72ef3985885ca901.tar.bz2
upstream-5260c1003cee20b004f4628c72ef3985885ca901.zip
ar71xx: mikrotik: cleanup nand image build code
Use the LOADER_TYPE variable to specify that we need the elf preloader and append the loader via the corresponding build recipe. It allows to enable initramfs images again for mikrotik NAND images, which caused a build error before. Add the minor header only to the kernel of the sysupgrade images, as it is only required for the bootloader to find the kernel on flash. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/image/mikrotik.mk34
1 files changed, 20 insertions, 14 deletions
diff --git a/target/linux/ar71xx/image/mikrotik.mk b/target/linux/ar71xx/image/mikrotik.mk
index a0a7b7a2dd..3238a885a8 100644
--- a/target/linux/ar71xx/image/mikrotik.mk
+++ b/target/linux/ar71xx/image/mikrotik.mk
@@ -2,44 +2,50 @@ define Device/mikrotik
PROFILES := Default
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
BOARD_NAME := routerboard
- KERNEL_INITRAMFS :=
- KERNEL_NAME := loader-generic.elf
- KERNEL := kernel-bin | kernel2minor -s 2048 -e -c
- FILESYSTEMS := squashfs
- IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := sysupgrade-tar
+ LOADER_TYPE := elf
+ KERNEL_NAME := vmlinux.bin.lzma
+ KERNEL := kernel-bin | loader-kernel
+ KERNEL_INITRAMFS_NAME := vmlinux-initramfs.bin.lzma
+ MIKROTIK_CHUNKSIZE :=
+ IMAGE/sysupgrade.bin/squashfs :=
endef
+DEVICE_VARS += MIKROTIK_CHUNKSIZE
-define Device/nand-64m
+define Device/mikrotik-nand
$(Device/mikrotik)
+ IMAGE/sysupgrade.bin/squashfs = append-kernel | \
+ kernel2minor -s $$(MIKROTIK_CHUNKSIZE) -e -c | sysupgrade-tar kernel=$$$$@
+endef
+
+define Device/nand-64m
+ $(Device/mikrotik-nand)
+ MIKROTIK_CHUNKSIZE := 512
DEVICE_TITLE := MikroTik RouterBoard (64 MB NAND)
- KERNEL := kernel-bin | kernel2minor -s 512 -e -c
endef
TARGET_DEVICES += nand-64m
define Device/nand-large
- $(Device/mikrotik)
+ $(Device/mikrotik-nand)
+ MIKROTIK_CHUNKSIZE := 2048
DEVICE_TITLE := MikroTik RouterBoard (>= 128 MB NAND)
- KERNEL := kernel-bin | kernel2minor -s 2048 -e -c
endef
TARGET_DEVICES += nand-large
define Device/nand-large-ac
- $(Device/mikrotik)
+ $(Device/mikrotik-nand)
+ MIKROTIK_CHUNKSIZE := 2048
DEVICE_TITLE := MikroTik RouterBoard (>= 128 MB NAND, 802.11ac)
DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
- KERNEL := kernel-bin | kernel2minor -s 2048 -e -c
SUPPORTED_DEVICES := rb-921gs-5hpacd-r2
endef
TARGET_DEVICES += nand-large-ac
define Device/rb-nor-flash-16M
+ $(Device/mikrotik)
DEVICE_TITLE := MikroTik RouterBoard (16 MB SPI NOR)
DEVICE_PACKAGES := rbcfg rssileds -nand-utils kmod-ledtrig-gpio
IMAGE_SIZE := 16000k
- LOADER_TYPE := elf
KERNEL_INSTALL := 1
- KERNEL := kernel-bin | lzma | loader-kernel
SUPPORTED_DEVICES := rb-750-r2 rb-750up-r2 rb-750p-pbr2 rb-911-2hn rb-911-5hn rb-941-2nd rb-951ui-2nd rb-952ui-5ac2nd rb-962uigs-5hact2hnt rb-lhg-5nd rb-map-2nd rb-mapl-2nd rb-wap-2nd rb-wapr-2nd
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)