Jump to content

PocketBook 614 plus (pocketbook-614-plus): Difference between revisions

From postmarketOS Wiki
[TEMP] temporarily added device tree and Uboot config
added information about the original software
Line 22: Line 22:
<!-- Features -->
<!-- Features -->
<!-- the following status_* questions should be answered with Y for yes, P for partial, N for no, - for N/A or unavailable, or left blank for untested or unknown -->
<!-- the following status_* questions should be answered with Y for yes, P for partial, N for no, - for N/A or unavailable, or left blank for untested or unknown -->
| status_usbnet = <!-- USB networking does work? then put Y here and delete this comment -->
| status_usbnet = Y <!-- USB networking does work? then put Y here and delete this comment -->
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
| status_flashing = <!-- Flashing with "pmbootstrap flasher" works? Put Y here. It works the same for everything coming below. -->
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. -->
| status_touch = <!-- Touch screen is working? You can also answer these questions with P for partially. -->
Line 72: Line 72:
| status_uboot_sd = Y
| status_uboot_sd = Y
| status_uboot_usbhost =
| status_uboot_usbhost =
| status_uboot_usbperipheral = P
| status_uboot_usbperipheral = Y
| status_uboot_screen =
| status_uboot_screen =
| status_uboot_keyboard =
| status_uboot_keyboard =
Line 92: Line 92:
<!-- you can use {{My devices}} on your profile page to show table with all your devices -->
<!-- you can use {{My devices}} on your profile page to show table with all your devices -->


== How to enter flash mode ==
== Original software ==
A regular sdcard is used as internal memory, so we can simply take it out and read/write it on the computer. It is worth noting that the image is tied to a specific sdcard (its serial number), but it is enough to simply untie the image from this dependence.


== Installation ==
{{note|'''Note:''' Before experiments, make a backup copy of the SD card (via dd)}}


== Devicetree ==
<div class="toccolours mw-collapsible mw-collapsed" style="width: 1000px; overflow: auto;">
<source>
<code># fdisk -l /dev/sda </code>
// SPDX-License-Identifier: GPL-2.0
<div class="mw-collapsible-content">
/*
<pre>
* Copyright 2019 Ondrej Jirman <megous@megous.com>
Disk /dev/sda: 7.37 GiB, 7908360192 bytes, 15446016 sectors
* Copyright 2024 Hitechshell <hitechshell@mail.ru>
Disk model: Card Reader   
  */
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: 0x00000000


/dts-v1/;
Device    Boot  Start      End  Sectors  Size Id Type
#include "sun5i-a13.dtsi"
/dev/sda1      1009664 15446015 14436352  6.9G  b W95 FAT32
#include "sunxi-common-regulators.dtsi"
/dev/sda2  *      73728  139263    65536    32M  6 FAT16
#include <dt-bindings/gpio/gpio.h>
/dev/sda3            1  1009664  1009664  493M 85 Linux extended
#include <dt-bindings/input/input.h>
/dev/sda5        139264  172031    32768    16M 83 Linux
#include <dt-bindings/interrupt-controller/irq.h>
/dev/sda6        172032  204799    32768    16M 83 Linux
/dev/sda7        204800  275455    70656  34.5M 83 Linux
/dev/sda8        275456  776191  500736 244.5M 83 Linux
/dev/sda9        776192  976895  200704    98M 83 Linux
/dev/sda10      976896  1009663    32768    16M 83 Linux


/ {
Partition table entries are not in disk order.
model = "PocketBook 614 Plus";
</pre>
compatible = "pocketbook,614-plus", "allwinner,sun5i-a13";
<pre>
sda1 - userdata
sda2 - boot partition (with kernel)
sda5 - ???
sda6 - ???
sda7 - root (/)
sda8 - /ebrmain (contain cramfs.img)
sda9 - /mnt/secure (contain some apps and libs)
sda10 - ??? (contain dictionaries)
</pre>
</div>
</div>


Unlinking an image from a specific SD card: after the system starts, the main application is launched - pocketbook located in /dev/sda8 (in fact, this is a link to /mnt/cramfs/bin/monitor.app). This binary contains a check for the serial number of the memory card. However, we can easily cheat this check: replace the path to the serialnumber of sdcard with a simple text file with this number.


aliases {
copy the cramfs.img file from sda8 and unpack it: <code>cramfsck -x tmp_cram cramfs.img </code> As a result, there will be a monitor.app file in the tmp_cram/bin directory.
serial0 = &uart1;
Using strings we can find that the program gets the serial number from <code>/sys/block/mmcblk%c/device/serial</code>
i2c0 = &i2c0;
Сreate a file with serial number in /mnt/secure (you can do it in another place, the main thing is that the final path is the same length as the line above) and replace path from from <code>/sys/block/mmcblk%c/device/serial</code> to your file.
i2c1 = &i2c1;
now just copy the file to sda8, delete the old link and create a new one. <code>ln -s monitor_patched.app pocketbook</code>
i2c2 = &i2c2;
};
 
chosen {
stdout-path = "serial0:115200n8";
};
 
    reg_3v3_mmc0: regulator-mmc0 {
compatible = "regulator-fixed";
regulator-name = "vdd-mmc0";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&pio 4 4 GPIO_ACTIVE_LOW>; /* PE4 */
vin-supply = <&reg_vcc3v3>;
};
};


 
== Installation ==
&ehci0 {
status = "okay";
};
 
 
&i2c0 {
status = "okay";
 
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupts = <0>;
};
};
 
#include "axp209.dtsi"
 
&i2c1 {
status = "okay";
 
pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
 
&i2c2 {
status = "okay";
 
/* Touchpanel is connected here. */
};
&mmc0 {
vmmc-supply = <&reg_3v3_mmc0>;
bus-width = <4>;
cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
status = "okay";
};
 
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_4bit_pc_pins>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
non-removable;
status = "okay";
};
 
 
&ohci0 {
status = "okay";
};
 
&otg_sram {
status = "okay";
};
 
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pg_pins>;
status = "okay";
};
 
// #############################################
 
&cpu0 {
cpu-supply = <&reg_dcdc2>;
};
 
&reg_dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1500000>;
regulator-name = "vdd-cpu";
};
 
&reg_dcdc3 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1400000>;
regulator-name = "vdd-int-dll";
};
 
&reg_ldo1 {
regulator-name = "vdd-rtc";
};
 
&reg_ldo2 {
regulator-always-on;
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
regulator-name = "avcc";
};
 
&reg_ldo3 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi";
};
 
&battery_power_supply {
status = "okay";
};
 
&usb_power_supply {
status = "okay";
};
 
 
 
// #############################################
 
&reg_usb0_vbus {
status = "okay";
gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
};
 
&reg_usb1_vbus {
gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
status = "okay";
};
 
&usbphy {
usb0_id_det-gpios = <&pio 6 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PG2 */
usb0_vbus_det-gpios = <&pio 6 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PG1 */
usb0_vbus-supply = <&reg_usb0_vbus>;
usb1_vbus-supply = <&reg_usb1_vbus>;
status = "okay";
};
 
&usb_otg {
dr_mode = "otg";
status = "okay";
};
</source>
 
== UBoot config ==
<source>
CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_DEFAULT_DEVICE_TREE="sun5i-a13-pocketbook-614-plus"
CONFIG_SPL=y
CONFIG_MACH_SUN5I=y
CONFIG_DRAM_CLK=408
CONFIG_DRAM_EMR1=0
 
CONFIG_REGULATOR_AXP_USB_POWER=y
CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE"
CONFIG_USB0_ID_DET="PG02"
CONFIG_USB1_VBUS_PIN="PG11"
 
CONFIG_AXP_GPIO=y
CONFIG_SPL_I2C=y
CONFIG_CMD_DFU=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_DFU_RAM=y
CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
CONFIG_SYS_I2C_MVTWSI=y
CONFIG_SYS_I2C_SLAVE=0x7f
CONFIG_SYS_I2C_SPEED=400000
CONFIG_AXP_ALDO3_VOLT=3300
CONFIG_CONS_INDEX=2
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
 
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 
</source>


== See also ==
== See also ==
* {{MR|4901|pmaports}} Initial merge request
<!--
<!--
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
Link to related GitLab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
Line 315: Line 153:
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
-->
-->
<!--
* {{Device package|device-pocketbook-614-plus}}
If you manage to get your device packages merged, uncomment links below and change DEVICE_CODENAME with the actual one.
* {{Kernel package|linux-postmarketos-allwinner}}
* {{Device package|DEVICE_CODENAME}}
* {{Kernel package|DEVICE_CODENAME}}
-->

Revision as of 17:08, 14 March 2024

PocketBook 614 plus
CHANGE_ME
CHANGE_ME
Manufacturer PocketBook
Name 614 plus
Codename pocketbook-614-plus
Model PocketBook 614
Released 2017
Type ebook reader
Hardware
Chipset Allwinner A13
CPU ARM Cortex-A8 @ 1Ghz
GPU Mali 400 MP1
Display 800x600 e-paper
Storage microSDHC
Memory 256 MB
Architecture armv7
Software
Original software PocketBook firmware
Original version Linux 3.0.8
FOSS bootloader yes
postmarketOS
Category testing
Pre-built images no
Mainline yes
postmarketOS kernel 6.8.0
Unixbench Whet/Dhry score 0.0
Features
Flashing
No data
USB Networking
Works
Internal storage
Works
SD card
Works
Battery
Works
Screen
No data
Touchscreen
No data
Multimedia
3D Acceleration
No data
Connectivity
WiFi
No data
Miscellaneous
FDE
No data
USB OTG
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Barometer
No data
Power Sensor
No data
U-Boot
Primary Bootloader
Works
Secondary Bootloader
No data
Mainline
Works
Internal Storage
Works
SD card
Works
USB Host
No data
USB Peripheral
Works
Display
No data
Keyboard
No data
Buttons
No data


Contributors


Users owning this device


Original software

A regular sdcard is used as internal memory, so we can simply take it out and read/write it on the computer. It is worth noting that the image is tied to a specific sdcard (its serial number), but it is enough to simply untie the image from this dependence.

Note Note: Before experiments, make a backup copy of the SD card (via dd)

# fdisk -l /dev/sda

Unlinking an image from a specific SD card: after the system starts, the main application is launched - pocketbook located in /dev/sda8 (in fact, this is a link to /mnt/cramfs/bin/monitor.app). This binary contains a check for the serial number of the memory card. However, we can easily cheat this check: replace the path to the serialnumber of sdcard with a simple text file with this number.

copy the cramfs.img file from sda8 and unpack it: cramfsck -x tmp_cram cramfs.img As a result, there will be a monitor.app file in the tmp_cram/bin directory. Using strings we can find that the program gets the serial number from /sys/block/mmcblk%c/device/serial Сreate a file with serial number in /mnt/secure (you can do it in another place, the main thing is that the final path is the same length as the line above) and replace path from from /sys/block/mmcblk%c/device/serial to your file. now just copy the file to sda8, delete the old link and create a new one. ln -s monitor_patched.app pocketbook

Installation

See also