Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Running Android or Linux from an SD card on a RK3288 device - An easy way to dual boot

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Running Android or Linux from an SD card on a RK3288 device - An easy way to dual boot

    If you are interested in dual booting Android and Linux on your RK3288 device or you simply want to try a different Android ROM or Linux distro without flashing the device, then use this method of booting from an SD card.


    You will need a PC running Linux and an SD card of 8 GB or more, at least class 10 speed.


    Download the tools from 'https://drive.google.com/file/d/0B99...GVqWkZMRGFCSjg'. After unzipping you will see two shell scripts called 'create-android-sdcard' and 'create-linux-sdcard', a directory called 'Tools', a file called 'RK3288Loader_uboot_V2.17.02.bin' and some '.img' files together with a 'parameter' file.


    To be able to dual boot (i.e. boot directly from the device or from an SD card), you will first need to update the bootloader on your device. Either use 'AndroidTool v2.3' on Windows or 'upgrade_tool' on Linux to flash just the 'Loader' with the 'RK3288Loader_uboot_V2.17.02.bin' file.


    To create a bootable SD card first put it into your PC and use a command like 'blkid' or 'lsblk' to identify its device name (e.g. /dev/sdc).


    For Android, run the script 'create-android-sdcard' and pass the name and location of the Android ROM you want to install onto the SD card, e.g.:


    ./create-android-sdcard radxa_rock_android_kitkat_140909_update.img


    The program will prompt you to confirm the name of the device for the SD card. Once confirmed it will then unpack the Android ROM, create partitions on the SD card that mimic the ROM including a 'user' partition that will use the remaining space of the SD card. It will then install the Android ROM to the SD card and notify you when complete.


    For Linux, as currently no standard approach to creating a Linux distro exists, to allow flexibility you will have to perform some initial set up steps. I've included example kernel and resource images which work fine on the Firefly, MK802V (et al) and Orion R28 (et al). I've also included download links for example root file systems (RFSs). Download either the Ubuntu 12.04 or Xubuntu/Lubuntu 14.10 RFS and unzip and rename as 'linux-rfs.img'. If you want to try a different kernel/resource combo simply rename them as 'kernel-linux.img' and 'resource-linux.img'. You can also use the tools in the 'Tools' directory to unpack Linux distros for those who want to experiment. Just don't modify the 'boot-linux.img' or 'parameter-linux' files as these must be used rather than any supplied as part of a Linux distro for Linux to boot from SD card.


    Once set up, simply run:


    ./create-linux-sdcard


    The program will initially prompt you to confirm the name the device for the SD card and then it will create a bootable Linux SD card from the images defined in the'*.img' files.


    Now just take the SD card and insert into your RK3288 device and power on to enjoy booting either Android or Linux.


    The Android script will work with any Android ROM packed as an image with a separate 'data' and 'user' partition. I recently saw a ROM with the 'user' partition effectively combined with the 'data' partition. My sketchy knowledge of Android includes the memory of some requirement to have the 'user' partition as type 'vfat' as some programs expected or required that format. So until I can confirm this, or identify which Android version release it pertains to, I've not included it yet within the script.


    Both scripts work for RK3288 and RK3188 devices. They utilize the excellent work from Fukaumi-san (naobsd) who provided the binary headers required to boot from SD card (see the 'README.txt' in the 'Tools' directory for further details and the required copyright notice, conditions and disclaimer).


    The other key advantage of these scripts is that they allow you to boot a 'bricked' device. Some time ago I managed to break my Orion R28 Meta such that it would not boot and could not be flashed. I've included the required functionality in the scripts to boot even if no memory can be found on the device. So now I have a working Orion R28 again, albeit just from SD card.


    Enjoy!

    #2


    THX
    RK3288 Devices
    - Overview BOX (LINK !)
    - Overview STICK (Dongle) (LINK !)

    MINIX NEO: Z64 W/A - (Intel Z3735F); X8-H Plus - (Amlogic S812H); A2 Lite (sponsored by minix.com.hk)
    UGOOS UT3S (4/32GB with fan) - FW 2.0.6 - (RK3288) (sponsored by GearBest.com)
    Tronsmart Draco AW80 Meta (2/16GB) - FW v2.0rc3 - (Allwinner A80) (sponsored by GeekBuying.com)
    Beelink / UBOX R89 - FW 111k4110_1219 - (RK3288) (sponsored by Netxeon (Beelink))

    RK3188: pcb => "CH001 1332 TN-BX09_V2.1" (K-R42 / CS918...) => wasser KK 1.0.3 (old rev)
    Fly Mouse Mini Wireless Keyboard with 2 mode learning IR remote 'iPazzPort KP-810-16'

    Comment


      #3
      thks

      EDIT:

      You can also use the tools in the 'Tools' directory to unpack Linux distros for those who want to experiment. Just don't modify the 'boot-linux.img' or 'parameter-linux' files as these must be used rather than any supplied as part of a Linux distro for Linux to boot from SD card.
      Well i cant unpack your "linux-sdcard-rkm-mk802iv-new.img", maybe because its a "dd" image i dont know, but none of the tools can unpack that image :/
      Btw for creating a linux-sdcard for rk3188 do i need resource-linux.img?
      I ask this because rk3188 devices wont use resource.img.
      Can you share all the files you used to make "linux-sdcard-rkm-mk802iv-new.img"?
      That one works good on my CR11s and on my CS968mtk but no wifi of course.

      Regards
      Last edited by superceleron; 12-05-2014, 01:46.

      Comment


        #4
        Great work and I shall give it a try on my R28.
        R-TV BOX S10, Beebox N3150, Chuwi Hibox, Nvidia Shield, A95X Max

        Comment


          #5
          Originally posted by superceleron View Post
          thks

          EDIT:



          Well i cant unpack your "linux-sdcard-rkm-mk802iv-new.img", maybe because its a "dd" image i dont know, but none of the tools can unpack that image :/
          Btw for creating a linux-sdcard for rk3188 do i need resource-linux.img?
          I ask this because rk3188 devices wont use resource.img.
          Can you share all the files you used to make "linux-sdcard-rkm-mk802iv-new.img"?
          That one works good on my CR11s and on my CS968mtk but no wifi of course.

          Regards
          I'm sorry, I thought you meant Linux on RK3288.

          For Linux on RK3188 see http://www.freaktab.com/showthread.p...ng-your-device or https://plus.google.com/+IanMORRISON/posts/TTXkb7pX7SG

          Also just to prevent any future confusion, the text 'Both scripts work for RK3288 and RK3188 devices' is misleading as it reads as both the Android and Linux scripts. What I meant was the script for Android on RK3288 (as in this post) and the recently posted script for Android on RK3188 (as in http://www.freaktab.com/showthread.p...M-from-SD-card).

          Comment


            #6
            I ran through the procedure and after running ./create-linux-sdcard and then specifying my card as being /dev/sdb, the commands all ran but they were instantaneous, finishing in about a second, showing DONE against each one and showing the last entry as Linux SD Card created on '/dev/sdb' but there was nothing on the card.

            Scratch that, I resolved it.

            Despite the process seeming to work, albeit linux-rfs.img being rather quick, I am always left with a blank card.

            Last edited by bluesmanuk; 12-06-2014, 05:57.
            R-TV BOX S10, Beebox N3150, Chuwi Hibox, Nvidia Shield, A95X Max

            Comment


              #7
              Originally posted by linuxium View Post
              I'm sorry, I thought you meant Linux on RK3288.

              For Linux on RK3188 see http://www.freaktab.com/showthread.p...ng-your-device or https://plus.google.com/+IanMORRISON/posts/TTXkb7pX7SG

              Also just to prevent any future confusion, the text 'Both scripts work for RK3288 and RK3188 devices' is misleading as it reads as both the Android and Linux scripts. What I meant was the script for Android on RK3288 (as in this post) and the recently posted script for Android on RK3188 (as in http://www.freaktab.com/showthread.p...M-from-SD-card).
              Thks i should have search beter
              But well know we have for rk3288 because of that
              Thks for your hard work

              Comment


                #8
                Problems running Linux on cs918ii

                First, Hello to everyone

                Even if this is my first post inside this forum , I am quite used in using (and creating) Linux on various ARM devices
                as Raspberrypi, Cubieboard (Allwinner A10) , and Wandboard Quad (Freescale i.mx6).
                but sadly no experience until now on Rockchip .

                Ive done everything as described above (flashed the loader, downloaded and renamed both Linux rfs, and successfully created 2 sdcards with it), but when i insert the card in my cs918ii (16gb) it just wont boot.
                Black screen and nothing more. (what should mean the loader flashed successfully, but the image wont boot)
                Has anyone else tried to get it to work on an cs918ii , or any useful tips for me how to start with in trying myself?


                Regards , Martin W.

                Comment


                  #9
                  Originally posted by nogareth View Post
                  First, Hello to everyone

                  Even if this is my first post inside this forum , I am quite used in using (and creating) Linux on various ARM devices
                  as Raspberrypi, Cubieboard (Allwinner A10) , and Wandboard Quad (Freescale i.mx6).
                  but sadly no experience until now on Rockchip .

                  Ive done everything as described above (flashed the loader, downloaded and renamed both Linux rfs, and successfully created 2 sdcards with it), but when i insert the card in my cs918ii (16gb) it just wont boot.
                  Black screen and nothing more. (what should mean the loader flashed successfully, but the image wont boot)
                  Has anyone else tried to get it to work on an cs918ii , or any useful tips for me how to start with in trying myself?


                  Regards , Martin W.
                  It could be the loader didn't successfully flash or that the included Linux images are not compatible with your device.

                  To check the loader, I would create an Android SD card with a different Android ROM to the one currently installed on your device but which is known to work on the CS918II. If you can boot the alternative Android then you know that the loader is working.

                  Then look for a Linux release for a device that is known to be compatible with your CS918II. Unpack it and use the kernel, resource and rfs images with the script to make a new SD card.

                  Interestingly, when I looked around this site, I could see lots of threads saying this ROM works on this device but nothing about this ROM doesn't work on this device. Whilst a list of what is working is very useful I think that a list of what doesn't work would be equally important.

                  Comment


                    #10
                    Ok 1 more question... what source you userd to build the kernel in the "linux-sdcard-rkm-mk802iv-new.img"? and what kernel config?
                    I used this one from your github "3188-SRC-AP6210".
                    Because i cant boot the default kernel config or or the one in the 7z pack (rk3188 pack) nor whit mine... but if i change to my android kernel build it boots but stays in the boot screen of course.
                    I even used this config "git-3188-SRC-AP6210.config-fb-fix-4-chromium-drm-hdmi-1080-boot-mk802iv-multiboot-fb-new" but no joy.....
                    And i booted your img to see if theres a config in /proc but its not there.

                    Regards

                    Comment


                      #11
                      can install xbmc version linux ??

                      Comment


                        #12
                        Alternatively use https://drive.google.com/file/d/0B99...FRucUM0bS1CWUE for undefined 'user' partition Android ROMs.

                        Comment


                          #13
                          its that for me?
                          You realy like scripting
                          I only wanted the .config you used to make the kernel on "linux-sdcard-rkm-mk802iv-new.img" if you can
                          i only need that
                          Or at what you have here "CONFIG_CMDLINE="
                          If you cant i understand.

                          Thks.
                          Last edited by superceleron; 12-07-2014, 03:26.

                          Comment


                            #14
                            well...
                            its this ok?
                            Code:
                            CONFIG_CMDLINE="initrd=0x62000000,0x00800000 root=LABEL=linuxroot init=/sbin/init mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x0000c000(boot)"
                            Regards

                            Comment


                              #15
                              still no luck booting Linux from sdcard

                              Hi, again

                              After some tries with different android roms (even the cs918ii stock Rom) which all could not be used with the android sdcard script, I've found a prebuild ca918ii kernel (among many others) in another forum http://www.arctablet.com/blog/forum/...140731/page-2/ that worked for the Linux script.
                              The kernel loads,I can see penguins, and that's all.

                              Is there any documentation about how those scripts can be used, and what to do if they don't work?
                              Somehow all that was much more simple on my wandboard ! :-)

                              Regards, Martin

                              Comment

                              Working...
                              X