wdtz

Members
  • Content Count

    38
  • Joined

  • Last visited

 Content Type 

Forums

Member Map

Store

Crowdfunding

Raffles

Applications

Posts posted by wdtz


  1. OK, i'll make an attempt, please correct me where wrong

    dtc is kind of stupid, and device trees could definitely be improved

    I'll bet you don't have a compiler environment and that's the problem

    an example line, still symbolic,,, gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;

    The <&something,,> is an internal (only?) pointer in the dtb

    The next 2 elements are probably populated from an appropriate .h (header) file

    (specific to that hardware)

    So it becomes,,,  gpios = < 0x3e 0x02 0x01 >;  ( a random example)

    The dtc compiler can only deal with numbers

    There is also an include at the top, has to be merged in

     

    It would be a REAL improvement if the pointers, wherever possible

    had the same numbers as linux devices they represent

    (Probably that would be half, to differentiate the "made up"

    ones, add F0 00 00 00, so f0000001,f0000002, ...

    There could be a standard..... a device tree number standard)

     

    The &numbers seem to be somewhat random, 1st come I think

    All source dts are not written is same order and have different numbers of stanza's

    so, in 6 dts's for example for 3328, only 2 will almost match (&numbers)

    most confusing, pages of notes, a real pain


  2. understand, uboot and kernel have different dtb,  that is why h96max+ starts, with uboot as seen

    by serial cable, but then when hands over to kernel dtb does not power uSD slot, something non-standard

    with regulators. So, it can't find its root filesystem, because slot is dead, no power

    You see no hdmi display until quite late in the boot, so it seems dead, just can't read uSD slot

    It there is a usb stick ALSO plugged in, will find root fs on usb stick..  uSD slot continues dead, unpowered

    easyb and hexdump  have made dtb for h96max+/T9 that make regulators work.

    I don't know about other models

    ----edit----

    For my h96max+ there is a problem with usb2 port, in dmesg late in boot and periodically

    (with hexdumps' dtb, not with easyb's)

    genirq: Flags mismatch irq 13. 00000080 (serial) vs. 00004000 (debug)

    Quickly, the usb2 port 'locks up' there is no easy way to revive,,

    I am sure a suitable  unbind,bind would make it work for a bit, a bit esoteric

    But now, I am using easyb's dtb, a 5hr power out forced a shutdown (47d uptime)

    No problem with usb2 port


  3. I hope you don't expect me to do it for you?

    I am going to assume that you have broken that image up into the partition images

    I don't know if you are using win or linux, no matter

    There are hexeditors for both, a gui vesion is my recommendation,

    wxHex or okteta or ghex,  I tend to use okteta

    load kernel.img into hexeditor, control f , make sure the hex button is selected,

    enter the signature above.  It will be a good sign if it is found at the begining of the line,

    make a note of the address, keep searching. Then, in calculator, set decimal , address/1024, should be even, no remainder

    If so,, try        dd if=kernel.img of=test bs=1024 skip=(above number) count=70     (Input file, output file, block size)

    Check test, load into hexeditor, should begin with signature, if not, you screwed up

    Then try to decompile, as usual

    If you don't find it appended to kernel, search in other images


  4. Are you saying that there is no resource.img? You do know that the dtb is 2K into resource.img (IIRR)? use dd to strip

    Sometimes the dtb is appended to the kernel,,, anyway search, with a hexeditor for D0 0D FE ED 00, at an even K boundry

    d00dfeed00 it the "signature" for dtb's.  Most dtbs are about 60-65K in size

    Most of the resource.img is an (graphic) image file (or 2) for the splash screen

    I haven't found android dtbs to be very  useful

    And, BTW how well does easyb's dtb work for you,, does everything work, both usb, ethernet?

    I have 46d uptime, I seldom reboot


  5. Digit:  with a working and non-working situation,, compare

     

    lsusb ,,, lsusb | wc -l  ,,,    dmesg | tail -15 (just after dongle inserted,, ie unplug, replug)

    as root/sudo,,,   lsmod | grep ath  ,,, ifconfig

     

    If it doesn't show with lsusb, check the other port,

    for me, hexdump's dtb conflicts usb2 and debug, doesn't work,,

    and usb3 locks hub on a daily basis, needs a replug, 3 different hubs

    Haven't tried easyb's dtb yet


  6. >I have tried the conversion from dts to dtb but i not have success. 

    Try again,,,  dtc -h,, must be dtb,,, dts is only for editing/altering,,, kernel wants dtb

    Let us know how it goes

    Because of the symbolic names, if you don't have a compile environment it

    probably won't work


  7. I guess you have not read much of this thread, last5-6 pages would be good

    t9.dtb for 4.4.x kernel seems OK, I have not tried any 5.x, slightly different dtb (guess)

    Not on ups, 10d uptime,, H96max+, wifi dongle a bit unstable, needs powered hub, x11vnc

    Oh, and if hub back-feeds (many do) must unplug for reboot or power off

    For example, a 2 second power "blink", you will think box is dead, until you unplug hub power too


  8. @hexdump

    Thanks for your t9.dtb,, works fine with H96 max+ for me

    I could never figure out how the regulators worked, somehow you did

    Only thing lacking is module for SSV6051

    I guess I should try to put patch in right place and make a kernel


  9. On 2/15/2019 at 7:49 PM, rmoriz said:

     

    They are not the same, as my 64GB version has another radio chipset. There are at least two hardware versions out there, and there are different android firmware releases. One is "SSV6051_RTL8189" the other one is "HS2734".

    Board is labeled RK3328_8D4_V1.1, same as yours, wifi chip is indeed different, SV6051P

    Serial connection as shown in your photo

    I think the problem with sd card is power to socket,

    if you read this thread I have a few posts previous


  10. 17 hours ago, rmoriz said:

    1. PCB is labelled as "RK3328_8D4_V1.1" with date "20180703"

    2 .Wifi/BT chip seems to be:

    I have H96 max+,32gb, board is same, wifi is sv6051, no bluetooth

    Like you, most of the dtb give root fs not found, no /dev/block/mmc....  ,, or

    for the android versions a black screen, serial shows only a few lines of kernel load (<5)

    --edit--

    you can make it work by writing image to both a uSD card and a usb stick,

    it will probably find the stick and run from it. The uSd can be small and slow

    Not so good with only 2 usb sockets


  11. 17 hours ago, CarlosPiles said:

    Be carefull with changing /system/xbin/su as i've read sometimes it blocks Android boot.

    Can you quote some specific models?

    My H96max+, android8.1 seemed OK,,  SuperSU installed OK, root checker said all was well


  12. 47 minutes ago, mb16 said:

    but in my case, running literary "adb root" did work for me.

    Err,, adb is not "android",, android is the graphical shell,,

    hypothetical example,, if you had firefox installed,, typing firefox in adb would NOT startup firefox

    But, for sure , adb is very powerful, despite being a considerable pain

    More on point, adb uses the su in /sbin,, android uses the su in /system/xbin,, it is no good


  13. 4 hours ago, mb16 said:

    adb root worked out of the box, devices like this one seem to be rooted by default?

    Clearly,, you have not read whole thread,, about 5 pages back, but differently

    in adb# ,, ls -l /sbin/su;  ls -l /system/xbin/su   ,, notice that they are not the same?

    (google) verity off; mount -o remount,rw /system;  cd /system/xbin; mv su su.bak;  cp /sbin/su .

    and then root will work in android

    FWIW


  14. 4 hours ago, nathanwz said:

    can anyone give me a hint what the problem might be

    I have one of these, in the simple shell ls -l /dev/block will show at best mmcblk1 (the emmc),

    (almost) never the sd card

    I think it's something to do with the regulator,,  pwm does not seem to work,,

    the android dtb seem to use simpleReg vrs rk805-regulator

    I did a "hack" bypassing gpio, barely works, lots of errors in dmesg

    (regulator errors,, boots and runs from sd)

    The other method is to copy rootfs to a usb stick, rename the partitions (e2label)


  15. 16 hours ago, armar said:

    dding just the fw files and the config with the old 8723bs.ko does not work either (modprobes...but no wifi).

    Dmesg , if all is well, will give a message, ie  (dmesg |grep firmw)

    usb 1-1.4.3: rtl8xxxu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin

    for a usb dongle


  16. 17 hours ago, armar said:

     

    What do the firmware files for  wifi look like? And how does the module know where to pick it up from?

    Well, it varies, alas. The firmware files can be bin or fw or other. Usually from /lib/firmware or a folder there BUT

    can be in /usr/somewhere, this is not common

    I don't know how the ko knows where to find the firmware

    Firmware are for the wifi chip, are version and OS independent

    17 hours ago, armar said:

    is a mountpoint /vendor which is on /dev/mmcblk2p17 . Is this the android directory? 

    It is 1 of them, there are 9 or 10 in total plus uboot and miniLoader and ?

    Maybe I'm telling you something you already know, / in Android is only in mem,

    loaded from the boot part, a gz cpio. Most of the folders in / (android ) are links to

    the appropriate partition

     

    17 hours ago, armar said:

    /etc/firmware/rtl8723bs_fw  ./etc/firmware/rtl8723bs_config./etc/firmware/rtl8723bs_VQ0_config /etc/firmware/rtl8723bs_VQ0_fw

    I would guess that these are the ones you need, try copy them to lib/firmware/rtlwifi


  17. 6 hours ago, mg-to said:

    Am I correct?

    As I said, usually an android dtb won't work for linux, but it is a guide on how to change

    an almost working dtb

    For wifi,, 3 things have to be "right".  A reference in the dtb, a module, and the firmware

    You will really have to get dtc (device tree compiler) and learn how to use it,

    it is not that hard..  Harder is making the "right" device tree

    IMO,, you really should have a "perfect" boot with sdcard (everything works, no glitches)

    before thinking about overwriting emmc

    ----more--

    For wifi the reference in the dtb is not at all important, only if you

    want it to work during boot. I have seen wrong wifi chip referenced in dtb,

    modprobe right module (if firmware is there) and the wifi works

    This assumes it is talking to the right gpio

    There is a discussion about that in this thread a few pages previous


  18. 5 hours ago, mg-to said:

    DEV_EMMC=/dev/mmcblk0

    No, mmcblk0 is almost certainly your sdcard, just from the partitions on it

    It's really common for android to have boot0, boot1, rpmb on the emmc, that is likely where it is (blk2)

    If you have checked your evb.dtb by turning it into a dts, check dwmmc@ff500000, and  @ff520000

    for  bus-width = < 0x04 >;  or 0x08 and the  aliases {  ,, then you will know for sure

    You do know this will wipe out your android?  Before you do that, it would be good to

    extract the android dtb because it is sometimes hard to get the right image for your hardware,

    there are so many slightly different images


  19. 7 hours ago, balbes150 said:

    The easiest way to get the desired dtb is to unpack the native firmware file

    There are dozens of different tv boxes, easy to get wrong image, usually does not "work out"

    in output/Image (specifically my box, h96max+-ssv, from the vendor, ssv is wifi)

    ls -l *.img
    -rw-rw-r-- 1 d d    1048576 Nov 11 12:35 baseparameter.img
    -rw-rw-r-- 1 d d    1708536 Nov 11 12:35 boot.img
    -rw-rw-r-- 1 d d   19036180 Nov 11 12:35 kernel.img
    -rw-rw-r-- 1 d d      49152 Nov 11 12:35 misc.img
    -rw-rw-r-- 1 d d     168060 Nov 11 12:36 oem.img
    -rw-rw-r-- 1 d d    8971308 Nov 11 12:35 recovery.img
    -rw-rw-r-- 1 d d    5592576 Nov 11 12:35 resource.img
    -rw-rw-r-- 1 d d 1547079912 Nov 11 12:36 system.img
    -rw-rw-r-- 1 d d    4194304 Nov 11 12:35 trust.img
    -rw-rw-r-- 1 d d    4194304 Nov 11 12:35 uboot.img
    -rw-rw-r-- 1 d d  163962992 Nov 11 12:36 vendor.img

    and in output

    -rw-rw-r-- 1 d d 162126 Nov 11 12:33 boot.bin
    drwxrwxr-x 4 d d   4096 Nov 30 01:54 Image/
    -rw-rw-r-- 1 d d 162126 Nov 11 12:35 MiniLoaderAll.bin
    -rw-rw-r-- 1 d d    724 Nov 11 12:35 package-file
    -rw-rw-r-- 1 d d    981 Nov 11 12:35 parameter.txt

     

    Still have to extract dtb from resource.img


  20. 14 hours ago, mb16 said:

    Could I mount /dev/mmcblk2boot<x> somehow?

    Ah, android.. No, if you run fdisk -l on your mmcblk2 file you will see 3 4mB partitions,,

    where is the rest?? 15 or 30 gB missing, right?

    The rest is in a mtd filesystem,, under the stanza "chosen" you may see something like this

    bootargs .........

     mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(trust),\

    0x00002000@0x00006000(misc),0x00000800@0x00008000(baseparameter),0x00008000@0x00008800(resource),\

    0x00010000@0x00010800(kernel)...and so on (#'s are blocks/sectors,,,, length@offset (+12M))

    You want the first 70k of resource, starts 2k in, magic is 0xd00dfeed, about 64k long. The rest is 2 png or jpg,

    the splash screen, 1st is for 720p, 2nd (larger) for 1080p

    I don't know how to mount mtd filesystems, AND I have had no luck

    converting android dtb to linux dtb,, nothing that I have found on google either

    Usually it just doesn't boot, fails very early on kernel load (serial console)

    -----

    but usually with these tv boxes you have root in adb,, have you tried?

    If so, cd to proc, somewhere in there is the device tree, use busybox tar and write it to sdcard,

    and then to your computer (on an ext fs), then expand and use dtc -fs on the expanded directory,,

    then you will have the android dtb

    Or,, easier, if you have adb root,,,

    find which partition resource is , /dev/mmcblk2p??? ,,

    dd 70k to internal sdcard (I think this is ext fs,, vfat will lose permissions etc)

    then to computer, chop leading 2k, trim excess from end (hexeditor and dd)

    BTW the reason adb has root but not android...

    the su in /system/xbin is no good,, the one in /sbin is the right one

    Use verity off to make /system rw, then you can mv xbin/su xbin/su.bak

    and /sbin/su  -> xbin and then get su in android


  21. A bit late, but I have narrowed down the problem, for at least my TV box

    It is a problem with the regulators both linux and android have problems (at least their dtbs')

    linux uses rk805,, android pwm/simple

    with 805,, 00 1e 01 ,, sdio doesn't work, so no mmc      (gpio, offset, function)

    sdmmc-regulator

    with pwm  02 04 01 and 02 05 01 half fails (there is power to cpu and not cooked),, no gpu and debugfs

    vdd-center, vdd-log

    That is why the liantong had mmc but no vid, uses pwm, same as any other android dtb

    I did luck into a blodge, works for armbian but not Balbes' TV

    (cut out gpio0, go directly to pwm, not sure what to do with pinctrl-0, sorta works)

    Clearly,, a dtb is a looong way from a bios,,, it would be really helpful if

    as much as possible,, if phandle , if they corresponded to real hardware, had the same value as linux devices,,ALWAYS

    Standards are a wonderful thing

    --later--

    A report on new  wifi-dev, No sd found

    for rk3328-8d4-v1.1 ,, h96Max+

    of the 5 dtbs, both liantong and evb-android crashed

    z28 no mmc,,,. roc-cc emmc, no sd,,,, evb emmc, noticed sd but no p1,p2 no usb2 (phy-supply)

    --a day later--

    wanted to try my "blodged" dtb,,,,,Unable to read file my.dtb

    but uboot ls saw it OK, had been lower-cased, so change extlinux.conf, ,

     a uboot artifact, had NOT been lower cased,,, then tried one of the originals

    Unable to read file rk3328-roc-cc.dtb,, spelling correct,, uboot ls sees it

    ?????,, nothing on google