Showing posts with label kernel. Show all posts
Showing posts with label kernel. Show all posts

Wednesday, December 31, 2014

use vmnet patch with vmware 10.0.4 and kernel 3.17

diff -ur vmnet-only.a/netif.c vmnet-only/netif.c
--- vmnet-only.a/netif.c    2014-10-10 03:23:08.585920012 +0300
+++ vmnet-only/netif.c  2014-10-10 03:23:09.245920008 +0300
@@ -149,7 +149,7 @@
    memcpy(deviceName, devName, sizeof deviceName);
    NULL_TERMINATE_STRING(deviceName);

-   dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);
+   dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_UNKNOWN, VNetNetIfSetup);
    if (!dev) {
       retval = -ENOMEM;
       goto out;


  1. tar xf /usr/lib/vmware/modules/source/vmnet.tar -C /tmp/vmware
  2. patch vmnet-only.a/netif.
  3. tar -cf vmnet.tar vmnet-only/ cp vmnet.tar /usr/lib/vmware/modules/source/
  4. # vmware-modconfig --console --install-all

Wednesday, November 4, 2009

Build New Kernel For Thinkpad

[caption id="attachment_1213" align="alignnone" width="300" caption="Thinkpad New Linux Kernel 2.6.27.38"]Thinkpad New Linux Kernel 2.6.27.38[/caption]

Tuesday, July 22, 2008

Kernel 2.6.26 Resume Bug

刚升级到 2.6.26 就遇到了一个 Intel 显卡下的,系统休眠不可用的BUG,找了很久,开始还以为是编译内核的时候参数搞错,但是编译了3次之后问题依然…… 就要想回退到 2.6.25 的时候,想到可能是一个BUG,结果真的找到了。应用这个补丁即可。


diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 36af01f..130711f 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -23,6 +23,15 @@ static unsigned long acpi_realmode;
static char temp_stack[10240];
#endif

+/* XXX: this macro should move to asm-x86/segment.h and be shared with the
+ boot code... */
+#define GDT_ENTRY(flags, base, limit) \
+ (((u64)(base & 0xff000000) << 32) | \
+ ((u64)flags << 40) | \
+ ((u64)(limit & 0x00ff0000) << 32) | \
+ ((u64)(base & 0x00ffffff) << 16) | \
+ ((u64)(limit & 0x0000ffff)))
+
/**
* acpi_save_state_mem - save kernel state
*
@@ -58,11 +67,11 @@ int acpi_save_state_mem(void)
((char *)&header->wakeup_gdt - (char *)acpi_realmode))
<< 16);
/* GDT[1]: real-mode-like code segment */
- header->wakeup_gdt[1] = (0x009bULL << 40) +
- ((u64)acpi_wakeup_address << 16) + 0xffff;
+ header->wakeup_gdt[1] =
+ GDT_ENTRY(0x809b, acpi_wakeup_address, 0xfffff);
/* GDT[2]: real-mode-like data segment */
- header->wakeup_gdt[2] = (0x0093ULL << 40) +
- ((u64)acpi_wakeup_address << 16) + 0xffff;
+ header->wakeup_gdt[2] =
+ GDT_ENTRY(0x8093, acpi_wakeup_address, 0xfffff);

#ifndef CONFIG_64BIT
store_gdt((struct desc_ptr *)&header->pmode_gdt);

upgrade to kernel 2.6.26

[caption id="attachment_837" align="aligncenter" width="499" caption="Linux 2.6.26 内核"]Linux 2.6.26 内核[/caption]

升级到了最新的内核版本,据说内核版本号规则要换了……

Monday, January 14, 2008

让内核自动加载所需模块

需要在配置编译时,选择

--- Enable loadable module support
[*] Module unloading
[*] Forced module unloading
[*] Module versioning support
[_] Source checksum for all modules
[*] Automatic kernel module loading


Automatic kernel module loading 是应该选择的项目 ;)

Slackware 12 initrd needed

how to build a initrd when you need, like this:
sudo mkinitrd -c -k 2.6.21.5-smp -m jbd:ext3 -r /dev/hda14 -o /boot/initrd-2.6.21.5-smp.gz