[OpenWrt-Devel] [PATCH 1/8] mpc85xx: add NM50 support to mpc85xx platform
Dieter Pfeuffer
dieter.pfeuffer at men.de
Wed Mar 23 08:17:25 EDT 2016
Signed-off-by: Dieter Pfeuffer <dieter.pfeuffer at men.de>
---
target/linux/mpc85xx/Makefile | 2 +-
target/linux/mpc85xx/image/Makefile | 21 +++++++++++++++-
target/linux/mpc85xx/men_nm50/config-default | 37 ++++++++++++++++++++++++++++
target/linux/mpc85xx/men_nm50/target.mk | 5 ++++
target/linux/mpc85xx/profiles/men-nm50.mk | 17 +++++++++++++
5 files changed, 80 insertions(+), 2 deletions(-)
create mode 100644 target/linux/mpc85xx/men_nm50/config-default
create mode 100644 target/linux/mpc85xx/men_nm50/target.mk
create mode 100644 target/linux/mpc85xx/profiles/men-nm50.mk
diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile
index 163e440..959c857 100644
--- a/target/linux/mpc85xx/Makefile
+++ b/target/linux/mpc85xx/Makefile
@@ -12,7 +12,7 @@ BOARDNAME:=Freescale MPC85xx
CPU_TYPE:=8540
FEATURES:=spe_fpu squashfs
MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
-SUBTARGETS=generic p1020
+SUBTARGETS=generic p1020 men_nm50
KERNEL_PATCHVER:=3.18
diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile
index 0ec067e..1c997b5 100644
--- a/target/linux/mpc85xx/image/Makefile
+++ b/target/linux/mpc85xx/image/Makefile
@@ -21,7 +21,7 @@ endef
zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage
-DTS_TARGETS = mpc8548cds_32b p1010rdb-pa tl-wdr4900-v1 p1020rdb
+DTS_TARGETS = mpc8548cds_32b p1010rdb-pa tl-wdr4900-v1 p1020rdb men_nm50 men_nm50_ubootrw
define Image/BuildKernel
cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
@@ -56,6 +56,25 @@ define Image/Build/Profile/Default
$(call Image/Build/Profile/TLWDR4900,$(1))
endef
+define Image/Build/MEN_NM50
+ # factory image with space (dtb + kernel + rootfs)
+ dd if=/dev/zero bs=1K count=8256 | tr '\000' '\377' > $(call factoryname,$(1),$(2))
+ dd if=$(BIN_DIR)/$(IMG_PREFIX)-men_nm50.fdt conv=notrunc of=$(call factoryname,$(1),$(2))
+ dd if=$(KDIR)/$(3) seek=65536 oflag=seek_bytes conv=notrunc of=$(call factoryname,$(1),$(2))
+ dd if=$(KDIR)/root.$(1) seek=8454144 oflag=seek_bytes conv=notrunc of=$(call factoryname,$(1),$(2))
+
+ # upgrade image (dtb + kernel + rootfs)
+ -sh $(TOPDIR)/scripts/combined-ext-image.sh \
+ "$(2)" "$(call sysupname,$(1),$(2))" \
+ "$(BIN_DIR)/$(IMG_PREFIX)-men_nm50.fdt" "dtb" \
+ "$(KDIR)/$(3)" "kernel" \
+ "$(KDIR)/root.$(1)" "rootfs"
+endef
+
+define Image/Build/Profile/MEN_NM50
+ $(call Image/Build/MEN_NM50,$(1),men_nm50,zImage,0x0eee0050,0,32Mppc)
+endef
+
define Image/Build/ext2
cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-ext2.img
endef
diff --git a/target/linux/mpc85xx/men_nm50/config-default b/target/linux/mpc85xx/men_nm50/config-default
new file mode 100644
index 0000000..f724cd9
--- /dev/null
+++ b/target/linux/mpc85xx/men_nm50/config-default
@@ -0,0 +1,37 @@
+CONFIG_ARCH_HAS_TICK_BROADCAST=y
+CONFIG_CPU_RMAP=y
+CONFIG_EEPROM_AT24=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_TBSYNC=y
+# CONFIG_GEN_RTC is not set
+CONFIG_GPIO_WATCHDOG=y
+CONFIG_HAVE_RCU_TABLE_FREE=y
+CONFIG_HIGHMEM=y
+CONFIG_HWMON=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MPC=y
+CONFIG_MEN_NM50=y
+CONFIG_MICREL_PHY=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+# CONFIG_NEED_PER_CPU_KM is not set
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NR_CPUS=2
+CONFIG_RCU_STALL_COMMON=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_DRV_RX8581=y
+# CONFIG_RTC_INTF_PROC is not set
+# CONFIG_RTC_INTF_SYSFS is not set
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SENSORS_LM75=y
+CONFIG_SLUB_CPU_PARTIAL=y
+CONFIG_SMP=y
+CONFIG_STOP_MACHINE=y
+CONFIG_TREE_RCU=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=y
+CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/mpc85xx/men_nm50/target.mk b/target/linux/mpc85xx/men_nm50/target.mk
new file mode 100644
index 0000000..15a6846
--- /dev/null
+++ b/target/linux/mpc85xx/men_nm50/target.mk
@@ -0,0 +1,5 @@
+BOARDNAME:=MEN_NM50
+
+define Target/Description
+ Build firmware images for MEN NM50 Mobile Wireless LAN Access Point.
+endef
diff --git a/target/linux/mpc85xx/profiles/men-nm50.mk b/target/linux/mpc85xx/profiles/men-nm50.mk
new file mode 100644
index 0000000..7e30577
--- /dev/null
+++ b/target/linux/mpc85xx/profiles/men-nm50.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2016 MEN Mikro Elektronik GmbH
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/MEN_NM50
+ NAME:=MEN NM50
+ PACKAGES:=\
+ kmod-usb-core kmod-usb2 kmod-usb2-fsl
+endef
+
+define Profile/MEN_NM50/Description
+ Package set optimized for MEN NM50 Mobile Wireless LAN Access Point.
+endef
+$(eval $(call Profile,MEN_NM50))
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list