Rockchip RK3328 (H96 TV-Box)

This is for ARMv8 based devices

Rockchip RK3328 (H96 TV-Box)

Postby igelbox » Tue Sep 24, 2019 10:24 pm

Well, I spent several days trying to boot Archlinux ARM on H96 TV-Box and got so far. So, lemme explain investigation results and hope if anyone will help me to finish the work.

The idea was to connect to the Linux serial console via UART, so, playing for several minutes with a multimeter I figured out the UART port uses 3.3V voltage and after a barbaric way of soldering and a couple of attempts, it spills the RT/TX layout (see the h96-top.jpg attachment).
But, after connecting via (minicom -b1500000 -D/dev/ttyUSB0 -C log), what I was seeing was only a sequence of "cryptographic" characters. Changing baud-rate and pulling signal lines using resistors brought nothing useful. After minutes of research and changing USB-UART converter, it showed me the boot log and login prompt (see the 0-android.boot.log.gz attachment). Well, it happened the previous USB-UART didn't manage to work at 1500000 baud rate.

The next steps were:
- mounting an external SD card
- dumping all the internal /dev/block/mmcblk2 partitions in order to unpack them and find something useful (like DTB) in there.
Attachments
0-android.boot.log.gz
Original Android boot log
(28.73 KiB) Downloaded 465 times
h96-uart-solder.jpg
A barbaric way of soldering UART
h96-uart-solder.jpg (221.12 KiB) Viewed 6756 times
h96-top.jpg
Board top and UARL layout
h96-top.jpg (244.37 KiB) Viewed 6756 times
igelbox
 
Posts: 7
Joined: Wed May 22, 2019 9:27 pm

Re: Rockchip RK3328 (H96 TV-Box)

Postby igelbox » Tue Sep 24, 2019 10:36 pm

I had a dump. That was the time to play with some custom third-party firmware. The Archlinux ARM for Rock64 looked the most closer to my hardware, so, I followed the instructions from https://archlinuxarm.org/platforms/armv8/rockchip/rock64 but got an error (see 1-rock64.log.gz attachment).
Then, I dd if=trust.img of=/dev/mmcblk0 seek=24576 conv=notrunc the original trust.img dumped from Android. And got a stuck attempting to mount the root partition:
$this->bbcode_second_pass_code('', '[ 5.594285] Run /init as init process
:: running early hook [udev]
Starting version 242.84-1-arch
:: running hook [udev]
:: Triggering uevents...
Waiting 10 seconds for device /dev/disk/by-partuuid/d7b6554e-01 ...
ERROR: device 'PARTUUID=d7b6554e-01' not found. Skipping fsck.
:: mounting 'PARTUUID=d7b6554e-01' on real root
mount: /new_root: can't find PARTUUID=d7b6554e-01.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
')
ls /dev said there's no any mmc-like devices (see 2-original-trust.log.gz attachment).

OK, it seemed the issue was in DTB (rk3328-rock64.dtb didn't suit the hardware) and I tried a DTB unpacked from Android boot partition, but, with no success (see 3-unpack_bootimg-dtb.log.gz attachment) the boot process just stuck.
Attachments
3-unpack_bootimg-dtb.log.gz
Boot using a DTB from Android boot partition
(6.3 KiB) Downloaded 518 times
2-original-trust.log.gz
Use the original Android trust.img
(8.05 KiB) Downloaded 443 times
1-rock64.log.gz
Initial Rock64 guide log
(1.34 KiB) Downloaded 451 times
igelbox
 
Posts: 7
Joined: Wed May 22, 2019 9:27 pm

Re: Rockchip RK3328 (H96 TV-Box)

Postby igelbox » Tue Sep 24, 2019 10:45 pm

Then I boot into original Android and dumped /sys/firmware/fdt to use it instead of original rk3328-rock64.dtb, but, with no luck. Both of two attempts failed with different kind of errors, e.g.
$this->bbcode_second_pass_code('', '[ 5.408412] Unable to handle kernel NULL pointer dereference at virtual address 000000000000004d
[ 5.409220] Mem abort info:
[ 5.409478] ESR = 0x96000004
[ 5.409763] Exception class = DABT (current EL), IL = 32 bits
[ 5.410308] SET = 0, FnV = 0
[ 5.410591] EA = 0, S1PTW = 0
')
Attachments
4-android--sys-firmware-fdt.1.log.gz
Boot caused kernel paging error
(6.68 KiB) Downloaded 447 times
4-android--sys-firmware-fdt.0.log.gz
Boot caused NULL pointer dereference error
(7 KiB) Downloaded 471 times
4-android--sys-firmware-fdt.dtb.gz
Android FDT/DTB
(20.62 KiB) Downloaded 454 times
igelbox
 
Posts: 7
Joined: Wed May 22, 2019 9:27 pm

Re: Rockchip RK3328 (H96 TV-Box)

Postby igelbox » Tue Sep 24, 2019 11:01 pm

Finally, I got the working Archlinux ;), but, by using the original Android Linux kernel by:
$this->bbcode_list('1')
  • Unpacking kernel from Android boot partition.
  • Copying it to /boot/Image.
  • Using a modified boot.scr (see attachments).

  • Moreover, built-in WiFi adapter works well since I:
    $this->bbcode_list('1')
  • Copied /vendor/lib/modules/* and firmware files from the original Android into respective /vendor/* directories.
  • Added firmware_class.path=/vendor/etc/firmware to the kernel commendline.
  • Called insmod /vendor/lib/modules/bcmdhd.ko

  • But, there's still trouble - I have no idea how to run X-server using this kernel. Coz, there's no /dev/ttyN devices, but, startx requires one of them :(.
    Hopefully, someone could help me.
    Attachments
    5-android-kernel--success.log.gz
    Success boot log
    (18.49 KiB) Downloaded 482 times
    boot.scr.gz
    Working boot.scr
    (486 Bytes) Downloaded 466 times
    igelbox
     
    Posts: 7
    Joined: Wed May 22, 2019 9:27 pm


    Return to ARMv8 Devices

    Who is online

    Users browsing this forum: No registered users and 2 guests