Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kobo Clara HD #4

Open
phodina opened this issue Nov 15, 2021 · 27 comments
Open

Kobo Clara HD #4

phodina opened this issue Nov 15, 2021 · 27 comments

Comments

@phodina
Copy link

phodina commented Nov 15, 2021

Hi,

does Inkbox run on Kobo Clara HD EInk reader?

@tux-linux
Copy link
Contributor

Not yet, sorry. I need testers!

@phodina
Copy link
Author

phodina commented Dec 3, 2021

Is there a way how to test it? I do own one and would be more than willing to help.

@tux-linux
Copy link
Contributor

tux-linux commented Dec 4, 2021 via email

@phodina
Copy link
Author

phodina commented Dec 8, 2021

That's actually why I got the device.

Is there a guide on where on the SDCard to put the Inkbox?

Soldering is not a problem.

kobo-clara

@them1ghtydill
Copy link
Contributor

image
This is the SD card, so basically you download the image and flash the image to the SD card, but be warned that this will completely overwrite anything on the SD card ;p

@tux-linux
Copy link
Contributor

@phodina You first need to hook up your Kobo to a working serial console because we'll have to debug kernels and U-Boot. There is no already-made image for this device, we have to start from scratch.
Thanks for contributing and let me know when you're ready !

@phodina
Copy link
Author

phodina commented Dec 9, 2021

Thanks for the information. There is postmarketos image here
I've backed up the image and plan to solder headers and attach serial to USB converter.

FIY The eink diplay configuration is placed in the beginning of the sdcard so backup is important

@tux-linux
Copy link
Contributor

tux-linux commented Dec 9, 2021 via email

@tux-linux
Copy link
Contributor

Hello, I was wondering if you got some progress with serial. Thanks !

@phodina
Copy link
Author

phodina commented Jan 5, 2022

@tux-linux Yes I got it working though there was some delay due to Christmas.

reboot: Power down


U-Boot 2016.03-00038-g4a92f9d (Jun 04 2018 - 14:20:13 +0800)

CPU:   Freescale i.MX6SLL rev1.1 996 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 39C
Reset cause: POR
Board: MX6SLL LPDDR2 NTX
I2C:   ready
DRAM:  512 MiB
__get_sd_number(),cfg23=1,cfg24=0
force_idle_bus: sda=1 scl=0 sda.gp=0x4d scl.gp=0x4c
force_idle_bus: sda=0 scl=0 sda.gp=0x4f scl.gp=0x4e
force_idle_bus: sda=1 scl=0 sda.gp=0x56 scl.gp=0x55
MMC:   board_mmc_init() : isd=1
board_mmc_init() : wifi=2
FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
ntx_hw_early_init() 0
ram p=80000000,size=536870912
switch to partitions #0, OK
mmc0 is current device
mmc read 0x9ffffe00 0x3ff 0x1

MMC read: dev # 0, block # 1023, count 1 ... 1 blocks read: OK
mmc read 0x9ffffe00 0x400 0x1

MMC read: dev # 0, block # 1024, count 1 ... 1 blocks read: OK
ntx_hw_late_init()
mmc read 0x9ffffc00 0x1 0x1

MMC read: dev # 0, block # 1, count 1 ... 1 blocks read: OK
NTXSN not avalible !
ntx_gpio_get_value(402) : error parameter ! null ptr !
ntx_config_fastboot_layout():10 binaries partition added
ntx_config_fastboot_layout():3 mbr partition added
check_and_clean: reg 0, flag_set 0
Fastboot: Normal
Net:   CPU Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
mmc read 0x80800000 0x800 0x2400

MMC read: dev # 0, block # 2048, count 9216 ... 9216 blocks read: OK
Booting from mmc ...
mmc read 0x83000000 0x505 0x1

MMC read: dev # 0, block # 1285, count 1 ... 1 blocks read: OK
dtb size = 33718@83000000
mmc read 0x83000000 0x506 0x47

MMC read: dev # 0, block # 1286, count 71 ... 71 blocks read: OK

 hwcfgp=9ffffe00,pcb=74,customer=9

ntx_gpio_get_value(402) : error parameter ! null ptr !
ESDin=0,UPGKey=-1,PWRKey=0,USBin=0x0,BootESD=0,MenuKey=0
mmc read 0x9ffffc00 0x37ff 0x1

MMC read: dev # 0, block # 14335, count 1 ... 1 blocks read: OK
mmc read 0x9fd6f400 0x3800 0x1485

MMC read: dev # 0, block # 14336, count 5253 ... 5253 blocks read: OK
mmc read 0x9fd6f200 0x405 0x1

MMC read: dev # 0, block # 1029, count 1 ... 1 blocks read: OK
[WARNING] Binaries load sequence should Lo->Hi !
mmc read 0x9fd6ce00 0x406 0x13

MMC read: dev # 0, block # 1030, count 19 ... 19 blocks read: OK
Kernel RAM visiable size=509M->509M
hwcfg rootfstype : 2
hwcfg partition type : 2
Kernel image @ 0x80800000 [ 0x000000 - 0x44e8d0 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300b3b5

Starting kernel ...

i2c i2c-1: Device probe no ACK , retry 1/10 ...
tps6518x-pmic tps6518x-pmic: request vcom gpio failed (-16)!
tps6518x-pmic tps6518x-pmic: request powerup gpio failed (-16)!
tps6518x 1-0068: tps6518x int workqueue creating failed !
syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 8002158c ntx_machine_poweroff
PMU: ricoh61x_battery_probe : version is RICOH61x_BATTERY_VERSION: 2014.02.21 V3.1.0.0-Solution1 2015/02/09
cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
EPDC_QoS not supported on this platform !
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
1+0 records in
1+0 records out
512 bytes (512B) copied, 0.000327 seconds, 1.5MB/s
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
cannot open /dev/null
dosfsck 3.0.6, 04 Oct 2009, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
  65:01/00
  Not automatically fixing this.
/dev/mmcblk0p3: 520 files, 80013/1791316 clusters
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
NtxHwCfg_GetCfgFldStrVal:[WARNING]Config version too old !! Please update config file !!
insmod: can't read '/drivers/mx6sll-ntx/misc/lowmem.ko': No such file or directory

(none) login: /usr/local/Kobo/nickel: /usr/lib/libxml2.so.2: no version information available (required by /usr/local/Kobo/libnickel.so.1)
/usr/local/Kobo/nickel: /usr/lib/libxml2.so.2: no version information available (required by /usr/local/Kobo/libnickel.so.1)
/usr/local/Kobo/nickel: /usr/lib/libxml2.so.2: no version information available (required by /usr/local/Kobo/libnickel.so.1)
/usr/local/Kobo/nickel: /usr/lib/libxml2.so.2: no version information available (required by /usr/local/Kobo/libnickel.so.1)
sh: you need to specify whom to kill
cyttsp5_i2c_adapter 1-0024: cyttsp5_core_rt_resume: Error on wake

This is the output of the official Kobo image.

@tux-linux
Copy link
Contributor

Hello, very nice !
I'll get back to you with a test kernel image to try on your Clara. This way, I'll be able to see if my compiler/source combination works on the device before getting any further in kernel development.

@tux-linux
Copy link
Contributor

Ok, try this on your Kobo: untar the tar.gz, then enter this in a terminal, assuming mmcblk0 is your microSD's device node:

# dd if=zImage of=/dev/mmcblk0 bs=512 seek=2048
# sync

zImage.tar.gz

Then, boot your Kobo up and post the boot log ;)

@phodina
Copy link
Author

phodina commented Jan 8, 2022

Thanks @tux-linux .

Should I copy the image to an empty micorSD or the one with the firmware for the Eink display included in the first sectors?

Based on the image size and quick check I assume it's just the Linux kernel, isn't it?

$ file zImage
zImage: ARM OpenFirmware FORTH Dictionary, Text length: -509607936 bytes, Data length: -509607936 bytes, Text Relocation Table length: -369098749 bytes, Data Relocation Table length: 24061976 bytes, Entry Point: 0x00000000, BSS length: 4504144 bytes

@tux-linux
Copy link
Contributor

Yes it is. Flash it to the SD with existing firmware.

@phodina
Copy link
Author

phodina commented Jan 13, 2022

So the boards boots with the new kernel and I'm able to reach the welcome menu.

However there are some issues after starting the kernel.

U-Boot 2016.03-00038-g4a92f9d (Jun 04 2018 - 14:20:13 +0800)

CPU:   Freescale i.MX6SLL rev1.1 996 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 38C
Reset cause: POR
Board: MX6SLL LPDDR2 NTX
I2C:   ready
DRAM:  512 MiB
__get_sd_number(),cfg23=1,cfg24=0
force_idle_bus: sda=1 scl=0 sda.gp=0x4d scl.gp=0x4c
force_idle_bus: sda=0 scl=0 sda.gp=0x4f scl.gp=0x4e
force_idle_bus: sda=1 scl=0 sda.gp=0x56 scl.gp=0x55
MMC:   board_mmc_init() : isd=1
board_mmc_init() : wifi=2
FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
ntx_hw_early_init() 0
ram p=80000000,size=536870912
switch to partitions #0, OK
mmc0 is current device
mmc read 0x9ffffe00 0x3ff 0x1

MMC read: dev # 0, block # 1023, count 1 ... 1 blocks read: OK
mmc read 0x9ffffe00 0x400 0x1

MMC read: dev # 0, block # 1024, count 1 ... 1 blocks read: OK
ntx_hw_late_init()
mmc read 0x9ffffc00 0x1 0x1

MMC read: dev # 0, block # 1, count 1 ... 1 blocks read: OK
NTXSN not avalible !
ntx_gpio_get_value(402) : error parameter ! null ptr !
ntx_config_fastboot_layout():10 binaries partition added
ntx_config_fastboot_layout():3 mbr partition added
check_and_clean: reg 0, flag_set 0
Fastboot: Normal
Net:   CPU Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
mmc read 0x80800000 0x800 0x2400

MMC read: dev # 0, block # 2048, count 9216 ... 9216 blocks read: OK
Booting from mmc ...
mmc read 0x83000000 0x505 0x1

MMC read: dev # 0, block # 1285, count 1 ... 1 blocks read: OK
dtb size = 33718@83000000
mmc read 0x83000000 0x506 0x47

MMC read: dev # 0, block # 1286, count 71 ... 71 blocks read: OK

 hwcfgp=9ffffe00,pcb=74,customer=9

ntx_gpio_get_value(402) : error parameter ! null ptr !
ESDin=0,UPGKey=-1,PWRKey=0,USBin=0x0,BootESD=0,MenuKey=0
mmc read 0x9ffffc00 0x37ff 0x1

MMC read: dev # 0, block # 14335, count 1 ... 1 blocks read: OK
mmc read 0x9fd6f400 0x3800 0x1485

MMC read: dev # 0, block # 14336, count 5253 ... 5253 blocks read: OK
mmc read 0x9fd6f200 0x405 0x1

MMC read: dev # 0, block # 1029, count 1 ... 1 blocks read: OK
[WARNING] Binaries load sequence should Lo->Hi !
mmc read 0x9fd6ce00 0x406 0x13

MMC read: dev # 0, block # 1030, count 19 ... 19 blocks read: OK
Kernel RAM visiable size=509M->509M
hwcfg rootfstype : 2
hwcfg partition type : 2
Kernel image @ 0x80800000 [ 0x000000 - 0x44ba50 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300b3b5

Starting kernel ...

i2c i2c-1: Device probe no ACK , retry 1/10 ...
tps6518x-pmic tps6518x-pmic: request vcom gpio failed (-16)!
tps6518x-pmic tps6518x-pmic: request powerup gpio failed (-16)!
tps6518x 1-0068: tps6518x int workqueue creating failed !
syscon-poweroff 20cc000.snvs:snvs-poweroff: pm_power_off already claimed 8002131c ntx_machine_poweroff
PMU: ricoh61x_battery_probe : version is RICOH61x_BATTERY_VERSION: 2014.02.21 V3.1.0.0-Solution1 2015/02/09
cpu cpu0: dev_pm_opp_get_opp_count: device OPP not found (-19)
EPDC_QoS not supported on this platform !

But if I reboot the device it's stuck at booting - don't see any kernel messages. And there are just 3 dots on the display.

U-Boot 2016.03-00038-g4a92f9d (Jun 04 2018 - 14:20:13 +0800)

CPU:   Freescale i.MX6SLL rev1.1 996 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 40C
Reset cause: POR
Board: MX6SLL LPDDR2 NTX
I2C:   ready
DRAM:  512 MiB
__get_sd_number(),cfg23=1,cfg24=0
force_idle_bus: sda=1 scl=0 sda.gp=0x4d scl.gp=0x4c
force_idle_bus: sda=0 scl=0 sda.gp=0x4f scl.gp=0x4e
force_idle_bus: sda=1 scl=0 sda.gp=0x56 scl.gp=0x55
MMC:   board_mmc_init() : isd=1
board_mmc_init() : wifi=2
FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
ntx_hw_early_init() 0
ram p=80000000,size=536870912
switch to partitions #0, OK
mmc0 is current device
mmc read 0x9ffffe00 0x3ff 0x1

MMC read: dev # 0, block # 1023, count 1 ... 1 blocks read: OK
mmc read 0x9ffffe00 0x400 0x1

MMC read: dev # 0, block # 1024, count 1 ... 1 blocks read: OK
ntx_hw_late_init()
mmc read 0x9ffffc00 0x1 0x1

MMC read: dev # 0, block # 1, count 1 ... 1 blocks read: OK
NTXSN not avalible !
ntx_gpio_get_value(402) : error parameter ! null ptr !
ntx_config_fastboot_layout():10 binaries partition added
ntx_config_fastboot_layout():3 mbr partition added
check_and_clean: reg 0, flag_set 0
Fastboot: Normal
Net:   CPU Net Initialization Failed
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
mmc read 0x80800000 0x800 0x2400

MMC read: dev # 0, block # 2048, count 9216 ... 5253 blocks read: OK
mmc read 0x9fd6f200 0x405 0x1

MMC read: dev # 0, block # 1029, count 1 ... 1 blocks read: OK
[WARNING] Binaries load sequence should Lo->Hi !
mmc read 0x9fd6ce00 0x406 0x13

MMC read: dev # 0, block # 1030, count 19 ... 19 blocks read: OK

Only after unplugging the serial adapter I got the board to boot :-/

@tux-linux
Copy link
Contributor

tux-linux commented Jan 13, 2022 via email

@tux-linux
Copy link
Contributor

Oh, I didn't see the second part of your comment. Maybe e-mail notifications didn't work properly.
Since we won't use Nickel anymore, maybe those are negligible, maybe not.
I was planning to use the 5.x branch made by @akemnade for the Clara, will get back to you once I get a compiled kernel and DTB.

@akemnade
Copy link
Contributor

just a note: the kobo clara vendor uboot seems to append quiet to the commandline... so maybe patch that away in the vendor uboot or rename the quiet command in kernel init/main.c

@akemnade
Copy link
Contributor

I remember a note about a "patched inkbox" on the Kobo Clara HD with more recent kernels. So somebody has tried something.

@tux-linux
Copy link
Contributor

tux-linux commented Jan 13, 2022

just a note: the kobo clara vendor uboot seems to append quiet to the commandline... so maybe patch that away in the vendor uboot or rename the quiet command in kernel init/main.c

Yes, it could be done, or force the cmdline at boot, too. IIRC, vendor U-Boot has bootdelay set to 1, so it would also be possible to set the bootargs there if needed.
Where did you see the "patched inkbox" thing?
Thanks

@akemnade
Copy link
Contributor

yes, you can enter the u-boot cmdline.
and then at bootz vendor uboot tends to append things... e.g. like addresses for the various blobs and quiet...

These messages are harmless, they just come from duplicated code in the drivers:
tps6518x-pmic tps6518x-pmic: request vcom gpio failed (-16)!
tps6518x-pmic tps6518x-pmic: request powerup gpio failed (-16)!
tps6518x 1-0068: tps6518x int workqueue creating failed !

@tux-linux
Copy link
Contributor

Hello @phodina , sorry for being slow in replying, I don't have much time these days.
It would really be better if you joined the Discord server at https://discord.com/invite/uSWtWbY23m
There's already a thread in the "#porting" channel that an user has created. Having two testers is always better than just one!
Plus, we can keep the discussion about Clara HD porting there and come back later when we want to see what has been done without scrolling through the history of a big channel.

Thanks and have a good day!

@phodina
Copy link
Author

phodina commented Feb 5, 2022

Oki, I'll try to join there and we can continue the discussion. @tux-linux

@phodina
Copy link
Author

phodina commented Feb 6, 2022

Here's list of the partitions of the backup SDcard (before powering it on for the first time)

Disk kobo_clara_hd.image: 7.4 GiB, 7948206080 bytes, 15523840 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
Disklabel type: dos
Disk identifier: 0x3b3b90d1

Device               Boot   Start      End  Sectors  Size Id Type
kobo_clara_hd.image1        49152   573440   524289  256M 83 Linux
kobo_clara_hd.image2       573441  1097729   524289  256M 83 Linux
kobo_clara_hd.image3      1097730 15456254 14358525  6.8G  b W95 F

@markvdb
Copy link

markvdb commented Dec 10, 2023

Hello,

I just got myself a Kobo Clara HD. It seems unofficial inkbox build instructions for the Kobo Clara HD are available in https://github.com/aartoni/n249 . I have not tried these yet.

Thank you for your work on free software!

M

@jaksatomovic
Copy link

Have anyone tried this link then?
https://github.com/aartoni/n249
is it working?

@Szybet
Copy link
Collaborator

Szybet commented Apr 12, 2024

The link you supplied is pretty outdated, here is some new info:

https://www.mobileread.com/forums/showthread.php?p=4387514#post4387514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants