When creating the SD card I failed to spot the optional step to resize the root partition. I wasn't entirely convinced by the steps on the wiki as it talks about deleting the swap partition and doesn't appear to recreate it. After a bit of browsing I used the following process.
Resizing the root partition
Firstly, to be able to run gparted (next step) you need to set the root password:
sudo passwd root
Next I moved the swap partition to the end of the SD card:
Launch gparted from within the GUI (under the Preferences menu), select the swap partition, Partition -> Resize/Move. It is possible to just drag the swap partition to the end of the SD card and apply the changes. After a system reboot there is plenty of empty space beyond the end of the root partition.
Now I can resize the root partition using the instructions in the wiki:
Here is my fdisk output before I made any changes:
sudo fdisk -cu /dev/mmcblk0
- p to see the current start of the main partition
- d, 2 to delete the main partition
- n, p, 2 to create a new primary partition
- w write the new partition table
sudo shutdown -r now
After the reboot you need to resize the actual partition. The resize2fs will resize your main partition to the new size from the changed partition table.
sudo resize2fs /dev/mmcblk0p2
Done! Here is my fdisk output after I made these changes:
Building Kernel Headers
With plenty of disk space available I was able to follow the instructions in my last post to build the kernel headers.sudo apt-get install git git clone --depth 1 https://github.com/raspberrypi/linux.git sudo mv linux /lib/modules/3.1.9+/build cd /lib/modules/3.1.9+/build make mrproper gzip -dc /proc/config.gz > .config make modules_prepare
Building ar5523 driver
With the kernel headers in place I as able to get further with the driver build.However this still failed a little further on with a different error message.
make[3]: Entering directory `/lib/modules/3.1.9+/build'
WARNING: Symbol version dump /lib/modules/3.1.9+/build/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /usr/src/modules/ar5523/ar5523.o
/usr/src/modules/ar5523/ar5523.c:873: warning: ‘struct ieee80211_if_init_conf’ declared inside parameter list
/usr/src/modules/ar5523/ar5523.c:873: warning: its scope is only this definition or declaration, which is probably not what you want
/usr/src/modules/ar5523/ar5523.c: In function ‘ar5523_add_interface’:
/usr/src/modules/ar5523/ar5523.c:885: error: dereferencing pointer to incomplete type
/usr/src/modules/ar5523/ar5523.c:888: error: dereferencing pointer to incomplete type
/usr/src/modules/ar5523/ar5523.c: At top level:
/usr/src/modules/ar5523/ar5523.c:898: warning: ‘struct ieee80211_if_init_conf’ declared inside parameter list
/usr/src/modules/ar5523/ar5523.c:1035: warning: initialization from incompatible pointer type
/usr/src/modules/ar5523/ar5523.c:1037: warning: initialization from incompatible pointer type
/usr/src/modules/ar5523/ar5523.c:1038: warning: initialization from incompatible pointer type
/usr/src/modules/ar5523/ar5523.c: In function ‘ar5523_free_tx_cmds’:
/usr/src/modules/ar5523/ar5523.c:1120: error: implicit declaration of function ‘usb_buffer_free’
/usr/src/modules/ar5523/ar5523.c: In function ‘ar5523_alloc_tx_cmds’:
/usr/src/modules/ar5523/ar5523.c:1140: error: implicit declaration of function ‘usb_buffer_alloc’
/usr/src/modules/ar5523/ar5523.c:1142: warning: assignment makes pointer from integer without a cast
/usr/src/modules/ar5523/ar5523.c: In function ‘ar5523_alloc_rx_cmds’:
/usr/src/modules/ar5523/ar5523.c:1195: warning: assignment makes pointer from integer without a cast
Setting up SSH
I extracted the error message in the last step by enabling ssh so that I could use WinSCP to transfer the error log back to my Windows PC:
sudo service ssh start
I have found a couple of interesting leads on the driver:
ReplyDelete1) The missing USB functions have been renamed: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=073900a28d95c75a706bf40ebf092ea048c7b236
2) The driver I am working in is definitely for my WG111T which I was previously a little unsure about: http://osdir.com/ml/linux-wireless/2009-07/msg00993.htm
Hi, I've followed your instrunctions to compile gspca but I get stuck in a very similar point as you:
ReplyDeletemake -C /lib/modules/`uname -r`/build SUBDIRS=/home/pi/gspcav1-20071224 CC=cc modules
make[1]: Entering directory `/lib/modules/3.1.9+/build'
WARNING: Symbol version dump /lib/modules/3.1.9+/build/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/pi/gspcav1-20071224/gspca_core.o
/home/pi/gspcav1-20071224/gspca_core.c:37:26: error: linux/config.h: No such file or directory
/home/pi/gspcav1-20071224/gspca_core.c:54:27: error: asm/semaphore.h: No such file or directory
...
Hello !
ReplyDeleteI have the same problem as you with gspca drivers.
If you have found the solution can you share it ?
Thank you !
This comment has been removed by the author.
ReplyDeleteI am getting the same error when trying to port my module, I am now having to re-build the kernel from sources, that will be all night. Surely a Rasperry Pi being a comuter targeted at development should have all of this in the image? Or a seperate image for those that want to do more than scratch!
ReplyDeleteI agree that the lack of kernel packages is awkward.
DeleteThis command
ReplyDeletegit clone –depth 1 https://github.com/raspberrypi/linux.git
should be
git clone –-depth 1 https://github.com/raspberrypi/linux.git
Fixed - thanks :)
DeleteHi Friends,
ReplyDeleteIf you get get this error at the make mkproper stage:
Must give KDIR=/path/to/kernel/source
Then install these packages -
sudo apt-get install firmware-linux-nonfree kernel-package
Enjoy!!
Thanks for the tip!
Delete