difos/target/linux/mvebu/image/cortexa72.mk
INAGAKI Hiroshi 97af506edf mvebu: add support for Check Point V-81
Check Point V-80 (Quantum Spark 1590 Appliance) is an Appliance, based
on Armada 8040 (88F8040).

Specification:

- SoC             : Marvell Armada 8040 (88F8040)
- RAM             : DDR4 2 GiB (4x 512 MiB chip)
- Flash           : eMMC 4 GiB
- Ethernet        : 10x 10/100/1000 Mbps
  - LAN 1-8       : Marvell 88E6393X
  - WAN           : Marvell 88E1512
  - DMZ           : Marvell 88E1512 (RJ-45/SFP combo)
- LEDs/Keys (GPIO): 11x/1x
- UART            : "CONSOLE" port (USB 1.1 Type-C)
  - chip          : Silicon Labs CP2102N
  - port          : ttyS0
  - settings      : 115200bps 8n1
- HW Monitoring   : 2x nuvoTon NCT7802Y
- USB             : USB 3.0 Type-A
- Power           : 12 VDC, 3.3 A
  - plug          : DC Plug 2.5/5.5 mm (inner/outer)

Flash instruction (common):

1. Boot V-81 normally
2. Login to the vendor CLI (default: admin/admin) and login to the Linux
   CLI by `expert` command
3. Update U-Boot environment variables by the following commands

   fw_setenv bootcmd_ow_usb 'usb start; load usb 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_sd 'load mmc 0:1 ${loadaddr} boot.scr && source ${loadaddr}'
   fw_setenv bootcmd_ow_emmc 'run set_mmc_internal; mmc read ${loadaddr} ${prim_header_mmc_blk} 4 && source ${loadaddr}'
   fw_setenv bootcmd 'run bootcmd_ow_usb; run bootcmd_ow_sd; run bootcmd_ow_emmc; run bootcmd_part${activePartition};'

   Attention: don't forget single quatations of values to prevent
              expansion of variables

4. Turn off the device

Flash instruction (USB-boot/SD-boot):

1. Extract and burn (squashfs|ext4)-sdcard.img.gz to USB storage or
   MicroSD card
2. Connect that storage to V-81
3. Turn on V-81 and it will be booted with OpenWrt in that USB storage

Flash instruction (eMMC-boot):

1. Copy initramfs image, dtb and bootsctipt to the USB storage with
   renaming

   initramfs.bin -------> Image
   dtb -----------------> armada-8040-v-81.dtb
   bootscript (.scr) ---> boot.scr

2. Connect that storage to the USB 3.0 port on V-81
3. Turn on V-81 and it will be booted with OpenWrt initramfs image in
   that USB storage
4. Upload (squashfs|ext4)-sysupgrade.gz to V-81
5. Perform sysupgrade with the uploaded image
6. Wait ~100 seconds to complete flashing

Reverting to stock firmware:

1. Turn on V-81 and interrupt booting by Ctrl + C
2. Select "4. Restore to Factory Defaults (local)"
3. Wait ~180 seconds to complete restoring and rebooting

Notes:

- The partition table in the internal eMMC has single partition, but
  "blkdevparts=" parameter will be passed from the bootloader and that
  definition will be used instead.

- The port-side LED pairs of RJ-45/SFP ports on V-81 are switched by a
  GPIO pin of pin7 on &cp0_gpio2. (High(1): RJ-45, Low(0): SFP)
  This needs to be switched manually.

- The MicroSD card slot is too unstable and the following messages are
  printed without "marvell,xenon-phy-slow-mode;" property.

  [   97.060851] mmc0: error -84 whilst initialising SD card
  [   97.137049] mmc0: error -84 whilst initialising SD card
  [   97.214315] mmc0: error -84 whilst initialising SD card
  ...

- There are no detailed information about maximum power consumption
  limit of the SFP port or optional DSL-SFP modules sold officially.
  But the power requirement of almost DSL-SFP modules are 3.3V/700mA, so
  set the maximum value of the SFP port to 2000 mW (Power Level III).

- Do not insert a MicroSD card before turning of the device when OpenWrt
  installation. The stock firmware deletes all files in the first
  partition automatically, to use it as a storage for logs.

MAC addresses:

LAN: 00:1C:7F:xx:xx:FA (mmcblk1boot0, ethaddr  (text))
WAN: 00:1C:7F:xx:xx:F9 (mmcblk1boot0, eth2addr (text))
DMZ: 00:1C:7F:xx:xx:FB (mmcblk1boot0, eth1addr (text))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16904
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-22 22:17:20 +02:00

159 lines
4.8 KiB
Makefile

define Build/append-bootscript
cat $@-boot.scr >> $@
endef
define Device/FitImage
KERNEL_SUFFIX := -uImage.itb
KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
KERNEL_NAME := Image
endef
define Device/UbiFit
KERNEL_IN_UBI := 1
IMAGES := factory.ubi sysupgrade.bin
IMAGE/factory.ubi := append-ubi
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
define Device/checkpoint_v-80
$(call Device/Default-arm64)
DEVICE_VENDOR := Check Point
DEVICE_MODEL := V-80
SOC := armada-7040
BOOT_SCRIPT := v-80
IMAGES += sysupgrade.gz
IMAGE/sysupgrade.gz := boot-scr eMMC | append-bootscript | pad-to 2048 | \
append-kernel | \
sysupgrade-tar kernel=$$$$@ dtb=$$(KDIR)/image-$$(DEVICE_DTS).dtb | \
gzip | append-metadata
ARTIFACTS := initramfs.dtb initramfs.scr
ARTIFACT/initramfs.dtb := append-dtb
ARTIFACT/initramfs.scr := boot-scr INIT | append-bootscript
DEVICE_PACKAGES := kmod-dsa-mv88e6xxx kmod-hwmon-nct7802 kmod-rtc-ds1307
endef
TARGET_DEVICES += checkpoint_v-80
define Device/checkpoint_v-81
$(call Device/Default-arm64)
DEVICE_VENDOR := Check Point
DEVICE_MODEL := V-81
SOC := armada-8040
BOOT_SCRIPT := v-80
IMAGES += sysupgrade.gz
IMAGE/sysupgrade.gz := boot-scr eMMC | append-bootscript | pad-to 2048 | \
append-kernel | \
sysupgrade-tar kernel=$$$$@ dtb=$$(KDIR)/image-$$(DEVICE_DTS).dtb | \
gzip | append-metadata
ARTIFACTS := initramfs.dtb initramfs.scr
ARTIFACT/initramfs.dtb := append-dtb
ARTIFACT/initramfs.scr := boot-scr INIT | append-bootscript
DEVICE_PACKAGES := kmod-dsa-mv88e6xxx kmod-hwmon-nct7802 kmod-rtc-ds1307
endef
TARGET_DEVICES += checkpoint_v-81
define Device/globalscale_mochabin
$(call Device/Default-arm64)
DEVICE_VENDOR := Globalscale
DEVICE_MODEL := MOCHAbin
DEVICE_PACKAGES += kmod-dsa-mv88e6xxx
SOC := armada-7040
endef
TARGET_DEVICES += globalscale_mochabin
define Device/marvell_armada7040-db
$(call Device/Default-arm64)
DEVICE_VENDOR := Marvell
DEVICE_MODEL := Armada 7040 Development Board
DEVICE_DTS := armada-7040-db
IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
endef
TARGET_DEVICES += marvell_armada7040-db
define Device/marvell_armada8040-db
$(call Device/Default-arm64)
DEVICE_VENDOR := Marvell
DEVICE_MODEL := Armada 8040 Development Board
DEVICE_DTS := armada-8040-db
IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
endef
TARGET_DEVICES += marvell_armada8040-db
define Device/marvell_macchiatobin-doubleshot
$(call Device/Default-arm64)
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := MACCHIATObin
DEVICE_VARIANT := Double Shot
DEVICE_ALT0_VENDOR := SolidRun
DEVICE_ALT0_MODEL := Armada 8040 Community Board
DEVICE_ALT0_VARIANT := Double Shot
DEVICE_PACKAGES += kmod-i2c-mux-pca954x
DEVICE_DTS := armada-8040-mcbin
SUPPORTED_DEVICES := marvell,armada8040-mcbin-doubleshot marvell,armada8040-mcbin
endef
TARGET_DEVICES += marvell_macchiatobin-doubleshot
define Device/marvell_macchiatobin-singleshot
$(call Device/Default-arm64)
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := MACCHIATObin
DEVICE_VARIANT := Single Shot
DEVICE_ALT0_VENDOR := SolidRun
DEVICE_ALT0_MODEL := Armada 8040 Community Board
DEVICE_ALT0_VARIANT := Single Shot
DEVICE_PACKAGES += kmod-i2c-mux-pca954x
DEVICE_DTS := armada-8040-mcbin-singleshot
SUPPORTED_DEVICES := marvell,armada8040-mcbin-singleshot
endef
TARGET_DEVICES += marvell_macchiatobin-singleshot
define Device/mikrotik_rb5009
$(call Device/Default-arm64)
$(Device/NAND-128K)
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := MikroTik
DEVICE_MODEL := RB5009
SOC := armada-7040
KERNEL_LOADADDR := 0x22000000
DEVICE_PACKAGES += kmod-i2c-gpio yafut kmod-dsa-mv88e6xxx
endef
TARGET_DEVICES += mikrotik_rb5009
define Device/marvell_clearfog-gt-8k
$(call Device/Default-arm64)
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := Clearfog
DEVICE_VARIANT := GT-8K
DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-crypto-hw-safexcel
DEVICE_DTS := armada-8040-clearfog-gt-8k
SUPPORTED_DEVICES := marvell,armada8040-clearfog-gt-8k
endef
TARGET_DEVICES += marvell_clearfog-gt-8k
define Device/iei_puzzle-m901
$(call Device/Default-arm64)
SOC := cn9131
DEVICE_VENDOR := iEi
DEVICE_MODEL := Puzzle-M901
DEVICE_PACKAGES += kmod-rtc-ds1307
endef
TARGET_DEVICES += iei_puzzle-m901
define Device/iei_puzzle-m902
$(call Device/Default-arm64)
SOC := cn9132
DEVICE_VENDOR := iEi
DEVICE_MODEL := Puzzle-M902
DEVICE_PACKAGES += kmod-rtc-ds1307
endef
TARGET_DEVICES += iei_puzzle-m902
define Device/solidrun_clearfog-pro
$(call Device/Default-arm64)
SOC := cn9130
DEVICE_VENDOR := SolidRun
DEVICE_MODEL := ClearFog Pro
DEVICE_PACKAGES += kmod-i2c-mux-pca954x kmod-dsa-mv88e6xxx
BOOT_SCRIPT := clearfog-pro
endef
TARGET_DEVICES += solidrun_clearfog-pro