diff options
Diffstat (limited to 'target/linux/avr32')
-rw-r--r-- | target/linux/avr32/Makefile | 2 | ||||
-rw-r--r-- | target/linux/avr32/base-files.mk | 5 | ||||
-rwxr-xr-x | target/linux/avr32/base-files/etc/diag.sh | 23 | ||||
-rwxr-xr-x | target/linux/avr32/base-files/etc/uci-defaults/02_network | 17 | ||||
-rwxr-xr-x | target/linux/avr32/base-files/lib/upgrade/platform.sh | 28 | ||||
-rw-r--r-- | target/linux/avr32/config-3.8 (renamed from target/linux/avr32/config-3.3) | 19 | ||||
-rw-r--r-- | target/linux/avr32/image/Config.in | 6 | ||||
-rw-r--r-- | target/linux/avr32/image/Makefile | 4 | ||||
-rw-r--r-- | target/linux/avr32/patches-3.8/100-dont-redefine-HZ.patch | 10 | ||||
-rw-r--r-- | target/linux/avr32/patches-3.8/110-openwrt_flashmap.patch (renamed from target/linux/avr32/patches-3.3/110-openwrt_flashmap.patch) | 12 |
10 files changed, 115 insertions, 11 deletions
diff --git a/target/linux/avr32/Makefile b/target/linux/avr32/Makefile index 71a84aeab..240c3428d 100644 --- a/target/linux/avr32/Makefile +++ b/target/linux/avr32/Makefile @@ -12,7 +12,7 @@ BOARDNAME:=Atmel AVR32 FEATURES:=squashfs MAINTAINER:=Imre Kaloz <kaloz@openwrt.org> -LINUX_VERSION:=3.3.8 +LINUX_VERSION:=3.8.12 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/avr32/base-files.mk b/target/linux/avr32/base-files.mk new file mode 100644 index 000000000..d6682bd38 --- /dev/null +++ b/target/linux/avr32/base-files.mk @@ -0,0 +1,5 @@ +define Package/base-files/install-target + rm -f $(1)/etc/config/network +endef + + diff --git a/target/linux/avr32/base-files/etc/diag.sh b/target/linux/avr32/base-files/etc/diag.sh new file mode 100755 index 000000000..ea20f98cc --- /dev/null +++ b/target/linux/avr32/base-files/etc/diag.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Copyright (C) 2013 OpenWrt.org + +. /lib/functions/leds.sh + +set_state() { + status_led="sys" + + case "$1" in + preinit) + insmod leds-gpio + status_led_blink_preinit + ;; + + failsafe) + status_led_blink_failsafe + ;; + + done) + status_led_on + ;; + esac +} diff --git a/target/linux/avr32/base-files/etc/uci-defaults/02_network b/target/linux/avr32/base-files/etc/uci-defaults/02_network new file mode 100755 index 000000000..3676146eb --- /dev/null +++ b/target/linux/avr32/base-files/etc/uci-defaults/02_network @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Copyright (C) 2013 OpenWrt.org +# + +[ -e /etc/config/network ] && exit 0 + +touch /etc/config/network + +. /lib/functions/uci-defaults.sh + +ucidef_set_interface_loopback +ucidef_set_interfaces_lan_wan "eth1" "eth0" + +uci commit network + +exit 0 diff --git a/target/linux/avr32/base-files/lib/upgrade/platform.sh b/target/linux/avr32/base-files/lib/upgrade/platform.sh new file mode 100755 index 000000000..00ad863d1 --- /dev/null +++ b/target/linux/avr32/base-files/lib/upgrade/platform.sh @@ -0,0 +1,28 @@ +# +# Copyright (C) 2013 OpenWrt.org +# + +PART_NAME=firmware + +platform_check_image() { + local magic="$(get_magic_long "$1")" + + [ "$ARGC" -gt 1 ] && return 1 + + [ "$magic" != "27051956" ] && { + echo "Invalid image type." + return 1 + } + + return 0 +} + +disable_watchdog() { + killall watchdog + ( ps | grep -v 'grep' | grep '/dev/watchdog' ) && { + echo 'Could not disable watchdog' + return 1 + } +} + +append sysupgrade_pre_upgrade disable_watchdog diff --git a/target/linux/avr32/config-3.3 b/target/linux/avr32/config-3.8 index 7a077ef0a..2578c33e8 100644 --- a/target/linux/avr32/config-3.3 +++ b/target/linux/avr32/config-3.8 @@ -2,19 +2,20 @@ CONFIG_AP700X_16_BIT_SMC=y # CONFIG_AP700X_32_BIT_SMC is not set # CONFIG_AP700X_8_BIT_SMC is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y # CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_ARCH_REQUIRE_GPIOLIB=y # CONFIG_ARCH_SPARSEMEM_ENABLE is not set CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_AT32AP700X_WDT=m -# CONFIG_ATMEL_PWM is not set # CONFIG_ATMEL_SSC is not set CONFIG_ATMEL_TCB_CLKSRC=y CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 CONFIG_ATMEL_TCLIB=y CONFIG_AVR32=y -CONFIG_BCMA_POSSIBLE=y CONFIG_BOARD_ATNGW100_ADDON_NONE=y CONFIG_BOARD_ATNGW100_COMMON=y # CONFIG_BOARD_ATNGW100_EVKLCD10X is not set @@ -32,6 +33,7 @@ CONFIG_DECOMPRESS_LZMA=y CONFIG_DMADEVICES=y CONFIG_DMA_ENGINE=y CONFIG_DW_DMAC=y +CONFIG_DW_DMAC_BIG_ENDIAN_IO=y CONFIG_ENTRY_ADDRESS=0x90000000 CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_ATOMIC64=y @@ -39,18 +41,19 @@ CONFIG_GENERIC_BUG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GPIOLIB=y CONFIG_HARDIRQS_SW_RESEND=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y -# CONFIG_HAVE_ARCH_BOOTMEM is not set CONFIG_HAVE_CLK=y CONFIG_HAVE_FB_ATMEL=y # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_HAVE_GENERIC_HARDIRQS=y -CONFIG_HAVE_NET_MACB=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_I2C=m CONFIG_I2C_BOARDINFO=y @@ -64,6 +67,7 @@ CONFIG_MMC=m CONFIG_MMC_ATMELMCI=m # CONFIG_MMC_ATMELMCI_DMA is not set CONFIG_MMC_BLOCK=m +CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MTD_CFI_INTELEXT is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_COMPLEX_MAPPINGS is not set @@ -79,6 +83,7 @@ CONFIG_NO_HZ=y CONFIG_NR_QUICK=2 # CONFIG_OWNERSHIP_TRACE is not set CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_PERCPU_RWSEM=y CONFIG_PERFORMANCE_COUNTERS=y CONFIG_PHYLIB=y CONFIG_PHYS_OFFSET=0x10000000 @@ -99,5 +104,9 @@ CONFIG_SPI=y CONFIG_SPI_ATMEL=y CONFIG_SPI_MASTER=y CONFIG_SUBARCH_AVR32B=y -CONFIG_XZ_DEC=y +CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_UIDGID_CONVERTED=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_XHCI is not set CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/avr32/image/Config.in b/target/linux/avr32/image/Config.in index bc5469e7a..7448a0f21 100644 --- a/target/linux/avr32/image/Config.in +++ b/target/linux/avr32/image/Config.in @@ -1,12 +1,12 @@ config AVR32_UBOOT bool "Build U-Boot bootloader" - depends TARGET_avr32 + depends on TARGET_avr32 default n config AVR32_UBOOT_TARGET string "U-Boot target board" - depends TARGET_avr32 - depends AVR32_UBOOT + depends on TARGET_avr32 + depends on AVR32_UBOOT default "atngw100" help For all supported boards there are ready-to-use default diff --git a/target/linux/avr32/image/Makefile b/target/linux/avr32/image/Makefile index 595a5d9fc..11387b14e 100644 --- a/target/linux/avr32/image/Makefile +++ b/target/linux/avr32/image/Makefile @@ -40,14 +40,14 @@ endef define Image/Build/squashfs $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) ( \ - dd if=$(KDIR)/uImage bs=1024k conv=sync; \ + dd if=$(KDIR)/uImage-lzma bs=1024k conv=sync; \ dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img endef define Image/Build/jffs2-64k ( \ - dd if=$(KDIR)/uImage bs=1024k conv=sync; \ + dd if=$(KDIR)/uImage-lzma bs=1024k conv=sync; \ dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \ ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img endef diff --git a/target/linux/avr32/patches-3.8/100-dont-redefine-HZ.patch b/target/linux/avr32/patches-3.8/100-dont-redefine-HZ.patch new file mode 100644 index 000000000..b2dac439a --- /dev/null +++ b/target/linux/avr32/patches-3.8/100-dont-redefine-HZ.patch @@ -0,0 +1,10 @@ +--- a/arch/avr32/include/asm/param.h ++++ b/arch/avr32/include/asm/param.h +@@ -3,7 +3,6 @@ + + #include <uapi/asm/param.h> + +-# define HZ CONFIG_HZ + # define USER_HZ 100 /* User interfaces are in "ticks" */ + # define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ + #endif /* __ASM_AVR32_PARAM_H */ diff --git a/target/linux/avr32/patches-3.3/110-openwrt_flashmap.patch b/target/linux/avr32/patches-3.8/110-openwrt_flashmap.patch index 98669bc47..3f87699b0 100644 --- a/target/linux/avr32/patches-3.3/110-openwrt_flashmap.patch +++ b/target/linux/avr32/patches-3.8/110-openwrt_flashmap.patch @@ -17,3 +17,15 @@ }, { .name = "env", +@@ -55,6 +60,11 @@ static struct mtd_partition flash_parts[ + .size = 0x00010000, + .mask_flags = MTD_WRITEABLE, + }, ++ { ++ .name = "firmware", ++ .offset = 0x00020000, ++ .size = 0x007d0000, ++ }, + }; + + static struct physmap_flash_data flash_data = { |