Posts by ukmark62

    You are welcome!

    I'll try to answer whatever I can. I'm just kind of an advanced linux user, by no means I'm a developer.

    If you are interested in what dd does try man dd in a console window, or well... dd(1) - Linux manual page

    Its not perfect, neither specifically for H6, but its an intro to the boot process: http://linux-sunxi.org/boot_process

    http://linux-sunxi.org/bootable_sd_card

    I repeated the process and the sd card was "empty". Inserted into the Tanix TX6 box and switched on with UART connected. The log is the same as I posted earlier - thinking about it, it would be the same. All those times when I was dd'ing to /dev/sdb and thinking it was doing nothing, it was in fact overwriting the .bin file (even though I couldn't see it). So all is well and I understand a little more........

    ukmark62 that dd command jernej gave you before means that you take the spl file as input (if=) and are writing it to your sdb as an output (of=) with a blocksize of 1024 (bs=) and before you write you skip 8 blocks (seek=)

    So all you do is write the raw bits of your spl in the empty space between the MBR of the card and the first partition (sdb1)

    So you won't see any files, but the rom bootloader code of the H6 checks at this very location for a magic number of a bootloader and if present loads the spl.

    Thanks so much for that - I was really confused. All this stuff is greek to me. Big learning curve ahead. So basically, I will still have an empty sd card after the dd command - but the file is there and hidden. I'll give it a go later and let you know how it goes - thx again :thumbup:

    Note that sdb1 means partition. You want to write to raw SD card, which is achieved by removing the number, so you should use only /dev/sdb

    Still nothing showing up. I am using a USB card adapter which contains the SD card. Can't I just drag and drop the file to the SD card??:-

    mark@mark-VirtualBox:~/u-boot$ sudo fdisk -l

    [sudo] password for mark:

    Disk /dev/sda: 160.4 GiB, 172197150720 bytes, 336322560 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: 0x7b0db11c

    Device Boot Start End Sectors Size Id Type

    /dev/sda1 * 2048 325560319 325558272 155.2G 83 Linux

    /dev/sda2 325560320 336322559 10762240 5.1G 5 Extended

    /dev/sda5 325562368 336322559 10760192 5.1G 82 Linux swap / So

    Disk /dev/sdb: 29.9 GiB, 32044482560 bytes, 62586880 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: 0x00253ab3

    Device Boot Start End Sectors Size Id Type

    /dev/sdb1 2048 62586879 62584832 29.9G c W95 FAT32 (LBA)

    mark@mark-VirtualBox:~/u-boot$ sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8

    355+1 records in

    355+1 records out

    364324 bytes (364 kB, 356 KiB) copied, 0.0218032 s, 16.7 MB/s

    EDIT: I went ahead and just dragged and dropped the file to the sd card and inserted it into the TX6 and switched on with UART connected and attached is log of that. It mentions RAM of 2gb in the log, should that not be 4gb? The box is 4gb ram and 64gb rom (or supposed to be).

    h6-test1.txt

    Filesystem type doesn't matter because we will work on SPL itself (SPL - secondary program loader, this loads U-Boot binary). U-Boot also supports many filesystems, so FAT32 is not requirement, it could also be ext4 or something else.

    Anyway, 32-bit U-Boot without ATF (ARM trust firmware) and without correct DT can't really boot Linux. As I said earlier, it's only to examine how libdram intializes DRAM.

    You can burn U-Boot by executing sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 (replace sdX with actuall device name, check dmesg after you plugged in your SD card). Please double check device name, you don't want to corrupt your PC disk.

    I get the following in Ubuntu. It sees my sd card as /dev/sdb1, and shows that it writes data to the card (or so it appears), but the card is empty?? I'm hoping it's something simple I missed. Very new to ubuntu and the various commands.

    mark@mark-VirtualBox:~/u-boot$ sudo fdisk -l

    Disk /dev/sda: 160.4 GiB, 172197150720 bytes, 336322560 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: 0x7b0db11c


    Device Boot Start End Sectors Size Id Type

    /dev/sda1 * 2048 325560319 325558272 155.2G 83 Linux

    /dev/sda2 325560320 336322559 10762240 5.1G 5 Extended

    /dev/sda5 325562368 336322559 10760192 5.1G 82 Linux swap / So



    Disk /dev/sdb: 29.9 GiB, 32044482560 bytes, 62586880 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: 0x00253ab3


    Device Boot Start End Sectors Size Id Type

    /dev/sdb1 2048 62586879 62584832 29.9G c W95 FAT32 (LBA)

    mark@mark-VirtualBox:~/u-boot$ sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb1 bs=1024 seek=8

    355+1 records in

    355+1 records out

    364324 bytes (364 kB, 356 KiB) copied, 1.30929 s, 278 kB/s

    ukmark62 Congratulations! Small request, would you mind making basic device page with UART how-to on linux-sunxi.org (template: http://linux-sunxi.org/device_page_example)? You certainly don't need fill everything, but it would be nice to describe UART connection.

    Ideally, you should now find which of USB ports is USB OTG. That way you could experiment with U-Boot without SD card, but you would need to corrupt existing Android installation. You would also need USB A to A cable, which may damage hardware if wrongly used (5V line could be cut to lower chance to damage anything). You decide if fast experimenting without SD card is worth this trouble. If so, I can give you few more advices how to do that.

    If you are fine with burning your experimental U-Boot everytime to SD card, you could go to next step, which is to make working U-Boot with libdram (Allwinner DRAM driver). It's useful to have something which works and you then have register values which works for sure. Fortunately, someone already wrote short tutorial how to do that: https://forum.armbian.com/topic/10174-since-tanix-tx6-can-boot-from-the-sd-card/?do=findcomment&comment=80301

    Note: Before you start following above instructions, make sure you have 32-bit ARM compiler. On my distro it's arm-none-eabi-gcc. You should also execute export CROSS_COMPILE=arm-none-eabi-, so U-Boot build system will pick up correct compiler.

    I've got to the compile stage (relatively new to all this) and I get the following error when issuing the final "make". I'm opting for the SD card testing route. I have Ubuntu 16.04 installed using Oracle VM VirtualBox:-

    mark@mark-VirtualBox:~/u-boot$ make

    scripts/kconfig/conf --syncconfig Kconfig

    CHK include/config.h

    UPD include/config.h

    CFG u-boot.cfg

    GEN include/autoconf.mk

    GEN include/autoconf.mk.dep

    CFG spl/u-boot.cfg

    GEN spl/include/autoconf.mk

    *** Your GCC is older than 6.0 and is not supported

    arch/arm/config.mk:66: recipe for target 'checkgcc6' failed

    make: *** [checkgcc6] Error 1

    Had a look on internet and found lots of hits but I'm stuck here.

    Here is the config file I'm using named (eachlink_h6_mini_libdram_spl_defconfig). I modified 3 lines of the existing file as you can see below:-

    CONFIG_ARM=y

    CONFIG_ARCH_SUNXI=y

    CONFIG_SPL=y

    CONFIG_MACH_SUN50I_H6_32=y

    CONFIG_DRAM_SUN50I_H6=y /* this was previously not set */

    CONFIG_DRAM_SUN50I_H6_LIBDRAM=y

    CONFIG_MMC0_CD_PIN="PF6"

    CONFIG_MMC_SUNXI_SLOT_EXTRA=2

    # CONFIG_PSCI_RESET is not set

    CONFIG_NR_DRAM_BANKS=2 /* this was previously 1 - my box has 4GB RAM - what should this be set to???*/

    # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set

    # CONFIG_CMD_FLASH is not set

    # CONFIG_SPL_DOS_PARTITION is not set

    # CONFIG_SPL_EFI_PARTITION is not set

    CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-tanix-tx6" /* changed the device tree name - should it be changed back???? */

    jernej

    Getting garbage on the UART connection to Tanix TX6 H6 box as example below:-

    ▒▒▒▒▒▒▒▒R▒▒J▒▒▒▒▒ ▒H▒▒▒▒▒▒▒▒▒▒"DD▒▒▒▒▒▒▒i▒▒▒$▒▒ DD"$▒$▒▒▒▒▒▒$D$DD$▒▒▒▒ ▒▒▒▒B"DD▒▒▒▒▒▒▒▒JJ▒+▒▒▒DDDDDDDDDDDDD$▒ښ*▒▒I $D $▒▒▒▒▒▒▒▒▒▒▒R▒U▒k▒▒▒@▒▒▒▒▒▒▒▒DD$▒▒▒▒▒▒▒ӷ▒▒B D▒▒▒▒▒▒▒▒▒▒▒▒$$▒U▒▒ D $DD$▒▒▒▒▒▒▒▒Jj▒۽▒DB▒H▒▒▒▒▒▒▒▒DD▒▒*▒▒Z▒▒I▒B@HBHDD$▒▒▒▒▒▒▒▒▒▒▒▒▒&"▒▒▒$$$$▒▒$DD▒▒▒▒*▒Z▒▒▒▒▒▒ $D

    Any ideas? Could it be a baud rate setting? Thx

    The UART USB device does show a blue light and red light when communicating. I am a complete noob on this - amazed that I have managed to get a connection using de-soldering, header pins, multimeter for first time etc. :shy:

    EDIT: Just figured out the lights correspond to the UART USB GND connection (red) and RX connection (blue) - tiny markings on the UART USB device show that info. I do get flashing blue light also on the TX USB UART connection, but the GND and RX lights are always on during the putty session, Still getting garbage chars

    UPDATE: Solved it by switching a cable around - the TX port on the H6 board was in a different place to where I thought - but all working now. Getting lots of readable text on boot up.

    What are the next steps? Thx

    jernej

    I've made progress with the Tanix TX6 H6 board. I believe I've identified the TX,RX and GND pins with a multimeter. I de-soldered the holes and am now waiting in the post for some header pins to attach to the board in order to make the USB UART connection with cables. I'm hoping I don't have to solder the header pins to the board, as the distance between the holes is tiny and I doubt I could solder them without the solder touching other pins. However, the holes are small and I'm hoping that I can just attach the header pins without solder and get a tight enough fit for a connection.

    One thing, there are 5 pins on the board and 2 of the pins look like they could both be ground pins. They both beep when doing the continuity test and they both show zero voltage when the box is powered on. The pins are next to each other. I'm sure I have identified the VCC 3.3v(not to be used), TX(shows 3v) and RX(shows 0v) pins. Would it matter which of those 2 'ground' pins I used?

    jernej

    I have been on holiday and will be back later this week to work on the Tanix TX6 H6 box. I should have a multimeter and uart usb device when I get back. I will try to get the uart connection working then.

    ukmark62 First of all, I suggest you find serial port on the board and connect it. Maybe you can find how-to on the internet or you'll have to do it hard way to find it by yourself. I'm sure correct settings for it are 115200 8N1 (I haven't seen different settings on any AW board/box).

    Then we'll need DTB from Android. There might be way to extract it from running system, but I usually extract it from Android update file.

    These two steps are pre-requirement for later U-Boot and Linux configuration and testing.

    I'm planning on getting this UART:- USB to TTL CP2102 UART Module 5Pin Serial Convertor 5v 3.3v + FREE Cables 606034480971 | eBay

    Never done this before but I like new challenges. Found this video on how to do it:-

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    I got the info from here:- http://linux-sunxi.org/uart

    EDIT:

    Actually looks very difficult on an android TV box board. I can't find the 3 connectors (GND, TX and RX) on the Tanix TX6 board. Seems like the Pine H64 board has proper connection points for UART, but I don't see anything on the Tanix TX6.

    Search for K4B4G0446Q tells that this is DDR3L. Note that there is no software difference between DDR3 and DDR3L, later just uses lower voltage power. Anyway, are you up for the task of adding support for new RAM type? I can help you, but obviously I don't have such board to test changes.

    Thanks - if you let me know what to do, how to test it etc, I'll be happy to do it.

    Even Android 9.0 is garbage when it comes to Kodi.

    This box is responsive though.

    Just realized that LPDDR is different to DDR. I'll let you know what I find when the box comes. Thx.

    jernej - I've uploaded 2 full size images of the Tanix TX6 Allwinner H6 box (files are bigger than 1MB hence the upload). Hopefully you will be able to confirm what type of ram is installed.

    Thanks!

    Link here:- MEGA

    If it uses LPDDR3 RAM type then it's not that hard, matter of writing few configuration files. Confirm first that it indeed uses LPDDR3 RAM and then I'll guide you through the process. If it's not LPDDR3, then it's much harder since you have to support new RAM type in U-Boot H6 DRAM driver, but I can help you there too.

    Thanks much for your reply. The box is due to be delivered tomorrow. According to the sellers website, it has DDR3 ram.

    See snapshot below :-

    Main Features

    ● Android 9.0 operation system

    ● Allwinner H6 CPU, up to 1.5GHz, Quad core, ARM Cortex-A53

    ● Mali T720 GPU

    ● 4GB DDR3 RAM + 64GB EMMC ROM

    ● 2.4GHz + 5.8GHz dual-band WiFi

    ● 100Mbps Ethernet

    ● Support 6K ultra HD image display

    ● Support H.265 decoding

    Is there a way I can tell which type of RAM is installed?

    Also, would I have to create a dtb file? I'd need help with that.

    Cheers.

    Update 20190524.

    On s905X2 working the sound.

    Unfortunately, I can't boot with this image - just get device boot logo (T95m) flashing on and off.

    Previous images all worked fine - using Sunvell T95m S905x box with 2g/8g. I have been using dtb meson-gxl-s905x-p212.dtb in the UEnv.ini file.

    I also have Sunvell metal case T95 S905 box with 2g/8g that has never booted with the new kernel images. I've tried dtb meson-gxbb-p200.dtb and meson-gxbb-p201.dtb for that device. With the device, the T95 logo is stuck on the screen and then eventually the box boots to internal memory.

    Both these boxes work fine with 3.14 kernel images. Is this a dtb issue?

    Thank you.

    How much work is involved in adding support for the Tanix TX6 Allwinner H6 device?

    I'm familiar with github and compiling images on Ubuntu etc, but don't know the steps required to add a new device to the image.

    Is this documented anywhere? I have no problem doing all the heavy lifting.

    Thanks.

    HEVC has some rough spots but should generally play fine on GX (not G12A/B which has zero support for HEVC at the moment) hardware with 8-bit media. Most streamed HEVC media is 8-bit, but most ripped HEVC media is 10-bit and right now there is no 10-bit support in the HDMI driver.

    I hadn't thought of 8-bit vs 10-bit HW decode of HEVC. I have some 10-bit HEVC videos that do play fine, but most are unplayable with HW decoding on. I'll check some 8-bit vids. All of my older vids are 8-bit, the new ones are 10-bit. This is on GX player (S905x)