release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > AgptekRocker

AGPtEK ROCKER


Overview

This is the page for the AGPtEK ROCKER port. It is also known as AGPTek MC15B (Black) or MC15S (Silver). OEM version is Benjie BJ-T6 (might be called "K1" too, see the picture in attachment). See http://www.benjie-tx.com/MP3HiFiPlayer/224.html

Main Features

  • No internal memory
  • Expandable microSDXC card slot
  • 1.8" TFT display
  • Bluetooth CSR4.1
  • 3.7 V / 600 mAh battery
  • Size: 85.6×40.2×10.1mm
  • Weight: 80g

Installation

Rockbox functions well on this target, and nightly builds are considered stable for day-to-day use.

The RockboxUtility fully supports this target. However, if you wish to install the bootloader manually, follow these instructions:

  • Build or download the bootloader
  • Obtain a stock firmware image
  • Patch the firmware image with the bootloader
  • Rename the patched firmware file to update.upt and place it into the root directory of the SD card
  • Grab the latest daily build for the player and unzip it into the root directory of the SD card
  • Go into the settings menu and select firmware update.
  • Upon reboot, select rockbox from the initial menu

Here you can download the current bootloader builds, along with "binary patches" that can be easily applied to stock firmware update images using the 'bspatch' utility:

OF version URL
20171101 http://download.rockbox.org/bootloader/agptek/rocker.zip

For convenience, here are pre-patched images:

OF version URL
20171101 http://download.rockbox.org/bootloader/agptek/ROCKER-20171101-patched.upt

Components

  • SoC: Ingenic X1000 (32MB integrated LPDDR)
  • Bluetooth: CSR 8811
  • Power management: AXP192
  • Codec: Cirrus 42L51C
  • Flash: SPI NAND ATO25D1GA

Contact with AGPtEK

AGPtEK was kind enough to offer two of rockbox developers (AmauryPouly, MarcinBukat) a player. They sent some disassembly pictures shown below

step1.jpg step2.jpg step3.jpg step4.jpg step5.jpg PCB26495_(1).jpg PCB26495_(2).jpg

Serial output

Three tespoints near the edge of PCB are serial port 3.3V 115200 8N1. This also exposes root serial console.

Output during cold boot:
U-Boot SPL 2013.07 (Jan 11 2017 - 15:11:13)
apll = 1008000000
 mpll = 600000000
cpccr = 9a752210


U-Boot 2013.07 (Jan 11 2017 - 15:11:13)

Board: K1 (Ingenic XBurst X1000 SoC)
DRAM:  32 MiB
Top of RAM usable for U-Boot at: 82000000
Reserving 0k for U-Boot at: 81feb000
Reserving 512k for U-Boot at: 81f68000
Reserving 8320k for malloc() at: 81748000
Reserving 32 Bytes for Board Info at: 81747fe0
Reserving 128 Bytes for Global Data at: 81747f60
Reserving 128k for boot params() at: 81727f60
Stack Pointer at: 81727f48
Now running in RAM - U-Boot at: 81f68000
NAND:  0 MiB
id0=9b
id1=12
SFC_DEV_STA_RT=0x00000000,
sfcnand param num=7
read status 0xa0 : 0
read status 0xb0 : 1
MMC:   

NAND read: device 0 offset 0xc0000, size 0x20000
 131072 bytes read: OK

NAND read: device 0 offset 0xe0000, size 0x20000
 131072 bytes read: OK
*** Warning - bad CRC, using default environment

 *** lcd res: 128*160
pixel_clock = 3072000
canot request gpio lcd_power
st7735s_128160 panel display pin init
st7735s_128160 panel display on
the slcd slcd_cfg_new is 00000200
draw logo

NAND read: device 0 offset 0x80000, size 0x14000
 81920 bytes read: OK

NAND read: device 0 offset 0x2c0000, size 0xc
 12 bytes read: OK
Mod:   Normal boot mode.
Hit any key to stop autoboot:  0 
set KERNEL WATCHDOG SIGNATURE

NAND read: device 0 offset 0x300000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 80600000 ...
   Image Name:   Linux-3.10.14
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    2548826 Bytes = 2.4 MiB
   Load Address: 80010000
   Entry Point:  80400e60
   Verifying Checksum ... OK
   Uncompressing Kernel Image ...

Starting kernel ...

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.14 (xujianhui@SA-CodeServer) (gcc version 4.7.2 (Ingenic 2015.02) ) #1 PREEMPT Wed Jan 11 15:12:10 CST 2017
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 RESET ERROR PC:FFAFFE07
[    0.000000] CPU0 revision is: 2ed1024f (Ingenic Xburst)
[    0.000000] FPU revision is: 00330000
[    0.000000] CCLK:1008MHz L2CLK:504Mhz H0CLK:200MHz H2CLK:200Mhz PCLK:100Mhz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 00518000 @ 00010000 (usable)
[    0.000000]  memory: 00038000 @ 00528000 (usable after init)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x01ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x01ffffff]
[    0.000000] Primary instruction cache 16kB, 4-way, VIPT, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128
[    0.000000] Kernel command line: console=ttyS2,115200n8 mem=32M@0x0 no_console_suspend lpj=5009408 ip=off init=/linuxrc ubi.mtd=4 root=ubi0:rootfs ubi.mtd=5 rootfstype=ubifs sn_no=00000000000000000000000000000000 bt_mac=4254301403f1 wifi_mac=xxxxxxxxxxxx rw
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 26348k/32768k available (4077k kernel code, 6420k reserved, 1135k data, 224k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:410
[    0.000000] clockevents_config_and_register success.
[    0.000000] Console: colour dummy device 80x25
[    0.004670] Calibrating delay loop (skipped) preset value.. 1001.88 BogoMIPS (lpj=5009408)
[    0.013050] pid_max: default: 32768 minimum: 301
[    0.018076] Mount-cache hash table entries: 512
[    0.023922] Initializing cgroup subsys devices
[    0.028500] Initializing cgroup subsys freezer
[    0.032932] Initializing cgroup subsys blkio
[    0.042468] regulator-dummy: no parameters
[    0.047274] NET: Registered protocol family 16
[    0.066087] hw version a:0, b:1
[    0.073597] bio: create slab <bio-0> at 0
[    0.080026] jz-dma jz-dma: JZ SoC DMA initialized
[    0.084904] gpio_regulator_gpio_init 0
[    0.089009] GPIO_BT_PWR: no parameters
[    0.092924] gpio_regulator_gpio_init 0
[    0.096934] GPIO_AMP_PWR: no parameters
[    0.101676] SCSI subsystem initialized
[    0.105861] usbcore: registered new interface driver usbfs
[    0.111434] usbcore: registered new interface driver hub
[    0.117239] usbcore: registered new device driver usb
[    0.122586]  (null): set:999  hold:1000 dev=100000000 h=2000 l=2000
[    0.129534]  (null): set:249  hold:250 dev=100000000 h=500 l=500
[    0.136007] AXP add mfd driver = 0
[    0.139757] Advanced Linux Sound Architecture Driver Initialized.
[    0.146900] Bluetooth: Core ver 2.16
[    0.150572] NET: Registered protocol family 31
[    0.155000] Bluetooth: HCI device and connection manager initialized
[    0.161595] Bluetooth: HCI socket layer initialized
[    0.166498] Bluetooth: L2CAP socket layer initialized
[    0.171626] Bluetooth: SCO socket layer initialized
[    0.176972] [AXP-MFD] axp_mfd_probe
[    0.180438] [AXP-MFD] axp_init_chip
[    0.184413] axp_mfd 2-0034: AXP (CHIP ID: 0x03) detected
[    0.193166] [AXP-MFD] register regultors
[    0.197974] [AXP-MFD] register power supply
[    0.202508] Switching to clocksource jz_clocksource
[    0.207946] FS-Cache: Loaded
[    0.219107] DWC IN DEVICE ONLY MODE
[    0.374312] dwc2 dwc2: Dynamic Power Control
[    0.378635] dwc2 dwc2: Using Buffer DMA mode
[    0.382902] dwc2 dwc2: Core Release: 3.00a
[    0.387996] Suspend otg by shutdown dwc cotroller and phy
[    0.393413] DIS PHY
[    0.396503] axp_ldo1: 1250 mV 
[    0.402411] axp_ldo2: 1800 <--> 3300 mV at 3300 mV 
[    0.408506] axp_ldo3: 700 <--> 3500 mV at 3675 mV 
[    0.414655] axp_ldo4: 1800 <--> 3300 mV at 2500 mV 
[    0.421004] axp_buck1: 700 <--> 3500 mV at 3300 mV 
[    0.427190] axp_buck2: 700 <--> 2275 mV at 1250 mV 
[    0.433573] axp_buck3: 700 <--> 3500 mV at 1800 mV 
[    0.439426] axp_buck4: 700 <--> 3500 mV at 1200 mV 
[    0.445078] axp_ldoio0: 1800 <--> 3300 mV at 2800 mV 
[    0.452586] charging current = 800 mA
[    0.466345] NET: Registered protocol family 2
[    0.471852] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.478977] TCP bind hash table entries: 512 (order: 1, 10240 bytes)
[    0.485423] TCP: Hash tables configured (established 512 bind 512)
[    0.491872] TCP: reno registered
[    0.495092] UDP hash table entries: 256 (order: 1, 12288 bytes)
[    0.501246] UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
[    0.508409] NET: Registered protocol family 1
[    0.513664] 359,init_ddr_proc
[    0.526028] NTFS driver 2.1.30 [Flags: R/O].
[    0.530985] fuse init (API version 7.22)
[    0.535535] exFAT: Version 1.2.9
[    0.539190] msgmni has been set to 51
[    0.547231] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.554994] io scheduler noop registered
[    0.558999] io scheduler deadline registered
[    0.563678] io scheduler cfq registered (default)
[    0.568989] pwm-backlight pwm-backlight.0: unable to request PWM, trying legacy API
[    0.581998] jz-uart.0: ttyS0 at MMIO 0x10030000 (irq = 59) is a uart0
[    0.589149] jz-uart.2: ttyS2 at MMIO 0x10032000 (irq = 57) is a uart2
[    0.597118] console [ttyS2] enabled, bootconsole disabled
[    0.597118] console [ttyS2] enabled, bootconsole disabled
[    0.608960] register vprivilege driver OK! Major = 252
[    0.614468] register vprivilege driver OK! Major = 251
[    0.622276] nand_magic=0x6e616e64sfcnand num=7
[    0.626960] Scanning device for bad blocks
[    0.690498] Creating 6 MTD partitions on "sfc_nand":
[    0.695637] 0x000000000000-0x000000080000 : "uboot"
[    0.701417] ftl_cs: FTL header not found.
[    0.706529] 0x000000080000-0x000000300000 : "logo"
[    0.712461] ftl_cs: FTL header not found.
[    0.717448] 0x000000300000-0x000000900000 : "kernel"
[    0.723649] ftl_cs: FTL header not found.
[    0.728716] 0x000000900000-0x000001000000 : "recovery"
[    0.734914] ftl_cs: FTL header not found.
[    0.740025] 0x000001000000-0x000005000000 : "rootfs"
[    0.746115] ftl_cs: FTL header not found.
[    0.751304] 0x000005000000-0x000008000000 : "data"
[    0.757133] ftl_cs: FTL header not found.
[    0.762616] usbcore: registered new interface driver asix
[    0.768417] usbcore: registered new interface driver ax88179_178a
[    0.774775] usbcore: registered new interface driver cdc_ether
[    0.780913] usbcore: registered new interface driver net1080
[    0.786786] usbcore: registered new interface driver cdc_subset
[    0.792996] usbcore: registered new interface driver zaurus
[    0.798906] usbcore: registered new interface driver cdc_ncm
[    0.804785] usbcore: registered new interface driver usb-storage
[    0.811319] usbcore: registered new interface driver usbserial
[    0.817376] usbcore: registered new interface driver usbserial_generic
[    0.824333] usbserial: USB Serial support registered for generic
[    0.835893] input: adc_key as /devices/platform/adc_key.0/input/input0
[    0.843908] jz-rtc jz-rtc.0: rtc core: registered jz-rtc as rtc0
[    0.851337] Bluetooth: HCI UART driver ver 2.2
[    0.855928] Bluetooth: HCI H4 protocol initialized
[    0.861045] Bluetooth: HCI BCSP protocol initialized
[    0.866197] Bluetooth: HCILL protocol initialized
[    0.871411] jzmmc_v1.2 jzmmc_v1.2.0: vmmc regulator missing
[    0.877887] BAD set to input gpio GPIO B[13].
[    0.897573] BAD set to input gpio GPIO B[13].
[    0.918217] jzmmc_v1.2 jzmmc_v1.2.0: register success!
[    0.923991] usbcore: registered new interface driver usbhid
[    0.931175] usbhid: USB HID core driver
[    1.647065] sa fail
[    1.650051] sa_information_init success
[    1.654974] [Cs42l51-codec] cs42l51_i2c_probe.
[    1.660132] jz-asoc-dma jz-asoc-aic-dma: Audio dma platfrom probe success
[    1.668506] jz-asoc-aic jz-asoc-aic: Aic core probe success
[    1.674557] jz-asoc-aic-i2s jz-asoc-aic-i2s: i2s platform probe success
[    1.681942] [Card-K1] k1_snd_probe
[    1.685916] [Cs42l51-codec] cs42l51_codec_probe.
[    1.691633] dma dma0chan4: Channel 4 have been requested.(phy id 3,type 0x06 desc a1a27000)
[    1.705041] ingenic-k1 ingenic-k1.0:  cs42l51-hifi <-> jz-asoc-aic-i2s mapping ok
[    1.717086] TCP: cubic registered
[    1.720835] NET: Registered protocol family 17
[    1.725956] Bluetooth: RFCOMM TTY layer initialized
[    1.731456] Bluetooth: RFCOMM socket layer initialized
[    1.736842] Bluetooth: RFCOMM ver 1.11
[    1.740840] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.746347] Bluetooth: BNEP filters: protocol multicast
[    1.751852] Bluetooth: BNEP socket layer initialized
[    1.757012] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.763236] Bluetooth: HIDP socket layer initialized
[    1.772378] UBI: attaching mtd4 to ubi0
[    1.892416] UBI: scanning is finished
[    1.901994] UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 5, need 20
[    1.914257] UBI: attached mtd4 (name "rootfs", size 64 MiB) to ubi0
[    1.920978] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.928057] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.934967] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.942126] UBI: good PEBs: 512, bad PEBs: 0, corrupted PEBs: 0
[    1.948291] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[    1.955649] UBI: max/mean erase counter: 4/1, WL threshold: 4096, image sequence number: 0
[    1.964241] UBI: available PEBs: 0, total reserved PEBs: 512, PEBs reserved for bad PEB handling: 5
[    1.973634] UBI: background thread "ubi_bgt0d" started, PID 39
[    1.979800] UBI: attaching mtd5 to ubi1
[    2.069845] UBI: scanning is finished
[    2.080463] UBI: attached mtd5 (name "data", size 48 MiB) to ubi1
[    2.086767] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.094025] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.101019] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.108201] UBI: good PEBs: 384, bad PEBs: 0, corrupted PEBs: 0
[    2.114331] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.121767] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1620814948
[    2.131153] UBI: available PEBs: 0, total reserved PEBs: 384, PEBs reserved for bad PEB handling: 20
[    2.140655] UBI: background thread "ubi_bgt1d" started, PID 40
[    2.147208] file system registered
[    2.153007] using random self ethernet address
[    2.157965] using random host ethernet address
[    2.163171] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    2.170503] android_usb gadget: Number of LUNs=1
[    2.175314]  lun0: LUN: removable file: (no medium)
[    2.181165] android_usb gadget: android_usb ready
[    2.186765] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[    2.194725] jz-rtc jz-rtc.0: setting system clock to 2014-08-21 21:05:10 UTC (1408655110)
[    2.203523] ALSA device list:
[    2.206654]   #0: k1
[    2.212808] UBIFS: background thread "ubifs_bgt0_0" started, PID 43
[    2.267487] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    2.273977] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.283481] UBIFS: FS size: 62472192 bytes (59 MiB, 492 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs)
[    2.293510] UBIFS: reserved for root: 0 bytes (0 KiB)
[    2.298788] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 0652C237-FB29-4558-880B-65266FA88363, small LPT model
[    2.310688] VFS: Mounted root (ubifs filesystem) on device 0:11.
[    2.319264] Freeing unused kernel memory: 224K (80528000 - 80560000)
mount: can't read '/proc/mounts': No such file or directory
Starting Limit: End Limit. 
Starting mdev...
Starting /etc/init.d/S15boot.sysctl : begin 
vm.dirty_ratio = 15
vm.dirty_background_ratio = 10
vm.dirty_writeback_centisecs = 100
vm.dirty_expire_centisecs = 300
vm.vfs_cache_pressure = 100
vm.min_free_kbytes = 630
Starting /etc/init.d/S15boot.sysctl : end 
Initializing random number generator... done.
Starting /etc/init.d/S30_mount_userdata : begin 
[    3.088064] UBIFS: background thread "ubifs_bgt1_0" started, PID 68
[    3.155024] UBIFS: mounted UBI device 1, volume 0, name "data_vol"
[    3.161828] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    3.171365] UBIFS: FS size: 44441600 bytes (42 MiB, 350 LEBs), journal size 2285568 bytes (2 MiB, 18 LEBs)
[    3.181432] UBIFS: reserved for root: 2099086 bytes (2049 KiB)
[    3.187486] UBIFS: media format: w4/r0 (latest is w4/r0), UUID CD865533-FB06-4909-B253-81E39CBAA5D4, small LPT model
ubi0:rootfs / ubifs rw,relatime 0 0
Starting /etc/init.d/S30_mount_userdata : end 
Starting /etc/init.d/S39_recovery : begin 
Starting /etc/init.d/S39_recovery : end 
Starting bluetooth...
Starting sys_server...
Starting /etc/init.d/S92_03_start_music_player : begin Starting /etc/init.d/S92_03_start_music_player : end Starting /etc/init.d/S99__99__end : begin 
[    3.379936] clear SIGNATURE
Starting /etc/init.d/S99__99__end : end 
(SYS:D)sys_server: Build Jan  7 2017 17:54:51
# lg_system_main in
(GUI:D)lg_system: build time: Jan 11 2017 15:12:39.
(GUI:D)system_if: 658 s_power_type 0
(GUI:D)x1000: lg platform init.
(GUI:D)lg_class: lg class init.
(GUI:D)render_mpf: construct.
(GUI:D)render_mpf: res 128,160 virtual 128,160, line_len 512
(GUI:D)render_mpf: dim 31,31
(GUI:D)x1000: lg platform init render 70f02c.
(MGR:E)ot_json: 32000
(MGR:E)ot_device: 32000(MGR:E)ot_json: 44100
(MGR:E)ot_device: 44100(MGR:E)ot_json: 48000
(MGR:E)ot_device: 48000(MGR:E)ot_json: 88200
(MGR:E)ot_device: 88200(MGR:E)ot_json: 96000
(MGR:E)ot_device: 96000(MGR:E)ot_json: 32000
(MGR:E)ot_device: 32000(MGR:E)ot_json: 44100
(MGR:E)ot_device: 44100(MGR:E)ot_json: 48000
(MGR:E)ot_device: 48000(MGR:E)ot_json: 88200
(MGR:E)ot_device: 88200(MGR:E)ot_json: 96000
(MGR:E)ot_device: 96000(MGR:I)ot_device: Imported 4 devices.
(MGR:I)ot_device: Imported 7 ports.
(MGR:I)ot_device: Imported 0 volumes.
sa_thread_begin status:0
(SYS:D) Libsystem Build Dec 14 2016 17:30:14block num:1
sa_thread_begin status:0
event open success , fd -> 6.
Fri Aug 22 05:05:12 CST 2014
&0001 = 0014 03f1 0030 4254
[    3.909644] android_usb: already disabled
(GUI:D)lg_system: lg_platform_init
Loading 0x212c ... done
Loading 0x212d ... done
Loading 0x212e ... (GUI:E)system_if: 98 value 0.000000  ret -2
left_volume = 52 right_volume = 52
 (GUI:D)system_if: hw vol left_level = 34  right_level = 34
(GUI:D)system_if: system_if_usb_select_device, val: 1
(GUI:D)system_if: system_if_select_spdif_lineout
done
Loading 0x212f ... done
Loading 0x2130 ... done
Loading 0x2131 ... done
Loading 0x2132 ... done
Loading 0x2133 ... sa_thread_begin status:0
done
Loading 0x2134 ... sa_thread_begin status:0
done
Loading 0x2135 ... done
Loading 0x2136 ... done
Loading 0x2137 ... done
Loading 0x2184 ... done
Loading 0x21fc ... done
Loading 0x257a ... done
Loading PSKEY_BDADDR ... done
Loading PSKEY_ANA_FREQ ... done
Loading PSKEY_HOST_INTERFACE ... done
Loading PSKEY_UART_BAUDRATE ... done
Loading PSKEY_PCM_CONFIG32 ... done
Loading PSKEY_PCM_FORMAT ... done
Loading PSKEY_LM_TEST_SEND_ACCEPTED_TWICE ... done
Loading PSKEY_LC_DEFAULT_TX_POWER ... done
Loading PSKEY_ANA_FREQ ... done
Loading PSKEY_DEEP_SLEEP_STATE ... done
Loading PSKEY_DEEP_SLEEP_USE_EXTERNAL_CLOCK ... done
Loading 0x2578 ... done
Loading 0x216d ... done
Loading 0x2175 ... done
Loading PSKEY_ANA_FTRIM ... done
Loading 0x241a ... done
Loading PSKEY_CLOCK_REQUEST_ENABLE ... done
Loading PSKEY_UART_HOST_WAKE_SIGNAL ... done
Loading PSKEY_UART_HOST_WAKE ... done
(GUI:D)lg_font_ft2: construct.
(SYS:E)mount_service: umount /mnt/sd_0 error <No such file or directory>
(GUI:D)system_msg_init: MOUNT:UMOUNT:FAIL
(SYS:E)mount_service: umount /mnt/sda_0 error <No such file or directory>
(GUI:D)lg_sys_messager_check: ****************************
(GUI:D)lg_sys_messager_check: g_message.result = MOUNT:UMOUNT:FAIL
(GUI:D)lg_message_thread: SD_UNMOUNT_MSG
(GUI:D)system_msg_init: MOUNT:UMOUNT:FAIL
(GUI:D)lg_sys_messager_check: ****************************
(GUI:D)lg_sys_messager_check: g_message.result = MOUNT:UMOUNT:FAIL
(GUI:D)lg_message_thread: SD_UNMOUNT_MSG
(GUI:D)lg_font_log: construct.
(GUI:D)lg_guimain: lg_topbar_init
sa_thread_begin status:0
(GUI:D)lg_guimain: lg_win_manage_init
(GUI:D)lg_guimain: lg_activity_mng_init
(GUI:D)event_input: construct.
sa_thread_begin status:0
(GUI:D)lg_guimain: lg_ial_init
(GUI:D)lg_system: lg_gui_init
sa_thread_begin status:0
BAL/D Balance module init
BAL/D HiBy host magic = 79426948
BAL/D HiBy host version = 1.0
BAL/D construct
sa_thread_begin status:0
sa_thread_begin status:0
(GUI:D)lg_system: lg_system_soft_init
(GUI:D)system_if: 663 s_power_type 0
left_volume = 52 right_volume = 52
 (GUI:D)system_if: hw vol left_level = 34  right_level = 34
(GUI:D)lg_system: lg_system_init
(GUI:D)lg_activity_mng: running activity lg_activity_launcher
Device setup complete
Name: AGPTEK ROCKER -> AGPTEK ROCKER
Agent registered
Powered: 1 -> 0

# cat /proc/cpuinfo
system type  : k1
machine   : Unknown
processor  : 0
cpu model  : Ingenic Xburst V4.15  FPU V0.0
BogoMIPS  : 1001.88
wait instruction : yes
microsecond timers : no
tlb_entries  : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 1, address/irw mask: [0x0fff]
isa   : mips32r1
ASEs implemented :
shadow register sets : 1
kscratch registers : 0
core   : 0
VCED exceptions  : not available
VCEI exceptions  : not available

Hardware  : k1
Serial   : 00000000 00000000 00000000 00000000

# ps auxw
PID   USER     TIME   COMMAND
    1 root       0:02 {linuxrc} init
    2 root       0:00 [kthreadd]
    3 root       0:00 [ksoftirqd/0]
    4 root       0:05 [kworker/0:0]
    5 root       0:00 [kworker/0:0H]
    6 root       0:00 [kworker/u2:0]
    7 root       0:00 [rcu_preempt]
    8 root       0:00 [rcu_bh]
    9 root       0:00 [rcu_sched]
   10 root       0:00 [khelper]
   11 root       0:00 [writeback]
   12 root       0:00 [bioset]
   13 root       0:00 [kblockd]
   14 root       0:00 [khubd]
   15 root       0:00 [irq/89-usb-dete]
   17 root       0:00 [kswapd0]
   18 root       0:00 [crypto]
   34 root       0:00 [kworker/u2:1]
   36 root       0:00 [irq/9-jz-asoc-a]
   37 root       0:00 [krfcommd]
   38 root       0:00 [deferwq]
   39 root       0:00 [ubi_bgt0d]
   40 root       0:00 [ubi_bgt1d]
   41 root       0:00 [f_mtp]
   42 root       0:00 [file-storage]
   43 root       0:00 [ubifs_bgt0_0]
   68 root       0:00 [ubifs_bgt1_0]
   76 root       0:00 /usr/bin/sys_server
   80 root       0:00 {hiby_player.sh} /bin/sh /usr/bin/hiby_player.sh
   85 root       0:00 -/bin/sh
   96 root       0:22 /usr/bin/hiby_player
   98 dbus       0:00 dbus-daemon --config-file=/etc/dbus-1/system.conf
  115 root       0:00 [kworker/0:3]
  122 root       0:00 [kworker/u3:0]
  123 root       0:00 [hci0]
  124 root       0:00 [hci0]
  127 root       0:00 [kworker/u3:1]
  128 root       0:00 hciattach -s 115200 ttyS0 bcsp 921600
  132 root       0:00 bluetoothd
  135 root       0:00 bt-agent
  136 root       0:00 bt-monitor
  197 root       0:00 [kworker/0:1]
  209 root       0:00 ps auxw

# mount
rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /dev type tmpfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
ubi1_0 on /data type ubifs (rw,relatime)

# amixer
Simple mixer control 'CS42L51 Gain',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'Left',0
  Capabilities: pvolume pvolume-joined
  Playback channels: Mono
  Limits: Playback 0 - 255
  Mono: Playback 0 [0%]
Simple mixer control 'Right',0
  Capabilities: pvolume pvolume-joined
  Playback channels: Mono
  Limits: Playback 0 - 255
  Mono: Playback 0 [0%]

# amixer contents
numid=3,iface=MIXER,name='CS42L51 Gain'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=0
numid=1,iface=MIXER,name='Left Playback Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=255,step=0
  : values=0
numid=4,iface=MIXER,name='Output Port Switch'
  ; type=INTEGER,access=rw------,values=1,min=0,max=5,step=0
  : values=0
numid=2,iface=MIXER,name='Right Playback Volume'
  ; type=INTEGER,access=rw------,values=1,min=0,max=255,step=0
  : values=0

# mtdinfo -a
Count of MTD devices:           6
Present MTD devices:            mtd0, mtd1, mtd2, mtd3, mtd4, mtd5
Sysfs interface supported:      yes

mtd0
Name:                           uboot
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          4 (524288 bytes, 512.0 KiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             true

mtd1
Name:                           logo
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          20 (2621440 bytes, 2.5 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true

mtd2
Name:                           kernel
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          48 (6291456 bytes, 6.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:4
Bad blocks are allowed:         true
Device is writable:             true

mtd3
Name:                           recovery
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          56 (7340032 bytes, 7.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:6
Bad blocks are allowed:         true
Device is writable:             true

mtd4
Name:                           rootfs
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          512 (67108864 bytes, 64.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:8
Bad blocks are allowed:         true
Device is writable:             true

mtd5
Name:                           data
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          384 (50331648 bytes, 48.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  2048 bytes
OOB size:                       64 bytes
Character device major/minor:   90:10
Bad blocks are allowed:         true
Device is writable:             true

Keys

Events reported are of type EV_KEY (1). Key press is signaled by value = 0x00010000, key release by value = 0x00000000

/dev/input/event0 handles LEFT, RIGHT, UP, DOWN and SELECT

linux code values for buttons are: KEY_LEFT (105), KEY_RIGHT (106), KEY_UP (103), KEY_DOWN (108), KEY_PLAYPAUSE (164)

/dev/input/event1 handles VOUME+, VOLUME- and POWER

linux code values for this buttons are: KEY_VOLUMEUP (115), KEY_VOLUMEDOWN (114), KEY_POWER (116)

Battery

The status of the battery can be read through somewhat standard sysfs interface reading/writing files in /sys/class/power_supply/battery directory

status - Charging/Discharging

voltage_max_design - Design max voltage of the battery (4200, seems to be in mV)

voltage_min_design - Design min voltage of the battery (3400, seems to be in mV)

voltage_now - Current voltage of the battery (for example 4164000 - lookout for units, it is in uV)

current_now - Current current draw (for example 142000 at max backlight brightness - in uA units)

Other entries seems usless

Backlight

The backlight might be controlled through somewhat standard sysfs interface reading/writing files in /sys/class/backlight/pwm-backlight.0

brightness - current setting (0-255)

max_brightness - maximum allowed setting (255)

bl_power - 0 for ON, other values for OFF (according to Documentation/ABI/stable/sysfs-class-backlight it should be 4 acutally but driver seems to not care)

Other entries seems usless

RTC

Standard linux 'new' rtc interface with read only access in /sys/class/rtc/rtc0, device in /dev/rtc0 and proc interface in /proc/driver/rtc

Screen

Displaying content on lcd is done through more or less standard FrameBuffer interface. The device is /dev/fb0. The only catch is that ioctl(fd, FBIOPAN_DISPLAY, &vinfo) is needed to force screen refresh.

There is non-standard ioctl to disable/enable lcd controller, as well as /sys/class/graphics/fb0/blank file (writing 1 disables lcd AND backlight, writing 0 enables lcd AND backlight).

System server

There is a system daemon /usr/bin/sys_server that receives messages over the unix socket /var/run/sys_server and processes them. The answer is returned over another unix socket /var/run/sys_client on which client (hiby_player) listens.

The messages are always zero-terminated strings that are parsed by the daemon.

The daemon answers with one (or more ?) message strings.

Command Format Return Format Action Comment
Mount Service      
MOUNT:MOUNT:%s %s   mount %1 at %2  
MOUNT:UMOUNT:%s   umount %1  
MOUNT:SETLUN:%s %s   if %2 = "empty" then write %2 to file %1, otherwise write "" to file %1  
| MOUNT:FORMAT:%s %s %[^ ] | | umounts and format | |
Log Service      
LOG:%s   set log level to %1 (only recognized level is "debug")  
Bluetooth Service      
BT:ON BT:ON:WAITINIT or BT:ON:FAIL turn bluetooth services on (does a lot of stuff)  
BT:OFF BT:OFF:OK or BT:OFF:FAIL turn bluetooth services off  
BT:DISCOVER BT:DISCOVER:OK or BT:DISCOVER:FAIL set addapter as discoverable (bt-adapter --set "Discoverable" "On")  
BT:NONDISCOVER BT:NONDISCOVER:OK or BT:NONDISCOVER:FAIL set adapter as non discoverable (bt-adapter --set "Discoverable" "Off")  
BT:LIST BT:LIST:OK or BT:LIST:FAIL bt-device -l -p /data/bt_list.txt List added devices
BT:PAIR:%s BT:PAIR:OK or BT:PAIR:FAIL bt-device -c %s Connect by MAC, retrive all SDP and initiate pairing. When successful add device to 'known devices list'
BT:UNPAIR:%s BT:UNPAIR:OK or BT:UNPAIR:FAIL bt-device -d %s; bt-device -r %s Disconnect and remove device (by MAC or name) from 'known devices list'
BT:CONNECT:%s BT:CONNECT:OK or BT:CONNECT:FAIL bt-connect -c %s  
BT:DISCONNECT:%s BT:DISCONNECT:OK or BT:DISCONNECT:FAIL bt-connect -d %s  
BT:SCAN BT:SCAN:OK or BT:SCAN:FAIL bt-adapter -d -p /data/bt_scan.txt Initiate discovery of nearby devices
BT:SCAN:CANCEL ?    
BT:STATUS:%s BT:STATUS:OK or BT:STATUS:FAIL bt-device -i %s > /data/bt_status.txt Show information about given device (by MAC or name)
BT:CONTROL:%s %s BT:CONTROL:OK or BT:CONTROL:FAIL bt-control -d %s -o %s  
BT:SETNAME:%s BT:SETNAME:OK or BT:SETNAME:FAIL set player name (bt-adapter --set "Name" "%s"  
Findable Service      
FINDABLE:START:xxxx      
FINDABLE:STOP:xxxx      
USB Service      
Wifi Service      

Codec

Cirrus Logic CS42L51. Alsa mixer supports three settings:
  • Gain with setting in range 0-7 which corresponds with 'DAC Output Control' (08h) register field HP_GAIN. According to documentation this directly influences max output power. Default is set to 1.0
  • Left and Right with setting range 0-255 which corresponds with 'AOUTA' (16h) and 'AOUTB' (17h) registers. Left and Right Playback Volume sets attenuation of HP output. Although configuration seems to suggest this are separate settings, tests show it behaves like combined (although logic analyzer shows i2c transfers to appropriate DAC registers). Driver has broken arithmetic of attenuation and allows to set it in range -0.5 - -102dB in 0.5dB increments. Because of off-by-one bug it is also possible to set +12dB volume (for value 231).
  • Output Port Switch which for value 2 setups DAC to output sound to headphones.

Scratchpad

Here are my random notes what to check on device:

  • echo recovery > /proc/jz/reset/reset
When reading this file it returns 'wdt hibernate recovery clear'. Writing "recovery" boots into recovery image which alows to perform upgrade. See notes on upgrade procedure flow.

  • echo mem > /sys/power/state
This seems to put device into suspend mode but I am unable to recover from this state other then by hard reseting (hold POWER button for 10+ seconds)

  • document usage of /sys/class/android_usb/android0/*
  • check /sys/class/power_supply/ac/online, /sys/class/power_supply/usb/online
  • check what is in /sys/class/axppower/axppoweron_type
Seems to return what caused poweron event (KEY, VBUS)
  • check /sys/bus/platform/devices/earpods_adc.0/earpods_adc/earpods_adc_sw
Does not exist on my device with hp plugged or not.

  • hiby_player:usb_dac_init() opens /dev/uac_sa
  • hiby_player:usb_dac_set_dsd_mode() echo on|off > /sys/class/android_usb/f_uac_sa/dsd_native_enable

USB, HP and SD plug/unplug is reported as uevents.

USB plug:
change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/battery
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/battery
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_MODEL_NAME=battery
POWER_SUPPLY_STATUS=Not charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3400
POWER_SUPPLY_VOLTAGE_NOW=3730000
POWER_SUPPLY_CURRENT_NOW=60000
SEQNUM=581

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/usb
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/usb
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=usb
POWER_SUPPLY_MODEL_NAME=usb
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_NOW=4916000
POWER_SUPPLY_CURRENT_NOW=103000
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=800
POWER_SUPPLY_CHARGE_CONTROL_LIMIT_MAX=500
SEQNUM=582

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/ac
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/ac
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=ac
POWER_SUPPLY_MODEL_NAME=ac
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_NOW=4935000
POWER_SUPPLY_CURRENT_NOW=0
SEQNUM=583

change@/devices/virtual/android_usb/android0
ACTION=change
DEVPATH=/devices/virtual/android_usb/android0
SUBSYSTEM=android_usb
USB_STATE=CONNECTED
SEQNUM=584

change@/devices/virtual/android_usb/android0
ACTION=change
DEVPATH=/devices/virtual/android_usb/android0
SUBSYSTEM=android_usb
USB_STATE=CONFIGURED
SEQNUM=585

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/battery
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/battery
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_MODEL_NAME=battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3400
POWER_SUPPLY_VOLTAGE_NOW=3732000
POWER_SUPPLY_CURRENT_NOW=367000
SEQNUM=586

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/usb
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/usb
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=usb
POWER_SUPPLY_MODEL_NAME=usb
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_NOW=4464000
POWER_SUPPLY_CURRENT_NOW=448000
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=800
POWER_SUPPLY_CHARGE_CONTROL_LIMIT_MAX=500
SEQNUM=587

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/ac
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/ac
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=ac
POWER_SUPPLY_MODEL_NAME=ac
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_NOW=4486000
POWER_SUPPLY_CURRENT_NOW=0
SEQNUM=588

USB unplug:
change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/battery
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/battery
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_MODEL_NAME=battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3400
POWER_SUPPLY_VOLTAGE_NOW=3878000
POWER_SUPPLY_CURRENT_NOW=0
SEQNUM=589

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/usb
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/usb
SUBSYSTEM=power_supply
POWER_SUPPLY_NAME=usb
POWER_SUPPLY_MODEL_NAME=usb
POWER_SUPPLY_PRESENT=0
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_VOLTAGE_NOW=3570000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=800
POWER_SUPPLY_CHARGE_CONTROL_LIMIT_MAX=500
SEQNUM=590

change@/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/ac
ACTION=change
DEVPATH=/devices/platform/jz-i2c.2/i2c-2/2-0034/axp-supplyer.9/power_supply/ac
SUBSYSTEM=power_supply
POWER_SUPPLY_MODEL_NAME=ac
POWER_SUPPLY_PRESENT=0
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_VOLTAGE_NOW=3656000
POWER_SUPPLY_CURRENT_NOW=0
SEQNUM=591

change@/devices/virtual/android_usb/android0
ACTION=change
DEVPATH=/devices/virtual/android_usb/android0
SUBSYSTEM=android_usb
USB_STATE=DISCONNECTED
SEQNUM=592

Usb status corresponds to the content of /sys/class/android_usb/android0/status (CONNECTED | CONFIGURED | DISCONNECTED)

HP plug:
change@/devices/virtual/switch/headset
ACTION=change
DEVPATH=/devices/virtual/switch/headset
SUBSYSTEM=switch
SWITCH_NAME=headset
SWITCH_STATE=1
SEQNUM=593

HP unplug:
change@/devices/virtual/switch/headset
ACTION=change
DEVPATH=/devices/virtual/switch/headset
SUBSYSTEM=switch
SWITCH_NAME=headset
SWITCH_STATE=0
SEQNUM=594

This corresponds to value in /sys/devices/switch/headset/status

SD eject:
remove@/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1
ACTION=remove
DEVPATH=/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1
SUBSYSTEM=block
MAJOR=179
MINOR=1
DEVNAME=mmcblk0p1
DEVTYPE=partition
PARTN=1
SEQNUM=595

remove@/devices/virtual/bdi/179:0
ACTION=remove
DEVPATH=/devices/virtual/bdi/179:0
SUBSYSTEM=bdi
SEQNUM=596

remove@/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
ACTION=remove
DEVPATH=/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
SUBSYSTEM=block
MAJOR=179
MINOR=0
DEVNAME=mmcblk0
DEVTYPE=disk
NPARTS=0
SEQNUM=597

remove@/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa
ACTION=remove
DEVPATH=/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa
SUBSYSTEM=mmc
MMC_TYPE=SD
MMC_NAME=SU08G
MODALIAS=mmc:block
SEQNUM=598

SD insert:
add@/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa
ACTION=add
DEVPATH=/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa
SUBSYSTEM=mmc
MMC_TYPE=SD
MMC_NAME=SU08G
MODALIAS=mmc:block
SEQNUM=599

add@/devices/virtual/bdi/179:8
ACTION=add
DEVPATH=/devices/virtual/bdi/179:8
SUBSYSTEM=bdi
SEQNUM=600

add@/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
ACTION=add
DEVPATH=/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
SUBSYSTEM=block
MAJOR=179
MINOR=8
DEVNAME=mmcblk0
DEVTYPE=disk
NPARTS=1
SEQNUM=601

add@/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1
ACTION=add
DEVPATH=/devices/platform/jzmmc_v1.2.0/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0/mmcblk0p1
SUBSYSTEM=block
MAJOR=179
MINOR=9
DEVNAME=mmcblk0p1
DEVTYPE=partition
PARTN=1
SEQNUM=602

For some reason asm threading is broken on hosted mips. For now sigaltstack threading seems to work so I'll stick to it to get something working.

Bluetooth stuff is controlled though DBus. Libraries present on device are dbus-1.10.2, dbus-glib-0.104 and glib-2.46.1

Recovery procedure overview

mtd3 contains recovery image. It is kernel with glued initramfs. Writing 'recovery' to /proc/jz/reset/reset reboots system into this recovery image. Hotplug support script mounts SD card and looks for update.upt upgrade file. This file is ISO9660 image containing a few image files and description file which drives upgrade procedure. If the update.upt file is found it is loop mounted to /mnt/autoupdate/autoupdate directory. Startup script of the recovery image runs /sbin/recoveryd program which performs flashing in a way described in update.txt description file. There is possibility to update uboot loader (mtd0), logo image (mtd1), kernel (mtd2), recovery (mtd3), rootfs (mtd4) and user data (mtd5).

mtd0: Uboot loader is stored in raw binary form preceded by some header (probably used by rom loader to figure a few crucial parameters).

mtd1: logo image is stored in raw binary form 128x160 32bpp BGRA format (this is AGPTEK startup logo obviously).

mtd2: kernel is uBoot legacy image containing gzip compressed linux kernel.

mtd3: recovery image is uBoot legacy image containing gzip compressed linux kernel + initramfs image containing recovery system

mtd4: rootfs is ubifs image of /

mtd5: This volume contains user data (bookmarks, playlists, eq presets). I never saw image populating this in update file.

file version.txt

version={
    name=
    ver=
}

file update.txt

bootloader={
    name=
    file_path=
    md5=
}

kernel={
    name=
    file_path=
    md5=
}

splash={
    name=
    file_path=
    md5=
}

rootfs={
    name=
    full_upgrade=
    file_path=
    md5=
}

userfs={
    name=
    full_upgrade=
    file_path=
    md5=
}

TODOs in random order

  • Improve key mapping
  • Figure out how to use BT
  • Figure out install procedure for non-Linux systems (Notably, tools to repack UBIFS)
  • Disasm of hiby_player shows interesting commands 'bt_aptx on' and 'bt_aptx off'
  • Experiment with alsa sink switching. Disasm of hiby_player suggests that inserting section in /etc/asound.conf in form
pcm.AA:BB:CC:DD:EE:FF {
    type bluetooth
    bdaddr AA:BB:CC:DD:EE:FF
    profile a2dp
}
where AA:BB:CC:DD:EE:FF is MAC of connected and paired headset adds new target

-- AmauryPouly - 07 Feb 2017

I Attachment Action Size Date Who Comment
PCB26495_(1).jpgjpg PCB26495_(1).jpg manage 363.5 K 20 Feb 2017 - 21:04 AmauryPouly  
PCB26495_(2).jpgjpg PCB26495_(2).jpg manage 378.9 K 20 Feb 2017 - 21:04 AmauryPouly  
n0x8s7.jpgjpg n0x8s7.jpg manage 461.7 K 07 Feb 2017 - 19:45 LudovicJacques Pic found on a webshop selling the Benjie T6. Referred here as K1
step1.jpgjpg step1.jpg manage 58.9 K 20 Feb 2017 - 21:03 AmauryPouly  
step2.jpgjpg step2.jpg manage 63.4 K 20 Feb 2017 - 21:03 AmauryPouly  
step3.jpgjpg step3.jpg manage 72.0 K 20 Feb 2017 - 21:03 AmauryPouly  
step4.jpgjpg step4.jpg manage 68.6 K 20 Feb 2017 - 21:03 AmauryPouly  
step5.jpgjpg step5.jpg manage 77.3 K 20 Feb 2017 - 21:04 AmauryPouly  
r31 - 02 Apr 2021 - 20:46:06 - UnknownUser

Copyright © by the contributing authors.