kirkwood: upgrade to 3.10.15

Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38402 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Luka Perkov 2013-10-14 19:46:40 +00:00
parent b1fe676572
commit 73ef94f400
7 changed files with 128 additions and 56 deletions

View File

@ -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 <kaloz@openwrt.org>
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))

View File

@ -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

View File

@ -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 <<EOF
@ -19,23 +21,17 @@ EOF
}
. /lib/functions/uci-defaults.sh
. /lib/kirkwood.sh
touch /etc/config/network
ucidef_set_interface_loopback
hardware=$(kirkwood_hardware_name)
case "$hardware" in
"Seagate FreeAgent DockStar")
case "`cat /proc/device-tree/model`" in
"Seagate FreeAgent Dockstar")
set_lan_dhcp "eth0"
;;
"RaidSonic ICY BOX IB-NAS6210")
"RaidSonic ICY BOX IB-NAS62x0 (Rev B)")
set_lan_dhcp "eth0"
;;
*)
ucidef_set_interface_lan "eth0"
;;

View File

@ -1,5 +0,0 @@
#!/bin/sh
kirkwood_hardware_name() {
grep ^Hardware /proc/cpuinfo | sed "s/Hardware.*: \(.*\)/\1/g"
}

View File

@ -9,67 +9,110 @@ include $(INCLUDE_DIR)/image.mk
NAND_BLOCKSIZE := 2048:128k
define Image/BuildKernel
$(CP) $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
define Image/BuildKernel/Template
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(CP) $(KDIR)/uImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
endif
$(CP) $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage
$(call Image/BuildKernel/MkuImageARM, \
0x00008000, \
$(BIN_DIR)/$(IMG_PREFIX)-zImage, \
$(BIN_DIR)/$(IMG_PREFIX)-uImage \
)
$(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 ($(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
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))

View File

@ -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))

View File

@ -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))