Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

How to compile your own kernel for rk3066 devices

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

    #31
    Thanks for the quick response.. I have tried different toolchains, most recent was from http://developer.android.com/tools/s...html#Downloads (x64 toolchain for linux) and still get the same error with arm-linux-androideabi-4.6 and arm-linux-androideabi-4.8.

    I have GCC (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 and kernel Im trying to compile is 3.0.36+.

    What basically happens is that kernel folder in kernel doesn't get compiled (thus the error: kernel/built-in.o not found).

    Could someone give some more pointers what to keep in mind or check!

    Thanks in advance

    Comment


      #32
      Re: How to compile your own kernel for rk3066 devices

      Originally posted by Shmarkus View Post
      Thanks for the quick response.. I have tried different toolchains, most recent was from http://developer.android.com/tools/s...html#Downloads (x64 toolchain for linux) and still get the same error with arm-linux-androideabi-4.6 and arm-linux-androideabi-4.8.

      I have GCC (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 and kernel Im trying to compile is 3.0.36+.

      What basically happens is that kernel folder in kernel doesn't get compiled (thus the error: kernel/built-in.o not found).

      Could someone give some more pointers what to keep in mind or check!

      Thanks in advance
      Can you use the cross compiler complete path? I use Ubuntu and I installed my cross compiler using apt-get and no problem for me on any kernel, newest toolchain is not always the best.
      Can you give me a link to the sources you are using and your config? I will try to take a look on it.

      Leolas.
      Sent by my phone.
      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


        #33
        Code:
        brian@brian-VirtualBox:~$ sudo apt-get install build-essential curl git-core gperf bison gnupg flex sharutils zip lzop gnupg gcc-multilib g++-multilib ia32-libs lib32z1-dev libncurses5-dev lib32ncurses5-dev zlib1g-dev libsdl-dev libesd0-dev libwxgtk2.8-dev
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
        Package ia32-libs is not available, but is referred to by another package.
        This may mean that the package is missing, has been obsoleted, or
        is only available from another source
        However the following packages replace it:
          lib32z1 lib32ncurses5 lib32bz2-1.0

        Not sure which one to change to
        Without memories we have nothing.

        Comment


          #34
          Originally posted by Decapper View Post
          Code:
          brian@brian-VirtualBox:~$ sudo apt-get install build-essential curl git-core gperf bison gnupg flex sharutils zip lzop gnupg gcc-multilib g++-multilib ia32-libs lib32z1-dev libncurses5-dev lib32ncurses5-dev zlib1g-dev libsdl-dev libesd0-dev libwxgtk2.8-dev
          Reading package lists... Done
          Building dependency tree       
          Reading state information... Done
          Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
          Package ia32-libs is not available, but is referred to by another package.
          This may mean that the package is missing, has been obsoleted, or
          is only available from another source
          However the following packages replace it:
            lib32z1 lib32ncurses5 lib32bz2-1.0

          Not sure which one to change to
          remove ia32-libs from list and install the other packages.
          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


            #35
            Hi Leolas,

            all the sources are linked in my first post (03-05-2014, 11:39 PM).

            Finally I figured out the problem. Diffed makefile in kernel folder with another rockchip kernel sources and it was a wrong makefile (from root folder. Kernel folder makefile should me somewhat different). So I changed the makefile and all the sources got compiled.

            Also, I used arm-linux-androideabi-4.6 toolchain, since 4.8 didnt work

            Comment


              #36
              one more question

              how do You debug kernel errors? I mean, when kernel gets compiled but wont run on the device :P

              Comment


                #37
                Re: How to compile your own kernel for rk3066 devices

                Originally posted by Shmarkus View Post
                how do You debug kernel errors? I mean, when kernel gets compiled but wont run on the device :P
                If it didn't boot, there is no way for me, to check the logs you need a serial to USB device attached to the stick, and is difficult to find where to attach the pins and you can damage the device.


                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


                  #38
                  Thanks for the feedback. I tried different defconfigs and finally found a working one

                  Comment


                    #39
                    Hi, more problems, hope someone can help!

                    Stock kernel, touchscreen init in dmesg:
                    <6>[ 1.214997] [elan] elan_ktf2k_ts_init driver version 0x0003: Integrated 2 and 5 fingers together and auto-mapping resolution
                    <6>[ 1.215041] [elan] elan_ktf2k_ts_probe
                    <4>[ 1.215168]
                    <4>[ 1.215174]
                    <4>[ 1.215177]
                    <4>[ 1.215181]
                    <4>[ 1.215184] EKTH32XX_init_platform_hw 1
                    <4>[ 1.215189]
                    <4>[ 1.215192]
                    <4>[ 1.215195]
                    <4>[ 1.215211] ------------[ cut here ]------------
                    <4>[ 1.215242] WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x4c/0x190()
                    <4>[ 1.215255] autorequest GPIO-155
                    <4>[ 1.215289] [<c049b2a8>] (unwind_backtrace+0x0/0xf0) from [<c04bf7ec>] (warn_slowpath_common+0x4c/0x64)
                    <4>[ 1.215317] [<c04bf7ec>] (warn_slowpath_common+0x4c/0x64) from [<c04bf884>] (warn_slowpath_fmt+0x2c/0x3c)
                    <4>[ 1.215345] [<c04bf884>] (warn_slowpath_fmt+0x2c/0x3c) from [<c064ae40>] (gpio_ensure_requested+0x4c/0x190)
                    <4>[ 1.215374] [<c064ae40>] (gpio_ensure_requested+0x4c/0x190) from [<c064b274>] (gpio_direction_output+0x8c/0x258)
                    <4>[ 1.215407] [<c064b274>] (gpio_direction_output+0x8c/0x258) from [<c070ebb0>] (elan_ktf2k_ts_probe+0x14c/0x730)
                    <4>[ 1.215439] [<c070ebb0>] (elan_ktf2k_ts_probe+0x14c/0x730) from [<c07194bc>] (i2c_device_probe+0xa0/0xd4)
                    <4>[ 1.215466] [<c07194bc>] (i2c_device_probe+0xa0/0xd4) from [<c0684e38>] (driver_probe_device+0xc8/0x184)
                    <4>[ 1.215492] [<c0684e38>] (driver_probe_device+0xc8/0x184) from [<c0684f54>] (__driver_attach+0x60/0x84)
                    <4>[ 1.215516] [<c0684f54>] (__driver_attach+0x60/0x84) from [<c0684634>] (bus_for_each_dev+0x48/0x84)
                    <4>[ 1.215550] [<c0684634>] (bus_for_each_dev+0x48/0x84) from [<c0683df4>] (bus_add_driver+0xac/0x230)
                    <4>[ 1.215577] [<c0683df4>] (bus_add_driver+0xac/0x230) from [<c0685554>] (driver_register+0xa8/0x138)
                    <4>[ 1.215603] [<c0685554>] (driver_register+0xa8/0x138) from [<c07198c0>] (i2c_register_driver+0x40/0xac)
                    <4>[ 1.215630] [<c07198c0>] (i2c_register_driver+0x40/0xac) from [<c04913c8>] (do_one_initcall+0x94/0x164)
                    <4>[ 1.215657] [<c04913c8>] (do_one_initcall+0x94/0x164) from [<c04083a0>] (kernel_init+0x80/0x12c)
                    <4>[ 1.215688] [<c04083a0>] (kernel_init+0x80/0x12c) from [<c0497260>] (kernel_thread_exit+0x0/0x8)
                    <4>[ 1.215724] ---[ end trace 76557314c123d4c5 ]---
                    <3>[ 1.323318] DVFS ERR: dvfs_reset_volt (clk:vd_cpu), try to reload arm_volt! arm_volt_correct = 1200000
                    <6>[ 1.592667] usb 2-1: new high speed USB device number 2 using usb20_host
                    <4>[ 1.603977] [elan] __hello_packet_handler: hello packet 55:55:55:55
                    <4>[ 1.604016] [elan] hellopacket's rc = 0
                    <6>[ 1.698656] [elan] __fw_packet_handler: firmware version: 0x0003
                    <6>[ 1.698667] [elan] __fw_packet_handler: firmware ID: 0x04e0
                    <6>[ 1.698676] [elan] __fw_packet_handler: x resolution: 896, y resolution: 576
                    <6>[ 1.698865] input: elan-touchscreen as /devices/virtual/input/input1
                    <6>[ 1.698883] cpufreq_interactive_input_connect: connect to elan-touchscreen
                    <4>[ 1.699205] [ELAN]misc_register finished!!
                    <4>[ 1.699215]
                    <4>[ 1.699218] --FW_VERSION = 0003---
                    Custom kernel:
                    <6>[ 1.327578] [elan] elan_ktf2k_ts_init driver version 0x0003: Integrated 2 and 5 fingers together and auto-mapping resolution
                    <7>[ 1.327590] bus: 'i2c': add driver elan-ktf2k
                    <7>[ 1.327621] i2c-core: driver [elan-ktf2k] registered
                    ...and touchscreen is not responding Why does it not probe the elan-ktf2k?
                    kernel source: https://github.com/Shmarkus/android_...ockchip_rk292x
                    rk2926_v86_defconfig

                    Elan touchscreen is snatched from here (not originally in my kernel sources):
                    GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
                    Last edited by Shmarkus; 13 March 2014, 19:37. Reason: elan source added

                    Comment


                      #40
                      device connect to the VB-guest?

                      Does someone get the device connect to the VB-guest?
                      I user VB 4.3.8-92456 (with Extension_Pack-4.3.8-92456) at host XP SP3 with guest ubuntu 12.10-x64 but only short time attach and then it detach ?by it self?:
                      dmesg:
                      Code:
                      [  114.900157] usb 1-1: new high-speed USB device number 3 using ehci_hcd
                      [  115.240097] usb 1-1: New USB device found, idVendor=2207, idProduct=0006
                      [  115.240097] usb 1-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
                      [  115.240097] usb 1-1: Product: Nexus 7
                      [  115.240097] usb 1-1: Manufacturer: google
                      [  115.240097] usb 1-1: SerialNumber: U33BX0YGRQ
                      [  117.088096] usb 1-1: USB disconnect, device number 3
                      [  820.045028] usb 1-1: new high-speed USB device number 4 using ehci_hcd
                      [  820.640032] usb 1-1: New USB device found, idVendor=2207, idProduct=0006
                      [  820.640032] usb 1-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
                      [  820.640032] usb 1-1: Product: Nexus 7
                      [  820.640032] usb 1-1: Manufacturer: google
                      [  820.640032] usb 1-1: SerialNumber: U33BX0YGRQ
                      [  823.110737] usb 1-1: USB disconnect, device number 4
                      VBox.log
                      Code:
                      00:02:07.732360 VUSB: attached '1e60f070[proxy 2207:0006]' to port 1
                      00:02:07.732976 EHCI: USB Operational
                      00:02:10.330511 VUSB: detached '1e60f070[proxy 2207:0006]' from port 1
                      00:02:13.074602 EHCI: USB Suspended
                      00:13:53.045957 VUSB: attached '0216a1f0[proxy 2207:0006]' to port 1
                      00:13:53.047250 EHCI: USB Operational
                      00:13:56.706843 VUSB: detached '0216a1f0[proxy 2207:0006]' from port 1
                      00:13:59.427669 EHCI: USB Suspended
                      Same procedure if it is at bootloader mode
                      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


                        #41
                        modules.dep

                        Hi all,

                        I have compiled a kernel using Galland's sources and flased it to my MK908II stick.
                        It starts booting normally but obviously it needs it's own compliled modules.
                        modprobe: FATAL: Could not load /lib/modules/rk3x_kernel_3.0.36/modules.dep: No such file or directory
                        BTW "depmod -a" or even rmmod doesn't work with a working kernel either. So the module loading in this linux running under android is working quite differently compared to a normal linux.

                        My question is: what is the correct way of copying the modules to my stick and how to configure modprobe to find them?

                        Thank you!
                        Last edited by nagper; 19 July 2014, 08:47.

                        Comment


                          #42
                          Hello and thanks for these great tips! Trying to use the techniques to create a kernel for my Minix Neo X5 so I can enable HDMI debugging and try to find out why turning on the TV to which it is attached causes a crash most of the time. My compiles seem to complete fine but after flashing the kernel I get no joy when trying to boot. Black screen, no action whatsoever. Thankfully I am able to recovery to Finless 1.3 via CWM recovery. Another thing I note is that the kernel image file being flashed is only about 50% of the size of the kernel.img in the Finless 1.3 CWM distribution I am using. So I wonder if that is an indication that some very important stuff is being left out of the kernel. The code I am using seems to be omgemoon (or derived from omegamoon). In arch/arm/configs there are only 2 files: bqCurie_defconfig and rk3066_m808b_defconfig. I am using the latter and then turning on HDMI debugging under Rockchip HDMI using make menuconfig. Seems reasonable but the results are troublesome. So I am thinking that I just don't have a proper Makefile or something. Can anyone shed any light on this? I have looked for a config.gz and tried to extract the config from the kernel image in Finless 1.3 without any success. So having that info may help too. Your help is appreciated. Thanks

                          Comment


                            #43
                            Scripts link: http://cloud.freak-tab.de/public.php...ecf4b68423a8e6
                            from post 3 is down. Can someone upload a mirror for that?

                            UPDATE: OK I can see now that text of each script is included below. NM then.
                            Last edited by drofmij; 10 November 2014, 18:20. Reason: correction

                            Comment


                              #44
                              Hello. I wonder if someone following this can shed some light for a newbie trying to get his first working kernel on a Minix Neo X5. I have been working with KitKat source code and a def config provided by Karel elsewhere on this forum. I am building without modifying anything in the code and config. I am just trying to get a duplicate of Karel's kernel that will boot. His code runs fine on my Neo and I can manage to build and deploy the kernel.img . Using a serial debug terminal I can see the early boot log info. My kernels, compared to Karel's don't get very far. They seem to go off the rails during early DDR processing. The boot log info does show that my kernel seems to be addressing RAM differently than Karel's in that SRAM code and data are being read from and moved to different addresses. So when the my kernel starts moving along, it seems clear that memory access is wrong. To see details of my kernel's log versus Karel's look here.

                              I am building on Debian 32 bit. For several months I have been able to build and use kernel modules from the 3.0.36+ codebase using this platform. But I have read several references that say I MUST be building on a 64-bit platform - which I do not have available. Can anyone confirm that this is indeed REQUIRED to build a full kernel? I also note that most folks seem to be building on Ubuntu. So I wonder if that is the problem (not sure why it would be)?

                              I don't understand why a 64-bit platform should be required to build a kernel for a 32-bit machine. So I am really stumped here. If anyone is able to build a KitKat kernel on a 32-bit linux (intel), it would be great to get some tips on what I might be doing wrong here.

                              Thanks very much.

                              Comment


                                #45
                                is there anyway someone can re upload the zip for this again!?!

                                Comment

                                Working...
                                X