View Single Post
Old 05-27-2015, 04:25 AM   #5
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 457
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
OK, this is a long one, I tried to make all the instructions to compile a kernel for K4nt (I think I use Debian (Jessie) as my host. At the end, I am able to add whatever modules I want. I highly recommend building your own modules!

HOST:
apt-get install debootstrap qemu-user-static binfmt-support
dd if=/dev/zero of=debian_image.ext3 bs=1M count=10000
mkfs.ext3 debian_image.ext3
tune2fs -i 0 -c 0 debian_image.ext3
mkdir -p /mnt/debian
mount -o loop -t ext3 debian_image.ext3 /mnt/debian
mkdir -p /mnt/debian/usr/bin
cp /usr/bin/qemu-arm-static /mnt/debian/usr/bin

for me, I use an iso of Debian Wheezy armel: debian-7.7.0-armel-DVD-1.iso
mkdir /mnt/iso
mount debian-7.7.0-armel-DVD-1.iso /mnt/iso
debootstrap --arch=armel --variant=buildd --no-check-gpg wheezy /mnt/debian file:///mnt/iso/debian
mkdir -p /mnt/debian/mnt/iso
mount --bind /mnt/iso /mnt/debian/mnt/iso
leafpad /mnt/debian/etc/apt/sources.list
deb [ trusted=yes ] file:/mnt/iso/debian wheezy main contrib

or continue using the web:
debootstrap --arch=armel wheezy /mnt/debian http://ftp.us.debian.org/debian
mount -o bind /dev /mnt/debian/dev
mount -o bind /dev/pts /mnt/debian/dev/pts
mount -o bind /proc /mnt/debian/proc
mount -o bind /sys /mnt/debian/sys
chroot /mnt/debian /bin/bash

CHROOT:
apt-get update
apt-get install locales vim
dpkg-reconfigure locales *FYI I selected 138 (en_US.UTF-8)
vim /etc/apt/sources.list
deb http://ftp.us.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian wheezy main contrib non-free
apt-get update

FINALLY, here's the Kernel stuff!

HOST:
I downloaded and extracted the source, I think for Kindle4NT?? (Kindle_src_4.1.2_???)
then I copied the linux source to /mnt/debian/usr/src


CHroot:
apt-get install ncurses-dev
cd /usr/src
tar jxf linux-2.6.31.tar.bz2
cd linux-2.6.31
make imx50_tequila_defconfig

Here it gets interesting:
I downloaded source for Kindle Touch 5.1.0 and extracted to get a few files,
as per the Touch wiki.
from 5.1.0 for Touch:
copy these to the chroot usr/src/linux-2.6.31/include folder:
include/llog.h
include/linux/einkfb.h
include/boardid.h
** had to modify to add definition for finkle (just a hack to make it work,
I have NO IDEA what I'm doing this was to make the display driver compile,
and we don't need that anyway.
#define BOARD_ID_FINKLE "004"


then, in the chroot you should be able to:

make menuconfig
*** make any changes, make into modules ***
make modules

from here, it's up to you - install the modules to your image and copy from there or
whatever you want. Good luck!
Attached Files
File Type: zip modules.zip (873.4 KB, 261 views)

Last edited by brianinmaine; 05-27-2015 at 04:38 AM.
brianinmaine is offline   Reply With Quote