mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-25 05:47:00 +00:00
68add5f364
Return to using the OpenWrt kernel loader to decompress and load kernel initram image. Continue to use the vmlinuz kernel for squashfs. Mikrotik's bootloader RouterBOOT on some ath79 devices is failing to boot the current initram, due to the size of the initram image. On the ath79 wAP-ac: a 5.7MiB initram image would fail to boot After this change: a 6.6MiB initram image successfully loads This partially reverts commit e91344776b9ba7c864be88d915c9c0df0eb790dd. An alternative of using RouterBOOT's capability of loading an initrd ELF section was investigated, but the OpenWrt kernel loader allows larger image. Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> (cherry picked from commit 62b72eafe49d2eecd3692691152ed86a0327fcb0) Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org> Fixes: #9954
24 lines
685 B
Makefile
24 lines
685 B
Makefile
define Device/mikrotik
|
|
DEVICE_VENDOR := MikroTik
|
|
LOADER_TYPE := elf
|
|
KERNEL_NAME := vmlinuz
|
|
KERNEL := kernel-bin | append-dtb-elf
|
|
KERNEL_INITRAMFS_NAME := vmlinux-initramfs
|
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel
|
|
endef
|
|
|
|
define Device/mikrotik_nor
|
|
$(Device/mikrotik)
|
|
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \
|
|
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \
|
|
check-size | append-metadata
|
|
endef
|
|
|
|
define Device/mikrotik_nand
|
|
$(Device/mikrotik)
|
|
IMAGE/sysupgrade.bin = append-kernel | kernel2minor -s 2048 -e -c | \
|
|
sysupgrade-tar kernel=$$$$@ | append-metadata
|
|
DEVICE_PACKAGES := nand-utils
|
|
DEFAULT := n
|
|
endef
|