Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

H96max running OrangePI Ubuntu.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    The unpacked Android image was only useful to retrieve the dtb file for the box. It's no longer needed as the right dtb can be found in the /boot directory in my release. The rest of the files was not much of an interest to me as the box is rooted (at least I got a rooted box right from gearbest) and I could get access to android filesystem via serial console - the box just boots to Android and gives a shell prompt via serial terminal. Then I used 'su' command to become superuser and have access to the whole filesystem.

    The Debian image I compiled is a bit of frnakenstein creation. I took the orange-pi image bacause it has most convenient partition layout to work with. mmcblk0p6 partition is the fat16 partition where the kernel and the dtb file is stored, so I could just easily mount it via command 'mount /dev/mmcblk0p6 <my_directory>' then replace files at will. Note that the other partitions (1-5) nicely match the booting sequence the rockchip CPU's require (see here: http://opensource.rock-chips.com/wiki_Boot_option). I did not particularly like the orange-pi Ubuntu-like greeter (and also the image was too big), so I chose to use Odroid's rootfs. So I needed to extract it from the odroid image and then reimplant it to the orange-pi image. First I used gparted to check the odroid's rootfs partition fits into the space on the orange-pi image, then I extracted it via 'dd' command, and then I overwrote the orrange-pi rootfs partition via dd like this 'dd if=odroid-rootfs.part of=/dev/mmcblk0p7 bs=64k'. Then I used gparted on the orange-pi image to fix the partition size differences (I think it's the partititon/check option in the menu). So that was it. It can be possible to use this technique to use rootfs from other distros for other rk3399 development boards (FriendlyElec's NanoPC-T4 board has Armbian and Ubuntu images, so it might be interesting to try those).

    After that I only had to fiddle with the kernel and the dtbs. The dtb file can be decompiled and compiled via 'dtc' command. To decompile use 'dtc -I dtb -O dts rk3399-h96max.dtb > rk3399-h96max.dts'. And compiled back via 'dtc -I dts -O dtb rk3300-h96max.dts > rk3399-h96max.dtb'. The dtc file is a text file where I made changes by looking into the odrdoid's dtbs and orange-pi's dtb, comparing how they map devices to which addressees, then copied / fixed things in the h96max dtb.

    The kernel I used was from Friendly Elec, because they seem use the most recent version of 4.4 kernel (4.4.138). They have an instruction page how to compile their kernel (http://wiki.friendlyarm.com/wiki/ind...Lubuntu_Kernel) so I followed that to compile it. Then I put the kernel Image itself to the mmcblk0p6 partititon (also the /boot directory on my release) and the modules to the rootfs partition (/lib/modules directory).

    Edit: clarity
    Last edited by olin; 09-20-2018, 19:10.

    Comment


      #17

      oh well nabbed the dtb file mmm maybe I can use your dtb to get my h96max LibreELEC odroid n1 running with ethernet

      H96 MAX RK3399 Tv Box 4/32GB Gladly going to test libreelec with it odroid n1 which should I be using ? Excavator sapphire board seems closest odroid n1,rockpro64,rock960,sapphire (Code, 1 line)


      edit
      ouch image is for 4 / 8 gig card I only have a heap of 2gb spare guess I can try and snip out the 0's
      one program says its 4 gig another says 8 gig .. soo unsure
      and neither seems to access data

      Code:
      sudo fdisk -l
      GPT PMBR size mismatch (15693823 != 7270399) will be corrected by w(rite).
      Disk /dev/loop0: 3.5 GiB, 3722444800 bytes, 7270400 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: 0x00000000
      
      Device       Boot Start      End  Sectors  Size Id Type
      /dev/loop0p1          1 15693823 15693823  7.5G ee GPT
      Code:
       sudo gparted /dev/loop0
      Unit -.mount does not exist, proceeding anyway.
      ======================
      libparted : 3.2
      ======================
      Invalid argument during seek for read on /dev/loop0
      The backup GPT table is corrupt, but the primary appears OK, so that will be used.
      unless the file never extracted correctly, I can not seem to get any data to show even if mounted

      mmm but photorec/testdisk see's partitions maybe ubuntu is not liking its efi partion type ?

      oh well nabbed the rk3399-h96max.dtb and all the deleted files you had on their as well :P

      could not get it booting with your dtb either

      at least we both agree this needs to be changed

      wifi_chip_type = [00]; > wifi_chip_type = "ap6354";

      attached is my dtb/dts and the dtb/dts from other semi working releases
      Attached Files
      Last edited by MasterCATZ; 09-22-2018, 23:29.

      Comment


        #18
        Originally posted by MasterCATZ View Post
        could not get it booting with your dtb either
        Have you tried my image (r2) ? Did it work for you? If so, then use my dtb AND my kernel (plus modules) on your Hardkernel rootfs.


        Originally posted by MasterCATZ View Post
        at least we both agree this needs to be changed

        wifi_chip_type = [00]; > wifi_chip_type = "ap6354";
        Actually no. This is a leftover from my previous trials. It does not work, but has no negative effect either. ap6354 is a radio combo containing broadcom chipset. As I wrote earlier, the TV box uses CM273SM (compatible with QCA9377) combo (Wifi + BT) which is supported via Atheros 10k Linux driver. Unfortunately the combo is connected to the SOC via SDIO interface (normally used for memory cards, that's why we can see a mmc2 idevice being probed during boot - that's a sign the SDIO interface to the Wifi chip is initialised, but then Linux kernel does not know how to communicate with the chip, nor which chip it really is) and this type connection is experimentally supported (with this Wifi chipset) since kernel 4.13.

        Unfortunately I don't have a working box, so I can not test / verify any further changes.

        Comment


          #19
          Dear Olin, Great work. Any update after nearly one month?

          Comment


            #20
            I gave up , if anyone has something with working ethernet I am all ears, however , I am having to currently switch between dts passthrough + spdif and PCM + hdmi depending on the audio

            because passthrough keeps having sound glitches

            Comment


              #21
              Originally posted by yanggis View Post
              Dear Olin, Great work. Any update after nearly one month?
              Sorry guys, my box is dead, so I can not develop/test anymore on this box. The box does not have over-voltage protection (hardware for $100!) and I blew it by connecting 12V power supply by accident.

              Comment


                #22
                Originally posted by MasterCATZ View Post
                I gave up , if anyone has something with working ethernet I am all ears, however , I am having to currently switch between dts passthrough + spdif and PCM + hdmi depending on the audio

                because passthrough keeps having sound glitches
                Ethernet works on my image release 2 (r2). See post #13 where 'enodeb' confirmed it:


                Originally posted by enodeb View Post

                Thanks for the update.
                Confirmed that the Ethernet works now! Brilliant!

                Comment


                  #23
                  Hi all,

                  I may have not read this thread completely through
                  But which image is used?

                  I have an h96Max to but my console (hdmi) is not working.. I am kinda lost in solutions. but have not tried the orangepi images.

                  Comment


                    #24
                    Hello,

                    Go here for more Information.
                    Cause now we have Armbian.
                    EDIT: This how-to is slightly out-of-date, because now the complete images for RK3318 boxes are available here. Thanks to community, especially to @jock. Hello all, I would like to summarize the required steps to boot armbian on device with RK3318 chip. I have a X88 Pro device already mentioned h...


                    Neomode

                    Comment

                    Working...
                    X