GK SDK 源码库: XMIPCLinuxV100R005C00SPC030 (kernel/tools/open_source excluded)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env make
|
||||
###############################################################################
|
||||
#
|
||||
#
|
||||
#Copyright (c) Lotus. All rights reserved.
|
||||
#
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
ETHTOOL := ethtool-6
|
||||
|
||||
ETHTOOL_PREFIX = $(ROOTFS_BUILDDIR)/$(ETHTOOL)/.install
|
||||
|
||||
rootfs_unstrip: $(ROOTFS_PREFIX)/sbin/ethtool
|
||||
|
||||
clean: $(ETHTOOL).clean
|
||||
|
||||
$(ETHTOOL).clean:
|
||||
rm -rf $(ROOTFS_BUILDDIR)/$(ETHTOOL)
|
||||
|
||||
$(ROOTFS_PREFIX)/sbin/ethtool: $(ROOTFS_BUILDDIR)/$(ETHTOOL)/.built
|
||||
$(call mkdir,$(@D))
|
||||
cp -arf $(ETHTOOL_PREFIX)/sbin/ethtool $(ROOTFS_PREFIX)/sbin
|
||||
touch $@
|
||||
|
||||
$(ROOTFS_BUILDDIR)/$(ETHTOOL)/.built: $(ROOTFS_BUILDDIR)/$(ETHTOOL)/.extracted
|
||||
cd $(<D); CC=$(CROSS_COMPILE)-gcc ./configure \
|
||||
--prefix=$(ETHTOOL_PREFIX) --host=$(CROSS_COMPILE) \
|
||||
CFLAGS="$(filter-out -Werror,$(SDK_USR_CFLAGS))" \
|
||||
--enable-static --disable-shared
|
||||
make -C $(<D)
|
||||
make -C $(<D) install
|
||||
touch $@
|
||||
|
||||
$(ROOTFS_BUILDDIR)/$(ETHTOOL)/.extracted:
|
||||
$(call mkdir,$(@D))
|
||||
tar xf $(OPEN_SOURCE_DIR)/ethtool/$(ETHTOOL).tar.gz -C $(ROOTFS_BUILDDIR)
|
||||
cp -arf $(ROOTFS_SRCDIR)/ethtools/$(ETHTOOL).patch/* $(@D)
|
||||
touch $@
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Portions Copyright 2001 Sun Microsystems (thockin@sun.com) */
|
||||
/* Portions Copyright 2002 Intel (scott.feldman@intel.com) */
|
||||
#ifndef ETHTOOL_UTIL_H__
|
||||
#define ETHTOOL_UTIL_H__
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/* hack, so we may include kernel's ethtool.h */
|
||||
typedef unsigned long long __u64;
|
||||
typedef unsigned int __u32; /* ditto */
|
||||
typedef unsigned short __u16; /* ditto */
|
||||
typedef unsigned char __u8; /* ditto */
|
||||
|
||||
/* historical: we used to use kernel-like types; remove these once cleaned */
|
||||
typedef unsigned long long u64;
|
||||
typedef unsigned int u32; /* ditto */
|
||||
typedef unsigned short u16; /* ditto */
|
||||
typedef unsigned char u8; /* ditto */
|
||||
|
||||
#include "ethtool-copy.h"
|
||||
|
||||
/* National Semiconductor DP83815, DP83816 */
|
||||
int natsemi_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
int natsemi_dump_eeprom(struct ethtool_drvinfo *info,
|
||||
struct ethtool_eeprom *ee);
|
||||
|
||||
/* Digital/Intel 21040 and 21041 */
|
||||
int de2104x_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Intel(R) PRO/1000 Gigabit Adapter Family */
|
||||
int e1000_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* RealTek PCI */
|
||||
int realtek_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Intel(R) PRO/100 Fast Ethernet Adapter Family */
|
||||
int e100_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Tigon3 */
|
||||
int tg3_dump_eeprom(struct ethtool_drvinfo *info, struct ethtool_eeprom *ee);
|
||||
|
||||
/* Advanced Micro Devices AMD8111 based Adapter */
|
||||
int amd8111e_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Advanced Micro Devices PCnet32 Adapter */
|
||||
int pcnet32_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Motorola 8xx FEC Ethernet controller */
|
||||
int fec_8xx_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* PowerPC 4xx on-chip Ethernet controller */
|
||||
int ibm_emac_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Intel(R) PRO/10GBe Gigabit Adapter Family */
|
||||
int ixgb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Broadcom Tigon3 Ethernet controller */
|
||||
int tg3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* SysKonnect Gigabit (Genesis and Yukon) */
|
||||
int skge_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* SysKonnect Gigabit (Yukon2) */
|
||||
int sky2_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* Fabric7 VIOC */
|
||||
int vioc_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
/* SMSC LAN911x/LAN921x embedded ethernet controller */
|
||||
int smsc911x_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user