Archive for the ‘debian’ tag
Building modules against installed kernel
I’ve been reading Linux Device Drivers 3rd for quite a long time, and once built a sacrifice system in VMWare. After I upgraded VMWare, the sacrifice kernel hangs, unable to discover root filesystem. It seems to be a driver issue. No matter how I compile my kernel, it hangs at the same place.
I finally give up, I don’t want to waste my time any more. Maybe I should just dump that 2.6.10 and try new ones. No need to
I have a Debian system working as my development system. I just need to install kernel header to get a module building environment.
# apt-get install linux-headers-`uname -r`
When it’s done, build directory should be found in
# ls -d /lib/modules/`uname -r`/build
Here is a handy Makefile for modules.
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Debian system-wide locale and timezone configuration
# dpkg-reconfigure locales # dpkg-reconfigure tzdata
Fix `apt-get update’ GPG Error
This is quite common when you add some non-official sources to ‘source.list’.
gpg --keyserver hkp://wwwkeys.eu.pgp.net --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv KEYID
Choose key server as you wish. The critical part is that we specify apt’s keyring, rather than creating our own. If we miss those key ring options, gpg(1) will create a folder .gnupg in home directory, which comes out to be our personal settings, not apt(8)’s.
Fix `apt-get update' GPG Error
This is quite common when you add some non-official sources to ‘source.list’.
gpg --keyserver hkp://wwwkeys.eu.pgp.net --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv KEYID
Choose key server as you wish. The critical part is that we specify apt’s keyring, rather than creating our own. If we miss those key ring options, gpg(1) will create a folder .gnupg in home directory, which comes out to be our personal settings, not apt(8)’s.