The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Community Workspace/kobo

From Mer Wiki
< Community Workspace(Difference between revisions)
Jump to: navigation, search
(kobo eReader Device Adaptation)
(kobo eReader Device Adaptation)
 
(2 intermediate revisions by one user not shown)
Line 102: Line 102:
  
 
== usb gadget ==
 
== usb gadget ==
 +
 +
=== manual setup ===
  
 
  insmod arcotg_udc.ko
 
  insmod arcotg_udc.ko
 
  insmod g_ether.ko
 
  insmod g_ether.ko
 
+
  ifconfig usb0 192.168.2.14
  ifconfig usb0 192.168.2.2
+
  
 
on pc
 
on pc
Line 116: Line 117:
 
if so then
 
if so then
  
  ifconfig usb0 192.168.2.1
+
  ifconfig usb0 192.168.2.15
  ssh nemo@192.168.2.2
+
  ssh nemo@192.168.2.14
 +
 
 +
=== automatic setup ===
 +
 
 +
Add
 +
 
 +
arcotg_udc
 +
g_ether
 +
ath6kl
 +
 
 +
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 192.168.2.14"
 +
 
 +
== 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.
  
 +
So the framebuffer is FB_VISUAL_STATIC_PSEUDOCOLOR
 +
 
== Usefull Links ==
 
== Usefull Links ==
  

Latest revision as of 16:20, 17 February 2013

Contents

[edit] kobo eReader Device Adaptation

[edit] 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

[edit] 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

[edit] 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/getty.target.wants/getty@ttymxc0.service

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

Kobo.jpg

[edit] Qt5

https://wiki.merproject.org/wiki/Zephyr#Steps_to_create_Zephyr_livecd_image_.28without_OpenGL_support.29

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

Kobo2.jpg

[edit] usb gadget

[edit] manual setup

insmod arcotg_udc.ko
insmod g_ether.ko
ifconfig usb0 192.168.2.14

on pc

lsusb

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

if so then

ifconfig usb0 192.168.2.15
ssh nemo@192.168.2.14

[edit] automatic setup

Add

arcotg_udc
g_ether
ath6kl 

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 192.168.2.14"

[edit] 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.

So the framebuffer is FB_VISUAL_STATIC_PSEUDOCOLOR

[edit] Usefull Links

http://bricoles.du-libre.org/doku.php/kobo:la_page_kobo
https://twitter.com/magoroku15/status/232885549436923905
http://a3nm.net/blog/fnacbook_kobo_more_hacking.html
http://petit-noise.net/blog/20120802/kobo-touch%E3%81%ABusb%E3%82%B7%E3%83%AA%E3%82%A2%E3%83%AB%E3%82%92%E7%B9%8B%E3%81%92%E3%82%8B
https://wiki.merproject.org/wiki/Adaptation_Guide/Step_by_step#Make_an_image
http://a-hackers-craic.blogspot.co.uk/2012/04/kobo.html
Personal tools