1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-24 22:32:25 +02:00

ramips: add board alias for the ALL0239-3G

Generate image for the ALL0239-3G which can be flashed through the
chipset-vendor SDK based firmware's web-interface and bootloader.

The bootloader seems to ignore uImage checksum errors, but does complain about
them once the 0xDEADC0DE was replaced by an actual JFFS2 page.

I'm working on implementing fixtrx for uImage in the mtd package to solve this.

Signed-off-by: Daniel Golle <dgolle@allnet.de>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33206 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2012-08-17 17:56:07 +00:00
parent cf26194ba9
commit 6f559fde75
10 changed files with 36 additions and 2 deletions

View File

@ -51,6 +51,7 @@ get_status_led() {
fonera20n) fonera20n)
status_led="fonera20n:green:power" status_led="fonera20n:green:power"
;; ;;
all0239-3g|\
hw550-3g) hw550-3g)
status_led="hw550-3g:green:status" status_led="hw550-3g:green:status"
;; ;;

View File

@ -53,6 +53,7 @@ case "$FIRMWARE" in
;; ;;
3g-6200n | \ 3g-6200n | \
all0239-3g | \
all0256n | \ all0256n | \
all5002 | \ all5002 | \
argus-atp52b | \ argus-atp52b | \

View File

@ -49,6 +49,7 @@ case $board in
set_usb_led "fonera20n:orange:usb" set_usb_led "fonera20n:orange:usb"
set_wifi_led "fonera20n:orange:wifi" set_wifi_led "fonera20n:orange:wifi"
;; ;;
all0239-3g|\
hw550-3g) hw550-3g)
set_usb_led "hw550-3g:green:usb" set_usb_led "hw550-3g:green:usb"
;; ;;

View File

@ -152,9 +152,10 @@ ramips_setup_macs()
wan_mac=$(ramips_get_mac_binary factory 32772) wan_mac=$(ramips_get_mac_binary factory 32772)
;; ;;
all0239-3g | \
w502u) w502u)
lan_mac=$(ramips_get_mac_binary factory 40) lan_mac=$(ramips_get_mac_binary factory 40)
wan_mac=$(ramips_get_mac_binary factory 46) wan_mac=$(ramips_get_mac_binary factory 46)
;; ;;
wl341v3) wl341v3)

View File

@ -34,6 +34,7 @@ preinit_set_mac_address() {
mac=$(ramips_get_mac_binary devdata 46) mac=$(ramips_get_mac_binary devdata 46)
ifconfig eth0 hw ether $mac 2>/dev/null ifconfig eth0 hw ether $mac 2>/dev/null
;; ;;
all0239-3g |\
all0256n |\ all0256n |\
all5002 |\ all5002 |\
dir-615-h1 |\ dir-615-h1 |\

View File

@ -50,6 +50,9 @@ ramips_board_name() {
*"Edimax 3g-6200n") *"Edimax 3g-6200n")
name="3g-6200n" name="3g-6200n"
;; ;;
*"Allnet ALL0239-3G")
name="all0239-3g"
;;
*"Allnet ALL0256N") *"Allnet ALL0256N")
name="all0256n" name="all0256n"
;; ;;

View File

@ -15,6 +15,7 @@ platform_check_image() {
case "$board" in case "$board" in
3g-6200n | \ 3g-6200n | \
all0239-3g | \
all0256n | \ all0256n | \
all5002 | \ all5002 | \
bc2 | \ bc2 | \

View File

@ -35,6 +35,7 @@ enum ramips_mach_type {
RAMIPS_MACH_WL_330N3G, /* Asus WL-330N3G */ RAMIPS_MACH_WL_330N3G, /* Asus WL-330N3G */
/* RT3052 based machines */ /* RT3052 based machines */
RAMIPS_MACH_ALL0239_3G, /* ALL0239-3G */
RAMIPS_MACH_ARGUS_ATP52B, /* Argus ATP-52B */ RAMIPS_MACH_ARGUS_ATP52B, /* Argus ATP-52B */
RAMIPS_MACH_BC2, /* NexAira BC2 */ RAMIPS_MACH_BC2, /* NexAira BC2 */
RAMIPS_MACH_DAP_1350, /* D-Link DAP-1350 */ RAMIPS_MACH_DAP_1350, /* D-Link DAP-1350 */

View File

@ -100,3 +100,6 @@ static void __init hw550_3g_init(void)
MIPS_MACHINE(RAMIPS_MACH_HW550_3G, "HW550-3G", "Aztech HW550-3G", MIPS_MACHINE(RAMIPS_MACH_HW550_3G, "HW550-3G", "Aztech HW550-3G",
hw550_3g_init); hw550_3g_init);
MIPS_MACHINE(RAMIPS_MACH_ALL0239_3G, "ALL0239-3G", "Allnet ALL0239-3G",
hw550_3g_init);

View File

@ -60,6 +60,18 @@ define MkImageLzma
$(call MkImage,lzma,$(KDIR)/vmlinux-$(1).bin.lzma,$(KDIR)/vmlinux-$(1).uImage,$(3)) $(call MkImage,lzma,$(KDIR)/vmlinux-$(1).bin.lzma,$(KDIR)/vmlinux-$(1).uImage,$(3))
endef endef
define MkCombineduImage
$(call PatchKernelLzma,$(2),$(3))
if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.lzma"` -gt `expr $(4) - 64` ]; then \
echo "Warning: $(KDIR)/vmlinux-$(2).bin.lzma is too big"; \
else if [ `stat -c%s "$(KDIR)/root.$(1)"` -gt $(5) ]; then \
echo "Warning: $(KDIR)/root.$(1) is too big"; \
else \
( dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=`expr $(4) - 64` conv=sync ; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/vmlinux-$(2).bin.lzma.combined ; \
fi ; fi
$(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma.combined,$(call sysupname,$(1),$(2)),$(6))
endef
define CatFiles define CatFiles
if [ `stat -c%s "$(1)"` -gt $(2) ]; then \ if [ `stat -c%s "$(1)"` -gt $(2) ]; then \
echo "Warning: $(1) is too big"; \ echo "Warning: $(1) is too big"; \
@ -125,6 +137,10 @@ define BuildFirmware/GENERIC_8M/initramfs
$(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M))) $(call BuildFirmware/Generic/initramfs,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M)))
endef endef
define BuildFirmware/UIMAGE_8M
$(call MkCombineduImage,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_8M)),$(kernel_size_8M),$(rootfs_size_8M),$(7))
endef
mtdlayout_edimax_3g6200n=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2752k(rootfs),128k@0x3e0000(cimage)ro,3648k@0x50000(firmware) mtdlayout_edimax_3g6200n=192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2752k(rootfs),128k@0x3e0000(cimage)ro,3648k@0x50000(firmware)
define BuildFirmware/3G6200N define BuildFirmware/3G6200N
$(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_edimax_3g6200n)),917504,2818048) $(call BuildFirmware/Generic,$(1),$(2),$(call mkcmdline,$(3),$(4),$(5)) $(call mkmtd/$(6),$(mtdlayout_edimax_3g6200n)),917504,2818048)
@ -367,6 +383,10 @@ define Image/Build/Profile/3G6200N
$(call Image/Build/Template/$(fs_squash)/$(1),3G6200N,3g-6200n,3G-6200N,ttyS1,57600,phys) $(call Image/Build/Template/$(fs_squash)/$(1),3G6200N,3g-6200n,3G-6200N,ttyS1,57600,phys)
endef endef
define Image/Build/Profile/ALL02393G
$(call Image/Build/Template/$(fs_squash)/$(1),UIMAGE_8M,all0239-3g,ALL0239-3G,ttyS1,57600,phys)
endef
define Image/Build/Profile/ALL0256N define Image/Build/Profile/ALL0256N
$(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,all0256n,ALL0256N,ttyS1,57600,spi) $(call Image/Build/Template/$(fs_squash)/$(1),GENERIC_4M,all0256n,ALL0256N,ttyS1,57600,spi)
endef endef
@ -513,6 +533,7 @@ endef
ifeq ($(CONFIG_RALINK_RT305X),y) ifeq ($(CONFIG_RALINK_RT305X),y)
define Image/Build/Profile/Default define Image/Build/Profile/Default
$(call Image/Build/Profile/3G6200N,$(1)) $(call Image/Build/Profile/3G6200N,$(1))
$(call Image/Build/Profile/ALL02393G,$(1))
$(call Image/Build/Profile/ALL0256N,$(1)) $(call Image/Build/Profile/ALL0256N,$(1))
$(call Image/Build/Profile/ALL5002,$(1)) $(call Image/Build/Profile/ALL5002,$(1))
$(call Image/Build/Profile/ARGUS_ATP52B,$(1)) $(call Image/Build/Profile/ARGUS_ATP52B,$(1))