Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Can't boot RK3566 device from SDcard

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

    Can't boot RK3566 device from SDcard

    Hi. I have a generic unbranded RK3566 device that I bought from China to play with, and, I also have a Pine64 Quartz64 model A board.

    They don't behave the same though.

    I cannot get the generic device to boot from the Micro SD card slot. In fact if there is a bootable SD card in the slot then it won't boot at all.

    When it's booted off the internal flash drive (one the SD card is removed) I can get ADB shell and it will allow me to go root.

    Can anyone advise what I should be looking for? I would love to take the Quartz64 BSP Linux build and get it working on the generic device.

    #2
    Originally posted by dieselnutjob View Post
    Hi. I have a generic unbranded RK3566 device that I bought from China to play with, and, I also have a Pine64 Quartz64 model A board.

    They don't behave the same though.

    I cannot get the generic device to boot from the Micro SD card slot. In fact if there is a bootable SD card in the slot then it won't boot at all.

    When it's booted off the internal flash drive (one the SD card is removed) I can get ADB shell and it will allow me to go root.

    Can anyone advise what I should be looking for? I would love to take the Quartz64 BSP Linux build and get it working on the generic device.
    Hi ,

    maybe the Firmware does not support that , this unbranded PCBs always have bad programmed FW ,

    maybe you need another Linux or similar , look in the other RK3566 Threads , there you can for sure

    find some Info ,

    good luck / gefattern

    Comment


      #3
      if when you turn on the devce , nothing loads , it means you have booted from SDcard , and the boot process is either stuck (due to wrong DTB configuration) or some other misconfiguration

      Pine devices are different than the generic rk3566 devices , they have different hardware attached to the SOC

      2nd , if you want to play with your device , you should solder wires to the UART pins so you can get a boot console and figure what went wrong

      in my case , I succesfully loaded armbian linux on my generic chinesse device (HK1 rbox r2) by changing the extlinux.conf file under boot to load my device DTB (extracted from the recovery android partition from firmware image)

      which "generic" device do you have?

      Comment


        #4
        Originally posted by Trigu75 View Post
        if when you turn on the devce , nothing loads , it means you have booted from SDcard , and the boot process is either stuck (due to wrong DTB configuration) or some other misconfiguration

        Pine devices are different than the generic rk3566 devices , they have different hardware attached to the SOC

        2nd , if you want to play with your device , you should solder wires to the UART pins so you can get a boot console and figure what went wrong

        in my case , I succesfully loaded armbian linux on my generic chinesse device (HK1 rbox r2) by changing the extlinux.conf file under boot to load my device DTB (extracted from the recovery android partition from firmware image)

        which "generic" device do you have?
        Thank you for the reply. It's really useful.

        The "device" is a totally unbranded tablet, so it isn't easy to get to the UART pins; in fact it might be totally impossible.

        I have a Manjaro BSP image which will boot from SDCard on the Quartz64. If I try to boot it on the tablet it just does nothing, but I noticed that to get it back to the Android build on the flash drive it needs a very long press on the power button, so maybe it isn't actually doing nothing; maybe (as you say) the DTB config from the Quartz64 causes it to get stuck.

        I don't have a firmware file from the tablet, but I am able to make a dump of the partitions on its flash drive, and one of those images is of a dtbo partition.

        How do I open up the dtbo partition? (what format is it?) and how can I understand the dtbo config inside? Is there any good documentation about it anywhere?
        If I could get some info out of that dtbo partition which would enable me to either hack the Manjaro BSP image, or compile armbian then I would like like to try that.

        I need more knowledge. Thanks.

        Comment


          #5
          If you have a tablet , if you have an hdmi port , try to plug-in the hdmi , most firmwares use hdmi instead of lvds (my guess is the lcd screen is not using the hdmi output from the main board)
          I didn’t play with dtbo partitions , but I think it’s basically the android dtb but as a partition , try to backup the partition to a file ( did if=Yourdtbopartition of=dtbackup.file then run binwalk to see the dtb starting address , extract from file using dd again , decompile back to dts to get rid of the android format , ant compile back to dtb ... )

          once you manage to do that , start with images from firefly , stationpc , there are armbian images on their forum that can be edited adding your dtb before booting them )

          I didn’t succeed booting images from pine using my dtb file , but firefly/stationpc images work fine with just my device dtb inthem

          Comment


            #6
            I have never used (or heard of) binwalk before. I will try this. Will the stationpc images boot from SD card? I have noticed with quartz64 that BSP linux will boot from SDcard but the Android ones will not.

            Comment


              #7


              this is my device booting statin-m2 armbian from sdcard ( with my dtb

              Comment


              • gefattern
                gefattern commented
                Editing a comment
                Nice that you can boot this on your Box , but did you ever cleaned your nice Screen , seen in Video , greetings / gefattern

              #8
              I don't have HDMI output but I could export console to an FTDI serial to usb device via an OTG adapter using getty. I already successfully did that with the Manjaro BSP linux build on the quartz64.

              Comment


                #9
                Originally posted by Trigu75 View Post
                https://www.youtube.com/watch?v=FKD8or8CAOs

                this is my device booting statin-m2 armbian from sdcard ( with my dtb
                I am also reading your thread here https://forum.freaktab.com/forum/tv-...droid-boxes-11

                I am impressed. I think that your work will help me a lot.

                It would be cool to get Armbian working on the Quartz64 as well.

                Comment


                  #10
                  gefattern , yes I do , that is not dirt ... that’s a 14 years old lcd monitor , and have some age marks that don’t go away , from the internal side , not the external side .... but only seen when the screen is off and shoot with mobile camera ...

                  it doesn’t affect the image when it’s on / not black

                  Comment


                    #11
                    This generic device of mine. I really want to extract the dtb from it, but I am struggling.

                    Firstly. It has both a dtbo partition and a boot partition.

                    If I do binwalk on the dtbo partition I get this
                    Code:
                    binwalk dtbo.img
                    
                    DECIMAL HEXADECIMAL DESCRIPTION
                    --------------------------------------------------------------------------------
                    64 0x40 Flattened device tree, size: 559 bytes, version: 17
                    secondly, if I unpack the boot partition I get these files (sorry I don't remember what tool I used):-
                    Code:
                    ls -al
                    total 32464
                    drwxr-xr-x 2 philip philip 4096 Nov 11 18:49 .
                    drwxr-xr-x 4 philip philip 4096 Nov 11 18:49 ..
                    -rw-r--r-- 1 philip philip 11 Nov 11 18:49 boot.img-base
                    -rw-r--r-- 1 philip philip 1 Nov 11 18:49 boot.img-board
                    -rw-r--r-- 1 philip philip 304 Nov 11 18:49 boot.img-cmdline
                    -rw-r--r-- 1 philip philip 358279 Nov 11 18:49 boot.img-dtb
                    -rw-r--r-- 1 philip philip 11 Nov 11 18:49 boot.img-dtb_offset
                    -rw-r--r-- 1 philip philip 5 Nov 11 18:49 boot.img-hashtype
                    -rw-r--r-- 1 philip philip 3 Nov 11 18:49 boot.img-header_version
                    -rw-r--r-- 1 philip philip 30910480 Nov 11 18:49 boot.img-kernel
                    -rw-r--r-- 1 philip philip 11 Nov 11 18:49 boot.img-kernel_offset
                    -rw-r--r-- 1 philip philip 8 Nov 11 18:49 boot.img-os_patch_level
                    -rw-r--r-- 1 philip philip 7 Nov 11 18:49 boot.img-os_version
                    -rw-r--r-- 1 philip philip 5 Nov 11 18:49 boot.img-pagesize
                    -rw-r--r-- 1 philip philip 904048 Nov 11 18:49 boot.img-ramdisk
                    -rw-r--r-- 1 philip philip 11 Nov 11 18:49 boot.img-ramdisk_offset
                    -rw-r--r-- 1 philip philip 1000960 Nov 11 18:49 boot.img-second
                    -rw-r--r-- 1 philip philip 11 Nov 11 18:49 boot.img-second_offset
                    -rw-r--r-- 1 philip philip 11 Nov 11 18:49 boot.img-tags_offset
                    and then if I binwalk the boot.img-dtb file:-
                    Code:
                    binwalk boot.img-dtb
                    
                    DECIMAL HEXADECIMAL DESCRIPTION
                    --------------------------------------------------------------------------------
                    0 0x0 Flattened device tree, size: 122261 bytes, version: 17
                    122261 0x1DD95 Flattened device tree, size: 121820 bytes, version: 17
                    244081 0x3B971 Flattened device tree, size: 114198 bytes, version: 17
                    what does all this mean?

                    When this boots Android is it loading the dtb from the dtb0 partition? or from the boot partition?

                    Comment


                      #12
                      Next I had a play with this tool https://github.com/PabloCastellano/extract-dtb

                      When I run it against boot.img it dumps out four different dtb files
                      When I run it against dtbo.img it dumps out one dtb file

                      So now I have five dtb files.

                      What next?

                      Comment


                        #13
                        As you can see it appears you have multiple copies of the dtb , you can see their sizes , and position ..

                        example ,
                        Code:
                        dd if=boot.Img-dtb bs=1 count=122261 of=Dtb.1
                        dd if=boot.img-dtb bs=1 skip=122261 count=121820 of=dtb.2
                        . and so on. ..

                        then you can decompile back to dts ( using dtc ) each file and compare , and compile back to dtb using dtc the one you think is ok

                        Comment


                          #14
                          This is the contents of the one dtb file ins dtbo.img converts to dts:-

                          Code:
                          /dts-v1/;
                          
                          / {
                          
                          fragment@0 {
                          target = <0xffffffff>;
                          
                          __overlay__ {
                          bootargs_ext = "androidboot.boot_devices=fe310000.sdhci,fe330000. nandc";
                          };
                          };
                          
                          fragment@1 {
                          target = <0xffffffff>;
                          
                          __overlay__ {
                          mode-bootloader = <0x5242c309>;
                          mode-charge = <0x5242c30b>;
                          mode-fastboot = <0x5242c303>;
                          mode-loader = <0x5242c301>;
                          mode-normal = <0x5242c300>;
                          mode-recovery = <0x5242c303>;
                          };
                          };
                          
                          __fixups__ {
                          chosen = "/fragment@0:target:0";
                          reboot_mode = "/fragment@1:target:0";
                          };
                          };

                          Comment


                            #15
                            I just did it!

                            I modified a slackware image for the quartz64 with the dtb file from the tablet and got it to boot on the tablet.

                            This is huge. It means that I have a way to backup and restore the contents of the flash drive of the table, and the beginnings of an OS to do what I want with.



                            Comment

                            Working...
                            X