mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
ath79: add initial nand support for gl-ar300m
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
This commit is contained in:
parent
fe3b62bbdc
commit
0e81968ee8
@ -4,7 +4,7 @@ ARCH:=mips
|
||||
BOARD:=ath79
|
||||
BOARDNAME:=Atheros ATH79 (DTS)
|
||||
CPU_TYPE:=24kc
|
||||
SUBTARGETS:=generic tiny
|
||||
SUBTARGETS:=generic nand tiny
|
||||
|
||||
FEATURES:=ramdisk source-only
|
||||
|
||||
|
67
target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts
Normal file
67
target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts
Normal file
@ -0,0 +1,67 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "qca9533_glinet_ar300m.dtsi"
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
num-cs = <1>;
|
||||
|
||||
flash@0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "winbond,w25q128", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
};
|
||||
|
||||
partition@2 {
|
||||
label = "reserved";
|
||||
reg = <0x050000 0xfa0000>;
|
||||
};
|
||||
|
||||
art: partition@3 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x010000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flash@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "spinand,mt29f";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "kernel";
|
||||
reg = <0x000000 0x0200000>;
|
||||
};
|
||||
|
||||
partition@1 {
|
||||
label = "ubi";
|
||||
reg = <0x200000 0x7e00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -71,6 +71,9 @@ include ./generic.mk
|
||||
include ./generic-tp-link.mk
|
||||
include ./generic-ubnt.mk
|
||||
endif
|
||||
ifeq ($(SUBTARGET),nand)
|
||||
include ./nand.mk
|
||||
endif
|
||||
ifeq ($(SUBTARGET),tiny)
|
||||
include ./tiny-tp-link.mk
|
||||
endif
|
||||
|
13
target/linux/ath79/image/nand.mk
Normal file
13
target/linux/ath79/image/nand.mk
Normal file
@ -0,0 +1,13 @@
|
||||
define Device/glinet_ar300m_nand
|
||||
ATH_SOC := qca9533
|
||||
DEVICE_TITLE := GL-AR300M (NAND)
|
||||
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-usb-ledtrig-usbport
|
||||
KERNEL_SIZE := 2048k
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
VID_HDR_OFFSET := 512
|
||||
IMAGES := factory.ubi sysupgrade.tar
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar
|
||||
IMAGE/factory.ubi := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
endef
|
||||
TARGET_DEVICES += glinet_ar300m_nand
|
14
target/linux/ath79/nand/config-default
Normal file
14
target/linux/ath79/nand/config-default
Normal file
@ -0,0 +1,14 @@
|
||||
CONFIG_BCH=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_BCH=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_BCH=y
|
||||
CONFIG_MTD_SPINAND_MT29F=y
|
||||
CONFIG_MTD_SPINAND_ONDIEECC=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
# CONFIG_MTD_UBI_BLOCK is not set
|
||||
# CONFIG_MTD_UBI_FASTMAP is not set
|
||||
# CONFIG_MTD_UBI_GLUEBI is not set
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
# CONFIG_UBIFS_FS is not set
|
18
target/linux/ath79/nand/profiles/00-default.mk
Normal file
18
target/linux/ath79/nand/profiles/00-default.mk
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Copyright (C) 2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
define Profile/Default
|
||||
NAME:=Default Profile
|
||||
PACKAGES:= \
|
||||
kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
|
||||
PRIORITY := 1
|
||||
endef
|
||||
|
||||
define Profile/Default/Description
|
||||
Default package set compatible with most boards.
|
||||
endef
|
||||
$(eval $(call Profile,Default))
|
7
target/linux/ath79/nand/target.mk
Normal file
7
target/linux/ath79/nand/target.mk
Normal file
@ -0,0 +1,7 @@
|
||||
BOARDNAME := Generic devices with NAND flash
|
||||
FEATURES += squashfs nand rtc
|
||||
|
||||
define Target/Description
|
||||
Build firmware for Atheros AR71xx/AR913x based boards with
|
||||
NAND flash, e.g. Netgear WNDR4300.
|
||||
endef
|
Loading…
Reference in New Issue
Block a user