mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
core/linux-mvebu to 3.12.0-4
This commit is contained in:
parent
a07ab5ecea
commit
75c41e62c3
5 changed files with 123 additions and 29 deletions
|
@ -0,0 +1,49 @@
|
|||
From: Willy Tarreau <w@xxxxxx>
|
||||
Date: Sun, 2 Dec 2012 19:59:28 +0100
|
||||
Subject: ARM: atags: add support for Marvell's u-boot
|
||||
|
||||
Marvell uses a specific atag in its u-boot which includes among other
|
||||
information the MAC addresses for up to 4 network interfaces.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@xxxxxx>
|
||||
---
|
||||
arch/arm/include/uapi/asm/setup.h | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h
|
||||
index 979ff40..d1d0c19 100644
|
||||
--- a/arch/arm/include/uapi/asm/setup.h
|
||||
+++ b/arch/arm/include/uapi/asm/setup.h
|
||||
@@ -143,6 +143,18 @@ struct tag_memclk {
|
||||
__u32 fmemclk;
|
||||
};
|
||||
|
||||
+/* Marvell uboot parameters */
|
||||
+#define ATAG_MV_UBOOT 0x41000403
|
||||
+struct tag_mv_uboot {
|
||||
+ __u32 uboot_version;
|
||||
+ __u32 tclk;
|
||||
+ __u32 sysclk;
|
||||
+ __u32 isUsbHost;
|
||||
+ __u8 macAddr[4][6];
|
||||
+ __u16 mtu[4];
|
||||
+ __u32 nand_ecc;
|
||||
+};
|
||||
+
|
||||
struct tag {
|
||||
struct tag_header hdr;
|
||||
union {
|
||||
@@ -165,6 +177,11 @@ struct tag {
|
||||
* DC21285 specific
|
||||
*/
|
||||
struct tag_memclk memclk;
|
||||
+
|
||||
+ /*
|
||||
+ * Marvell specific
|
||||
+ */
|
||||
+ struct tag_mv_uboot mv_uboot;
|
||||
} u;
|
||||
};
|
||||
|
||||
--
|
||||
1.7.12.2.21.g234cd45.dirty
|
44
core/linux-mvebu/0002-atags-retrieve-mac-addresses.patch
Normal file
44
core/linux-mvebu/0002-atags-retrieve-mac-addresses.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
From: Willy Tarreau <w@xxxxxx>
|
||||
Date: Sun, 2 Dec 2012 19:56:58 +0100
|
||||
Subject: ARM: atags/fdt: retrieve MAC addresses from Marvell boot loader
|
||||
|
||||
The atags are parsed and if a Marvell atag is found, up to 4 MAC
|
||||
addresses are extracted there and assigned to node aliases eth0..3
|
||||
with the name "mac-address".
|
||||
|
||||
This was tested on my Mirabox and the two NICs had their correct
|
||||
address set.
|
||||
|
||||
Signed-off-by: Willy Tarreau <w@xxxxxx>
|
||||
---
|
||||
arch/arm/boot/compressed/atags_to_fdt.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c
|
||||
index d1153c8..24b31ae 100644
|
||||
--- a/arch/arm/boot/compressed/atags_to_fdt.c
|
||||
+++ b/arch/arm/boot/compressed/atags_to_fdt.c
|
||||
@@ -16,7 +16,7 @@ static int node_offset(void *fdt, const char *node_path)
|
||||
}
|
||||
|
||||
static int setprop(void *fdt, const char *node_path, const char *property,
|
||||
- uint32_t *val_array, int size)
|
||||
+ void *val_array, int size)
|
||||
{
|
||||
int offset = node_offset(fdt, node_path);
|
||||
if (offset < 0)
|
||||
@@ -177,6 +177,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
|
||||
initrd_start);
|
||||
setprop_cell(fdt, "/chosen", "linux,initrd-end",
|
||||
initrd_start + initrd_size);
|
||||
+ } else if (atag->hdr.tag == ATAG_MV_UBOOT) {
|
||||
+ /* This ATAG provides up to 4 MAC addresses */
|
||||
+ setprop(fdt, "eth0", "mac-address", atag->u.mv_uboot.macAddr[0], 6);
|
||||
+ setprop(fdt, "eth1", "mac-address", atag->u.mv_uboot.macAddr[1], 6);
|
||||
+ setprop(fdt, "eth2", "mac-address", atag->u.mv_uboot.macAddr[2], 6);
|
||||
+ setprop(fdt, "eth3", "mac-address", atag->u.mv_uboot.macAddr[3], 6);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.12.2.21.g234cd45.dirty
|
|
@ -5,11 +5,11 @@ buildarch=4
|
|||
|
||||
pkgbase=linux-mvebu
|
||||
pkgname=("${pkgbase}" "${pkgbase}-smileplug" "${pkgbase}-mirabox" "${pkgbase}-ax3" "${pkgbase}-headers")
|
||||
_srcname=linux-3.12-rc1
|
||||
_srcname=linux-3.12-rc6
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="Marvell SOCs with Device Tree support"
|
||||
pkgver=3.12.0
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
arch=('armv7h')
|
||||
url="http://www.kernel.org/"
|
||||
license=('GPL2')
|
||||
|
@ -17,11 +17,16 @@ makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'uboot-mkimage')
|
|||
options=('!strip')
|
||||
source=("http://www.kernel.org/pub/linux/kernel/v3.x/testing/${_srcname}.tar.xz"
|
||||
'config'
|
||||
'smile.patch' 'mira.patch')
|
||||
md5sums=('f407382ea56f0831690e91d3c782bde1'
|
||||
'75136dbdc9153a90f419ae04a5a7a854'
|
||||
'8eb20ef02a6e25da0604848e3ed8f139'
|
||||
'911bffe9c261ca5b91dd0a083d99e81f')
|
||||
'smile.patch'
|
||||
'mmc.patch'
|
||||
'0001-atags-add-support-for-marvell-uboot.patch'
|
||||
'0002-atags-retrieve-mac-addresses.patch')
|
||||
md5sums=('b5acb7731f44f22b67e0b3ce49720ad0'
|
||||
'98359e59b2fa08dad17c1c1238f756fb'
|
||||
'6179d15ca204bcb3aebdfd880390a84d'
|
||||
'911bffe9c261ca5b91dd0a083d99e81f'
|
||||
'3ad860d0d6daedc82091ea29c9730b95'
|
||||
'02cce6b8f88c4392f552b14d0bf2e71c')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_srcname}"
|
||||
|
@ -30,7 +35,9 @@ prepare() {
|
|||
# patch -p1 -i "${srcdir}/patch-${pkgver}"
|
||||
|
||||
patch -p1 -i "${srcdir}/smile.patch"
|
||||
patch -p1 -i "${srcdir}/mira.patch"
|
||||
patch -p1 -i "${srcdir}/mmc.patch"
|
||||
patch -p1 -i "${srcdir}/0001-atags-add-support-for-marvell-uboot.patch"
|
||||
patch -p1 -i "${srcdir}/0002-atags-retrieve-mac-addresses.patch"
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 3.12.0-rc1 Kernel Configuration
|
||||
# Linux/arm 3.12.0-rc6 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM=y
|
||||
CONFIG_MIGHT_HAVE_PCI=y
|
||||
|
@ -226,7 +226,7 @@ CONFIG_BLK_DEV_BSG=y
|
|||
CONFIG_BLK_DEV_BSGLIB=y
|
||||
CONFIG_BLK_DEV_INTEGRITY=y
|
||||
CONFIG_BLK_DEV_THROTTLING=y
|
||||
# CONFIG_CMDLINE_PARSER is not set
|
||||
# CONFIG_BLK_CMDLINE_PARSER is not set
|
||||
|
||||
#
|
||||
# Partition Types
|
||||
|
@ -348,18 +348,6 @@ CONFIG_MACH_ARMADA_XP=y
|
|||
# CONFIG_ARCH_SUNXI is not set
|
||||
# CONFIG_ARCH_SIRF is not set
|
||||
# CONFIG_ARCH_TEGRA is not set
|
||||
|
||||
#
|
||||
# ST-Ericsson AB U300/U335 Platform
|
||||
#
|
||||
|
||||
#
|
||||
# ST-Ericsson Mobile Platform Products
|
||||
#
|
||||
|
||||
#
|
||||
# ST-Ericsson U300/U335 Feature Selections
|
||||
#
|
||||
# CONFIG_ARCH_U8500 is not set
|
||||
# CONFIG_ARCH_VEXPRESS is not set
|
||||
# CONFIG_ARCH_VIRT is not set
|
||||
|
@ -1252,7 +1240,6 @@ CONFIG_OF_MDIO=y
|
|||
CONFIG_OF_PCI=y
|
||||
CONFIG_OF_PCI_IRQ=y
|
||||
CONFIG_OF_MTD=y
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
# CONFIG_PARPORT is not set
|
||||
CONFIG_BLK_DEV=y
|
||||
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
|
||||
|
@ -3132,6 +3119,7 @@ CONFIG_USB_STORAGE_ENE_UB6250=m
|
|||
#
|
||||
CONFIG_USB_MDC800=m
|
||||
CONFIG_USB_MICROTEK=m
|
||||
# CONFIG_USB_DWC3 is not set
|
||||
# CONFIG_USB_CHIPIDEA is not set
|
||||
|
||||
#
|
||||
|
@ -3581,7 +3569,12 @@ CONFIG_FS_MBCACHE=y
|
|||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_BTRFS_FS=y
|
||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||
# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
|
||||
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
|
||||
# CONFIG_BTRFS_DEBUG is not set
|
||||
# CONFIG_BTRFS_ASSERT is not set
|
||||
# CONFIG_NILFS2_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_EXPORTFS=y
|
||||
|
@ -3630,9 +3623,7 @@ CONFIG_MSDOS_FS=y
|
|||
CONFIG_VFAT_FS=y
|
||||
CONFIG_FAT_DEFAULT_CODEPAGE=437
|
||||
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||
CONFIG_NTFS_FS=y
|
||||
# CONFIG_NTFS_DEBUG is not set
|
||||
# CONFIG_NTFS_RW is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
|
||||
#
|
||||
# Pseudo filesystems
|
||||
|
@ -3961,6 +3952,7 @@ CONFIG_KEYS=y
|
|||
# CONFIG_SECURITYFS is not set
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_DEFAULT_SECURITY=""
|
||||
CONFIG_XOR_BLOCKS=y
|
||||
CONFIG_CRYPTO=y
|
||||
|
||||
#
|
||||
|
@ -4072,8 +4064,9 @@ CONFIG_CRYPTO_LZO=y
|
|||
# Random Number Generation
|
||||
#
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
# CONFIG_CRYPTO_USER_API_HASH is not set
|
||||
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
|
||||
CONFIG_CRYPTO_USER_API=m
|
||||
CONFIG_CRYPTO_USER_API_HASH=m
|
||||
CONFIG_CRYPTO_USER_API_SKCIPHER=m
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_DEV_MV_CESA=y
|
||||
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
|
||||
|
@ -4083,6 +4076,7 @@ CONFIG_CRYPTO_DEV_MV_CESA=y
|
|||
#
|
||||
# Library routines
|
||||
#
|
||||
CONFIG_RAID6_PQ=y
|
||||
CONFIG_BITREVERSE=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
|
|
Loading…
Reference in a new issue