Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a hp pavilion dm3t with intel HD graphics running ubuntu 10.10 64 bit. I'm trying to compile and install a patched kernel according to this,
https://launchpad.net/~kamalmostafa/+archive/linux-kamal-mjgbacklight

So I downloaded the tarball from here (linked to from the page above): http://kernel.ubuntu.com/git?p=kamal/ubuntu-maverick.git;a=shortlog;h=refs/heads/mjg-backlight

I untar'd it to a directory, entered the directory and did:

make defconfig

I'm not sure if that's what I should have done but it was successful, so I did:

make

which seemed to work fine until it gave these errors:

ubuntu/ndiswrapper/iw_ndis.c:1966: error: unknown field ‘num_private’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1966: warning: initialization makes pointer from integer without a cast
ubuntu/ndiswrapper/iw_ndis.c:1967: error: unknown field ‘num_private_args’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1967: warning: excess elements in struct initializer
ubuntu/ndiswrapper/iw_ndis.c:1967: warning: (near initialization for ‘ndis_handler_def’)
ubuntu/ndiswrapper/iw_ndis.c:1970: error: unknown field ‘private’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1970: warning: initialization makes integer from pointer without a cast
ubuntu/ndiswrapper/iw_ndis.c:1970: error: initializer element is not computable at load time
ubuntu/ndiswrapper/iw_ndis.c:1970: error: (near initialization for ‘ndis_handler_def.num_standard’)
ubuntu/ndiswrapper/iw_ndis.c:1971: error: unknown field ‘private_args’ specified in initializer
ubuntu/ndiswrapper/iw_ndis.c:1971: warning: initialization from incompatible pointer type
make[2]: *** [ubuntu/ndiswrapper/iw_ndis.o] Error 1
make[1]: *** [ubuntu/ndiswrapper] Error 2
make: *** [ubuntu] Error 2

How can I compile and install this kernel successfully? I'm new to this and would appreciate any help.

share|improve this question
    
Yeah, that's what I found, but there was no answer –  user12497 Mar 16 '11 at 15:39
    
For the iw_ndis.c problems see my answer at askubuntu.com/questions/30636/… –  RobS Mar 23 '11 at 22:18
add comment

2 Answers

Considering your last question about your laptop backlight, you don't need to compile the kernel to use the patch. You just need to add the PPA to your system's Software Sources.

htorque explained how to proceed in his comment :

Just add the PPA to your system. Start a terminal and run sudo apt-add-repository ppa:kamalmostafa/linux-kamal-mjgbacklight, then sudo apt-get update and finally run the upgrade with sudo apt-get upgrade. As you can read in the above link to the PPA, you might need to add acpi_backlight=vendor to the linux-line of the grub entry for the new kernel (see the comments in this answer about how to add parameters to the kernel during boot).

The whole process is already detailed at the bottom of the page you linked.

share|improve this answer
add comment

The num_private and num_private_args fields are only defined when CONFIG_WEXT_PRIV is defined during kernel compilation hence you need to add the #ifdef/#endif lines here to iw_ndis.c:

const struct iw_handler_def ndis_handler_def = {
    .num_standard   = sizeof(ndis_handler) / sizeof(ndis_handler[0]),
#ifdef CONFIG_WEXT_PRIV 
    .num_private    = sizeof(priv_handler) / sizeof(priv_handler[0]),
    .num_private_args = sizeof(priv_args) / sizeof(priv_args[0]),
#endif
    .standard   = (iw_handler *)ndis_handler,
#ifdef CONFIG_WEXT_PRIV 
    .private    = (iw_handler *)priv_handler,
    .private_args   = (struct iw_priv_args *)priv_args,
#endif  
    .get_wireless_stats = get_iw_stats,
};

However, that's not all. You'll also then get an error compiling wrapndis.c so you need to find the lines with the following if statement (at approx line 1820) and wrap that up in an #ifdef/#endif.

#ifdef CONFIG_WEXT_PRIV
if (wnd->physical_medium == NdisPhysicalMediumWirelessLan) { net_dev->wireless_handlers = &ndis_handler_def; }#endif

Should add that I am trying to compile this myself and have not tested ndiswrapper having done this so YMMV.

The above for wrapndis is wrong, it seems that CONFIG_WIRELESS_EXT is not set in (my) kernel configuration. If it was then I shouldn't get this error.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.