This page describes the process of compiling the Linux kernel version 3.18.12 for the IGEPv2 RC4 board that I own.
It includes compilation details not only for the kernel but also for the newer version of U-Boot SPL that doesn't need the TI X-Loader as its first stage loader.
ISEE, the company that manufactures the IGEP boards, only provides kernels versions 2.6.35 and 2.6.37 and those are not recent enough to run a mainstream distribution like Debian on your IGEPv2 board with all the security fixes that come out periodically.
Disclaimer: The process described on this page works very well for me and didn't destroy my IGEPv2 or my computer, but everything on this page is provided without any warranty. You may download the kernel and U-Boot already compiled on the next section or in alternative feel free to compile your own by following the instructions.
Here are the binary files you'll need to place in the boot partition of your SD card and the linux kernel source. You don't need to go through the entire build process unless you wish to add extra features to the kernel.
All you need to start using the new kernel is here in the downloads section:
kernel source (optional) | kernel zImage | modules | dtb | uEnv.txt script | extras |
linux-3.18.12.tar.xz | zImage-3.18.12 | modules-3.18.12.tar.xz | omap3-igep0020.dtb | uEnv.txt |
+ samba |
u-boot SPL | u-boot main uImage | uEnv.txt script generic |
MLO | u-boot.img | uEnv.txt |
LED usage example | Enable audio example |
setleds.sh | enable_sound.sh |
I installed Debian Wheezy using their net-install (link no longer works, see end of paragraph) ISO on a VirtualBox VM with 512M RAM and 10GB HDD to reduce the probability of making mistakes while using the crosscompile toolchain, but it's also possible to crosscompile on a physical system if you have one available. Debian no longer provides a working link to download Wheezy but you can use the newer version Jessie 8.2.0 as well.
To get the crosscompiler toolchain, I went to the Linaro website and downloaded their gnueabihf most recent build (at the time of writing): gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz which I extracted to /usr/src/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux and included its bin/ it in the search path.
cd /usr/src
mkdir build-target
tar xvlf gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz
export PATH=/usr/src/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin:$PATH
Like the crosscompiler, the Linux kernel was also extracted at /usr/src
cd /usr/src
tar xvlf linux-3.18.12.tar.xz
cd linux-3.18.12
Now edit the file "arch/arm/configs/omap2plus_defconfig" and paste the following parameters at the bottom:
CONFIG_DMA_SHARED_BUFFER=y
CONFIG_MTD_NAND_BCH=y
CONFIG_MTD_NAND_ECC_BCH=y
CONFIG_MTD_NAND_OMAP_BCH=y
CONFIG_I2C_ALGOBIT=m
CONFIG_MFD_OMAP_USB_HOST=y
CONFIG_DRM=m
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_GEM_CMA_HELPER=y
CONFIG_DRM_KMS_CMA_HELPER=y
CONFIG_DRM_I2C_NXP_TDA998X=m
CONFIG_DRM_OMAP=m
CONFIG_DRM_OMAP_NUM_CRTCS=1
CONFIG_DRM_TILCDC=m
CONFIG_HDMI=y
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=m
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_USB_OTG=y
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_HCD_OMAP=m
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_DUAL_ROLE=y
CONFIG_USB_MUSB_OMAP2PLUS=m
CONFIG_USB_MUSB_DSPS=m
CONFIG_USB_MUSB_AM335X_CHILD=m
CONFIG_MUSB_PIO_ONLY=y
CONFIG_AM335X_CONTROL_USB=m
CONFIG_AM335X_PHY_USB=m
CONFIG_TWL4030_USB=m
CONFIG_BCH=y
Search and comment out any repeated value from the file.
Apply the configuration and request the menuconfig target to continue with the configuration:
make ARCH=arm omap2plus_defconfig
make ARCH=arm menuconfig
Activate the options indicated below if they are not active (some are already active but verify them anyway)
Device Drivers
[*] LED Support --->
<*> Led Class Support
<*> LED Support for GPIO connected LEDs
[*] LED Trigger support --->
<*> LED One-shot Trigger
<*> LED Heartbeat Trigger
General setup --->
<*> open by handle at
Networking support --->
Wireless --->
[*] cfg80211 wireless extensions compatibility
File systems --->
<M> Reiserfs support
[*] Network File Systems --->
<M> CIFS support (advanced network filesystem, SMBFS successor)
[*] Support legacy servers which use weaker LANMAN security
Device Drivers --->
<*> Multimedia support --->
[*] Cameras/video grabbers support
[*] Media USB Adapters --->
<M> USB Video Class (UVC)
[*] UVC input events device support
<M> GSPCA based webcams --->
(none selected but you may have one of the cameras listed)
<M> USB Philips Cameras
[*] USB Philips Cameras input events device support
Device Drivers --->
[*] USB support --->
<M> USB Serial Converter support --->
<M> USB FTDI Single Port Serial Driver
<M> USB Prolific 2303 Single Port Serial Driver
Exit saving the configuration and start the compilation
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/usr/src/build-target/ modules_install
Finally copy the kernel zImage and the Device Tree Blob file to build-target directory and compress the modules:
cp -p arch/arm/boot/zImage ../build-target
cp -p arch/arm/boot/dts/omap3-igep0020.dtb ../build-target
cd ../build-target
tar -cf - lib/ | xz -c - > modules-3.18.12.tar.xz
mv zImage zImage-3.18.12
And you shall have 3 files:
The bootloader was cloned from its git repository and then a specific version was checked out because the HEAD on 2015/01 didn't create an u-boot.img that works on the IGEPv2. The revision a176ff0705351bf6d993a8f15e081bfa2ba2e1af works fine (v2014.07-rc4).
cd /usr/src
git clone git://git.denx.de/u-boot.git
cd u-boot
git checkout a176ff0705351bf6d993a8f15e081bfa2ba2e1af
make CROSS_COMPILE=arm-linux-gnueabihf- igep0020_config
make CROSS_COMPILE=arm-linux-gnueabihf-
cp -p MLO u-boot.img ../build-target
Now you should have the following list of file in build-target
I'm using almost the same file found on this page but I changed the resolution to 1440x900.
fdtaddr= 0x81600000
kernel_file=zImage-3.18.12
fdtfile=omap3-igep0020.dtb
bootargs='console=ttyO2,115200n8 console=tty0 video=DVI-D-1:1440x900MR-16@60 omapfb.mode=dvi:1440x900MR-16@60 omapdss.def_disp=dvi omapfb.vram=0:8M,1:8M,2:8M vram=24M smsc911x.mac=0x5c,0xda,0xd4,0x3d,0x2f,0x08 mpurate=800 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 fixrtc'
loadzimage=load mmc 0:1 ${loadaddr} ${kernel_file}
loadfdt=load mmc 0:1 ${fdtaddr} ${fdtfile}
setenvargs=setenv bootargs ${bootargs}
uenvcmd=run loadzimage; run loadfdt; run setenvargs; bootz ${loadaddr} - ${fdtaddr}
I added the omapfb.vram, vram and video parameters to prevent the kernel Oops error on omapdrm.ko due to the lack of configuration on the omapfb.ko (omapfb.vram, vram) and omapdrm.ko itself (video).
Save as text file (in UNIX mode) and place it also on build-target.
Copy all files from build-target to the boot partition of the SD card. Don't forget uEnv.txt.
Uncompress the modules-3.18.12.tar.xz file into the rootfs partition at /. It should write all modules in /lib/modules/3.18.12.
Compilation related
DVI/HDMI related
WIFI
Published on Tuesday 2015/01/13, last modified on Monday 2016/01/04