WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: script to prepare kernel 64 for compiling modules  (Read 2561 times)

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
script to prepare kernel 64 for compiling modules
« on: March 15, 2011, 05:23:06 PM »
it downloads, extracts and prepares linux source using toolchain64 cross compiler

Code: [Select]
./module-prepare.sh
after that you should be able to compile modules by running

Code: [Select]
export PATH=/usr/local/x64/bin:$PATH
make -C /path/to/linux M=$PWD ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux-gnu- modules

use strip of cross compiler for stripping unneccessary debugging symbols
Code: [Select]
find -type f -name "*.ko" -exec x86_64-unknown-linux-gnu-strip --strip-unneeded {} \;
also you can compress modules
Code: [Select]
find -type f -name "*.ko" -exec gzip {} \;

« Last Edit: March 16, 2011, 10:41:09 AM by Arslan S. »