Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Linuxium's Bootloader software to dualboot Android and Linux

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

    #16
    Two more (for the moment last ) question:
    1.)
    Why do you use the android-kernel as recovery /at "recovery-partition"?
    Because if you are able to create a linux-partition (as final), why don't you create a new partition like "android-kernel" (I don't know if it will work witch RKbatch, because I only user RKTool for separate partitions)?
    Is it because of only patching the boot.img instead of recompiling?
    If you manage it in the linux-kernel, it only have to fixed there?

    2.)
    If I only want to use SD or USB is it really needing to have a linux-partition at NAND?
    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


      #17
      Originally posted by no_spam_for_me View Post
      Two more (for the moment last ) question:
      1.)
      Why do you use the android-kernel as recovery /at "recovery-partition"?
      Because if you are able to create a linux-partition (as final), why don't you create a new partition like "android-kernel" (I don't know if it will work witch RKbatch, because I only user RKTool for separate partitions)?
      Is it because of only patching the boot.img instead of recompiling?
      If you manage it in the linux-kernel, it only have to fixed there?

      The Linux partition '(as final)' is to hold the Linux RFS similar to how the 'system' partition holds the Android RFS - they are different to the kernel/recovery partitions which are used as kernel for Linux and recovery for Android kernels respectively.

      2.)
      If I only want to use SD or USB is it really needing to have a linux-partition at NAND?
      If you don't want to install Linux to NAND (which actually means installing the Linux RFS to a NAND partition) then there is not need for a 'linux-partition'.

      Comment


        #18
        1.)
        Why do you use the android-kernel as recovery /at "recovery-partition"?
        Because if you are able to create a linux-partition (as final), why don't you create a new partition like "android-kernel" (I don't know if it will work witch RKbatch, because I only user RKTool for separate partitions)?
        Is it because of only patching the boot.img instead of recompiling?
        If you manage it in the linux-kernel, it only have to fixed there?

        The Linux partition '(as final)' is to hold the Linux RFS similar to how the 'system' partition holds the Android RFS - they are different to the kernel/recovery partitions which are used as kernel for Linux and recovery for Android kernels respectively.
        "The Linux partition '(as final)' is to hold the Linux RFS similar to how the 'system' partition holds the Android RFS - they are different to the kernel/recovery partitions which are used as kernel for Linux and recovery for Android kernels respectively."
        => Yes, sure, but that was not my question
        My question is, why don't you use a new partition for the android kernel instead of recovery...

        BTW: sorry, but I don't understand your answer at post #15
        "*** if CMW is using two kernels (kernel and recovery) then probably yes - as stock Android doesn't use the recovery partition other than for upgrades my bootloader make use of the space - probably just like CMW ***"
        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


          #19
          Ok, I think I've found a working kernel (config) ??
          Code:
          CONFIG_CMDLINE_FROM_BOOTLOADER=y
          # CONFIG_CMDLINE_FORCE is not set
          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


            #20
            Originally posted by no_spam_for_me View Post
            "The Linux partition '(as final)' is to hold the Linux RFS similar to how the 'system' partition holds the Android RFS - they are different to the kernel/recovery partitions which are used as kernel for Linux and recovery for Android kernels respectively."
            => Yes, sure, but that was not my question
            My question is, why don't you use a new partition for the android kernel instead of recovery...

            BTW: sorry, but I don't understand your answer at post #15
            "*** if CMW is using two kernels (kernel and recovery) then probably yes - as stock Android doesn't use the recovery partition other than for upgrades my bootloader make use of the space - probably just like CMW ***"
            Simply because I don't know of a command to reboot and substitute the current kernel for another one other than the command 'reboot recovery' which requires the "recovery" kernel to be located in the 'recovery' partition.

            If there are better ways of storing an alternative kernel and then being able to boot it this would be great.

            Comment


              #21
              Originally posted by no_spam_for_me View Post
              Ok, I think I've found a working kernel (config) ??
              Code:
              CONFIG_CMDLINE_FROM_BOOTLOADER=y
              # CONFIG_CMDLINE_FORCE is not set
              Sounds good, as long as the kernel supports your hardware device.

              Comment


                #22
                Originally posted by linuxium View Post
                Simply because I don't know of a command to reboot and substitute the current kernel for another one other than the command 'reboot recovery' which requires the "recovery" kernel to be located in the 'recovery' partition.

                If there are better ways of storing an alternative kernel and then being able to boot it this would be great.
                OK

                Originally posted by linuxium View Post
                ... as long as the kernel supports your hardware device.
                I think so because the start of the threat is at ~09.2013 and "[Edit: This is working on K-R42/CS918/MK888/DX05 devices, if you try it on another device, please report your results ]" and I have an clone old revision of the K-R42 (seems 1:1)...
                And it seems so, generally, because the K-R42 don't use a "real" LAN-chip (like minix x7), it use the "quick and dirty" solution by the RTL8201F, it will work and because of using a WiFi-bridge it is important for me...


                But at the moment I've stripped the wasser-mod-img to get the parameter and partition-images and build up the neeeding config for rktool...

                Next stepp will be to think about to write a script, perhaps to use dd or or or, to toggle the kernel images, and boot via shell at one click ...
                And first I have to do a BackUp ....
                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


                  #23
                  BTW:
                  Had ever any one test to rename the recovery partition to e.g. recovery1 and try 'reboot recovery1' ?
                  Perhaps it is so simple, that the reboot looks at the parameter to know where (address) to boot?
                  Last edited by no_spam_for_me; 02-23-2014, 23:04.
                  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


                    #24
                    boot.img

                    One more question/problem:
                    I've used "beyond compare" to compare two of your boot.img (for usb) an see there are many different bits and byts, so I think I have to use the "original" boot.img from wasser-mod and have to modifying it for sd and usb by my self...

                    So how do you do it (and what)?

                    If it is easier and ok for you, I can attach it...
                    But for the future (newer versions) it would be nice to know how to do it....

                    PS:
                    Ok, first and last step I've found out:
                    Unpack and pack Rockchip boot.img image (RK3066/RK3188)
                    (shit no windows but vmware ubuntu ... I will try)

                    PPS:
                    but first I have to wait for an answer by wasser...
                    Last edited by no_spam_for_me; 02-24-2014, 16:21.
                    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


                      #25
                      OK,
                      1. with "dd for windows" I can skip the first 8 Byte
                      2. and then with WinRAR I can unpack the GZ
                      3. and with 7z I can unpack the CPIO and have the file-system
                      So it looks like it is not "save/secured" ...

                      So, please can you explain what to do inside the file-system ?

                      Greetings
                      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


                        #26
                        OK, I analyse your boot (minix) for USB and SD and found out that you handle it at "init"...
                        e.g. at USB
                        Code:
                         :
                        # Wait for system to fully boot
                        clear
                        sleep 5
                         :
                        at SD not
                        and at USB
                        Code:
                                    :
                                    # Check for a disk with Linux - N.B. limited to only check the first drive to prevent multiple drive complexities
                                    DISK_LINUX=false
                                    DISK_DEVICE=""
                                    # First check to see if Linux is on an unpartitioned disk subject to limitation
                                    if [ -b /dev/sda ] ; then
                                                # Test for Linux (/mnt/disk/sbin/init is used to indicate that Linux is installed on disk)
                                                [ -d /mnt/disk ] || mkdir /mnt/disk
                                     :
                        and at SD not... and so on...

                        BUT
                        the boot.img (wasser and stock) are really different to yours...
                        I've attached this both (with skipped leading 8 Byte)... (because .rar is not possible I attach a .zip at filename)
                        So generally do it work (because I think the android kernel need the boot.img)?????????

                        Greeting
                        Attached Files
                        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


                          #27
                          recovery.img

                          I found a "one klick" tool (commandline) for unpacking boot.img
                          imgRePackerRK (RockChip's firmware images unpacker/packer)

                          so it unpacking recovery.img too and I get with your linuxium-recovery.img
                          - kernel (~10MB)
                          - ramdisk (~1MB)

                          this kernel can not unpack by the tool ("unknown format detected")

                          so only 1.) "kernel as recovery (as this is where the Android kernel is expected)"
                          will never work, and the unpacked kernel from the linuxium-recovery.img is ~10MB (normal kernel <4MB) so inside this kernel there must be more than the normal kernel (perhaps the boot.img??)...




                          PS: ----------------------

                          at the unpack of wassers recovery, I get
                          - kernel (~8MB)
                          - ramdisk (~2MB)
                          and automatically an unpack of the ramdisk and this seems to be nearly the same like the boot.img...


                          PPS: ---------------------

                          Ok, for recovery.img the Android Image Kitchen - Unpack/Repack Kernel/Recovery + ramdisk [Win32] seems to be the better alternative, because this is able to unpack the ramdisk from linuxium-recovery.img too...

                          So at least the question is, what kind of kernel (because >4MB) is inside...
                          Here it is named .zImage (compressed)
                          Last edited by no_spam_for_me; 02-25-2014, 02:36.
                          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


                            #28
                            Originally posted by no_spam_for_me View Post
                            OK, I analyse your boot (minix) for USB and SD and found out that you handle it at "init"...
                            e.g. at USB
                            Code:
                             :
                            # Wait for system to fully boot
                            clear
                            sleep 5
                             :
                            at SD not
                            and at USB
                            Code:
                                        :
                                        # Check for a disk with Linux - N.B. limited to only check the first drive to prevent multiple drive complexities
                                        DISK_LINUX=false
                                        DISK_DEVICE=""
                                        # First check to see if Linux is on an unpartitioned disk subject to limitation
                                        if [ -b /dev/sda ] ; then
                                                    # Test for Linux (/mnt/disk/sbin/init is used to indicate that Linux is installed on disk)
                                                    [ -d /mnt/disk ] || mkdir /mnt/disk
                                         :
                            and at SD not... and so on...

                            BUT
                            the boot.img (wasser and stock) are really different to yours...
                            I've attached this both (with skipped leading 8 Byte)... (because .rar is not possible I attach a .zip at filename)
                            So generally do it work (because I think the android kernel need the boot.img)?????????

                            Greeting
                            You shouldn't have to modify either stock or other's boot.img as my boot.img is the one doing the work and if the Android kernel is built without a ramdisk (so the Android boot.img is thus required) you can simply rebuild the Android kernel.

                            In principle, this is what I do (and it will depend on the Android ROM):

                            1. Unpack the Android upgrade.img to get individual boot.img, kernel.img, recovery.img, system.img etc and parameter
                            2. Split the Android boot.img to get the kernel and the ramdisk
                            3. Unpack the Android ramdisk so you can make any changes you might want
                            4. Repack the ramdisk
                            5. Build a new recovery.img using mkbootimg with the Android kernel from step 2 and the new ramdisk from step 4

                            If you don't want to mod the Android ramdisk just use the Android ROM's boot.img as the recovery.img with my boot.img and my kernel.img (or whatever Linux kernel image you want to substitute) and of course the Android ROM's system.img

                            If after step 1 you find that the Android boot.img is just a signed ramdisk and there is a separate Android kernel.img then remove the 8 byte header from the Android boot.img to get the ramdisk and build a new recovery.img using mkbootimg with the Android kernel,img and the ramdisk.

                            Simples!

                            Comment


                              #29
                              Originally posted by linuxium View Post
                              2. Split the Android boot.img to get the kernel and the ramdisk
                              And that's the PROBLEM, because our boot.img don't include a kernel...

                              Originally posted by linuxium View Post
                              If after step 1 you find that the Android boot.img is just a signed ramdisk and there is a separate Android kernel.img then remove the 8 byte header from the Android boot.img to get the ramdisk and build a new recovery.img using mkbootimg with the Android kernel,img and the ramdisk.
                              Without the config file for the recovery i.g. kerneloffset, ramdiskoffset...?
                              I will try it at windows, but I think then it only work at linux...
                              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


                                #30
                                Originally posted by no_spam_for_me View Post
                                And that's the PROBLEM, because our boot.img don't include a kernel...



                                Without the config file for the recovery i.g. kerneloffset, ramdiskoffset...?
                                I will try it at windows, but I think then it only work at linux...
                                I just took a quick look at t-r42-wasser-1.2.3.img and I would build the new recovery.img using the kernel extracted out of wasser's recovery.img and the ramdisk extracted out of wasser's boot.img

                                Comment

                                Working...
                                X