Differences

This shows you the differences between the selected revision and the current version of the page.

howto:kernel_build 2007/08/09 02:37 howto:kernel_build 2017/09/06 17:34 current
Line 2: Line 2:
This procedure was develped under Ubuntu Dapper, but it is believed to work on most Linux distributions. This procedure was develped under Ubuntu Dapper, but it is believed to work on most Linux distributions.
-To build a new kernel, source for the kernel and build tools needs to be obtained.  These sources are available from a number of places.  The sources for the individual packages are available from [[ftp://ftp.dlink.com/GPL/DSMG-600_reB/]]+To build a new kernel, source for the kernel and build tools needs to be obtained.  These sources are available from a number of places.  The sources for the individual packages are available from [[ftp://ftp.dlink.com/GPL/DSM-G600_reB/]]
.  The sources are also available at [[http://tsd.dlink.com.tw/GPL.asp]] as a single file containing all the released sources, though you need do a little navigation to get them. .  The sources are also available at [[http://tsd.dlink.com.tw/GPL.asp]] as a single file containing all the released sources, though you need do a little navigation to get them.
Line 66: Line 66:
  ifneq ($(filter $(TARGETS),kernel-headers),)   ifneq ($(filter $(TARGETS),kernel-headers),)
   
-  LINUX_SITE:=http://www.uclibc.org/downloads/toolchain+  -LINUX_SITE:=http://www.uclibc.org/downloads/toolchain 
 +  +LINUX_SITE:=http://www.uclibc.org/downloads/old-releases/toolchain/
  -LINUX_SOURCE:=kernel-headers-2.4.21.tar.bz2   -LINUX_SOURCE:=kernel-headers-2.4.21.tar.bz2
  +LINUX_SOURCE:=kernel-headers-2.4.25.tar.bz2   +LINUX_SOURCE:=kernel-headers-2.4.25.tar.bz2
Line 155: Line 156:
  make Sandpoint8245_config;make all   make Sandpoint8245_config;make all
  cp tools/mkimage /opt/uclibc-powerpc/gcc-2.95/bin/   cp tools/mkimage /opt/uclibc-powerpc/gcc-2.95/bin/
 +
 +
Line 161: Line 164:
Verify your path, execute the following command: Verify your path, execute the following command:
  powerpc-linux-uclibc-gcc --version   powerpc-linux-uclibc-gcc --version
-this should print ''"2.95.4"'' if the correct compiler is in your path.  If it prints some number that does not begin with ''2.95'' you will need to figure out how to remove the extra dircetory from your path, if it prints ''"command not found"'' run:+this should print ''"2.95.4"'' if the correct compiler is in your path.  If it prints some number that does not begin with ''2.95'' you will need to figure out how to remove the extra directory from your path, if it prints ''"command not found"'' run:
  export PATH=$PATH:/opt/uclibc-powerpc/gcc-2.95/bin   export PATH=$PATH:/opt/uclibc-powerpc/gcc-2.95/bin
-Make sure that the directory /tftpboot exists and is writable, then in the directory containing the source tarfiles:+Make sure that the directory /tftpboot exists and is writeable, then in the directory containing the source tarfiles:
  tar zxvf ppclinux.tar.gz;cd ppclinux   tar zxvf ppclinux.tar.gz;cd ppclinux
Run the D-Link provided script Run the D-Link provided script
Line 170: Line 173:
And Build the kernel And Build the kernel
  make oldconfig;make clean;make dep;make pImage   make oldconfig;make clean;make dep;make pImage
-At this point, there should be a file named ''pImage'' in the directory ''/tftpboot'', this is a u-boot-able kernel image. (For a loader.o loadable kernel, do the following, instead:+At this point, there should be a file named ''pImage'' in the directory ''/tftpboot'', this is a u-boot-able kernel image. 
 + 
 +For a loader.o loadable kernel, the build procedure is slightly different. First, check [[howto:hdd_boot|How to install a root file system to a Hard Disk]] for some additional kernel patches.  Then,
  make oldconfig;make clean;make dep;make   make oldconfig;make clean;make dep;make
  powerpc-linux-objcopy -O binary vmlinux   powerpc-linux-objcopy -O binary vmlinux
Line 179: Line 184:
  make modules_install INSTALL_MOD_PATH=/tftpboot   make modules_install INSTALL_MOD_PATH=/tftpboot
The installation command will "fail" because it will attempt to use your buildhost's 'depmod' utility to construct a modules.dep file.  However, the modules themselves will be installed into /tftpboot/lib/modules/2.4.21-pre4/.  Also, do not be surprised that the default .config builds several inappropriate wireless drivers (orinoco, hermes): these can't be used by the dsmg600 (unless you happen to have a miniPCI card supported by those drivers, and swap out the shipped Ralink RT2560). The installation command will "fail" because it will attempt to use your buildhost's 'depmod' utility to construct a modules.dep file.  However, the modules themselves will be installed into /tftpboot/lib/modules/2.4.21-pre4/.  Also, do not be surprised that the default .config builds several inappropriate wireless drivers (orinoco, hermes): these can't be used by the dsmg600 (unless you happen to have a miniPCI card supported by those drivers, and swap out the shipped Ralink RT2560).
 +----
 +====== Related Forum Threads ======
 +http://dns323.kood.org/forum/t46-linux-kernel.html
 +

Personal Tools