2021-02-10 13:52:34 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2009-08-30 19:15:51 +00:00
|
|
|
#
|
2011-10-31 09:23:44 +00:00
|
|
|
# Copyright (C) 2008-2011 OpenWrt.org
|
2021-02-10 13:52:34 +00:00
|
|
|
|
2009-08-30 19:15:51 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
ramips: add support for Beeline SmartBox GIGA
Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
Sercomm company.
Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB, Nanya NT5CC128M16JR-EK
Flash: 128 MiB, Macronix MX30LF1G18AC
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
USB ports: 1xUSB3.0
Button: 1 button (Reset/WPS)
PCB ID: DBE00B-1.6MM
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot
Installation
-----------------
1. Downgrade stock (Beeline) firmware to v.1.0.02;
2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
3. Upload and update the firmware via the original web interface.
Remark: You might need make the 3rd step twice if your running firmware
is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.
Revert to stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
overwrite OpenWrt in Slot 0 completely.
MAC Addresses
-------------
+-----+-----------+---------+
| use | address | example |
+-----+-----------+---------+
| LAN | label | *:16 |
| WAN | label + 1 | *:17 |
| 2g | label + 4 | *:1a |
| 5g | label + 5 | *:1b |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000
Notes
-----
1. The following scripts are required for the build:
sercomm-crypto.py - already exists in OpenWrt
sercomm-partition-tag.py - already exists in OpenWrt
sercomm-payload.py - already exists in OpenWrt
sercomm-pid.py - new, the part of this pull request
sercomm-kernel-header.py - new, the part of this pull request
2. This device (same as other Sercomm S2,S3-based devices) requires
special LZMA and LOADADDR settings for successful boot:
LZMA_TEXT_START=0x82800000
KERNEL_LOADADDR=0x81001000
LOADADDR=0x80001000
3. This device (same as several other Sercomm-based devices - Beeline,
Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
real partition offsets, which may differ from device to device
depending on the number and location of bad blocks on NAND.
"fixed-partitions" is used if the partition map is not found or
corrupted. This behavour (it's the same as on stock firmware) is
provided by MTD_SERCOMM_PARTS module.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-03-18 18:09:45 +00:00
|
|
|
DEVICE_VARS += LOADER_TYPE LOADER_FLASH_OFFS LZMA_TEXT_START
|
2020-03-09 12:14:06 +00:00
|
|
|
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
2023-03-30 22:27:11 +00:00
|
|
|
DEVICE_VARS += NETGEAR_ENC_MODEL NETGEAR_ENC_REGION NETGEAR_ENC_HW_ID_LIST NETGEAR_ENC_MODEL_LIST
|
2017-01-28 16:05:56 +00:00
|
|
|
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
|
2018-12-29 18:25:00 +00:00
|
|
|
DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK
|
2020-07-10 10:00:08 +00:00
|
|
|
DEVICE_VARS += SERCOMM_HWNAME SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER
|
2020-08-03 17:23:50 +00:00
|
|
|
DEVICE_VARS += SERCOMM_PAD JCG_MAXSIZE
|
2015-01-10 15:26:53 +00:00
|
|
|
|
2015-01-10 15:26:38 +00:00
|
|
|
loadaddr-y := 0x80000000
|
|
|
|
loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000
|
|
|
|
loadaddr-$(CONFIG_TARGET_ramips_mt7621) := 0x80001000
|
2009-08-30 19:15:51 +00:00
|
|
|
|
2020-04-14 03:17:47 +00:00
|
|
|
ldrplatform-y := ralink
|
|
|
|
ldrplatform-$(CONFIG_TARGET_ramips_mt7621) := mt7621
|
|
|
|
|
2020-09-02 06:22:30 +00:00
|
|
|
ldrflashstart-y := 0x1c000000
|
|
|
|
ldrflashstart-$(CONFIG_TARGET_ramips_mt7621) := 0x1fc00000
|
|
|
|
|
ramips: add support for Beeline SmartBox GIGA
Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
Sercomm company.
Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB, Nanya NT5CC128M16JR-EK
Flash: 128 MiB, Macronix MX30LF1G18AC
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
USB ports: 1xUSB3.0
Button: 1 button (Reset/WPS)
PCB ID: DBE00B-1.6MM
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot
Installation
-----------------
1. Downgrade stock (Beeline) firmware to v.1.0.02;
2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
3. Upload and update the firmware via the original web interface.
Remark: You might need make the 3rd step twice if your running firmware
is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.
Revert to stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
overwrite OpenWrt in Slot 0 completely.
MAC Addresses
-------------
+-----+-----------+---------+
| use | address | example |
+-----+-----------+---------+
| LAN | label | *:16 |
| WAN | label + 1 | *:17 |
| 2g | label + 4 | *:1a |
| 5g | label + 5 | *:1b |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000
Notes
-----
1. The following scripts are required for the build:
sercomm-crypto.py - already exists in OpenWrt
sercomm-partition-tag.py - already exists in OpenWrt
sercomm-payload.py - already exists in OpenWrt
sercomm-pid.py - new, the part of this pull request
sercomm-kernel-header.py - new, the part of this pull request
2. This device (same as other Sercomm S2,S3-based devices) requires
special LZMA and LOADADDR settings for successful boot:
LZMA_TEXT_START=0x82800000
KERNEL_LOADADDR=0x81001000
LOADADDR=0x80001000
3. This device (same as several other Sercomm-based devices - Beeline,
Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
real partition offsets, which may differ from device to device
depending on the number and location of bad blocks on NAND.
"fixed-partitions" is used if the partition map is not found or
corrupted. This behavour (it's the same as on stock firmware) is
provided by MTD_SERCOMM_PARTS module.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-03-18 18:09:45 +00:00
|
|
|
LOADADDR := $(loadaddr-y)
|
2020-04-14 03:17:47 +00:00
|
|
|
LOADER_PLATFORM := $(ldrplatform-y)
|
2020-09-02 06:22:30 +00:00
|
|
|
LOADER_FLASH_START := $(ldrflashstart-y)
|
2015-01-10 15:26:53 +00:00
|
|
|
|
2019-06-27 12:44:27 +00:00
|
|
|
KERNEL_DTB = kernel-bin | append-dtb | lzma
|
2015-01-10 15:26:53 +00:00
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/jcg-header
|
|
|
|
$(STAGING_DIR_HOST)/bin/jcgimage -v $(1) \
|
2023-11-11 12:29:26 +00:00
|
|
|
$(if $(JCG_MAXSIZE), -m $$(($(call exp_units,$(JCG_MAXSIZE)))),) \
|
2020-05-08 16:20:53 +00:00
|
|
|
-u $@ -o $@.new
|
|
|
|
mv $@.new $@
|
2016-09-27 05:38:08 +00:00
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/loader-common
|
|
|
|
rm -rf $@.src
|
|
|
|
$(MAKE) -C lzma-loader \
|
|
|
|
PKG_BUILD_DIR="$@.src" \
|
|
|
|
TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
|
|
|
|
BOARD="$(BOARDNAME)" PLATFORM="$(LOADER_PLATFORM)" \
|
ramips: add support for Beeline SmartBox GIGA
Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
Sercomm company.
Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB, Nanya NT5CC128M16JR-EK
Flash: 128 MiB, Macronix MX30LF1G18AC
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
USB ports: 1xUSB3.0
Button: 1 button (Reset/WPS)
PCB ID: DBE00B-1.6MM
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot
Installation
-----------------
1. Downgrade stock (Beeline) firmware to v.1.0.02;
2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
3. Upload and update the firmware via the original web interface.
Remark: You might need make the 3rd step twice if your running firmware
is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.
Revert to stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
overwrite OpenWrt in Slot 0 completely.
MAC Addresses
-------------
+-----+-----------+---------+
| use | address | example |
+-----+-----------+---------+
| LAN | label | *:16 |
| WAN | label + 1 | *:17 |
| 2g | label + 4 | *:1a |
| 5g | label + 5 | *:1b |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000
Notes
-----
1. The following scripts are required for the build:
sercomm-crypto.py - already exists in OpenWrt
sercomm-partition-tag.py - already exists in OpenWrt
sercomm-payload.py - already exists in OpenWrt
sercomm-pid.py - new, the part of this pull request
sercomm-kernel-header.py - new, the part of this pull request
2. This device (same as other Sercomm S2,S3-based devices) requires
special LZMA and LOADADDR settings for successful boot:
LZMA_TEXT_START=0x82800000
KERNEL_LOADADDR=0x81001000
LOADADDR=0x80001000
3. This device (same as several other Sercomm-based devices - Beeline,
Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
real partition offsets, which may differ from device to device
depending on the number and location of bad blocks on NAND.
"fixed-partitions" is used if the partition map is not found or
corrupted. This behavour (it's the same as on stock firmware) is
provided by MTD_SERCOMM_PARTS module.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-03-18 18:09:45 +00:00
|
|
|
LZMA_TEXT_START=$(LZMA_TEXT_START) \
|
|
|
|
LOADADDR=$(LOADADDR) \
|
2023-01-21 21:34:28 +00:00
|
|
|
SUBTARGET=$(SUBTARGET) \
|
2020-05-08 16:20:53 +00:00
|
|
|
$(1) compile loader.$(LOADER_TYPE)
|
|
|
|
mv "$@.$(LOADER_TYPE)" "$@"
|
|
|
|
rm -rf $@.src
|
2016-11-21 07:46:48 +00:00
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/loader-kernel
|
|
|
|
$(call Build/loader-common,LOADER_DATA="$@")
|
2016-11-25 12:03:01 +00:00
|
|
|
endef
|
|
|
|
|
2020-09-02 06:22:30 +00:00
|
|
|
define Build/loader-okli-compile
|
|
|
|
$(call Build/loader-common, \
|
|
|
|
FLASH_START=$(LOADER_FLASH_START) \
|
|
|
|
FLASH_OFFS=$(LOADER_FLASH_OFFS) \
|
|
|
|
FLASH_MAX=0 \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/append-loader-okli
|
|
|
|
cat "$(KDIR)/loader-$(word 1,$(1)).$(LOADER_TYPE)" >> "$@"
|
|
|
|
endef
|
|
|
|
|
2018-01-20 08:27:03 +00:00
|
|
|
# combine kernel and rootfs into one image
|
|
|
|
# mkdlinkfw <type> <optional extra arguments to mkdlinkfw binary>
|
|
|
|
define Build/mkdlinkfw
|
|
|
|
-$(STAGING_DIR_HOST)/bin/mkdlinkfw \
|
|
|
|
-k $(IMAGE_KERNEL) \
|
|
|
|
-r $(IMAGE_ROOTFS) \
|
|
|
|
-o $@ \
|
2018-04-19 17:36:55 +00:00
|
|
|
$(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \
|
2018-01-20 08:27:03 +00:00
|
|
|
-s $(DLINK_FIRMWARE_SIZE)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/mkdlinkfw-factory
|
|
|
|
-$(STAGING_DIR_HOST)/bin/mkdlinkfw \
|
|
|
|
-m $(DLINK_ROM_ID) -f $(DLINK_FAMILY_MEMBER) \
|
|
|
|
-F $@ \
|
|
|
|
-o $@.new \
|
2018-04-19 17:36:55 +00:00
|
|
|
$(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \
|
2018-01-20 08:27:03 +00:00
|
|
|
-s $(DLINK_FIRMWARE_SIZE)
|
|
|
|
mv $@.new $@
|
|
|
|
endef
|
2021-06-10 15:17:23 +00:00
|
|
|
|
|
|
|
define Build/mkdlinkfw-loader
|
|
|
|
-$(STAGING_DIR_HOST)/bin/mkdlinkfw \
|
|
|
|
-k $(KDIR)/loader-$(DEVICE_NAME).bin \
|
|
|
|
-r $@ \
|
|
|
|
-o $@.new \
|
|
|
|
$(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \
|
|
|
|
-s $(DLINK_FIRMWARE_SIZE)
|
|
|
|
mv $@.new $@
|
|
|
|
endef
|
2018-01-20 08:27:03 +00:00
|
|
|
|
2019-11-11 16:23:07 +00:00
|
|
|
define Build/netis-tail
|
|
|
|
echo -n $(1) >> $@
|
2021-05-09 20:28:15 +00:00
|
|
|
echo -n $(UIMAGE_NAME)-yun | $(MKHASH) md5 | \
|
2019-11-11 16:23:07 +00:00
|
|
|
sed 's/../\\\\x&/g' | xargs echo -ne >> $@
|
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/poray-header
|
|
|
|
$(STAGING_DIR_HOST)/bin/mkporayfw $(1) -f $@ -o $@.new
|
|
|
|
mv $@.new $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/relocate-kernel
|
|
|
|
rm -rf $@.relocate
|
|
|
|
$(CP) ../../generic/image/relocate $@.relocate
|
2022-01-29 14:24:07 +00:00
|
|
|
$(MAKE) -C $@.relocate KERNEL_ADDR=$(if $(1),$(1),$(KERNEL_LOADADDR)) CROSS_COMPILE=$(TARGET_CROSS)
|
2020-05-08 16:20:53 +00:00
|
|
|
( \
|
|
|
|
dd if=$@.relocate/loader.bin bs=32 conv=sync && \
|
|
|
|
perl -e '@s = stat("$@"); print pack("V", @s[7])' && \
|
|
|
|
cat $@ \
|
|
|
|
) > $@.new
|
|
|
|
mv $@.new $@
|
|
|
|
rm -rf $@.relocate
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/sercom-footer
|
|
|
|
$(call Build/sercom-seal,-f)
|
2018-06-28 05:26:39 +00:00
|
|
|
endef
|
|
|
|
|
2019-05-15 19:11:01 +00:00
|
|
|
define Build/sercom-seal
|
|
|
|
$(STAGING_DIR_HOST)/bin/mksercommfw \
|
|
|
|
-i $@ \
|
|
|
|
-b $(SERCOMM_HWID) \
|
|
|
|
-r $(SERCOMM_HWVER) \
|
|
|
|
-v $(SERCOMM_SWVER) \
|
|
|
|
$(1)
|
|
|
|
endef
|
|
|
|
|
2020-10-05 14:13:38 +00:00
|
|
|
define Build/sign-dlink-ru
|
|
|
|
sign_dlink_ru $@ $1 $2
|
|
|
|
mv $@.new $@
|
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/trx
|
|
|
|
$(STAGING_DIR_HOST)/bin/trx $(1) \
|
|
|
|
-o $@ \
|
2023-11-11 12:29:26 +00:00
|
|
|
-m $$(($(call exp_units,$(IMAGE_SIZE)))) \
|
2020-05-08 16:20:53 +00:00
|
|
|
-f $(IMAGE_KERNEL) \
|
|
|
|
-a 4 -f $(IMAGE_ROOTFS)
|
2019-05-15 19:11:01 +00:00
|
|
|
endef
|
|
|
|
|
2020-07-10 12:16:23 +00:00
|
|
|
define Build/uimage-padhdr
|
|
|
|
uimage_padhdr $(if $(1),-l $(1)) -i $@ -o $@.new
|
|
|
|
mv $@.new $@
|
|
|
|
endef
|
|
|
|
|
2021-04-20 09:44:01 +00:00
|
|
|
define Build/uimage-sgehdr
|
|
|
|
uimage_sgehdr -i $@ -o $@.new -m $(DEVICE_MODEL) \
|
|
|
|
-h $(DEVICE_VARIANT) -s V1.00000
|
|
|
|
mv $@.new $@
|
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/umedia-header
|
|
|
|
fix-u-media-header -T 0x46 -B $(1) -i $@ -o $@.new && mv $@.new $@
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/wrg-header
|
|
|
|
mkwrgimg -i $@ -d "/dev/mtdblock/2" -s $(1) -o $@.new
|
2019-07-25 23:11:48 +00:00
|
|
|
mv $@.new $@
|
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Build/zyimage
|
|
|
|
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
|
|
|
|
endef
|
2011-07-28 10:56:32 +00:00
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Device/Default
|
|
|
|
PROFILES = Default
|
2023-05-13 13:01:00 +00:00
|
|
|
BLOCKSIZE := 64k
|
2020-05-08 16:20:53 +00:00
|
|
|
KERNEL := $(KERNEL_DTB) | uImage lzma
|
2022-02-02 15:10:04 +00:00
|
|
|
KERNEL_LOADADDR := $(loadaddr-y)
|
ramips: add support for Beeline SmartBox GIGA
Beeline SmartBox GIGA is a wireless WiFi 5 router manufactured by
Sercomm company.
Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB, Nanya NT5CC128M16JR-EK
Flash: 128 MiB, Macronix MX30LF1G18AC
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7613BE): a/n/ac, 2x2
Ethernet: 3 ports - 2xGbE (WAN, LAN1), 1xFE (LAN2)
USB ports: 1xUSB3.0
Button: 1 button (Reset/WPS)
PCB ID: DBE00B-1.6MM
LEDs: 1 RGB LED
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot
Installation
-----------------
1. Downgrade stock (Beeline) firmware to v.1.0.02;
2. Give factory OpenWrt image a shorter name, e.g. 1001.img;
3. Upload and update the firmware via the original web interface.
Remark: You might need make the 3rd step twice if your running firmware
is booted from the Slot 1 (Sercomm0 bootflag). The stock firmware
reverses the bootflag (Sercomm0 / Sercomm1) on each firmware update.
Revert to stock
---------------
1. Change the bootflag to Sercomm1 in OpenWrt CLI and then reboot:
printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
2. Optional: Update with any stock (Beeline) firmware if you want to
overwrite OpenWrt in Slot 0 completely.
MAC Addresses
-------------
+-----+-----------+---------+
| use | address | example |
+-----+-----------+---------+
| LAN | label | *:16 |
| WAN | label + 1 | *:17 |
| 2g | label + 4 | *:1a |
| 5g | label + 5 | *:1b |
+-----+-----------+---------+
The label MAC address was found in Factory 0x21000
Notes
-----
1. The following scripts are required for the build:
sercomm-crypto.py - already exists in OpenWrt
sercomm-partition-tag.py - already exists in OpenWrt
sercomm-payload.py - already exists in OpenWrt
sercomm-pid.py - new, the part of this pull request
sercomm-kernel-header.py - new, the part of this pull request
2. This device (same as other Sercomm S2,S3-based devices) requires
special LZMA and LOADADDR settings for successful boot:
LZMA_TEXT_START=0x82800000
KERNEL_LOADADDR=0x81001000
LOADADDR=0x80001000
3. This device (same as several other Sercomm-based devices - Beeline,
Netgear, Etisalat, Rostelecom) has partition map (mtd1) containing
real partition offsets, which may differ from device to device
depending on the number and location of bad blocks on NAND.
"fixed-partitions" is used if the partition map is not found or
corrupted. This behavour (it's the same as on stock firmware) is
provided by MTD_SERCOMM_PARTS module.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2022-03-18 18:09:45 +00:00
|
|
|
LZMA_TEXT_START := 0x81800000
|
2020-05-08 16:20:53 +00:00
|
|
|
SOC := $(DEFAULT_SOC)
|
|
|
|
DEVICE_DTS_DIR := ../dts
|
|
|
|
DEVICE_DTS = $$(SOC)_$(1)
|
2023-03-30 22:27:11 +00:00
|
|
|
NETGEAR_ENC_MODEL :=
|
|
|
|
NETGEAR_ENC_REGION :=
|
|
|
|
NETGEAR_ENC_HW_ID_LIST :=
|
|
|
|
NETGEAR_ENC_MODEL_LIST :=
|
2020-05-08 16:20:53 +00:00
|
|
|
IMAGES := sysupgrade.bin
|
ramips: add support for HooToo HT-TM05
The HooToo HT-TM05 is a battery powered router, with an Ethernet and USB port.
Vendor U-Boot limited to 1.5 MB kernel size, so use lzma loader (loader-okli).
Specifications:
SOC: MediaTek MT7620N
BATTERY: 10400mAh
WLAN: 802.11bgn
LAN: 1x 10/100 Mbps Ethernet
USB: 1x USB 2.0 (Type-A)
RAM: 64 MB
FLASH: GigaDevice GD25Q64, Serial 8 MB Flash, clocked at 50 MHz
Flash itself specified to 80 MHz, but speed limited by mt7620 SPI
fast-read enabled (m25p)
LED: Status LED (blue after boot, green with WiFi traffic
4 leds to indicate power level of the battery (unable to control)
INPUT: Power, reset button
MAC assignment based on vendor firmware:
2.4 GHz *:b4 (factory 0x04)
LAN/label *:b4 (factory 0x28)
WAN *:b5 (factory 0x2e)
Tested and working:
- Ethernet
- 2.4 GHz WiFi (Correct MAC-address)
- Installation from TFTP (recovery)
- OpenWRT sysupgrade (Preserving and non-preserving), through the usual
ways: command line and LuCI
- LEDs (except as noted above)
- Button (reset)
- I2C, which is needed for reading battery charge status and level
- U-Boot environment / variables (from U-Boot, and OpenWrt)
Installation:
- Download the needed OpenWrt install files, place them in the root
of a clean TFTP server running on your computer. Rename the files as,
- ramips-mt7620-hootoo_tm05-squashfs-kernel.bin => kernel
- ramips-mt7620-hootoo_tm05-squashfs-rootfs.bin => rootfs
- Plug the router into your computer via Ethernet
- Set your computer to use 10.10.10.254 as its IP address
- With your router shut down, hold down the power button until the first
white LED lights up.
- Push and hold the reset button and release the power button. Continue
holding the reset button for 30 seconds or until it begins searching
for files on your TFTP server, whichever comes first.
- The router (10.10.10.128) will look for your computer at 10.10.10.254
and install the two files. Once it has finished installation, it will
automatically reboot and start up OpenWrt.
- Set your computer to use DHCP for its IP address
Notes:
- U-Boot environment can be modified, u-boot-env is preserved on initial
install or sysupgrade
- mtd-concat functionality is included, to leave a "hole" for u-boot-env,
combining the OEM kernel and rootfs partitions
I would like to thank @mpratt14 and @xabolcs for their help getting the
lzma loader to work!
Signed-off-by: Russell Morris <rmorris@rkmorris.us>
[drop changes in image/Makefile, fix indent and PKG_RELEASE in
uboot-envtools, fix LOADER_FLASH_OFFS, minor commit message facelift,
add COMPILE to Device/Default]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-12-25 00:38:36 +00:00
|
|
|
COMPILE :=
|
2020-05-08 16:20:53 +00:00
|
|
|
sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
|
2021-06-20 16:54:36 +00:00
|
|
|
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
|
2020-05-08 16:20:53 +00:00
|
|
|
endef
|
2010-04-11 17:47:28 +00:00
|
|
|
|
2020-08-03 17:23:50 +00:00
|
|
|
define Device/netgear_sercomm_nor
|
|
|
|
DEVICE_VENDOR := NETGEAR
|
|
|
|
IMAGES += factory.img
|
|
|
|
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
|
|
|
|
pad-rootfs
|
2021-06-20 16:54:36 +00:00
|
|
|
IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
|
2020-08-03 17:23:50 +00:00
|
|
|
IMAGE/factory.img := pad-extra $$$$(SERCOMM_PAD) | $$(IMAGE/default) | \
|
|
|
|
pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
|
|
|
|
zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
|
|
|
|
endef
|
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Device/seama
|
|
|
|
SEAMA_MTDBLOCK := 2
|
|
|
|
IMAGES += factory.bin
|
2012-04-21 12:30:44 +00:00
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
# 64 bytes offset:
|
|
|
|
# - 28 bytes seama_header
|
|
|
|
# - 36 bytes of META data (4-bytes aligned)
|
|
|
|
IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
|
|
|
|
IMAGE/sysupgrade.bin := \
|
2021-06-20 16:54:36 +00:00
|
|
|
$$(IMAGE/default) | seama | pad-rootfs | check-size | append-metadata
|
2020-05-08 16:20:53 +00:00
|
|
|
IMAGE/factory.bin := \
|
|
|
|
$$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size
|
|
|
|
SEAMA_SIGNATURE :=
|
|
|
|
endef
|
2013-11-16 20:28:52 +00:00
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
define Device/uimage-lzma-loader
|
|
|
|
LOADER_TYPE := bin
|
2022-09-26 06:42:54 +00:00
|
|
|
KERNEL/lzma-loader := kernel-bin | append-dtb | lzma | loader-kernel
|
|
|
|
KERNEL := $$(KERNEL/lzma-loader) | uImage none
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Device/seama-lzma-loader
|
|
|
|
$(Device/seama)
|
|
|
|
$(Device/uimage-lzma-loader)
|
|
|
|
KERNEL := $$(KERNEL/lzma-loader) | relocate-kernel | lzma -a0
|
|
|
|
KERNEL_INITRAMFS := $$(KERNEL/lzma-loader) | uImage none
|
2020-05-08 16:20:53 +00:00
|
|
|
endef
|
2013-12-13 10:53:34 +00:00
|
|
|
|
2020-05-08 16:20:53 +00:00
|
|
|
include $(SUBTARGET).mk
|
2015-07-24 09:11:56 +00:00
|
|
|
|
2009-08-30 19:15:51 +00:00
|
|
|
$(eval $(call BuildImage))
|