Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

View Poll Results: Was this helpful?
Yes 0 0%
No 0 0%
Voters: 0. You may not vote on this poll

Reply
 
Thread Tools Search this Thread
Old Yesterday, 08:24 PM   #1
finitelife
Junior Member
finitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enough
 
Posts: 2
Karma: 500
Join Date: Sep 2014
Device: PaperWhite
PaperWhite 1 Kernel Build Walkthrough

Long time listener, first time caller:

Since I couldn't find much specific info concerning the PaperWhite here (yes I know its a K5... kinda), I decided to share my current progress on building the kernel and modules. The end goal is to have OTG host mode, bluetooth, audio, and thumb drive support. That should keep me happy. Once I make some headway with this I will be posting an end to end walkthrough for the PW1. It will be from demo/brick/serial to jailbreak to kindlets to kual to root to optware to OTG to bt/sound/thumb. What I need from you people now is some guidance.

Here we go:

Note: your toolchain/build directory may be different. I hope its obvious what you have to change in that case. The steps should remain the same.

Base operating system: Slackware64 14.1 (right?)
  1. Download the required files
    Quote:
    #go to your home directory
    cd ~
    #download the Kindle source files (5.4.4.2)
    wget https://kindle.s3.amazonaws.com/Kind...3310003.tar.gz
    #download a simple arm toolchain
    wget https://sourcery.mentor.com/GNUToolc...ux-gnu.tar.bz2
  2. Extract the files and move into the build root
    Quote:
    #extract your toolchain
    tar xf arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
    #extract the kindle sources
    tar xf Kindle_src_5.4.4.2_2323310003.tar.gz
    #move into the build root
    cd gplrelease
  3. Build uBoot's mkimage
    Quote:
    #make and move into our uBoot build root
    mkdir uboot; cd uboot
    #extract uBoot sources to our location
    tar xf ../uboot_2009.08.tar.gz
    #set up our uBoot for our board
    make imx50_yoshi_config
    #make the tools (we only need mkimage)
    make CROSS_COMPILE=~/arm-2014.05/bin/arm-none-linux-gnueabi- tools
    #exit the uBoot build root
    cd ..
  4. Set up the Linux build
    Quote:
    #make and move into our Linux build root
    mkdir linux; cd linux
    #extract the linux sources to our location
    tar xf ../linux-2.6.31.tar.gz
    #set up the kernel for our board (it could also be yoshi or yoshime, comments appreciated)
    make ARCH=arm imx50_yoshime3_defconfig
    #configure the kernel options (I like menuconfig, but config, etc, also work)
    make ARCH=arm menuconfig
  5. Kernel Configuration Notes (full .config attached 'pw1.config.tar')
    Quote:
    #Here are my working changes:
    CONFIG_NET_IPIP=m
    CONFIG_NET_IPGRE=m
    CONFIG_NET_IPGRE_BROADCAST=y
    CONFIG_IPV6=m

    CONFIG_BT=m
    CONFIG_BT_L2CAP=m
    CONFIG_BT_RFCOMM=m
    CONFIG_BT_RFCOMM_TTY=y
    CONFIG_BT_HIDP=m
    CONFIG_BT_HCIBTUSB=m

    CONFIG_TUN=m

    CONFIG_SOUND=m
    CONFIG_SND=m
    CONFIG_SND_SEQUENCER=m
    CONFIG_SND_MIXER_OSS=m
    CONFIG_SND_PCM_OSS=m
    CONFIG_SND_DUMMY=m
    CONFIG_SND_USB_AUDIO=m

    CONFIG_HID_SUPPORT=y

    CONFIG_USB_DEBUG=y
    CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
    CONFIG_USB_GADGET_DEBUG_FILES=y
    CONFIG_USB_GADGET_DEBUG_FS=y
    CONFIG_USB_OTG=y
    CONFIG_USB_AUDIO=m
    CONFIG_USB_GADGETFS=m
    CONFIG_USB_G_SERIAL=m
    CONFIG_USB_MIDI_GADGET=m
    CONFIG_USB_GPIO_VBUS=m
    CONFIG_NOP_USB_XCEIV=m

    CONFIG_EXT4_FS=m
    CONFIG_EXT4DEV_COMPAT=y
    CONFIG_NTFS_FS=m
    CONFIG_NTFS_DEBUG=y
    CONFIG_NTFS_RW=y
  6. Fix the broken config includes (comments appreciated)
    Quote:
    #disable yoshime hall sensor (CONFIG_YOSHIME_HALL=n),
    #as the required header is missing (lab126_hall.h)

    perl -pi -e 's/CONFIG_YOSHIME_HALL=y/CONFIG_YOSHIME_HALL=n/g' .config
    #disable yoshime front light (CONFIG_YOSHIME_FL=n),
    #as the required header is missing (yoshime_fl_int.h)

    perl -pi -e 's/CONFIG_YOSHIME_FL=y/CONFIG_YOSHIME_FL=n/g' .config

    #patch mx50_yoshime.c to respect CONFIG_YOSHIME_HALL=n
    perl -pi -e 's/#include <linux\/lab126_hall.h>/#ifdef CONFIG_YOSHIME_HALL\n #include <linux\/lab126_hall.h>\n#endif/g' arch/arm/mach-mx5/mx50_yoshime.c
    #patch mx50_yoshime.c to respect CONFIG_YOSHIME_FL=n
    perl -pi -e 's/#include <mach\/yoshime_fl_int.h>/#ifdef CONFIG_YOSHIME_FL\n #include <mach\/yoshime_fl_int.h>\n#endif/g' arch/arm/mach-mx5/mx50_yoshime.c

    #[B]TEMPORARY FIX[\B] - disable the E-Ink panel because of a broken include in the source/toolchain
    #I am currently looking into this issue
    #this will result in a kernel without display modules, and possibly a brick if you aren't careful
    #ASSISTANCE REQUESTED

    perl -pi -e 's/FB_MXC_EINK_PANEL=m/FB_MXC_EINK_PANEL=n/g' .config
  7. BACK UP YOUR .config
    Quote:
    #just copy your kernel config to outside the build root
    cp .config ../pw1.config
  8. Compile the kernel and modules
    Quote:
    #make the uImage kernel
    make ARCH=arm CROSS_COMPILE=~/arm-2014.05/bin/arm-none-linux-gnueabi- PATH=${PATH}:~/gplrelease/uboot/tools uImage
    #make the modules
    make ARCH=arm CROSS_COMPILE=~/arm-2014.05/bin/arm-none-linux-gnueabi- targz-pkg
  9. TODO- Update broken modules.dep (not really important)
  10. You now have a file named linux-2.6.31-rt11-lab126.tar.gz containing the kernel and modules (mine is attached 'linux-2.6.31-rt11-lab126.tar.gz', don't blame me if you use it). I will edit to add how to load this onto your kernel shortly, but if you are doing this process you really should know how already.
  11. ???
  12. Brick or Profit

My questions now are:
  • Should I be configuring yoshi, yoshime, yoshime3, or something else?
  • Anyone have 'linux/lab126_hall.h'?
  • Anyone have 'mach/yoshime_fl_int.h'?
  • Any ideas on the FB_MXC_EINK_PANEL problem?
  • Does the PaperWhite 1 (i.MX508?) support OTG host mode?
  • How do I sense/manually trigger OTG host mode?
  • Is there a preferred way to load the kernel+modules on my Kindle so as to not brick it repeatedly?

Special thanks to MadMouse on HackThisSite IRC for the moral support, and shared coffees/cigarettes!

Last edited by finitelife; Yesterday at 08:27 PM.
finitelife is offline   Reply With Quote
Old Yesterday, 09:11 PM   #2
Glorfindel
Wizard
Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.
 
Glorfindel's Avatar
 
Posts: 2,414
Karma: 2330800
Join Date: Feb 2014
Location: Valinor
Device: Kindle 4 w/SO
I think you will get more help/interest in the Kindle Developer's Corner
Glorfindel is offline   Reply With Quote
Old Yesterday, 11:09 PM   #3
finitelife
Junior Member
finitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enoughfinitelife will become famous soon enough
 
Posts: 2
Karma: 500
Join Date: Sep 2014
Device: PaperWhite
oh shoot, can a mod move this please?
finitelife is offline   Reply With Quote
Old Today, 02:42 AM   #4
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,641
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by finitelife View Post
oh shoot, can a mod move this please?
You can use the report button on the first post () to reach a mod.
thomass is offline   Reply With Quote
Old Today, 08:38 AM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 4,904
Karma: 4492229
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2
For a PW1, probably yoshime or yoshime3 (yoshi is the Touch).

(cf. KindleTool).
NiLuJe is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo Aura HD - Linux Walkthrough - Registration bypass linux.kobo.user Kobo Reader 10 09-23-2013 06:59 PM
Conversion walkthrough needed bigbro69 Conversion 5 03-29-2013 10:46 PM
PRS-T1 How-to: Compiling the kernel and kernel modules altruizine Sony Reader Dev Corner 9 09-03-2012 09:12 PM
How to root your Nook -- easiest step by step walkthrough with pictures RockdaMan Nook Developer's Corner 2 12-29-2010 12:42 PM
iPhone Great iOS4 Walkthrough kjk Apple Devices 5 06-19-2010 04:48 PM


All times are GMT -4. The time now is 08:38 AM.


MobileRead.com is a privately owned, operated and funded community.