From f2b7d9dc1ca3d33f14961cf2885639f4f9e8965e Mon Sep 17 00:00:00 2001 From: Chris Blake Date: Sat, 30 Sep 2017 11:14:58 -0500 Subject: mpc85xx: Add Aerohive HiveAP-330 Access Point The following adds the Aerohive HiveAP-330 Access Point to LEDE under the mpc85xx/p1020 subtarget. Hardware: - SoC: Freescale P1020NSE2DFB - NAND: Intel JS28F512M29EWH 64MB - Memory: 2x ProMOS V59C1G01168QBJ3 128MB (Total of 256MB) - 2.4GHz WiFi: Atheros AR9390-AL1A - 5.0GHz WiFi: Atheros AR9390-AL1A - Eth1: Atheros AR8035-A PoE - Eth2: Atheros AR8035-A - TPM: Atmel AT97SC3204 - LED Driver: TI LP5521 Flashing: 1. Hook into UART (9600 baud) and enter U-Boot. You may need to enter a password of administrator or AhNf?d@ta06 if prompted. 2. Once in U-Boot, tftp boot the initramfs image: dhcp; tftpboot 0x1000000 192.168.1.101:lede- mpc85xx-p1020-hiveap-330-initramfs.zImage; tftpboot 0x6000000 192.168.1.101:lede-mpc85xx-p1020-hiveap-330.fdt; bootm 0x1000000 - 0x6000000; 3. Once booted, scp over the sysupgrade file and sysupgrade the device to flash LEDE to the NAND. sysupgrade /tmp/lede-mpc85xx-p1020-hiveap-330-sysupgrade.img Signed-off-by: Chris Blake --- target/linux/mpc85xx/image/Makefile | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'target/linux/mpc85xx/image') diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 25a9b070c5..4738dcf122 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -21,7 +21,18 @@ endef zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage -DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb +DTS_TARGETS = hiveap-330 fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb + +define Build/empty-initramfs + -mkdir $(KDIR_TMP)/empty-initramfs; \ + cd $(KDIR_TMP)/empty-initramfs; \ + find . | cpio -o -H newc | gzip -9n > $(KDIR_TMP)/empty-initramfs.gpio.gz + + -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) -O linux -T ramdisk \ + -C gzip -n "empty initramfs" \ + -d $(KDIR_TMP)/empty-initramfs.gpio.gz \ + $(KDIR_TMP)/$(IMG_PREFIX)-empty-initramfs.image +endef define Image/BuildKernel cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage @@ -35,6 +46,21 @@ define Image/BuildKernel/Initramfs ifeq ($(SUBTARGET),generic) cp $(KDIR)/cuImage.tl-wdr4900-v1-initramfs $(BIN_DIR)/$(IMG_PREFIX)-tl-wdr4900-v1-initramfs.uImage endif +ifeq ($(SUBTARGET),p1020) + cp $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-hiveap-330-initramfs.zImage +endif +endef + +define Image/Build/Aerohive + $(call Build/empty-initramfs) +ifeq ($(2),hiveap-330) + ( \ + dd if=$(BIN_DIR)/$(IMG_PREFIX)-$(2).fdt bs=256k conv=sync; \ + dd if=$(KDIR_TMP)/$(IMG_PREFIX)-empty-initramfs.image bs=256k conv=sync; \ + dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=40704k conv=sync; \ + dd if=$(KDIR)/zImage conv=sync; \ + ) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-sysupgrade.img +endif endef define Image/Build/TPLINK @@ -50,6 +76,10 @@ define Image/Build/TPLINK -o $(call sysupname,$(1),$(2)) endef +define Image/Build/Profile/hiveap-330 + $(call Image/Build/Aerohive,$(1),hiveap-330) +endef + define Image/Build/Profile/TLWDR4900 $(call Image/Build/TPLINK,$(1),tl-wdr4900-v1,cuImage.tl-wdr4900-v1,0x49000001,1,16Mppc) endef -- cgit v1.2.3