mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
a58cb22bbe
ath79/tiny kernel config has
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
from commit
05d35403b2
Because of this, these changes are required for 2 reasons:
1.
Senao devices in ath79/tiny
with a 'failsafe' partition and the tar.gz sysupgrade platform
and a flash chip that supports 4k sectors
will fail to reboot to openwrt after a sysupgrade.
the stored checksum is made with the 64k blocksize length
of the image to be flashed,
and the actual checksum changes after flashing due to JFFS2 space
being formatted within the length of the rootfs from the image
example:
0x440000 length of kernel + rootfs (from sysupgrade.bin)
0x439000 offset of rootfs_data (from kernel log)
2.
for boards with flash chips that support 4k sectors:
saving configuration over sysupgrade is not possible
because sysupgrade.tgz is appended at a 64k boundary
and the mtd parser starts JFFS2 at a 4k boundary.
for boards with flash chips that do not support 4k sectors:
partitioning with 4k boundaries causes a boot loop
from the mtd parser not finding kernel and rootfs.
Also:
Some of the Senao boards that belong in ath79/tiny,
for example ENH202,
have a flash chip that does not support 4k sectors
(no SECT_4K symbol in upstream source).
Because of this, partitioning must be different for these devices
depending on the flash chip model detected by the kernel.
Therefore:
this creates 2 DTSI files
to replace the single one with 64k partitioning
for 4k and 64k partitioning respectively.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
82 lines
2.0 KiB
Makefile
82 lines
2.0 KiB
Makefile
include ./common-buffalo.mk
|
|
include ./common-senao.mk
|
|
|
|
define Device/buffalo_whr-g301n
|
|
$(Device/buffalo_common)
|
|
SOC := ar7240
|
|
DEVICE_MODEL := WHR-G301N
|
|
BUFFALO_PRODUCT := WHR-G301N
|
|
IMAGE_SIZE := 3712k
|
|
SUPPORTED_DEVICES += whr-g301n
|
|
DEFAULT := n
|
|
endef
|
|
TARGET_DEVICES += buffalo_whr-g301n
|
|
|
|
define Device/dlink_dir-615-e4
|
|
SOC := ar7240
|
|
DEVICE_VENDOR := D-Link
|
|
DEVICE_MODEL := DIR-615
|
|
DEVICE_VARIANT := E4
|
|
IMAGE_SIZE := 3776k
|
|
FACTORY_IMAGE_SIZE := 3456k
|
|
IMAGES += factory.bin
|
|
IMAGE/default := append-kernel | append-rootfs | pad-rootfs
|
|
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
|
|
check-size
|
|
IMAGE/factory.bin := $$(IMAGE/default) | \
|
|
check-size $$$$(FACTORY_IMAGE_SIZE) | pad-to $$$$(FACTORY_IMAGE_SIZE) | \
|
|
append-string "AP99-AR7240-RT-091105-05"
|
|
SUPPORTED_DEVICES += dir-615-e4
|
|
DEFAULT := n
|
|
endef
|
|
TARGET_DEVICES += dlink_dir-615-e4
|
|
|
|
define Device/engenius_eap350-v1
|
|
$(Device/senao_loader_okli)
|
|
BLOCKSIZE := 4k
|
|
SOC := ar7242
|
|
DEVICE_VENDOR := EnGenius
|
|
DEVICE_MODEL := EAP350
|
|
DEVICE_VARIANT := v1
|
|
IMAGE_SIZE := 4928k
|
|
LOADER_FLASH_OFFS := 0x1a0000
|
|
SENAO_IMGNAME := senao-eap350
|
|
endef
|
|
TARGET_DEVICES += engenius_eap350-v1
|
|
|
|
define Device/engenius_ecb350-v1
|
|
$(Device/senao_loader_okli)
|
|
BLOCKSIZE := 4k
|
|
SOC := ar7242
|
|
DEVICE_VENDOR := EnGenius
|
|
DEVICE_MODEL := ECB350
|
|
DEVICE_VARIANT := v1
|
|
IMAGE_SIZE := 4928k
|
|
LOADER_FLASH_OFFS := 0x1a0000
|
|
SENAO_IMGNAME := senao-ecb350
|
|
endef
|
|
TARGET_DEVICES += engenius_ecb350-v1
|
|
|
|
define Device/engenius_enh202-v1
|
|
$(Device/senao_loader_okli)
|
|
SOC := ar7240
|
|
DEVICE_VENDOR := EnGenius
|
|
DEVICE_MODEL := ENH202
|
|
DEVICE_VARIANT := v1
|
|
DEVICE_PACKAGES := rssileds
|
|
IMAGE_SIZE := 4928k
|
|
LOADER_FLASH_OFFS := 0x1a0000
|
|
SENAO_IMGNAME := senao-enh202
|
|
endef
|
|
TARGET_DEVICES += engenius_enh202-v1
|
|
|
|
define Device/pqi_air-pen
|
|
SOC := ar9330
|
|
DEVICE_VENDOR := PQI
|
|
DEVICE_MODEL := Air-Pen
|
|
DEVICE_PACKAGES := kmod-usb2
|
|
IMAGE_SIZE := 7680k
|
|
SUPPORTED_DEVICES += pqi-air-pen
|
|
endef
|
|
TARGET_DEVICES += pqi_air-pen
|