Skip to content

Commit

Permalink
Merge branch 'master' of git://nbd.name/openwrt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Taht committed Sep 18, 2012
2 parents 9eccad5 + 484998f commit 07b8c26
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 302 deletions.
2 changes: 1 addition & 1 deletion package/hostapd/Makefile
Expand Up @@ -17,7 +17,7 @@ PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=git
PKG_MIRROR_MD5SUM:=2732dbca58b0aaaebdad69e13588d058
PKG_MIRROR_MD5SUM:=fa3227c146cb50732fe8511ce6d1d862

PKG_BUILD_PARALLEL:=1

Expand Down
5 changes: 1 addition & 4 deletions target/linux/ar71xx/base-files/etc/diag.sh
Expand Up @@ -64,10 +64,7 @@ get_status_led() {
dir-615-c1)
status_led="d-link:green:status"
;;
dir-825-b1 |\
dir-825-b1-towholeflash |\
dir-825-b1-wholeflash |\
dir-825-b1-stock)
dir-825-b1)
status_led="d-link:orange:power"
;;
eap7660d)
Expand Down
68 changes: 0 additions & 68 deletions target/linux/ar71xx/base-files/etc/uci-defaults/caldata-migration

This file was deleted.

5 changes: 1 addition & 4 deletions target/linux/ar71xx/base-files/etc/uci-defaults/leds
Expand Up @@ -54,10 +54,7 @@ dir-615-e4)
ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10"
;;

dir-825-b1|\
dir-825-b1-towholeflash|\
dir-825-b1-wholeflash|\
dir-825-b1-tostock)
dir-825-b1)
ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
;;

Expand Down
3 changes: 0 additions & 3 deletions target/linux/ar71xx/base-files/etc/uci-defaults/network
Expand Up @@ -33,9 +33,6 @@ rb-2011uas-2hnd)
;;

dir-825-b1|\
dir-825-b1-towholeflash|\
dir-825-b1-wholeflash|\
dir-825-b1-tostock|\
tew-673gru)
ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
ucidef_add_switch "rtl8366s" "1" "1"
Expand Down
9 changes: 0 additions & 9 deletions target/linux/ar71xx/base-files/lib/ar71xx.sh
Expand Up @@ -201,15 +201,6 @@ ar71xx_board_detect() {
*"DIR-825 rev. B1")
name="dir-825-b1"
;;
*"DIR-825 rev. B1 WHOLEFLASH")
name="dir-825-b1-wholeflash"
;;
*"DIR-825 rev. B1 TOWHOLEFLASH")
name="dir-825-b1-towholeflash"
;;
*"DIR-825 rev. B1 TOSTOCK")
name="dir-825-b1-tostock"
;;
*EAP7660D)
name="eap7660d"
;;
Expand Down
3 changes: 0 additions & 3 deletions target/linux/ar71xx/base-files/lib/upgrade/platform.sh
Expand Up @@ -101,9 +101,6 @@ platform_check_image() {
dir-615-c1 | \
dir-615-e4 | \
dir-825-b1 | \
dir-825-b1-towholeflash | \
dir-825-b1-wholeflash | \
dir-825-b1-tostock | \
ew-dorin | \
ew-dorin-router | \
mzk-w04nu | \
Expand Down
1 change: 1 addition & 0 deletions target/linux/ar71xx/config-3.3
Expand Up @@ -15,6 +15,7 @@ CONFIG_ATH79_DEV_ETH=y
CONFIG_ATH79_DEV_GPIO_BUTTONS=y
CONFIG_ATH79_DEV_LEDS_GPIO=y
CONFIG_ATH79_DEV_M25P80=y
CONFIG_ATH79_DEV_NFC=y
CONFIG_ATH79_DEV_SPI=y
CONFIG_ATH79_DEV_USB=y
CONFIG_ATH79_DEV_WMAC=y
Expand Down
48 changes: 25 additions & 23 deletions target/linux/ar71xx/files/drivers/mtd/nand/ar934x_nfc.c
Expand Up @@ -131,6 +131,7 @@
#define AR934X_NFC_DEV_READY_TIMEOUT 25 /* msecs */
#define AR934X_NFC_DMA_READY_TIMEOUT 25 /* msecs */
#define AR934X_NFC_DONE_TIMEOUT 1000
#define AR934X_NFC_DMA_RETRIES 20

#define AR934X_NFC_USE_IRQ true
#define AR934X_NFC_IRQ_MASK AR934X_NFC_INT_DEV_RDY(0)
Expand Down Expand Up @@ -465,7 +466,7 @@ ar934x_nfc_do_rw_command(struct ar934x_nfc *nfc, int column, int page_addr,
(write) ? "write" : "read", page_addr);

ar934x_nfc_restart(nfc);
if (retries++ < 5)
if (retries++ < AR934X_NFC_DMA_RETRIES)
goto retry;

dev_err(nfc->parent, "%s operation failed on page %d\n",
Expand All @@ -491,12 +492,12 @@ ar934x_nfc_send_readid(struct ar934x_nfc *nfc, unsigned command)

static void
ar934x_nfc_send_read(struct ar934x_nfc *nfc, unsigned command, int column,
int page_addr, int len, bool oob)
int page_addr, int len)
{
u32 cmd_reg;

nfc_dbg(nfc, "read, column=%d page=%d len=%d oob:%d\n",
column, page_addr, len, oob);
nfc_dbg(nfc, "read, column=%d page=%d len=%d\n",
column, page_addr, len);

cmd_reg = (command & AR934X_NFC_CMD_CMD0_M) << AR934X_NFC_CMD_CMD0_S;

Expand Down Expand Up @@ -613,37 +614,38 @@ ar934x_nfc_cmdfunc(struct mtd_info *mtd, unsigned int command, int column,

case NAND_CMD_READ0:
case NAND_CMD_READ1:
if (nfc->small_page)
ar934x_nfc_send_read(nfc, command, column, page_addr,
mtd->writesize + mtd->oobsize,
false);
else
if (nfc->small_page) {
ar934x_nfc_send_read(nfc, command, column, page_addr,
mtd->writesize, false);
nfc->rndout_page_addr = page_addr;
nfc->rndout_read_cmd = command;
mtd->writesize + mtd->oobsize);
} else {
ar934x_nfc_send_read(nfc, command, 0, page_addr,
mtd->writesize + mtd->oobsize);
nfc->buf_index = column;
nfc->rndout_page_addr = page_addr;
nfc->rndout_read_cmd = command;
}
break;

case NAND_CMD_READOOB:
if (nfc->small_page) {
if (nfc->small_page)
ar934x_nfc_send_read(nfc, NAND_CMD_READOOB,
column, page_addr,
mtd->oobsize,
true);
} else {
mtd->oobsize);
else
ar934x_nfc_send_read(nfc, NAND_CMD_READ0,
column, page_addr,
mtd->writesize + mtd->oobsize,
true);
nfc->buf_index = mtd->writesize;
}
mtd->writesize, page_addr,
mtd->oobsize);
break;

case NAND_CMD_RNDOUT:
if (WARN_ON(nfc->small_page))
break;

/* emulate subpage read */
ar934x_nfc_send_read(nfc, nfc->rndout_read_cmd, column,
ar934x_nfc_send_read(nfc, nfc->rndout_read_cmd, 0,
nfc->rndout_page_addr,
mtd->writesize, false);
mtd->writesize + mtd->oobsize);
nfc->buf_index = column;
break;

case NAND_CMD_ERASE1:
Expand Down
58 changes: 0 additions & 58 deletions target/linux/ar71xx/generic/profiles/d-link.mk
Expand Up @@ -50,16 +50,6 @@ endef

$(eval $(call Profile,DIR615E4))

define Profile/DIR825B1_ALL
NAME:=D-Link DIR-825 rev. B1 - all flavours
PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
endef

define Profile/DIR825B1_ALL/Description
Build all D-Link DIR-825 rev. B1 images
endef

$(eval $(call Profile,DIR825B1_ALL))

define Profile/DIR825B1
NAME:=D-Link DIR-825 rev. B1
Expand All @@ -68,54 +58,6 @@ endef

define Profile/DIR825B1/Description
Package set optimized for the D-Link DIR-825 rev. B1.
WARNING: Flashing wholeflash (openwrt optimized) image may brick your router
. This will occur if your openwrt optimized image is larger than the
maximum size for a regular dir-825 b1 image (a little more than 6MB).
Please flash a TOWHOLEFLASH image instead of this image before flashing
a
WHOLEFLASH image.
endef

$(eval $(call Profile,DIR825B1))

define Profile/DIR825B1_TOWHOLEFLASH
NAME:=D-Link DIR-825 rev. B1 designed for transition to image using whole flash
PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
endef

define Profile/DIR825B1_TOWHOLEFLASH/Description
Package set optimized for the D-Link DIR-825 rev. B1. design for transtion to
image using whole flash.
Copies the calibration data to the last erase block so that, if desired,
an image optimized for use with OpenWrt (access to full flash) can be flashed.
endef

$(eval $(call Profile,DIR825B1_TOWHOLEFLASH))

define Profile/DIR825B1_WHOLEFLASH
NAME:=D-Link DIR-825 rev. B1 optimized for OpenWrt which uses full 8M flash
PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
endef

define Profile/DIR825B1_WHOLEFLASH/Description
Package set optimized for the D-Link DIR-825 rev. B1. using wholeflash
Can only be flashed from OpenWrt because it requires that the calibration data
be on the last sector of the flash (which the 'standard' version that can be flashed from
stock will ensure).
endef

$(eval $(call Profile,DIR825B1_WHOLEFLASH))

define Profile/DIR825B1_TOSTOCK
NAME:=D-Link DIR-825 rev. B1 that undoes OpenWrt optimization (i.e. wholeflash)
PACKAGES:=kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
endef

define Profile/DIR825B1_TOSTOCK/Description
Package set optimized for the D-Link DIR-825 rev. B1. that undoes OpenWrt optimization
Copies the calibration data from the last erase block to the erase block normally used
by the stock firmware for said data.
endef

$(eval $(call Profile,DIR825B1_TOSTOCK))

38 changes: 1 addition & 37 deletions target/linux/ar71xx/image/Makefile
Expand Up @@ -171,10 +171,7 @@ cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,960k(kernel),28
cameo933x_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,192k(language)ro,896k(kernel),2752k(rootfs),3648k@0x70000(firmware)
db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1600k(unknown)ro,6208k@0x50000(firmware)
dir825b1_towholeflash_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1536k(unknown)ro,64k(owrt_caldata),7808k@0x50000(firmware)
dir825b1_wholeflash_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),6784k(rootfs),64k(caldata)ro,7808k@0x50000(firmware)
ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),1024k(kernel),2688k(rootfs),64k(art),3712k@0x50000(firmware)
dir825b1_tostock_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata),1536k(unknown)ro,64k(owrt_caldata)ro,6208k@0x50000(firmware)
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,960k(kernel),6784k(rootfs),128k(art)ro,7744k@0x50000(firmware)
ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6528k(rootfs),256k(cfg)ro,64k(EEPROM)ro,7552k@0x50000(firmware)
Expand Down Expand Up @@ -221,35 +218,6 @@ define Image/Build/DIR825B1
fi
endef

define Image/Build/DIR825B1_TOWHOLEFLASH
$(call MkuImageLzma,$(2),$(3) $(dir825b1_towholeflash_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,5308416)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
dd if=$(call sysupname,$(1),$(2)); \
echo -n "$(4)"; \
) > $(call imgname,$(1),$(2))-backup-loader.bin; \
if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \
echo "Warning: $(call sysupname,$(1),$(2)) is too big"; \
else \
( \
dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \
echo -n "$(5)"; \
) > $(call factoryname,$(1),$(2)); \
fi; \
fi
endef

define Image/Build/DIR825B1_WHOLEFLASH
$(call MkuImageLzma,$(2),$(3) $(dir825b1_wholeflash_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,6946816)
endef

define Image/Build/DIR825B1_TOSTOCK
$(call MkuImageLzma,$(2),$(3) $(dir825b1_tostock_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,5308416)
endef

define Image/Build/WZRHPG30XNH
$(call MkuImageLzma,$(2),$(3))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,31850496)
Expand Down Expand Up @@ -789,10 +757,7 @@ $(eval $(call SingleProfile,Cameo933x,$(fs_squash),TEW712BR,tew-712br,TEW-712BR,
$(eval $(call SingleProfile,CyberTAN,$(fs_64k),WRT160NL,wrt160nl,WRT160NL,ttyS0,115200,1.00.01))

$(eval $(call SingleProfile,DIR825B1,$(fs_64k),DIR825B1,dir-825-b1,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
$(eval $(call SingleProfile,DIR825B1_TOWHOLEFLASH,$(fs_64k),DIR825B1_TOWHOLEFLASH,dir-825-b1-towholeflash,DIR-825-B1_TOWHOLEFLASH,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
$(eval $(call SingleProfile,DIR825B1_WHOLEFLASH,$(fs_64k),DIR825B1_WHOLEFLASH,dir-825-b1-wholeflash,DIR-825-B1_WHOLEFLASH,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
$(eval $(call SingleProfile,DIR825B1_TOSTOCK,$(fs_64k),DIR825B1_TOSTOCK,dir-825-b1-tostock,DIR-825-B1_TOSTOCK,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
$(eval $(call SingleProfile,DIR825B1,$(fs_64k),TEW673GRU,tew-637gru,TEW-673GRU,ttyS0,115200,01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01))
$(eval $(call SingleProfile,DIR825B1,$(fs_64k),TEW673GRU,tew-673gru,TEW-673GRU,ttyS0,115200,01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01))

$(eval $(call SingleProfile,MyLoader,$(fs_64k),WP543_2M,wp543,,ttyS0,115200,0x200000,2M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WP543_4M,wp543,,ttyS0,115200,0x400000,4M))
Expand Down Expand Up @@ -882,7 +847,6 @@ $(eval $(call SingleProfile,ZyXEL,$(fs_64k),NBG_460N_550N_550NH,nbg460n_550n_550


$(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
$(eval $(call MultiProfile,DIR825B1_ALL,DIR825B1 DIR825B1_TOWHOLEFLASH DIR825B1_WHOLEFLASH DIR825B1_TOSTOCK))
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT))
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
$(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2))
Expand Down

0 comments on commit 07b8c26

Please sign in to comment.