Announcement

Collapse
No announcement yet.

Marvin - automated multi device kernel build tool

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

    Marvin - automated multi device kernel build tool

    Please note: If all you want is to overclock your CPU/GPU/RAM, then try using these tools instead to patch a stock kernel:
    rkpatchomatic 3188
    rkpatchomatic 3066
    There are many sticks around with different hardware configurations and sticks require specific modifications to the kernel. Keeping track of all this seems difficult, so the sources below are probably outdated and need some work. The tool can be used with any source tree however. So use the tool only if you know what you are doing and if you have up to date sources.



    Some time ago I made a posting with an idea for simplifying and automating multi-stick RK3188 kernel compilation:
    http://www.freaktab.com/showthread.p...el-compilation

    I'm pleased to announce that such a tool is now available

    Marvin the Paranoid Android Kernel Builder

    Marvin is an Android kernel build tool intended to make compiling kernels for multiple devices and multiple configurations easier. While it's originally designed for the Rockchip RK3188 platform, it could also be used for other platforms.

    Linux kernels are configured using a .config file. The settings in the config file decide which components are added to the kernel and how they should be configured. The settings can be chosen by using make menuconfig or by editing the config file directly. Different hardware devices require a different config file, different settings such as CPU or RAM clock speeds also need different config files. For example, if you would want to build kernels for 3 different devices, with 2 different CPU speeds and 2 different RAM speeds, you will end up with 12 config files. Each config needs to be built manually.

    Here's where Marvin comes to the rescue! Marvin works with a three level layered config system:
    1. a base config, common to all devices and configurations
    2. device configs, one for each device (T428, MK908, QX1, MK802IV, etc)
    3. option configs, any choice of settings can be combined in one config (a set of CPU frequencies, etc)
    The first contains a full config, the last two only the changes compared to the base config. You can edit these configs using menuconfig or a text editor, Marvin will automatically calculate the changes you made and store only those in the config files.

    These 3 configs are combined in a build profile, for example:
    t428 cpu1800 ddr600

    You can create a list of profiles and ask Marvin to build each configuration and package the kernels together with the generated config files and option descriptions in a single zip file. Handy for posting it on Freaktab

    Marvin can also help you install all the software you need for kernel building.

    Sounds interesting? Give it a try:
    https://github.com/phjanderson/marvin
    Scroll down on that page to see the manual and instructions to get started.

    Also available now, a parameterized kernel version for the RK3188:
    https://github.com/phjanderson/Kernel-3188
    Different RK3188 devices need different code in board-rk3188-box.c. Changing the clock speeds and voltages also require changes in that same file. Instead of having the change that file, conditional blocks are added to it to make these settings configurable through the kernel config file.

    Everything is is GPL so add to, edit or fork it as you like!
    Last edited by phjanderson; 01-25-2014, 22:26.
    Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

    #2
    Re: Marvin - automated multi device kernel build tool

    GREAT WORK :thumbup: CLAP CLAP CLAP.
    I need to test it deeper, but this is a great tool, and with it we can submit our sticks or box config and modifications needed to make our devices work, and all improvements we can add, will be added for all users. So please, all developers join this project, and we will share the same sources.
    Thanks phjanderson and thesawolf, sam321, hoabycsr, etc... All who share his configs and sources. Good work.

    leolas
    REMEMBER, YOUR FEEDBACK IS VERY IMPORTANT TO US.
    My devices:
    Minix Neo X7; Minix Neo X8-H , Minix Neo Z64W & Z64 (Sponsored by Minix)
    MK902 & MK902II(Sponsored by RKM)
    Beelink M8B & Beelink R89 (Sponsored by Beelink)
    Tronsmart VEGA S89H (Sponsored by
    Gearbest.com)
    MELE-PCG03 (Sponsored by Gearbest.com) Discount Coupon:MPCG03
    Ainol Intel Z3735 MiniPC(Sponsored by Gearbest.com)
    Thanks to them I can try to support your devices http://freaktab.com/core/images/smilies/wink.png

    Comment


      #3
      I would like to thank everyone who provided me with information, tips, sources, etc!
      Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

      Comment


        #4
        Is it possible to add RK3066 Config files to this too from eg. Omegamoon's repo, as there are a lot of config files, but they are in a different format/layout than the quad core devices?

        Comment


          #5
          Originally posted by mo123 View Post
          Is it possible to add RK3066 Config files to this too from eg. Omegamoon's repo, as there are a lot of config files, but they are in a different format/layout than the quad core devices?
          Yes. I've added a platform layer for this. Currently there's only a folder rk3188 in the plaform folder. Just make a folder rk3066 next to it. You'll have to figure out a good base config yourself.

          If you want to control things like clock speeds and GPIO wiring using config files, then you'll also have to parametrize the board file like the way I did for the RK3188. It shouldn't be very difficult to do.

          You can then switch the platform with:
          ./marvin select rk3066
          Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

          Comment


            #6
            Originally posted by phjanderson View Post
            Yes. I've added a platform layer for this. Currently there's only a folder rk3188 in the plaform folder. Just make a folder rk3066 next to it. You'll have to figure out a good base config yourself.

            If you want to control things like clock speeds and GPIO wiring using config files, then you'll also have to parametrize the board file like the way I did for the RK3188. It shouldn't be very difficult to do.

            You can then switch the platform with:
            ./marvin select rk3066
            I can't seem to make sense of this tool the help is completely non descriptive with no command line example
            edit: Nm I am a idiot today build= SUCCESS
            Last edited by Legitsu; 08-29-2013, 17:04.
            current devices(rockchip sucks)
            Hardkernel ODROID C1 running android kitkat
            Hardkernel ODROID XU3-L Running Linux/openelec (primary media server)
            rPi model B+ running nothing ... bricked

            Comment


              #7
              ok after a quick round of testing here is what I have found
              only getting ~10500 in antutu 3.3.2 I know the cpu isn't scaling up beyond 1008 seems to be the running theme with these V3 sticks
              the vfsam fix causes spam in the logcat/dmsg this eats up a FAIR ammount of cpu time ( like nearly 30% on my config) witch is partly to blame for the low antutu score disabling logcat/dmsg solve the issue
              http://www.filedropper.com/kernelmar...pu600ovsfsam_1 theres a link to the kernel I built if anyone else wants to try it (note I bumpd the ram voltage to 1.350 and the cpu core to 1.350)
              current devices(rockchip sucks)
              Hardkernel ODROID C1 running android kitkat
              Hardkernel ODROID XU3-L Running Linux/openelec (primary media server)
              rPi model B+ running nothing ... bricked

              Comment


                #8
                Originally posted by Legitsu View Post
                ok after a quick round of testing here is what I have found
                only getting ~10500 in antutu 3.3.2 I know the cpu isn't scaling up beyond 1008 seems to be the running theme with these V3 sticks
                the vfsam fix causes spam in the logcat/dmsg this eats up a FAIR ammount of cpu time ( like nearly 30% on my config) witch is partly to blame for the low antutu score disabling logcat/dmsg solve the issue
                http://www.filedropper.com/kernelmar...pu600ovsfsam_1 theres a link to the kernel I built if anyone else wants to try it (note I bumpd the ram voltage to 1.350 and the cpu core to 1.350)
                Interesting finding about the vsfsam fix, could you post the errors in dmesg in this thread?
                http://www.freaktab.com/showthread.p...video-playback
                I might have an idea to fix it. Thanks!
                Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

                Comment


                  #9
                  Originally posted by phjanderson View Post
                  Interesting finding about the vsfsam fix, could you post the errors in dmesg in this thread?
                  http://www.freaktab.com/showthread.p...video-playback
                  I might have an idea to fix it. Thanks!
                  done
                  .offtopic the consensus between me and hoaby is the the modules for the voltage regulators on the MK908 V3 are either wrong or not getting loaded correctly and this is preventing us from scaling beyond 1200Mhz on the mk908 V3 no matter what combination of governors and speeds /voltages we try neither of us can get anything more then 1.36Ghz to run on our V3 sticks
                  basically hoaby thinks that THIS set of messages in the dmsg is why scaling isn't functioning correctlly

                  <6>[ 0.996424] PMU: registered new PMU device of type 0
                  <3>[ 1.002099] DVFS ERR: gpu can't get regulator in clk_enable_dvfs
                  <3>[ 1.008831] DVFS ERR: ddr can't get regulator in clk_enable_dvfs
                  <3>[ 1.015540] DVFS ERR: cpu can't get regulator in clk_enable_dvfs
                  I don't think it should matter whats your thoughts on it
                  any attempt to set the cpu speed higher then 1200 or 1300mhz results in crash
                  also attempting to use any governor other then interactive also cause a lock this happens no matter what rom we try
                  edit: fix quote
                  Last edited by Legitsu; 08-30-2013, 01:18.
                  current devices(rockchip sucks)
                  Hardkernel ODROID C1 running android kitkat
                  Hardkernel ODROID XU3-L Running Linux/openelec (primary media server)
                  rPi model B+ running nothing ... bricked

                  Comment


                    #10
                    Update to 1.0.2

                    I fixed a bug where text config was used instead of menuconfig for menuconfig_option.

                    Just run a git pull to update Marvin.
                    Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

                    Comment


                      #11
                      Originally posted by phjanderson View Post
                      I fixed a bug where text config was used instead of menuconfig for menuconfig_option.

                      Just run a git pull to update Marvin.
                      couple of Options missing from this
                      1. Governor select
                      2. io Scheduler select
                      another issue iv had is that that there is no per-device base-config
                      if I wanna go in and enable some different modals I need to edit the base config save it as a copy under the \device folder and then load it and make
                      current devices(rockchip sucks)
                      Hardkernel ODROID C1 running android kitkat
                      Hardkernel ODROID XU3-L Running Linux/openelec (primary media server)
                      rPi model B+ running nothing ... bricked

                      Comment


                        #12
                        Originally posted by Legitsu View Post
                        couple of Options missing from this
                        1. Governor select
                        2. io Scheduler select
                        another issue iv had is that that there is no per-device base-config
                        if I wanna go in and enable some different modals I need to edit the base config save it as a copy under the \device folder and then load it and make
                        Did you read the manual?
                        https://github.com/phjanderson/marvin#editing-configs

                        Base configs are non-device specific.

                        Device settings go in the device configs.

                        To edit an existing device config:
                        ./marvin menuconfig_device t428

                        It will automatically create a new config if you specify a new device.
                        Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

                        Comment


                          #13
                          I tried to set up marvin and the kernel sources on an Arch Linux installation I had available. I believe I managed to install all packages required for cross-compiling ARM binaries but I still get the following error from './marvin build':

                          Code:
                          ==========
                          Building a kernel using:  
                          Device  : t428
                          Options : 1080p cpu1920h ddr720 gpu600h
                          ==========
                          
                            CHK     include/linux/version.h
                            CHK     include/generated/utsrelease.h
                          make[1]: `include/generated/mach-types.h' is up to date.
                            CALL    scripts/checksyscalls.sh
                            CHK     include/generated/compile.h
                            Kernel: arch/arm/boot/Image is ready
                            LZO     arch/arm/boot/compressed/piggy.lzo
                            SHIPPED arch/arm/boot/compressed/lib1funcs.S
                            AS      arch/arm/boot/compressed/lib1funcs.o
                            AS      arch/arm/boot/compressed/piggy.lzo.o
                            LD      arch/arm/boot/compressed/vmlinux
                            OBJCOPY arch/arm/boot/zImage
                            Kernel: arch/arm/boot/zImage is ready
                          make: *** [zkernel.img] Error 127
                          Any idea which package/tool I might be still missing?
                          NVidia Shield TV 2015 16 GB || Stock
                          NVidia Shield TV 2017 16 GB || Stock
                          Buy me a beer?

                          Comment


                            #14
                            Originally posted by Molle View Post
                            I tried to set up marvin and the kernel sources on an Arch Linux installation I had available. I believe I managed to install all packages required for cross-compiling ARM binaries but I still get the following error from './marvin build':

                            Code:
                            ==========
                            Building a kernel using:  
                            Device  : t428
                            Options : 1080p cpu1920h ddr720 gpu600h
                            ==========
                            
                              CHK     include/linux/version.h
                              CHK     include/generated/utsrelease.h
                            make[1]: `include/generated/mach-types.h' is up to date.
                              CALL    scripts/checksyscalls.sh
                              CHK     include/generated/compile.h
                              Kernel: arch/arm/boot/Image is ready
                              LZO     arch/arm/boot/compressed/piggy.lzo
                              SHIPPED arch/arm/boot/compressed/lib1funcs.S
                              AS      arch/arm/boot/compressed/lib1funcs.o
                              AS      arch/arm/boot/compressed/piggy.lzo.o
                              LD      arch/arm/boot/compressed/vmlinux
                              OBJCOPY arch/arm/boot/zImage
                              Kernel: arch/arm/boot/zImage is ready
                            make: *** [zkernel.img] Error 127
                            Any idea which package/tool I might be still missing?
                            Are you using 64bit intel linux? You need to use 64bit intel/amd linux.
                            Want to thank me for my work? Donate to one of the administrators of this forum here or here, thanks!

                            Comment


                              #15
                              Originally posted by phjanderson View Post
                              Are you using 64bit intel linux? You need to use 64bit intel/amd linux.
                              Yes, inside a VMware image:

                              Code:
                              $ uname -a
                              Linux merlin 3.10.9-1-ARCH #1 SMP PREEMPT Wed Aug 21 13:49:35 CEST 2013 x86_64 GNU/Linux
                              NVidia Shield TV 2015 16 GB || Stock
                              NVidia Shield TV 2017 16 GB || Stock
                              Buy me a beer?

                              Comment

                              Working...
                              X