linux 2.6.30 内核裁减的选择

linux 2.6.30 内核裁减的选择,第1张

make clean

make oldconfig

make bzImage

make modules

make modules_install

mkinitrd initrd-2.6.30 2.6.30

cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.30

cp initrd-2.6.30 /boot/

修改/etc/grub.conf(照着以前linux的title以下的复制到下面,把版本号改了就行了)

----------------------------------------------------------------------

适合PC,arm不行,如不行请留言

你必须用4.*的gcc来编译2.6.30内核

用gcc --version查看一下你的gcc版本,估计是3.×的。

你可以升级到gcc4.×,或者,学着打补丁。下面是gcc3.4.6的补丁:

[PATCH] igb: gcc-3.4.6 fix

---

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c

index be48029..adb09d3 100644

--- a/drivers/net/igb/igb_main.c

+++ b/drivers/net/igb/igb_main.c

@@ -127,14 +127,48 @@ static void igb_restore_vlan(struct igb_adapter *)

static void igb_ping_all_vfs(struct igb_adapter *)

static void igb_msg_task(struct igb_adapter *)

static int igb_rcv_msg_from_vf(struct igb_adapter *, u32)

-static inline void igb_set_rah_pool(struct e1000_hw *, int , int)

static void igb_set_mc_list_pools(struct igb_adapter *, int, u16)

static void igb_vmm_control(struct igb_adapter *)

-static inline void igb_set_vmolr(struct e1000_hw *, int)

-static inline int igb_set_vf_rlpml(struct igb_adapter *, int, int)

static int igb_set_vf_mac(struct igb_adapter *adapter, int, unsigned char *)

static void igb_restore_vf_multicasts(struct igb_adapter *adapter)

+static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn)

+{

+ u32 reg_data

+

+ reg_data = rd32(E1000_VMOLR(vfn))

+ reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */

+ E1000_VMOLR_ROPE | /* Accept packets matched in UTA */

+ E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */

+ E1000_VMOLR_AUPE | /* Accept untagged packets */

+ E1000_VMOLR_STRVLAN/* Strip vlan tags */

+ wr32(E1000_VMOLR(vfn), reg_data)

+}

+

+static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size,

+ int vfn)

+{

+ struct e1000_hw *hw = &adapter->hw

+ u32 vmolr

+

+ vmolr = rd32(E1000_VMOLR(vfn))

+ vmolr &= ~E1000_VMOLR_RLPML_MASK

+ vmolr |= size | E1000_VMOLR_LPE

+ wr32(E1000_VMOLR(vfn), vmolr)

+

+ return 0

+}

+

+static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry)

+{

+ u32 reg_data

+

+ reg_data = rd32(E1000_RAH(entry))

+ reg_data &= ~E1000_RAH_POOL_MASK

+ reg_data |= E1000_RAH_POOL_1 <<pool

+ wr32(E1000_RAH(entry), reg_data)

+}

+

#ifdef CONFIG_PM

static int igb_suspend(struct pci_dev *, pm_message_t)

static int igb_resume(struct pci_dev *)

@@ -5418,43 +5452,6 @@ static void igb_io_resume(struct pci_dev *pdev)

igb_get_hw_control(adapter)

}

-static inline void igb_set_vmolr(struct e1000_hw *hw, int vfn)

-{

- u32 reg_data

-

- reg_data = rd32(E1000_VMOLR(vfn))

- reg_data |= E1000_VMOLR_BAM | /* Accept broadcast */

- E1000_VMOLR_ROPE | /* Accept packets matched in UTA */

- E1000_VMOLR_ROMPE | /* Accept packets matched in MTA */

- E1000_VMOLR_AUPE | /* Accept untagged packets */

- E1000_VMOLR_STRVLAN/* Strip vlan tags */

- wr32(E1000_VMOLR(vfn), reg_data)

-}

-

-static inline int igb_set_vf_rlpml(struct igb_adapter *adapter, int size,

- int vfn)

-{

- struct e1000_hw *hw = &adapter->hw

- u32 vmolr

-

- vmolr = rd32(E1000_VMOLR(vfn))

- vmolr &= ~E1000_VMOLR_RLPML_MASK

- vmolr |= size | E1000_VMOLR_LPE

- wr32(E1000_VMOLR(vfn), vmolr)

-

- return 0

-}

-

-static inline void igb_set_rah_pool(struct e1000_hw *hw, int pool, int entry)

-{

- u32 reg_data

-

- reg_data = rd32(E1000_RAH(entry))

- reg_data &= ~E1000_RAH_POOL_MASK

- reg_data |= E1000_RAH_POOL_1 <<pool

- wr32(E1000_RAH(entry), reg_data)

-}

-

static void igb_set_mc_list_pools(struct igb_adapter *adapter,

int entry_count, u16 total_rar_filters)

{

--


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8381408.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-15
下一篇 2023-04-15

发表评论

登录后才能评论

评论列表(0条)

保存