l e m m s t e r . d e
  • Home
  • impressum
  • talks
  • Categories
  • Tags
  • Archives

Cross-compile kernel module (ext2) for Samsung nx300 on Ubuntu 14.04

Manually download ’NX300 1.4 NX300.zip’ from http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=nx300

# Extract nx300.zip and nested nx300.tar.gz
root@melanogaster:/tmp/# unzip nx300.zip && tar xfz nx300.tar.gz

# Install necessary packages
root@melanogaster:/tmp/# apt-get install gcc-arm-linux-gnueabi u-boot-tools libncurses5-dev

# Create symlinks to gcc-arm-linux-gnueabi binaries because Makefiles refer to arm-none-linux...
# See http://stackoverflow.com/a/13798214 for background info
root@melanogaster:/tmp/# for f in /usr/bin/arm-linux-gnueabi-*; do echo $f && BASE=`basename $f` && ln -s $f /usr/local/bin/${BASE/arm-linux/arm-none-linux}; done

root@melanogaster:/tmp/TIZEN/build# make nx300_config && make
[...]

root@melanogaster:/tmp/TIZEN/build# cd ../packages/linux
root@melanogaster:/tmp/TIZEN/packages/linux# make menuconfig 
## 1. Set ext2 to be compiled as module "<M>"
## 2. Set CONFIG_LOCALVERSION="+" to make the module's 'vermagic' (see modinfo /path/to/compiled/ext2.ko) match the nx300's in .config (thx to http://www.cnx-software.com/2012/09/11/building-kernel-modules-for-allwinner-a10-devices-android/)

root@melanogaster:/tmp/TIZEN/packages/linux# make && make modules
[...]

root@melanogaster:/tmp/TIZEN/packages/linux# find . -iname *.ko
./drivers/video/backlight/backlight.ko
./drivers/video/backlight/generic_bl.ko
./drivers/net/wireless/ath/ath.ko
./drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko
./drivers/usb/gadget/g_ffs.ko
./fs/ext2/ext2.ko

# Copy ext2.ko to nx300

Published

Jun 9, 2014

Category

hacks

Contact

  • Powered by Pelican. Theme: Elegant