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

    #31
    Originally posted by linuxium View Post
    Did you check whether 'gdisk' was installed? If not enter 'apt-get install gdisk' in a terminal window and try again.

    If it still fails, then enter the following in a terminal window:

    cp create-linux-sdcard create-linux-sdcard-debug
    sed -i 's?2> /dev/null??' create-linux-sdcard-debug

    and then run the new script like before:


    ./create-linux-sdcard-debug

    and post the results.
    Managed to flash using
    Cinnamon and sudo and setting to sdb.
    I see the linuxroot filesystem on the SD-Card through Linux Mint Cinnamon but
    where is the kernel-linux.img,resource-linux.img etc. files, should they also be copied to a partition on the SD-Card?

    When I insert SDCard to RK3288 box and boot to recovery, I don't see Linuxium bootlogo anymore, just black screen, no signal?

    Is there a detailed guide how to partition the SD-Card and what name should the partition be, linuxroot?
    Should there be more than 1 partition, what format?

    Comment


      #32
      Originally posted by mo123 View Post
      Managed to flash using
      Cinnamon and sudo and setting to sdb.
      I see the linuxroot filesystem on the SD-Card through Linux Mint Cinnamon but
      where is the kernel-linux.img,resource-linux.img etc. files, should they also be copied to a partition on the SD-Card?

      When I insert SDCard to RK3288 box and boot to recovery, I don't see Linuxium bootlogo anymore, just black screen, no signal?

      Is there a detailed guide how to partition the SD-Card and what name should the partition be, linuxroot?
      Should there be more than 1 partition, what format?
      LOL, I didn't notice that on your previous attempt you put the partition '/dev/sdb1' as your device when you should have used the device name i.e. '/dev/sdb' ... it shouldn't matter what was on the SD card as the script will wipe it ... that is why it is important to enter the correct device name ... the script will put everything required to boot on the SD card ... you don't need to worry about partitioning the SD card as the script will do that as required.

      So, before you tried to boot from the newly created SD card did you update your bootloader first? (OP ... 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).

      Comment


        #33
        Originally posted by nogareth View Post
        First, Thanks for your Help!!

        Ok, after modifying the script the way you wrote, here is some output and the error messages shown:

        ...image seems Ok.

        unpacking update.img
        ================================================== ==============================
        FIRMWARE_VER:4.4.2
        MACHINE_MODEL:rk30sdk
        MACHINE_ID:007
        MANUFACTURER:RK30SDK

        unpacking 12 files
        -------------------------------------------------------------------------------
        00000800-00000800 package-fileackage-file 627 bytes
        00001000-000010bd bootloader:RK3288Loader_uboot_V2.15.bin 387406 bytes
        00060000-00060000 parameter:rk3288-3.10-uboot-data1G.parameter.txt:0x4000@0x0 1429 bytes
        00060800-00060818 misc:Image/misc.img:0x2000@0x4000 49152 bytes
        0006d000-0006d038 resource:Image/resource.img:0x8000@0x6000 115200 bytes
        00089800-0008a303 kernel:Image/kernel.img:0x8000@0xe000 5774196 bytes
        0060b800-0060c550 boot:Image/boot.img:0x10000@0x16000 6979584 bytes
        00cb4000-00cb5330 recovery:Image/recovery.img:0x10000@0x26000 10059776 bytes
        0164c800-0169b1de system:Image/system.img:0x180000@0x92000 659484672 bytes
        00000000-ffffffff backup:RESERVED:0x1a000@0x36000 0 bytes
        28b3c000-28b3c000 update-script:update-script 933 bytes
        28b3c800-28b3c800 recover-script:recover-script 266 bytes
        -------------------------------------------------------------------------------
        ================================================== ==============================

        0005e9b4-28b9b9b7 ../chuangsiqi_CS918_AP6330_20140912.img-MD5 32 bytes
        unpacked
        done.


        but then this happens with all tested images...



        .
        .
        .
        ./create-android-sdcard-debug: Creating 'user' partition as '/dev/sdb5' using rest of space on '/dev/sdb' ... Warning: The kernel is still using the old partition table.
        The new table will be used at the next reboot.
        The operation has completed successfully.
        done.
        ./create-android-sdcard-debug: Making 'vfat' file system for 'user' partition on '/dev/sdb5' ... mkfs.fat 3.0.26 (2014-03-07)
        /dev/sdb5: No such file or directory
        done.
        ./create-android-sdcard-debug: Updating Android boot source ... egrep: res: Is a directory
        egrep: sbin: Is a directory
        egrep: res: Is a directory
        egrep: sbin: Is a directory
        done.
        ./create-android-sdcard-debug: Rebuilding Android boot image ... 4038 blocks

        ./create-android-sdcard-debug: Cannot create Android boot image ... exiting.

        .....


        maybe ill give it a try on another linux Distro. (Currently running Ubuntu 14.04 inside Vmware Player)

        Martin
        The messagge "Cannot create Android boot image ... exiting" in my ubuntu vm x64 was generated by a problem with mkkrnlimg include in Tools folder.

        I compiled it from source (https://github.com/dayongxie/rk2918_tools), move it to Tools folder and added -a switch to script in sub
        CONVERT_ANDROID_IMAGE_TO_RUN_ON_SDCARD()
        line 370
        from:
        ${MKKRNLIMG} boot.img-ramdisk.cpio.gz boot.img > /dev/null 2>&1 && ANDROID_IMAGE_CREATION_SUCCESSFUL=true

        to:
        ${MKKRNLIMG} -a boot.img-ramdisk.cpio.gz boot.img > /dev/null 2>&1 && ANDROID_IMAGE_CREATION_SUCCESSFUL=true

        I have successfully moved to sd card last android firmware from rikomagick for my mk902IILE. Now I can boot linux from my internal ROM and Android from SD.

        Comment


          #34
          Originally posted by pirmar View Post
          The messagge "Cannot create Android boot image ... exiting" in my ubuntu vm x64 was generated by a problem with mkkrnlimg include in Tools folder.

          I compiled it from source (https://github.com/dayongxie/rk2918_tools), move it to Tools folder and added -a switch to script in sub
          CONVERT_ANDROID_IMAGE_TO_RUN_ON_SDCARD()
          line 370
          from:
          ${MKKRNLIMG} boot.img-ramdisk.cpio.gz boot.img > /dev/null 2>&1 && ANDROID_IMAGE_CREATION_SUCCESSFUL=true

          to:
          ${MKKRNLIMG} -a boot.img-ramdisk.cpio.gz boot.img > /dev/null 2>&1 && ANDROID_IMAGE_CREATION_SUCCESSFUL=true

          I have successfully moved to sd card last android firmware from rikomagick for my mk902IILE. Now I can boot linux from my internal ROM and Android from SD.
          Great. And just to clarify ...

          'mkkrnlimg' is provided as a 32-bit binary from Rockchip hence the need to install 'ia32-libs' if on a 64-bit environment (and see no_spam_for_me's comment for a kludge to install ia32-libs on Ubuntu 14.04).

          Alternatively a 64-bit version is also available here https://github.com/phjanderson/Kernel-3188 which is also based on the same source you mention but doesn't force the '-a' flag and so can be used without having to modify the script. To download and install this 64-bit version, first change directory to 'Tools' and in a terminal window enter 'mv mkkrnlimg mkkrnlimg.x86' and then 'wget https://github.com/phjanderson/Kerne...ster/mkkrnlimg' and finally 'chmod 755 mkkrnlimg' (note: I cannot stop hypertexting on the 'wget' command so make sure the full path is 'github.com/phjanderson/Kernel-3188/raw/master/mkkrnlimg').

          Comment


            #35
            Just tried booting again Lubuntu 14.10 from SD-Card and still no signal.
            2.17.02 bootloader is installed.
            Can boot Tizen Firefly image correctly from SD-Card but not this.


            Anyone tried making Ubuntu Touch Image yet for RK3288?

            Comment


              #36
              Originally posted by mo123 View Post
              Just tried booting again Lubuntu 14.10 from SD-Card and still no signal.
              2.17.02 bootloader is installed.
              Can boot Tizen Firefly image correctly from SD-Card but not this.


              Anyone tried making Ubuntu Touch Image yet for RK3288?
              What does the output of a USB-UART serial debugging connection show on boot up?

              Comment


                #37
                Originally posted by linuxium View Post
                What does the output of a USB-UART serial debugging connection show on boot up?
                Unfortunately I have a normal RK3288 Box and not any of those connectors or cables or know how to debug it.
                Will use Firefly internal EMMC Lubuntu Image in the meantime.
                Thanks anyway.

                Comment


                  #38
                  Originally posted by mo123 View Post
                  Unfortunately I have a normal RK3288 Box and not any of those connectors or cables or know how to debug it.
                  Will use Firefly internal EMMC Lubuntu Image in the meantime.
                  Thanks anyway.
                  What device do you use and what image are you using that works? Maybe I could just prepare a downloadable image that can be flashed directly to an SD card?

                  Comment


                    #39
                    Originally posted by linuxium View Post
                    What device do you use and what image are you using that works? Maybe I could just prepare a downloadable image that can be flashed directly to an SD card?
                    Nagrace HPH RK3288 16GB TV Box

                    This works for internal EMMC, maybe can be changed to SD-Card
                    Lubuntu 14.04
                    https://drive.google.com/folderview?id=0B7HO8lbGgAqANHVpUS1kQWVOMjA&usp=dri ve_web
                    Also the Android 4.4 & Ubuntu 14.04 Dual Boot v0930(the boot-linux and linuxroot image can be extracted)


                    Also this one for UT3 - Xubuntu 14.10


                    Both images use their own boot-linux.img to flash to recovery and are not interchangeable.
                    Maybe the Firefly image can be upgraded to Lubuntu 14.10. That would be nice.
                    Tried to do it manually with the update manager but when installed and rebooted, the image didn't boot anymore.

                    Comment


                      #40
                      different Linux kernel

                      Does anyone have a different Linux kernel than the one inside the create sdcard archive? I've tried to download the ricomagic Linux firmware because their android image runs flawless on my cs918ii but it seems they removed it for some reason.
                      The kernel in the archive does not boot on my device, and the (stock) android kernel won't boot the Linux rootfs . Not even when location of root is added in the parameter file before creating the card. ( cmdline root=LABEL=linuxroot)

                      Regards, Martin

                      Comment


                        #41
                        Well ive tried the installinmg wasser 2.0.3 to sdcard with create-android-sdcard-no-user-partition-debug ill attach the file dont want to fill the screen up. I had to install sgdisk apart from that dont know whats going wrong unless the firmware just doesnt agree with the script.

                        readme.txt

                        Comment


                          #42
                          Originally posted by grant2258 View Post
                          Well ive tried the installinmg wasser 2.0.3 to sdcard with create-android-sdcard-no-user-partition-debug ill attach the file dont want to fill the screen up. I had to install sgdisk apart from that dont know whats going wrong unless the firmware just doesnt agree with the script.

                          [ATTACH]9548[/ATTACH]
                          What version of Linux are you running, is it a 32 or 64 bit version and is it running natively or in a VM?

                          Comment


                            #43
                            Originally posted by linuxium View Post
                            What version of Linux are you running, is it a 32 or 64 bit version and is it running natively or in a VM?
                            the linux is running natively

                            cat /etc/linuxmint/info
                            RELEASE=17
                            CODENAME=qiana
                            EDITION="Cinnamon 64-bit"
                            DESCRIPTION="Linux Mint 17 Qiana"
                            DESKTOP=Gnome
                            TOOLKIT=GTK
                            NEW_FEATURES_URL=http://www.linuxmint.com/rel_qiana_cinnamon_whatsnew.php
                            RELEASE_NOTES_URL=http://www.linuxmint.com/rel_qiana_cinnamon.php
                            USER_GUIDE_URL=http://www.linuxmint.com/documentation.php
                            GRUB_TITLE=Linux Mint 17 Cinnamon 64-bit


                            I have installed the boot loader on the box. I did initially have to install sgdisk like i said. All i get is a boot screen and then it hangs.


                            ive not really been through all how this works i think ill need to look into what the sctripts are doing more to work out what the mattery my side. All i know is when i mout all the partitons as ext4 the only one that has any data listed on it is sdd3 the system partition
                            Last edited by grant2258; 01-01-2015, 15:59.

                            Comment


                              #44
                              On my Linux the internal card reader has device names like /dev/mmcblk0 with partitions like /dev/mmcblk0p0. For this reason the script failes during creation of the partition device filenames (the "p" is missing). Especially the flashing of the system.img fails because of a wrong target device filename. I had to adapt the script a bit to work correctly.

                              Comment


                                #45
                                Originally posted by hueb_s View Post
                                On my Linux the internal card reader has device names like /dev/mmcblk0 with partitions like /dev/mmcblk0p0. For this reason the script failes during creation of the partition device filenames (the "p" is missing). Especially the flashing of the system.img fails because of a wrong target device filename. I had to adapt the script a bit to work correctly.
                                thing is everything seems to be flashing right on the sdcard the system is the only partition showing any data. In all honesty i have no clue where its going wrong it is working properly as far as device names go.

                                mkkrnlimg V20120220
                                cmd:boot.img-ramdisk.cpio.gz boot.img [(null)]
                                kernel Image:boot.img for mid is ready.
                                done.
                                ./create-android-sdcard-no-user-partition-debug: Creating 'parameter.img' from 'parameter' ... done.
                                ./create-android-sdcard-no-user-partition-debug: Flashing 'parameter.img' to '/dev/sdd' ... dd if=parameter.img of=/dev/sdd seek=8192 conv=sync,fsync
                                1+1 records in
                                2+0 records out
                                1024 bytes (1.0 kB) copied, 0.00357752 s, 286 kB/s
                                done.
                                ./create-android-sdcard-no-user-partition-debug: Flashing boot 'boot.img' to '/dev/sdd ... dd if=boot.img of=/dev/sdd seek=98304 conv=sync,fsync
                                2315+1 records in
                                2316+0 records out
                                1185792 bytes (1.2 MB) copied, 0.733255 s, 1.6 MB/s
                                done.
                                ./create-android-sdcard-no-user-partition-debug: Flashing kernel 'kernel' to '/dev/sdd ... dd if=kernel.img of=/dev/sdd seek=65536 conv=sync,fsync
                                11752+1 records in
                                11753+0 records out
                                6017536 bytes (6.0 MB) copied, 3.25158 s, 1.9 MB/s
                                done.
                                ./create-android-sdcard-no-user-partition-debug: Flashing resource 'resource' to '/dev/sdd ... dd if=resource.img of=/dev/sdd seek=32768 conv=sync,fsync
                                228+0 records in
                                228+0 records out
                                116736 bytes (117 kB) copied, 0.0789783 s, 1.5 MB/s
                                done.
                                ./create-android-sdcard-no-user-partition-debug: Flashing system 'system.img' to '/dev/sdd3' ... dd if=system.img of=/dev/sdd3 conv=sync,fsync
                                1221760+0 records in
                                1221760+0 records out
                                625541120 bytes (626 MB) copied, 3.75537 s, 167 MB/s
                                /dev/sdd3 is mounted.

                                Comment

                                Working...
                                X