openwrtv4/target/linux/ath79/image/tiny.mk
YuheiOKAWA 27eae6597e ath79: add support for PQI Air Pen
SoC: AR9330 (or AR9331 revision?)
Ethernet x1, Wireless 2.4G, uSD card slot x1.
USB Power, include Li-Po Battery.

Flash 8MiB. (factory is dual image)
1. write image is use half 4MiB size from factory.
  write initramfs image to mtd6 and mtd7.
2. change next boot setting. next is mtd6 boot.
  echo -ne "\x01" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

3. rewrite sysupgrade image.
  change next boot setting. next is mtd4.
  echo -ne "\x00" | dd of=/dev/mtdblock8 conv=notrunc bs=1 count=1 seek=0

OEM mtd.
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "ART"
mtd3: 00010000 00010000 "NVRAM"
mtd4: 00140000 00010000 "uImage"
mtd5: 00280000 00010000 "rootfs"
mtd6: 00140000 00010000 "uImage2"
mtd7: 00280000 00010000 "rootfs2"
mtd8: 00010000 00010000 "CONF"

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>
2018-10-28 10:59:14 +01:00

41 lines
1.3 KiB
Makefile

include ./common-buffalo.mk
DEVICE_VARS += ROOTFS_SIZE
define Device/buffalo_bhr-4grv2
ATH_SOC := qca9558
DEVICE_TITLE := Buffalo BHR-4GRV2
BOARDNAME := BHR-4GRV2
ROOTFS_SIZE := 14528k
KERNEL_SIZE := 1472k
IMAGE_SIZE := 16000k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := \
append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | \
append-kernel | append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-kernel | \
pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
SUPPORTED_DEVICES += bhr-4grv2
endef
TARGET_DEVICES += buffalo_bhr-4grv2
define Device/buffalo_whr-g301n
ATH_SOC := ar7240
DEVICE_TITLE := Buffalo WHR-G301N
IMAGE_SIZE := 3712k
IMAGES += factory.bin tftp.bin
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | buffalo-tag WHR-G301N 3
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += whr-g301n
endef
TARGET_DEVICES += buffalo_whr-g301n
define Device/pqi_air-pen
ATH_SOC := ar9330
DEVICE_TITLE := PQI Air-Pen
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
IMAGE_SIZE := 7680k
SUPPORTED_DEVICES += pqi-air-pen
endef
TARGET_DEVICES += pqi_air-pen