Nokia N900 >> Sbox

build kernel(power53)


多虧有Pali以及社群的努力下,讓N900的Kernel增添許多新功能,如:USB Host功能,讓N900的生命力可以繼續延伸,而該改版的Kernel稱為Kernel Power,目前最新版的版號為Kernel Power53,如想自己動手編譯,可以參考如下方式:

$ sudo apt-get install make libncurses5-dev gcc sdk-fiasco-gen wl1251-maemo-source
$ cd /usr/src
$ sudo apt-get source kernel-power

編譯Kernel

$ cd kernel-2.6.28-2.6.28
$ sudo vim debian/rules
  cd $(BUILDTMP) && tar -jxvf /usr/src/compat-wireless-2.6.tar.bz2
  cd $(BUILDTMP) && tar -jxvf /usr/src/compat.tar.bz2
  cd $(BUILDTMP) && tar -jxvf /usr/src/wireless-testing.tar.bz2

$ sudo dpkg-buildpackage -b -rfakeroot
$ sudo vim debian/build/compat-wireless-2.6/config.mk +26
  #$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
  CONFIG_COMPAT_KERNEL_29 = y
  CONFIG_COMPAT_KERNEL_30 = y
  CONFIG_COMPAT_KERNEL_31 = y
  CONFIG_COMPAT_KERNEL_32 = y
  CONFIG_COMPAT_KERNEL_33 = y
  CONFIG_COMPAT_KERNEL_34 = y
  CONFIG_COMPAT_KERNEL_35 = y
  CONFIG_COMPAT_KERNEL_36 = y
  CONFIG_COMPAT_KERNEL_37 = y
  CONFIG_COMPAT_KERNEL_38 = y

$ sudo dpkg-buildpackage -b -nc -rfakeroot

更新Kernel和Modules(需要安裝UBoot)

$ sudo cp arch/arm/boot/zImage /opt/boot/zImage-2.6.28.10-power53
$ sudo INSTALL_MOD_PATH="/lib/modules/2.6.28.10-power53" sudo make modules_install
$ sudo find /lib/modules/2.6.28.10-power53/ -name *.ko -exec strip --remove-section=.comment --remove-section=.note --strip-unneeded {} \;
$ sudo vim /etc/bootmenu.d/30-Maemo5-power53.item 
  ITEM_NAME="Maemo 5 with kernel-power 2.6.28.10-power53"
  ITEM_KERNEL="2.6.28.10-power53"
  ITEM_OMAPATAG="1"

$ u-boot-update-bootmenu
$ sudo reboot


返回上一頁