The Mer Wiki now uses your Mer user account and password (create account on

Community Workspace/kobo

From Mer Wiki
Jump to: navigation, search


kobo eReader Device Adaptation

SDcard Partitions

[vgrade@quad original-sdcard-image]$ sudo fdisk -l /dev/sde
Disk /dev/sde: 1977 MB, 1977614336 bytes
4 heads, 16 sectors/track, 60352 cylinders, total 3862528 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
/dev/sde1           19456      543744      262144+  83  Linux
/dev/sde2          543745     1068033      262144+  83  Linux
/dev/sde3         1068034     3862527     1397247    b  W95 FAT32
sde1 - rootfs
sde2 - recovery rootfs
sde3 - partion for storing books
two sdcard slots  - mmcblk0 = internal slot, mmcblk1 = external slot

Backup sdcard

sudo dd if=/dev/sde of=kobo-touch-sde.raw bs=1M

In /usr/local/Kobo/udev/sd following code checks for hardware version

if [ `dd if=/dev/mmcblk0 bs=512 skip=1024 count=1 | grep -c "HW CONFIG"` == 1 ]; then

if [ -e /drivers/ntx508 ]; then PLATFORM=ntx508

So I have ntx508 platform device. Well I thought I did. Looking at the chip its imx507

Create a bootable sdcard

Now try to see if we can create sdcard to boot existing firmware from external slot. Needs uboot config + filesystem changes mmcblk0/1 + kernel command line

rootfs/etc/u-boot/ntx508 has u-boot.mmc and u-boot.recovey files

So process is as follows

dd if=u-boot.bin of=/dev/$DEVICE bs=1K seek=1 skip=1
dd if=waveform.header of=$DEVICE bs=512 seek=14335
dd if=waveform of=/dev/$DEVICE bs=512 seek=14336
dd if=uImage of=/dev/$DEVICE bs=512 seek=2048

make a basic mer image with mer-core-armv7l-xorg-basic-qmlviewer.ks

mic cr fs mer-core-armv7l-xorg-basic-qmlviewer.ks ...

copied fs image onto sdcard p1 after increasing its size

sudo tar --numeric-owner -xf kobo.tar.b2.tar -C /run/media/vgrade/rootfs

boots this filesystem but got errors

Failed to mount /dev:No such device
Failed to open /dev/kmsg for logging: No such file or directoy

Typical systemd errors. So we need a new kernel. Get kernel from git Get kernel config from running device /proc/config.gz

Test build kernel with options from device flash to sdcard test

make ARCH=arm CROSS_COMPILE=~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- uImage
make ARCH=arm CROSS_COMPILE=~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules
make ARCH=arm CROSS_COMPILE=~/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules_install INSTALL_MOD_PATH=[path to rootfs]
dd if=uImage of=/dev/$DEVICE bs=512 seek=2048

boots ok, but extra "epdc_init_sequence(994) : epd_power_on request fail !" message

Edit .config for mer systemd options Build kernel with options from device + Mer options flash to sdcard test - boots kernel then nothing on serial or screen- Check logs on sdcard.

xorg log looks good. need to enable a terminal session on serial so I can log in

ln -s lib/systemd/system/getty@.service lib/systemd/system/

good we have a terminal

but the error we had with this kernel source "epd_power_on request fail !" is saying that the eink display has no power.

Using the right kernel (imx507) source managed to get qmlviewer up



Kickstart file here File:Nogl-armv7l.ks

sudo mic create fs nogl-arm7l-vm.ks --arch=armv7l --pack-to=nogl.tar.bz2
export XDG_RUNTIME_DIR=/tmp


usb gadget

manual setup

insmod arcotg_udc.ko
insmod g_ether.ko
ifconfig usb0

on pc


should get Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

if so then

ifconfig usb0
ssh nemo@

automatic setup



To /etc/modules-load.d/kobo.conf

Add following udev rule to /etc/udev/rules.d/usb-gadget-up.rules

ACTION=="add",DEVPATH=="/devices/platform/usb_host",SUBSYSTEM=="platform",RUN+="/sbin/ifconfig usb0"

framebuffer research

[root@localhost qwidget-compositor]# /fbdev-test  -f /dev/fb0 
Device /dev/fb0 opened: mxc_epdc_fb
--- Fixed screen info ---
Type:          Packed Pixels
Visual:        Pseudo Color (read-only)
Chip/card:     no hardware accelerator
Memory:        2179072 bytes @0x75000000
X Pan Step:    1
Y Pan Step:    1
Line Length:   800 bytes
--- Variable screen info ---
Resolution:            800x600
Virtual Resolution:    800x1280
X/Y Offset:            (6,0)
Size:                  4294967295mm x 4294967295mm
FB memory mapped at 0x2aab2000
Error: test pattern is only supported for true color and fourcc visuals.


Usefull Links
Personal tools