The first build was not working, the disk couldn't be mounted and kernel was panic. I went back to the config and compiled the SATA driver in. Second boot up was smooth, I could see the standard login prompt silently waiting and blinking.
Suddenly I felt good at myself: After so many hours I have spent all these years to compile the linux kernel, up from the 2.0 series until now. At least now I have an instinct on how to build a kernel and can get it right the second time.
This new 2.6 kernel seems to change quite a lot of stuff, most notable is my RaLink-based D-Link wireless PCI card driver no longer compiles, complaining "error: structure has no member named `get_wireless_stats'". A quick look at linux/netdevice.h reviewed that the function get_wireless_stats is deprecated in the struct net_device and got moved into some other places (to struct iw_handler_def in the 'net' directory actually). As social service to the world, I now fix it.
Steps:
- Backup your files
- Edit rtmp_info.c, search for the string 'rt61_iw_handler_def'. You will land on the definition of the struct. Remove the word 'const' from the definition
- Save and close file
- Edit rtmp_main.c, again search for the above string.
- You will land on the following line. Remove the 'const'
extern const struct iw_handler_def rt61_iw_handler_def;
- At the same file, go to line 198, as shown below:
net_dev->get_wireless_stats = RT61_get_wireless_stats;
- Change it to:
rt61_iw_handler_def.get_wireless_stats = RT61_get_wireless_stats;
- Save and close file. Your module should compile. If you are bored, you may want to remove all compilation warnings. If you are really really bored, put a -Wall switch in the Makefile and remove all warnings
No comments:
Post a Comment