From: Luka Perkov Date: Mon, 14 Oct 2013 19:46:40 +0000 (+0000) Subject: kirkwood: upgrade to 3.10.15 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=73246d2f646eec821ad59a2c9177ac3e0b2e75fd;p=openwrt%2Fstaging%2Fblocktrron.git kirkwood: upgrade to 3.10.15 Signed-off-by: Luka Perkov SVN-Revision: 38402 --- diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile index 4739760dec..ba1d259d64 100644 --- a/target/linux/kirkwood/Makefile +++ b/target/linux/kirkwood/Makefile @@ -9,16 +9,14 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=kirkwood BOARDNAME:=Marvell Kirkwood -FEATURES:=targz usb jffs2_nand +FEATURES:=targz usb jffs2_nand ubifs CPU_TYPE:=xscale MAINTAINER:=Imre Kaloz -LINUX_VERSION:=3.3.8 +LINUX_VERSION:=3.10.15 include $(INCLUDE_DIR)/target.mk -KERNELNAME:="uImage" - -DEFAULT_PACKAGES += +KERNELNAME:="zImage dtbs" $(eval $(call BuildTarget)) diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds index 18ac43c86a..7e2018853a 100644 --- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds @@ -1,19 +1,15 @@ #!/bin/sh # -# Copyright (C) 2012 OpenWrt.org +# Copyright (C) 2012-2013 OpenWrt.org # . /lib/functions/uci-defaults.sh -. /lib/kirkwood.sh -hardware=$(kirkwood_hardware_name) - -case "$hardware" in +case "`cat /proc/device-tree/model`" in "Seagate FreeAgent DockStar") ucidef_set_led_netdev "eth0" "dockstar:orange:misc" "eth0" ucidef_set_led_default "health" "dockstar:green:health" "1" ;; - *) ;; esac diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network index 8c04fdbf28..42724ef706 100644 --- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network @@ -1,10 +1,12 @@ #!/bin/sh # -# Copyright (C) 2012 OpenWrt.org +# Copyright (C) 2012-2013 OpenWrt.org # [ -e /etc/config/network ] && exit 0 +touch /etc/config/network + set_lan_dhcp() { local ifname=$1 uci batch <> $(BIN_DIR)/$(IMG_PREFIX)-zImage + $(call Image/BuildKernel/MkuImageARM, \ + 0x00008000, \ + $(BIN_DIR)/$(IMG_PREFIX)-zImage, \ + $(BIN_DIR)/$(IMG_PREFIX)-uImage \ + ) -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(CP) $(KDIR)/uImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs -endif + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs + echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs + $(call Image/BuildKernel/MkuImageARM, \ + 0x00008000, \ + $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs, \ + $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ + ) + endif - $(foreach board,$(BOARDS), - $(LINUX_DIR)/scripts/dtc/dtc \ - -O dtb -o $(BIN_DIR)/$(IMG_PREFIX)-$(board).dtb \ - -I dts $(LINUX_DIR)/arch/arm/boot/dts/kirkwood-$(board).dts - ) + ifneq ($(1),) + $(CP) $(LINUX_DIR)/arch/arm/boot/dts/kirkwood-$(1).dtb $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb + + $(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-zImage + cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb >> $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-zImage + $(call Image/BuildKernel/MkuImageARM, \ + 0x00008000, \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-zImage, \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-uImage \ + ) + + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-zImage-initramfs + cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb >> $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-zImage-initramfs + $(call Image/BuildKernel/MkuImageARM, \ + 0x00008000, \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-zImage-initramfs, \ + $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-uImage-initramfs \ + ) + endif + endif endef -define Image/InstallKernel - +define Image/InstallKernel/Template + ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_KERNEL),) $(INSTALL_DIR) $(TARGET_DIR)/boot - $(CP) $(KDIR)/uImage $(TARGET_DIR)/boot/ + $(CP) $(BIN_DIR)/$(IMG_PREFIX)-zImage $(TARGET_DIR)/boot/ endif ifneq ($(CONFIG_TARGET_ROOTFS_INCLUDE_DTB),) $(INSTALL_DIR) $(TARGET_DIR)/boot - $(foreach board,$(BOARDS), - $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(board).dtb $(TARGET_DIR)/boot/ - ) + ifneq ($(1),) + $(CP) $(BIN_DIR)/$(IMG_PREFIX)-$(1).dtb $(TARGET_DIR)/boot/ + endif endif endef -define Image/Build - $(if $(Image/Build/$(1)), \ - $(call Image/Build/$(1),$(1)), \ - $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \ - ) -endef - define Image/Build/jffs2-nand-2048-128k - dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img \ + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-$(1).img \ bs=2048 conv=sync endef define Image/Build/squashfs $(call prepare_generic_squashfs,$(KDIR)/root.squashfs) ( \ - dd if=$(KDIR)/uImage bs=4096k conv=sync; \ + dd if=$(KDIR)/zImage bs=4096k conv=sync; \ dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \ - ) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img + ) > $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-$(1).img endef define Image/Build/ubifs - ifdef UBIFS_OPTS - $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img + ifneq ($($(PROFILE)_UBIFS_OPTS),) + $(CP) $(KDIR)/root.ubifs $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-ubifs.img endif endef define Image/Build/ubi - ifdef UBI_OPTS - $(call Image/Build/ubifs,$(1)) + ifneq ($($(PROFILE)_UBI_OPTS),) + $(CP) $(KDIR)/root.ubi $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-ubi.img endif endef +Image/BuildKernel/Template/Generic=$(call Image/BuildKernel/Template) +Image/InstallKernel/Template/Generic=$(call Image/InstallKernel/Template) + +Image/BuildKernel/Template/IB62X0=$(call Image/BuildKernel/Template,ib62x0) +Image/InstallKernel/Template/IB62X0=$(call Image/InstallKernel/Template,ib62x0) + +define Image/BuildKernel + $(call Image/BuildKernel/Template/$(PROFILE)) +endef + +define Image/InstallKernel + $(call Image/InstallKernel/Template/$(PROFILE)) +endef + +define Image/Build + $(if $(Image/Build/$(1)), \ + $(call Image/Build/$(1),$(1)), \ + $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-$(1).img \ + ) +endef + $(eval $(call BuildImage)) diff --git a/target/linux/kirkwood/profiles/100-generic.mk b/target/linux/kirkwood/profiles/100-generic.mk new file mode 100644 index 0000000000..da4560442f --- /dev/null +++ b/target/linux/kirkwood/profiles/100-generic.mk @@ -0,0 +1,21 @@ +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/Generic + NAME:=Generic (default) + PACKAGES:= \ + kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \ + kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \ + kmod-ata-core kmod-ata-marvell-sata \ + kmod-rtc-marvell kmod-thermal-kirkwood +endef + +define Profile/Generic/Description + Package set compatible with most Marvell Kirkwood based boards. +endef + +$(eval $(call Profile,Generic)) diff --git a/target/linux/kirkwood/profiles/110-nas.mk b/target/linux/kirkwood/profiles/110-nas.mk new file mode 100644 index 0000000000..28b180223c --- /dev/null +++ b/target/linux/kirkwood/profiles/110-nas.mk @@ -0,0 +1,23 @@ +# +# Copyright (C) 2013 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/IB62X0 + NAME:=RaidSonic ICY BOX IB-NAS62x0 + PACKAGES:= \ + kmod-ata-core kmod-ata-marvell-sata \ + kmod-rtc-marvell kmod-usb2 kmod-usb-storage \ + uboot-envtools +endef + +define Profile/IB62X0/Description + Package set compatible with RaidSonic ICY BOX IB-NAS62x0 board. +endef + +IB62X0_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096 -U" +IB62X0_UBI_OPTS:="-m 2048 -p 128KiB -s 512" + +$(eval $(call Profile,IB62X0))