Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #10 from riptidewave93/staging
Browse files Browse the repository at this point in the history
We final release now!
  • Loading branch information
riptidewave93 committed Dec 21, 2015
2 parents e0caf4c + dd0dc61 commit 36e9ac3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 39 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Bringup repo for the Cisco Meraki MR18 on OpenWRT!

Code is based on revision http://git.openwrt.org/?p=openwrt.git;a=commit;h=23feef5dede2fbd6373b03f782e2fbdabb70dca3
**NOTE: This repo is NO LONGER MAINTAINED as these changes were applied upstream. Refer to http://git.openwrt.org/?p=openwrt.git;a=commit;h=08649070b3de6da8913a5e93d853834ad7293934 and enjoy the official nightles!**

Building
-----
Expand All @@ -17,8 +17,7 @@ Note that you will need to run a modify on the first compile to select the NAND
To Do
-----
##### MR18
* Code Cleanup?
* Start merging things into official nightlies!
* You tell me!

Working
-----
Expand All @@ -29,8 +28,9 @@ Working
* Basic Sysfs Integration
* Nandloader bootable images
* Ethernet
* Sysconfig w/ kernel_backup support
* Sysconfig/Sysupgrade
* Automatic Wifi Caldata partition selection (Let's prevent ecc errors if possible!)
* Merged upstream!

Notice
------
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -d $clonedir ]; then
Msg "Cloning Repo..."
git clone git://git.openwrt.org/openwrt.git $clonedir
cd $clonedir
git reset --hard 23feef5dede2fbd6373b03f782e2fbdabb70dca3
#git reset --hard 23feef5dede2fbd6373b03f782e2fbdabb70dca3
cd - > /dev/null
fi

Expand All @@ -35,8 +35,8 @@ if [ $firstbuild = "0" ]; then
cd - > /dev/null
fi

Msg "Applying overlay..."
cp -R ./overlay/* $clonedir/
#Msg "Applying overlay..."
#cp -R ./overlay/* $clonedir/

if [ $firstbuild = "1" ]; then
Msg "Running first build configurations..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
. /lib/ar71xx.sh
. /lib/functions.sh
. /lib/functions/system.sh
. /lib/upgrade/nand.sh

ath9k_eeprom_die() {
echo "ath9k eeprom: " "$*"
Expand Down Expand Up @@ -54,6 +53,8 @@ case "$FIRMWARE" in
"soc_wmac.eeprom")
case $board in
mr18)
. /lib/upgrade/nand.sh

if [ -n "$(nand_find_volume ubi0 caldata)" ]; then
ath9k_ubi_eeprom_extract "caldata" 4096 2048
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#
. /lib/ar71xx.sh
. /lib/functions.sh
. /lib/upgrade/nand.sh

get_magic_at() {
local mtddev=$1
Expand Down
47 changes: 17 additions & 30 deletions overlay/target/linux/ar71xx/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,6 @@ dragino2_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro
hiwifi_hc6361_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(bdinfo)ro,1280k(kernel),14848k(rootfs),64k(backup)ro,64k(art)ro,16128k@0x20000(firmware)
mr12_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2304k(kernel),128k(art)ro,15744k@0x80000(firmware)
mr16_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2304k(kernel),128k(art)ro,15744k@0x80000(firmware)
mr18_mtdlayout=mtdparts=ar934x-nfc:512k(nandloader)ro,8M(kernel),8M(recovery),113664k(ubi),128k@130944k(odm-caldata)ro
pb92_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware)
planex_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7744k(firmware),128k(art)ro
ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7552k(firmware),256k(cfg)ro,64k(EEPROM)ro
Expand Down Expand Up @@ -1976,37 +1975,14 @@ Image/Build/CyberTANLZMA/buildkernel=$(call MkuImageLzma,$(2),$(3) $(4))
Image/Build/CyberTANLZMA=$(call Image/Build/CyberTAN,$(1),$(2),$(3),$(4),$(5))


define Image/Build/MerakiNAND/initramfs
$(eval kernelsize=$(call mtdpartsize,kernel,$(4)))
$(call PatchKernel,$(2),$(3) $(4),"-initramfs")
-$(STAGING_DIR_HOST)/bin/mkmerakifw \
-B $(2) -s \
-i $(KDIR_TMP)/vmlinux-initramfs-$(2) \
-o $(KDIR_TMP)/vmlinux-initramfs-$(2)-patched
$(CP) $(KDIR_TMP)/vmlinux-initramfs-$(2)-patched $(BIN_DIR)/$(IMG_PREFIX)-$(2)-initramfs.bin
endef

define Image/Build/MerakiNAND/buildkernel
$(eval kernelsize=$(call mtdpartsize,kernel,$(4)))
$(call PatchKernel,$(2),$(3) $(4),"")
define Build/MerakiNAND
-$(STAGING_DIR_HOST)/bin/mkmerakifw \
-B $(2) -s \
-i $(KDIR_TMP)/vmlinux-$(2) \
-o $(KDIR_TMP)/vmlinux-$(2)-patched
$(CP) $(KDIR_TMP)/vmlinux-$(2)-patched $(BIN_DIR)/$(IMG_PREFIX)-$(2)-kernel.bin

endef

define Image/Build/MerakiNAND
$(eval fwsize=$(call mtdpartsize,firmware,$(4)))
$(eval rootsize=$(call mtdpartsize,rootfs,$(4)))
$(eval kernsize=$(call mtdpartsize,kernel,$(4)))
dd if=$(KDIR)/root.$(1) \
of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
$(call Image/Build/SysupgradeNAND,$(2),squashfs,$(KDIR_TMP)/vmlinux-$(2)-patched)
-B $(BOARDNAME) -s \
-i $@ \
-o $@.new
@mv $@.new $@
endef


Image/Build/Netgear/initramfs=$(call MkuImageLzma/initramfs,$(2),$(3) $(4),,-M $(5))

define Image/Build/Netgear/buildkernel
Expand Down Expand Up @@ -2445,7 +2421,18 @@ $(eval $(call MultiProfile,Madwifi,EAP7660D WP543))
endif # ifeq ($(SUBTARGET),generic)

ifeq ($(SUBTARGET),nand)
$(eval $(call SingleProfile,MerakiNAND,64k,MR18,mr18,MR18,ttyS0,115200,$$(mr18_mtdlayout)))

define Device/mr18
BOARDNAME = MR18
BLOCKSIZE := 64k
CONSOLE = ttyS0,115200
MTDPARTS = ar934x-nfc:512k(nandloader)ro,8M(kernel),8M(recovery),113664k(ubi),128k@130944k(odm-caldata)ro
IMAGES := sysupgrade.tar
KERNEL := kernel-bin | patch-cmdline | MerakiNAND
KERNEL_INITRAMFS := kernel-bin | patch-cmdline | MerakiNAND
IMAGE/sysupgrade.tar := sysupgrade-nand
endef
TARGET_DEVICES += mr18

$(eval $(call SingleProfile,NetgearNAND,64k,WNDR3700V4,wndr3700v4,WNDR3700_V4,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR3700v4,"",-H 29763948+128+128,wndr4300))
$(eval $(call SingleProfile,NetgearNAND,64k,WNDR4300V1,wndr4300,WNDR4300,ttyS0,115200,$$(wndr4300_mtdlayout),0x33373033,WNDR4300,"",-H 29763948+0+128+128+2x2+3x3,wndr4300))
Expand Down

0 comments on commit 36e9ac3

Please sign in to comment.