Initial commit
This commit is contained in:
138
target/linux/mvebu/image/Makefile
Normal file
138
target/linux/mvebu/image/Makefile
Normal file
@@ -0,0 +1,138 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2012-2016 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE-project.org
|
||||
|
||||
JFFS2_BLOCKSIZE = 128k
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += BOOT_SCRIPT UBOOT
|
||||
KERNEL_LOADADDR := 0x00008000
|
||||
|
||||
define Build/boot-scr
|
||||
rm -f $@-boot.scr
|
||||
sed \
|
||||
-e 's#@ROOT@#$(IMG_PART_SIGNATURE)#g' \
|
||||
-e 's#@DTB@#$(firstword $(DEVICE_DTS))#g' \
|
||||
$(BOOT_SCRIPT).bootscript > $@-new.bootscript
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $@-new.bootscript $@-boot.scr
|
||||
endef
|
||||
|
||||
define Build/boot-img
|
||||
rm -f $@.boot
|
||||
mkfs.fat -C $@.boot $$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 ))
|
||||
$(foreach dts,$(DEVICE_DTS), mcopy -i $@.boot $(KDIR)/image-$(dts).dtb ::$(dts).dtb;)
|
||||
mcopy -i $@.boot $(IMAGE_KERNEL) ::$(KERNEL_NAME)
|
||||
-mcopy -i $@.boot $@-boot.scr ::boot.scr
|
||||
endef
|
||||
|
||||
define Build/boot-img-ext4
|
||||
rm -fR $@.boot
|
||||
mkdir -p $@.boot
|
||||
$(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;)
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME)
|
||||
-$(CP) $@-boot.scr $@.boot/boot.scr
|
||||
make_ext4fs -J -L kernel -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot
|
||||
endef
|
||||
|
||||
define Build/buffalo-kernel-jffs2
|
||||
rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
|
||||
mkdir -p $(KDIR)/kernel_jffs2
|
||||
dd if=/dev/zero of=$@.fakerd bs=131008 count=1 conv=sync
|
||||
$(STAGING_DIR_HOST)/bin/mkimage \
|
||||
-T ramdisk -A $(LINUX_KARCH) -O linux -C gzip -n 'fake initrd' \
|
||||
-d $@.fakerd $(KDIR)/kernel_jffs2/initrd.buffalo
|
||||
cp $@ $(KDIR)/kernel_jffs2/uImage.buffalo
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
|
||||
--little-endian -v --squash-uids -q -f -n -x lzma -x rtime -m none \
|
||||
--eraseblock=128KiB --pad=$(KERNEL_SIZE) -d $(KDIR)/kernel_jffs2 -o $@
|
||||
rm -rf $(KDIR)/kernel_jffs2 $@.fakerd
|
||||
endef
|
||||
|
||||
define Build/sdcard-img
|
||||
SIGNATURE="$(IMG_PART_SIGNATURE)" \
|
||||
./gen_mvebu_sdcard_img.sh $@ \
|
||||
$(if $(UBOOT),$(STAGING_DIR_IMAGE)/$(UBOOT)) \
|
||||
c $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
||||
83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS)
|
||||
endef
|
||||
|
||||
define Build/sdcard-img-ext4
|
||||
SIGNATURE="$(IMG_PART_SIGNATURE)" \
|
||||
./gen_mvebu_sdcard_img.sh $@ \
|
||||
$(if $(UBOOT),$(STAGING_DIR_IMAGE)/$(UBOOT)) \
|
||||
83 $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.bootimg \
|
||||
83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS)
|
||||
endef
|
||||
|
||||
define Build/omnia-medkit-initramfs
|
||||
$(TAR) -c -T /dev/null -f $@
|
||||
rm -rf $(dir $(IMAGE_KERNEL))boot
|
||||
mkdir -p $(dir $(IMAGE_KERNEL))boot/boot/
|
||||
cp $(KDIR)/zImage-initramfs $(dir $(IMAGE_KERNEL))boot/boot/zImage
|
||||
cp $(KDIR)/image-$(DEVICE_DTS).dtb $(dir $(IMAGE_KERNEL))boot/boot/dtb
|
||||
$(TAR) -rp --numeric-owner --owner=0 --group=0 --sort=name \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
--file=$@ -C $(dir $(IMAGE_KERNEL))boot/ .
|
||||
endef
|
||||
|
||||
define Build/uDPU-firmware
|
||||
(rm -fR $@-fw; mkdir -p $@-fw)
|
||||
$(CP) $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-initramfs.itb $@-fw/recovery.itb
|
||||
$(CP) $@-boot.scr $@-fw/boot.scr
|
||||
$(TAR) -cvzp --numeric-owner --owner=0 --group=0 --sort=name \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
-f $@-fw/rootfs.tgz -C $(TARGET_DIR) .
|
||||
$(TAR) -cvzp --numeric-owner --owner=0 --group=0 --sort=name \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
-f $@-fw/boot.tgz -C $@.boot .
|
||||
$(TAR) -cvzp --numeric-owner --owner=0 --group=0 --sort=name \
|
||||
$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
|
||||
-f $(KDIR_TMP)/$(DEVICE_IMG_PREFIX)-firmware.tgz -C $@-fw .
|
||||
endef
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)
|
||||
BOARD_NAME = $$(DEVICE_DTS)
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | append-dtb | uImage none
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
UBINIZE_OPTS := -E 5
|
||||
UBOOT :=
|
||||
BOOT_SCRIPT :=
|
||||
endef
|
||||
|
||||
define Device/Default-arm64
|
||||
BOOT_SCRIPT := generic-arm64
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)/marvell
|
||||
IMAGES := sdcard.img.gz
|
||||
IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
KERNEL_NAME := Image
|
||||
KERNEL := kernel-bin
|
||||
endef
|
||||
|
||||
define Device/NAND-128K
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
SUBPAGESIZE := 512
|
||||
VID_HDR_OFFSET := 2048
|
||||
endef
|
||||
|
||||
define Device/NAND-256K
|
||||
BLOCKSIZE := 256k
|
||||
PAGESIZE := 4096
|
||||
endef
|
||||
|
||||
define Device/NAND-512K
|
||||
BLOCKSIZE := 512k
|
||||
PAGESIZE := 4096
|
||||
endef
|
||||
|
||||
include $(SUBTARGET).mk
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
23
target/linux/mvebu/image/clearfog.bootscript
Normal file
23
target/linux/mvebu/image/clearfog.bootscript
Normal file
@@ -0,0 +1,23 @@
|
||||
# Standard Boot-Script
|
||||
# use only well-known variable names provided by U-Boot Distro boot
|
||||
# This script assumes that there is a boot partition,
|
||||
# and that the root partition is always the next one.
|
||||
|
||||
# rootfs is always on the next partition
|
||||
setexpr openwrt_rootpart ${distro_bootpart} + 1
|
||||
|
||||
# figure out partition uuid to pass to the kernel as root=
|
||||
part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid
|
||||
|
||||
# generate bootargs (rootfs)
|
||||
setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait
|
||||
|
||||
# add console= option to bootargs, if any
|
||||
if test -n "${console}"; then
|
||||
setenv bootargs ${bootargs} console=${console}
|
||||
fi
|
||||
|
||||
echo "Booting Linux with ${bootargs}"
|
||||
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb
|
||||
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
94
target/linux/mvebu/image/cortexa53.mk
Normal file
94
target/linux/mvebu/image/cortexa53.mk
Normal file
@@ -0,0 +1,94 @@
|
||||
define Device/glinet_gl-mv1000
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-MV1000
|
||||
SOC := armada-3720
|
||||
endef
|
||||
TARGET_DEVICES += glinet_gl-mv1000
|
||||
|
||||
define Device/globalscale_espressobin
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := ESPRESSObin
|
||||
DEVICE_VARIANT := Non-eMMC
|
||||
DEVICE_ALT0_VENDOR := Marvell
|
||||
DEVICE_ALT0_MODEL := Armada 3700 Community Board
|
||||
DEVICE_ALT0_VARIANT := Non-eMMC
|
||||
SOC := armada-3720
|
||||
BOOT_SCRIPT := espressobin
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_espressobin
|
||||
|
||||
define Device/globalscale_espressobin-emmc
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := ESPRESSObin
|
||||
DEVICE_VARIANT := eMMC
|
||||
DEVICE_ALT0_VENDOR := Marvell
|
||||
DEVICE_ALT0_MODEL := Armada 3700 Community Board
|
||||
DEVICE_ALT0_VARIANT := eMMC
|
||||
SOC := armada-3720
|
||||
BOOT_SCRIPT := espressobin
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_espressobin-emmc
|
||||
|
||||
define Device/globalscale_espressobin-ultra
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := ESPRESSObin
|
||||
DEVICE_VARIANT := Ultra
|
||||
DEVICE_PACKAGES += kmod-i2c-pxa kmod-rtc-pcf8563
|
||||
SOC := armada-3720
|
||||
BOOT_SCRIPT := espressobin
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_espressobin-ultra
|
||||
|
||||
define Device/globalscale_espressobin-v7
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := ESPRESSObin
|
||||
DEVICE_VARIANT := V7 Non-eMMC
|
||||
DEVICE_ALT0_VENDOR := Marvell
|
||||
DEVICE_ALT0_MODEL := Armada 3700 Community Board
|
||||
DEVICE_ALT0_VARIANT := V7 Non-eMMC
|
||||
SOC := armada-3720
|
||||
BOOT_SCRIPT := espressobin
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_espressobin-v7
|
||||
|
||||
define Device/globalscale_espressobin-v7-emmc
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := ESPRESSObin
|
||||
DEVICE_VARIANT := V7 eMMC
|
||||
DEVICE_ALT0_VENDOR := Marvell
|
||||
DEVICE_ALT0_MODEL := Armada 3700 Community Board
|
||||
DEVICE_ALT0_VARIANT := V7 eMMC
|
||||
SOC := armada-3720
|
||||
BOOT_SCRIPT := espressobin
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_espressobin-v7-emmc
|
||||
|
||||
define Device/marvell_armada-3720-db
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada 3720 Development Board (DB-88F3720-DDR3)
|
||||
DEVICE_DTS := armada-3720-db
|
||||
endef
|
||||
TARGET_DEVICES += marvell_armada-3720-db
|
||||
|
||||
define Device/methode_udpu
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Methode
|
||||
DEVICE_MODEL := micro-DPU (uDPU)
|
||||
DEVICE_DTS := armada-3720-uDPU
|
||||
KERNEL_LOADADDR := 0x00080000
|
||||
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
|
||||
KERNEL_INITRAMFS_SUFFIX := .itb
|
||||
DEVICE_PACKAGES += f2fs-tools fdisk kmod-i2c-pxa
|
||||
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(2)
|
||||
IMAGES := firmware.tgz
|
||||
IMAGE/firmware.tgz := boot-scr | boot-img-ext4 | uDPU-firmware | append-metadata
|
||||
BOOT_SCRIPT := udpu
|
||||
endef
|
||||
TARGET_DEVICES += methode_udpu
|
||||
71
target/linux/mvebu/image/cortexa72.mk
Normal file
71
target/linux/mvebu/image/cortexa72.mk
Normal file
@@ -0,0 +1,71 @@
|
||||
define Device/globalscale_mochabin
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := Globalscale
|
||||
DEVICE_MODEL := MOCHAbin
|
||||
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/iei_puzzle-m901
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := iEi
|
||||
DEVICE_MODEL := Puzzle-M901
|
||||
SOC := cn9131
|
||||
IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += iei_puzzle-m901
|
||||
|
||||
define Device/iei_puzzle-m902
|
||||
$(call Device/Default-arm64)
|
||||
DEVICE_VENDOR := iEi
|
||||
DEVICE_MODEL := Puzzle-M902
|
||||
SOC := cn9132
|
||||
IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += iei_puzzle-m902
|
||||
271
target/linux/mvebu/image/cortexa9.mk
Normal file
271
target/linux/mvebu/image/cortexa9.mk
Normal file
@@ -0,0 +1,271 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2012-2016 OpenWrt.org
|
||||
# Copyright (C) 2016 LEDE-project.org
|
||||
|
||||
define Device/dsa-migration
|
||||
DEVICE_COMPAT_VERSION := 1.1
|
||||
DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
|
||||
endef
|
||||
|
||||
define Device/kernel-size-migration
|
||||
DEVICE_COMPAT_VERSION := 2.0
|
||||
DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (up to 19.07) due to kernel size restrictions. \
|
||||
Upgrade via sysupgrade mechanism is not possible, so new installation via factory style image is required.
|
||||
endef
|
||||
|
||||
define Device/buffalo_ls421de
|
||||
$(Device/NAND-128K)
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_MODEL := LinkStation LS421DE
|
||||
SUBPAGESIZE :=
|
||||
KERNEL_SIZE := 33554432
|
||||
FILESYSTEMS := squashfs ubifs
|
||||
KERNEL := kernel-bin | append-dtb | uImage none | buffalo-kernel-jffs2
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | uImage none
|
||||
DEVICE_DTS := armada-370-buffalo-ls421de
|
||||
DEVICE_PACKAGES := \
|
||||
kmod-rtc-rs5c372a kmod-hwmon-gpiofan kmod-hwmon-drivetemp kmod-usb3 \
|
||||
kmod-linkstation-poweroff kmod-md-raid0 kmod-md-raid1 kmod-md-mod \
|
||||
kmod-fs-xfs mkf2fs e2fsprogs partx-utils
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_ls421de
|
||||
|
||||
define Device/cznic_turris-omnia
|
||||
DEVICE_VENDOR := CZ.NIC
|
||||
DEVICE_MODEL := Turris Omnia
|
||||
KERNEL_INSTALL := 1
|
||||
SOC := armada-385
|
||||
KERNEL := kernel-bin
|
||||
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
|
||||
DEVICE_PACKAGES := \
|
||||
mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
|
||||
wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
|
||||
partx-utils kmod-i2c-mux-pca954x
|
||||
IMAGES := $$(DEVICE_IMG_PREFIX)-sysupgrade.img.gz omnia-medkit-$$(DEVICE_IMG_PREFIX)-initramfs.tar.gz
|
||||
IMAGE/$$(DEVICE_IMG_PREFIX)-sysupgrade.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
|
||||
IMAGE/omnia-medkit-$$(DEVICE_IMG_PREFIX)-initramfs.tar.gz := omnia-medkit-initramfs | gzip
|
||||
DEVICE_IMG_NAME = $$(2)
|
||||
SUPPORTED_DEVICES += armada-385-turris-omnia
|
||||
BOOT_SCRIPT := turris-omnia
|
||||
endef
|
||||
TARGET_DEVICES += cznic_turris-omnia
|
||||
|
||||
define Device/globalscale_mirabox
|
||||
$(Device/NAND-512K)
|
||||
DEVICE_VENDOR := Globalscale
|
||||
DEVICE_MODEL := Mirabox
|
||||
SOC := armada-370
|
||||
SUPPORTED_DEVICES += mirabox
|
||||
endef
|
||||
TARGET_DEVICES += globalscale_mirabox
|
||||
|
||||
define Device/kobol_helios4
|
||||
DEVICE_VENDOR := Kobol
|
||||
DEVICE_MODEL := Helios4
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL := kernel-bin
|
||||
DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils
|
||||
IMAGES := sdcard.img.gz
|
||||
IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
SOC := armada-388
|
||||
UBOOT := helios4-u-boot-spl.kwb
|
||||
BOOT_SCRIPT := clearfog
|
||||
endef
|
||||
TARGET_DEVICES += kobol_helios4
|
||||
|
||||
define Device/linksys
|
||||
$(Device/NAND-128K)
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_PACKAGES := kmod-mwlwifi wpad-basic-wolfssl
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi | pad-to $$$$(PAGESIZE)
|
||||
KERNEL_SIZE := 6144k
|
||||
endef
|
||||
|
||||
define Device/linksys_wrt1200ac
|
||||
$(call Device/linksys)
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_MODEL := WRT1200AC
|
||||
DEVICE_ALT0_VENDOR := Linksys
|
||||
DEVICE_ALT0_MODEL := Caiman
|
||||
DEVICE_DTS := armada-385-linksys-caiman
|
||||
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
|
||||
SUPPORTED_DEVICES += armada-385-linksys-caiman linksys,caiman
|
||||
endef
|
||||
TARGET_DEVICES += linksys_wrt1200ac
|
||||
|
||||
define Device/linksys_wrt1900acs
|
||||
$(call Device/linksys)
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_MODEL := WRT1900ACS
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_ALT0_VENDOR := Linksys
|
||||
DEVICE_ALT0_MODEL := WRT1900ACS
|
||||
DEVICE_ALT0_VARIANT := v2
|
||||
DEVICE_ALT1_VENDOR := Linksys
|
||||
DEVICE_ALT1_MODEL := Shelby
|
||||
DEVICE_DTS := armada-385-linksys-shelby
|
||||
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
|
||||
SUPPORTED_DEVICES += armada-385-linksys-shelby linksys,shelby
|
||||
endef
|
||||
TARGET_DEVICES += linksys_wrt1900acs
|
||||
|
||||
define Device/linksys_wrt1900ac-v1
|
||||
$(call Device/linksys)
|
||||
$(Device/kernel-size-migration)
|
||||
DEVICE_MODEL := WRT1900AC
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_ALT0_VENDOR := Linksys
|
||||
DEVICE_ALT0_MODEL := Mamba
|
||||
DEVICE_DTS := armada-xp-linksys-mamba
|
||||
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
|
||||
KERNEL_SIZE := 4096k
|
||||
SUPPORTED_DEVICES += armada-xp-linksys-mamba linksys,mamba
|
||||
endef
|
||||
TARGET_DEVICES += linksys_wrt1900ac-v1
|
||||
|
||||
define Device/linksys_wrt1900ac-v2
|
||||
$(call Device/linksys)
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_MODEL := WRT1900AC
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_ALT0_VENDOR := Linksys
|
||||
DEVICE_ALT0_MODEL := Cobra
|
||||
DEVICE_DTS := armada-385-linksys-cobra
|
||||
DEVICE_PACKAGES += mwlwifi-firmware-88w8864
|
||||
SUPPORTED_DEVICES += armada-385-linksys-cobra linksys,cobra
|
||||
endef
|
||||
TARGET_DEVICES += linksys_wrt1900ac-v2
|
||||
|
||||
define Device/linksys_wrt3200acm
|
||||
$(call Device/linksys)
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_MODEL := WRT3200ACM
|
||||
DEVICE_ALT0_VENDOR := Linksys
|
||||
DEVICE_ALT0_MODEL := Rango
|
||||
DEVICE_DTS := armada-385-linksys-rango
|
||||
DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
|
||||
SUPPORTED_DEVICES += armada-385-linksys-rango linksys,rango
|
||||
endef
|
||||
TARGET_DEVICES += linksys_wrt3200acm
|
||||
|
||||
define Device/linksys_wrt32x
|
||||
$(call Device/linksys)
|
||||
$(Device/kernel-size-migration)
|
||||
DEVICE_MODEL := WRT32X
|
||||
DEVICE_ALT0_VENDOR := Linksys
|
||||
DEVICE_ALT0_MODEL := Venom
|
||||
DEVICE_DTS := armada-385-linksys-venom
|
||||
DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964
|
||||
KERNEL_SIZE := 6144k
|
||||
KERNEL := kernel-bin | append-dtb
|
||||
SUPPORTED_DEVICES += armada-385-linksys-venom linksys,venom
|
||||
endef
|
||||
TARGET_DEVICES += linksys_wrt32x
|
||||
|
||||
define Device/marvell_a370-db
|
||||
$(Device/NAND-512K)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada 370 Development Board (DB-88F6710-BP-DDR3)
|
||||
DEVICE_DTS := armada-370-db
|
||||
SUPPORTED_DEVICES += armada-370-db
|
||||
endef
|
||||
TARGET_DEVICES += marvell_a370-db
|
||||
|
||||
define Device/marvell_a370-rd
|
||||
$(Device/NAND-512K)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada 370 RD (RD-88F6710-A1)
|
||||
DEVICE_DTS := armada-370-rd
|
||||
SUPPORTED_DEVICES += armada-370-rd
|
||||
endef
|
||||
TARGET_DEVICES += marvell_a370-rd
|
||||
|
||||
define Device/marvell_a385-db-ap
|
||||
$(Device/NAND-256K)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada 385 Development Board AP (DB-88F6820-AP)
|
||||
DEVICE_DTS := armada-385-db-ap
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
|
||||
append-ubi | pad-to $$$$(PAGESIZE)
|
||||
KERNEL_SIZE := 8192k
|
||||
SUPPORTED_DEVICES += armada-385-db-ap
|
||||
endef
|
||||
TARGET_DEVICES += marvell_a385-db-ap
|
||||
|
||||
define Device/marvell_a388-rd
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada 388 RD (RD-88F6820-AP)
|
||||
DEVICE_DTS := armada-388-rd
|
||||
IMAGES := firmware.bin
|
||||
IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs
|
||||
SUPPORTED_DEVICES := armada-388-rd marvell,a385-rd
|
||||
endef
|
||||
TARGET_DEVICES += marvell_a388-rd
|
||||
|
||||
define Device/marvell_axp-db
|
||||
$(Device/NAND-512K)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada XP Development Board (DB-78460-BP)
|
||||
DEVICE_DTS := armada-xp-db
|
||||
SUPPORTED_DEVICES += armada-xp-db
|
||||
endef
|
||||
TARGET_DEVICES += marvell_axp-db
|
||||
|
||||
define Device/marvell_axp-gp
|
||||
$(Device/NAND-512K)
|
||||
DEVICE_VENDOR := Marvell
|
||||
DEVICE_MODEL := Armada Armada XP GP (DB-MV784MP-GP)
|
||||
DEVICE_DTS := armada-xp-gp
|
||||
SUPPORTED_DEVICES += armada-xp-gp
|
||||
endef
|
||||
TARGET_DEVICES += marvell_axp-gp
|
||||
|
||||
define Device/plathome_openblocks-ax3-4
|
||||
DEVICE_VENDOR := Plat'Home
|
||||
DEVICE_MODEL := OpenBlocks AX3
|
||||
DEVICE_VARIANT := 4 ports
|
||||
SOC := armada-xp
|
||||
SUPPORTED_DEVICES += openblocks-ax3-4
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 1
|
||||
IMAGES += factory.img
|
||||
IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += plathome_openblocks-ax3-4
|
||||
|
||||
define Device/solidrun_clearfog-base-a1
|
||||
DEVICE_VENDOR := SolidRun
|
||||
DEVICE_MODEL := ClearFog Base
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL := kernel-bin
|
||||
DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils
|
||||
IMAGES := sdcard.img.gz
|
||||
IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
DEVICE_DTS := armada-388-clearfog-base armada-388-clearfog-pro
|
||||
UBOOT := clearfog-u-boot-spl.kwb
|
||||
BOOT_SCRIPT := clearfog
|
||||
SUPPORTED_DEVICES += armada-388-clearfog-base
|
||||
DEVICE_COMPAT_VERSION := 1.1
|
||||
DEVICE_COMPAT_MESSAGE := Ethernet interface rename has been dropped
|
||||
endef
|
||||
TARGET_DEVICES += solidrun_clearfog-base-a1
|
||||
|
||||
define Device/solidrun_clearfog-pro-a1
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_VENDOR := SolidRun
|
||||
DEVICE_MODEL := ClearFog Pro
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL := kernel-bin
|
||||
DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils
|
||||
IMAGES := sdcard.img.gz
|
||||
IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata
|
||||
DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
|
||||
UBOOT := clearfog-u-boot-spl.kwb
|
||||
BOOT_SCRIPT := clearfog
|
||||
SUPPORTED_DEVICES += armada-388-clearfog armada-388-clearfog-pro
|
||||
endef
|
||||
TARGET_DEVICES += solidrun_clearfog-pro-a1
|
||||
34
target/linux/mvebu/image/espressobin.bootscript
Normal file
34
target/linux/mvebu/image/espressobin.bootscript
Normal file
@@ -0,0 +1,34 @@
|
||||
# Bootscript for Globalscale ESPRESSOBin Board
|
||||
|
||||
# Set distro variables if necessary for compability with downstream firmware
|
||||
if test -z "${kernel_addr_r}"; then
|
||||
setenv kernel_addr_r 0x7000000
|
||||
fi
|
||||
|
||||
if test -z "${fdt_add_r}"; then
|
||||
setenv fdt_addr_r 0x6f00000
|
||||
fi
|
||||
|
||||
if test -z "${devtype}"; then
|
||||
setenv devtype mmc
|
||||
fi
|
||||
|
||||
if test -z "${devnum}"; then
|
||||
if mmc dev 0; then
|
||||
setenv devnum 0
|
||||
elif mmc dev 1; then
|
||||
setenv devnum 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# figure out partition uuid to pass to the kernel as root=
|
||||
part uuid ${devtype} ${devnum}:2 uuid
|
||||
|
||||
setenv console "console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000"
|
||||
setenv bootargs "root=PARTUUID=${uuid} rw rootwait ${console}"
|
||||
|
||||
echo "Booting Linux from ${devtype} ${devnum} with args: ${bootargs}"
|
||||
load ${devtype} ${devnum}:1 ${fdt_addr_r} @DTB@.dtb
|
||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} Image
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
70
target/linux/mvebu/image/gen_mvebu_sdcard_img.sh
Executable file
70
target/linux/mvebu/image/gen_mvebu_sdcard_img.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#
|
||||
# Copyright (C) 2016 Josua Mayer
|
||||
|
||||
usage() {
|
||||
echo "$0 <outfile> [<bootloader> <type_partitionN> <size_partitionN> <img_partitionN>]?"
|
||||
}
|
||||
|
||||
# always require first 2 or 3 arguments
|
||||
# then in pairs up to 8 more for a total of up to 4 partitions
|
||||
if [ $# -lt 1 ] || [ $# -gt 14 ] || [ $((($# - 1) % 3)) -ne 0 ]; then
|
||||
if [ $# -lt 2 ] || [ $# -gt 15 ] || [ $((($# - 2) % 3)) -ne 0 ]; then
|
||||
usage
|
||||
exit 1
|
||||
else
|
||||
BOOTLOADER="$2"
|
||||
fi
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# parameters
|
||||
OUTFILE="$1"; shift
|
||||
if [ -n "$BOOTLOADER" ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
# generate image file
|
||||
printf "Creating %s from /dev/zero: " "$OUTFILE"
|
||||
dd if=/dev/zero of="$OUTFILE" bs=512 count=1 >/dev/null
|
||||
printf "Done\n"
|
||||
|
||||
while [ "$#" -ge 3 ]; do
|
||||
ptgen_args="$ptgen_args -t $1 -p $(($2 * 1024 + 256))"
|
||||
parts="$parts$3 "
|
||||
shift; shift; shift
|
||||
done
|
||||
|
||||
head=16
|
||||
sect=63
|
||||
|
||||
# create real partition table using fdisk
|
||||
printf "Creating partition table: "
|
||||
set $(ptgen -o "$OUTFILE" -h $head -s $sect -l 1024 -S 0x$SIGNATURE $ptgen_args)
|
||||
printf "Done\n"
|
||||
|
||||
# install bootloader
|
||||
if [ -n "$BOOTLOADER" ]; then
|
||||
printf "Writing bootloader: "
|
||||
dd of="$OUTFILE" if="$BOOTLOADER" bs=512 seek=1 conv=notrunc 2>/dev/null
|
||||
printf "Done\n"
|
||||
fi
|
||||
|
||||
i=1
|
||||
while [ "$#" -ge 2 ]; do
|
||||
img="${parts%% *}"
|
||||
parts="${parts#* }"
|
||||
|
||||
printf "Writing %s to partition %i: " "$img" $i
|
||||
(
|
||||
cat "$img"
|
||||
# add padding to avoid leaving behind old overlay fs data
|
||||
dd if=/dev/zero bs=128k count=1 2>/dev/null
|
||||
) | dd of="$OUTFILE" bs=512 seek=$(($1 / 512)) conv=notrunc 2>/dev/null
|
||||
printf "Done\n"
|
||||
|
||||
i=$((i+1))
|
||||
shift; shift
|
||||
done
|
||||
24
target/linux/mvebu/image/generic-arm64.bootscript
Normal file
24
target/linux/mvebu/image/generic-arm64.bootscript
Normal file
@@ -0,0 +1,24 @@
|
||||
setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait"
|
||||
|
||||
if test -n "${console}"; then
|
||||
setenv bootargs "${bootargs} ${console}"
|
||||
fi
|
||||
|
||||
if mmc dev 0; then
|
||||
setenv mmcdev 0
|
||||
elif mmc dev 1; then
|
||||
setenv mmcdev 1
|
||||
fi
|
||||
|
||||
if test -n "${fdt_addr_r}"; then
|
||||
setenv fdt_addr ${fdt_addr_r}
|
||||
fi
|
||||
|
||||
if test -n "${kernel_addr_r}"; then
|
||||
setenv kernel_addr ${kernel_addr_r}
|
||||
fi
|
||||
|
||||
load mmc ${mmcdev}:1 ${fdt_addr} @DTB@.dtb
|
||||
load mmc ${mmcdev}:1 ${kernel_addr} Image
|
||||
|
||||
booti ${kernel_addr} - ${fdt_addr}
|
||||
32
target/linux/mvebu/image/turris-omnia.bootscript
Normal file
32
target/linux/mvebu/image/turris-omnia.bootscript
Normal file
@@ -0,0 +1,32 @@
|
||||
# Determine root device
|
||||
setexpr rootpart ${distro_bootpart} + 1
|
||||
if test ${devtype} = mmc -a ${devnum} = 0; then
|
||||
setenv rootdev /dev/mmcblk0p${rootpart}
|
||||
elif test ${devtype} = scsi -a ${devnum} = 0; then
|
||||
setenv rootdev /dev/sda${rootpart}
|
||||
else
|
||||
# New U-Boot only
|
||||
part uuid ${devtype} ${devnum}:${rootpart} uuid
|
||||
setenv rootdev PARTUUID=${uuid}
|
||||
fi
|
||||
setenv bootargs earlyprintk console=ttyS0,115200 root=${rootdev} rootfstype=auto rootwait
|
||||
|
||||
# Load device tree and prepare for modification
|
||||
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize
|
||||
|
||||
# Enable SFP cage, if module is present
|
||||
i2c dev 0
|
||||
i2c mw 0x70 0.0 0xf
|
||||
i2c read 0x71 0 1 0x00fffff1
|
||||
setexpr.b mod_def0 *0x00fffff1 \& 0x10
|
||||
if test ${mod_def0} -eq 0; then
|
||||
fdt set /sfp status okay
|
||||
fdt rm /soc/internal-regs/ethernet@34000 phy-handle
|
||||
fdt set /soc/internal-regs/ethernet@34000 managed in-band-status
|
||||
fi
|
||||
|
||||
# Load kernel and boot
|
||||
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
38
target/linux/mvebu/image/udpu.bootscript
Normal file
38
target/linux/mvebu/image/udpu.bootscript
Normal file
@@ -0,0 +1,38 @@
|
||||
# Bootscript for Methode uDPU device
|
||||
# Device and variables may vary between different revisions
|
||||
# of device, so we need to make sure everything is set correctly.
|
||||
|
||||
# Set the LED's correctly
|
||||
gpio clear 12; gpio clear 40; gpio clear 45;
|
||||
|
||||
# Find eMMC device,
|
||||
if mmc dev 0; then
|
||||
setenv mmcdev 0
|
||||
setenv rootdev 'root=/dev/mmcblk0p3'
|
||||
elif mmc dev 1; then
|
||||
setenv mmcdev 1
|
||||
setenv rootdev 'root=/dev/mmcblk1p3'
|
||||
fi
|
||||
|
||||
# Set the variables if necessary
|
||||
if test ${kernel_addr_r}; then
|
||||
setenv kernel_addr_r 0x5000000
|
||||
fi
|
||||
|
||||
if test ${fdt_add_r}; then
|
||||
setenv fdt_addr_r 0x4f00000
|
||||
fi
|
||||
|
||||
setenv console 'console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000'
|
||||
setenv bootargs ${console} $rootdev rw rootwait
|
||||
|
||||
load mmc ${mmcdev}:1 ${fdt_addr_r} @DTB@.dtb
|
||||
load mmc ${mmcdev}:1 ${kernel_addr_r} Image
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
# If the boot command fails, fallback to recovery image
|
||||
echo '-- Boot failed, falling back to the recovery image --'
|
||||
setenv bootargs $console
|
||||
load mmc ${mmcdev}:2 ${kernel_addr_r} recovery.itb
|
||||
bootm ${kernel_addr_r}
|
||||
Reference in New Issue
Block a user