mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Prepare support Banana Pi R2
This commit is contained in:
parent
fb4a368c84
commit
1e73f37fde
7 changed files with 252303 additions and 0 deletions
68
root/target/linux/mediatek/image/Makefile
Normal file
68
root/target/linux/mediatek/image/Makefile
Normal file
|
@ -0,0 +1,68 @@
|
|||
#
|
||||
# Copyright (C) 2012-2015 OpenWrt.org
|
||||
# Copyright (C) 2016-2017 LEDE project
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
# for arm
|
||||
KERNEL_LOADADDR := 0x80008000
|
||||
|
||||
# for arm64
|
||||
ifeq ($(SUBTARGET),mt7622)
|
||||
KERNEL_LOADADDR = 0x41080000
|
||||
endif
|
||||
|
||||
# build dtb
|
||||
define Build/dtb
|
||||
$(call Image/BuildDTB,$(DEVICE_DTS_DIR)/$(DEVICE_DTS).dts,$(DEVICE_DTS_DIR)/$(DEVICE_DTS).dtb)
|
||||
$(CP) $(DEVICE_DTS_DIR)/$(DEVICE_DTS).dtb $(BIN_DIR)/
|
||||
endef
|
||||
|
||||
define Build/sysupgrade-emmc
|
||||
rm -f $@.recovery
|
||||
mkfs.fat -C $@.recovery 3070
|
||||
|
||||
dd bs="512" of="$@" if="$(IMAGE_KERNEL)"
|
||||
dd bs="512" of="$@" if="$@.recovery" seek="67072"
|
||||
dd bs="512" of="$@" if="$(IMAGE_ROOTFS)" seek="87552"
|
||||
dd if=/dev/zero of="$@" bs=128k count=1 oflag=append conv=notrunc
|
||||
endef
|
||||
|
||||
# default all platform image(fit) build
|
||||
define Device/Default
|
||||
PROFILES = Default $$(DEVICE_NAME)
|
||||
KERNEL_NAME := zImage
|
||||
FILESYSTEMS := squashfs
|
||||
DEVICE_DTS_DIR := $(DTS_DIR)
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
ifeq ($(SUBTARGET),mt7623)
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := dtb | kernel-bin | append-dtb | uImage none
|
||||
KERNEL_INITRAMFS := dtb | kernel-bin | append-dtb | uImage none
|
||||
endif
|
||||
ifeq ($(SUBTARGET),mt7622)
|
||||
KERNEL_NAME := Image
|
||||
KERNEL = dtb | kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
KERNEL_INITRAMFS = dtb | kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
endif
|
||||
endef
|
||||
|
||||
ifeq ($(SUBTARGET),mt7622)
|
||||
include mt7622.mk
|
||||
endif
|
||||
|
||||
ifeq ($(SUBTARGET),mt7623)
|
||||
include mt7623.mk
|
||||
endif
|
||||
|
||||
define Image/Build
|
||||
$(call Image/Build/$(1),$(1))
|
||||
endef
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
|
17
root/target/linux/mediatek/image/mt7623.mk
Normal file
17
root/target/linux/mediatek/image/mt7623.mk
Normal file
|
@ -0,0 +1,17 @@
|
|||
define Device/7623a-unielec-u7623-02-emmc-512m
|
||||
DEVICE_TITLE := MTK7623a UniElec U7623-02 (eMMC/512MB RAM)
|
||||
DEVICE_DTS := mt7623a-unielec-u7623-02-emmc-512M
|
||||
DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 kmod-mmc
|
||||
SUPPORTED_DEVICES := unielec,u7623-02-emmc-512m
|
||||
IMAGES := sysupgrade-emmc.bin.gz
|
||||
IMAGE/sysupgrade-emmc.bin.gz := sysupgrade-emmc | gzip | append-metadata
|
||||
endef
|
||||
|
||||
TARGET_DEVICES += 7623a-unielec-u7623-02-emmc-512m
|
||||
|
||||
define Device/7623n-bananapi-bpi-r2
|
||||
DEVICE_TITLE := MTK7623n BananaPi R2
|
||||
DEVICE_DTS := mt7623n-bananapi-bpi-r2
|
||||
endef
|
||||
|
||||
TARGET_DEVICES += 7623n-bananapi-bpi-r2
|
Loading…
Add table
Add a link
Reference in a new issue