3.10.17 Kernel

Discussion in 'Kernels' started by jas-mx, Feb 11, 2014.

  1. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    I started work on getting the FSL 3.10.17 (beta) kernel working on the UDOO a couple of weeks back and finally have a working/useable kernel. There is a branch (imx_3.10.17_1.0.0_beta-udoo) in my git repo if your interested in building/testing/contributing. I expect this is mainly for devs given the technical nature of deployment.

    You will need a rootfs with BSP 3.10.17 libraries if you want to test GPU/VPU support. See here

    To build the kernel use udoo_defconfig and the dts file is imx6-udoo.dts. You will need to re-build the 2013 uboot with display/console support disabled.

    updates:
    15-02-2014 - Added with new defconfig file udoo_defconfig. Enabled wifi support and added power off driver.
    06-04-2014 - Original post includes instructions for compilation and deployment (below). New debian rootfs available to test against here.

    What's currently working (or should be):

    1. sd card
    2. ethernet
    2. USB ports
    3. hdmi
    4. video/sound work fine through hdmi
    5. gpu works fine for fb. It works for x11 but there are issues with display detection because of the newly implemented xrandr support (see blog).
    6. SAM3X (can be programmed via Ardunio IDE)
    7. sata (haven't tested)
    8. correct power down of UDOO
    9. wifi

    What's not working:

    1. Analogue audio
    2. LCD/Touchscreen (don't have one to test with)

    Compilation and deployment instructions

    1. Build kernel and dts files

    Code:
    git clone git://github.com/mtx512/linux-imx.git
    cd linux-imx
    git checkout -b imx_3.10.17_1.0.0_beta-udoo origin/imx_3.10.17_1.0.0_beta-udoo
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  udoo_defconfig
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  uImage  UIMAGE_LOADADDR=0x10008000
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install
    2. Build 2013 Ubootand deploy to SD card.

    3. Extract debian rootfs onto ext4 partition on SD card.

    4. Create uboot boot script file (boot.scr) to load dts and kernel and copy to / on ext4 parition eg:

    Code:
    setenv bootargs 'console=ttymxc1,115200 root=root=/dev/mmcblk0p1  rootwait rw rootfstype=ext4 consoleblank=0 video=mxcfb0:dev=hdmi,1280x720M@60,bpp=32'
    setenv fdt_addr 0x12000000
    ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
    ext2load mmc ${mmcdev}:${mmcpart} 10800000 /boot/uImage 
    bootm 10800000 - ${fdt_addr}
    
    5. Copy kernel/modules and dts to ext4 parition

    sudo cp arch/arm/boot/dts/imx6q-udoo.dtb <SD card mount point>/
    sudo cp arch/arm/boot/uImage <SD card mount point>/boot/
    sudo cp -r output/lib/modules/3.10.17-xxxx <SD card mount point> /lib/modules
     
  2. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    Added with new defconfig file udoo_defconfig, enabled wifi support and added power off driver. See original post for update.
     
  3. miousername

    miousername New Member

    Joined:
    Jun 23, 2013
    Messages:
    73
    Likes Received:
    0
    Awensome!

    Great work! Thank you!
     
  4. moon.linux

    moon.linux New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    Please correct me if I am wrong we need to upgrade the u-boot loader to support this kernel.
     
  5. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    You can use the udoo 2013 uboot but you need to build it with display output disabled (there's a bug somewhere in the kernel hdmi driver) eg:

    Code:
    diff --git a/include/configs/udoo.h b/include/configs/udoo.h
    index 7632bb7..73d6e84 100644
    --- a/include/configs/udoo.h
    +++ b/include/configs/udoo.h
    @@ -70,7 +70,7 @@
     #define CONFIG_BAUDRATE                        115200
     
     /* HDMI or LVDS Display Configuration */
    -#define CONFIG_VIDEO_ENABLED
    +#undef CONFIG_VIDEO_ENABLED
     #ifdef CONFIG_VIDEO_ENABLED
     #define CONFIG_VIDEO
     #define CONFIG_VIDEO_IPUV
     
  6. jedik

    jedik New Member

    Joined:
    Feb 1, 2014
    Messages:
    10
    Likes Received:
    0
    I try to compile 3.10.17 kernel , but i get error
    Code:
    make[2]: *** No rule to make target `scripts/sortextable.c', needed by `scripts/sortextable'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    3.0.35 kernel compile with no errors.
     
  7. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    The dts files needs to be compiled followed by the kernel.
     
  8. jedik

    jedik New Member

    Joined:
    Feb 1, 2014
    Messages:
    10
    Likes Received:
    0
    I have compiled zImage 3.10.17 kernel
    Do i have to change uboot ? to use it my image
    What is next step ?
     
  9. bwautosport

    bwautosport New Member

    Joined:
    Oct 21, 2013
    Messages:
    13
    Likes Received:
    0
    So, I've been playing with this kernel the last few days. It seems to work pretty well on a rootfs with the Freescale SDK packages that correspond to the 3.10.17 kernel (gst-fsl-plugins, libfsl*, etc. from here at meta-fsl-bsp-release. A bit of flickering, and the OpenGL test seems to not want to launch. Video playback stutters a bit, but that could either be due to load with X running, or the GPU drivers maybe not being quite in line due to this UDOO kernel being decidedly beta - plus the Vivante drivers are still being actively developed against the 3.10.17. My testing is via HDMI display (Motorola Lapdock, actually).

    Note, I did not have to modify U-boot for this to work, mine loads correctly, and displays the splash image on the HDMI display when attached. I did rebuild U-boot with #undef CONFIG_VIDEO_ENABLED set, but that seems to take it's sweet time booting, and bootp/tftp traffic suffers greatly.

    I have a touchscreen, and a camera, and would like to offer to test but my issue is that, I need to wrap my head around the DTS to get the LDB enabled correctly, as well as the camera. I've borrowed a bit from the nitrogen6x and sabresd dts.

    But even before I get there, does the 3.10.17 kernel have the support for the LDB display on the UDOO? I'm having a hard time determining where/when the 3.0.35 kernel picked up support for the displays. Since that first push of their kernel was just a big commit comprising the 3.0.35 vanilla kernel *and* all of the FSL 4.1.0 and UDOO specific changes, working that backwards takes some time, and it seems since they just updated the touchscreen bits a bit, that support was there from the outset, in advance of the hardware actually being available.

    So, that being said, do you know if LDVS/LDB support needs to be ported still? Using the hacked dts I threw together, I see some signs of life that mxc_sdc_fb is loading the ldb driver, but the display immediately blanks when U-boot hands off, so I suspect this kernel doesn't have any knowledge of the LDB display. Thanks for your hard work on this. It's certainly great progress!
     
  10. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    Many thanks for testing for the kernel, glad to see someone who can :D . I'm testing on a modify debian rootfs with 3.10.17 gpu/vpu libraries. Video playback seems to be working fine for me, although X performance is slightly below par.

    Any chance you could verify ethernet throughput (i.e. with iperf)?

    That's interesting, wondering now if it is to do with the detection for my HDMI monitor.

    I'm expecting LDVS support to be working as I haven't heard of it not working on 3.10.17. If you could pastebin your dts changes and/or your kernel boot output it might hold a clue to the problem. Alternatively time pending I could try to create a dts with the lvds support for you to test.

    Regarding camera support this is something I need to look into.
     
  11. bwautosport

    bwautosport New Member

    Joined:
    Oct 21, 2013
    Messages:
    13
    Likes Received:
    0
    No problem - thanks for getting the ball rolling with 3.10. Sure, I will run a test and see what I can get on eth.

    Possibly? I don't have my LIlliput display on hand to test with, but I can in the next few days. I know that previously, I didn't have any issues with it displaying or hanging boot. Let me verify on another HDMI display before saying its absolutely working.

    I'm not confident my DTS changes are correct, so I'd like to spend a bit more time testing before posting changes which could confuse others.
    As it stands, changing the bootargs to those appropriate for my 7" LVDS display, result in the display *immediately* turning off after issuing the boot command. To clarify, when the board powers on, and is in U-boot, the display is lit, though it doesn't show the bootlogo and version strings (it does on an HDMI display) - it immediately turns off when U-boot hands to kernel/dts. So I'm thinking the pin-muxing isn't there in the DTS.

    I'll boot this and grab some console output in a bit. Thanks for getting back to me.
    Camera isn't a huge concern right now, if I really need one, I can use USB webcam for the time being.
     
  12. Oromit

    Oromit New Member

    Joined:
    Mar 14, 2014
    Messages:
    8
    Likes Received:
    0
    Does this kernel support i2c, spi via /dev/spidevX.Y and a way to controll all 4 PWMs from userspace?
     
  13. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    i2c is configured in the dts, therefore providing you have a kernel driver available then it should work.

    Not sure on the spi side, haven't looked into it. However nothing stopping you getting your feet wet if you want to implement it.
     
  14. moon.linux

    moon.linux New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    Hi Jas-mx,

    I have checked out the kernel and build the kernel for udoo as bellow.

    amoon@moon-ubuntu: ~/linux-imx-udoo-3.10$ make O=../build-3.10/ ARCH=arm udoo_defconfig

    amoon@moon-ubuntu: ~/linux-imx-udoo-3.10$ make j=2 O=../build-3.10/ CROSS_COMPILE=/opt/toolchains/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi- ARCH=arm uImage modules modules_install LOADADDR=0x10800000

    Build got succes full and After mounting the micro sd card. I copied the image and module on the micro sd card.

    amoon@moon-ubuntu: ~/build-3.10$ sudo cp ./arch/arm/boot/uImage /media/amoon/udoo_ubuntu/boot/uImage

    amoon@moon-ubuntu: ~/build-3.10$ sudo cp -R /lib/modules/3.10.17-80552-gd6e35d0/ /media/amoon/udoo_ubuntu/lib/modules/

    amoon@moon-ubuntu: ~/build-3.10$ umount /media/amoon/udoo_ubuntu

    If I try to boot up with this image it stucks at following message

    U-Boot 2009.08-svn89 (Oct 29 2013 - 16:13:13)

    CPU: Freescale i.MX6 family TO1.2 at 792 MHz
    Thermal sensor with ratio = 176
    Temperature: 37 C, calibration data 0x5594c369
    mx6q pll1: 792MHz
    mx6q pll2: 528MHz
    mx6q pll3: 480MHz
    mx6q pll8: 50MHz
    ipg clock : 66000000Hz
    ipg per clock : 66000000Hz
    uart clock : 80000000Hz
    cspi clock : 60000000Hz
    ahb clock : 132000000Hz
    axi clock : 264000000Hz
    emi_slow clock: 132000000Hz
    ddr clock : 528000000Hz
    usdhc1 clock : 198000000Hz
    usdhc2 clock : 198000000Hz
    usdhc3 clock : 198000000Hz
    usdhc4 clock : 198000000Hz
    nfc clock : 24000000Hz
    Board: i.MX6Q-UDOO: unknown-board Board: 0x63012 [POR]
    Boot Device: NOR
    I2C: ready
    DRAM: 1 GB
    MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3
    In: serial
    Out: serial
    Err: serial
    Net: got MAC address from IIM: 00:00:00:00:00:00
    FEC0
    Hit any key to stop autoboot: 0
    mmc2 is current device
    Loading file "/boot/uImage" from mmc device 2:1 (xxc1)
    5077704 bytes read
    ## Booting kernel from Legacy Image at 10800000 ...
    Image Name: Linux-3.10.17-80552-gd6e35d0
    Created: 2014-04-04 5:15:06 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 5077640 Bytes = 4.8 MB
    Load Address: 10800000
    Entry Point: 10800000
    Verifying Checksum ... OK
    XIP Kernel Image ... OK
    OK

    Starting kernel ...

    Please help me out with this situation... do I need to change the u-boot loader...
     
  15. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    I have updated the original post with compilation/deployment instructions. I suggest you also spend sometime getting up to speed with uboot/kernel/dts as will need to understand how these work to resolve problems.
     
  16. moon.linux

    moon.linux New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    Hi Jas-mx,
    After reading your complete blog and updateing my arm toolchain. I followed all the instructions that you have provided. Espeically changing the uboot commands it help me a lot. I am able to move ahead and boot into the new kernel but it stuck at some points I am not able to login to the board on the console. I am expolring more. Thanks for your input it was most valuable. I am trying to learn and explore this new arm arciteture.
    You have done excelent job Keep it up.
    -Anand Moon
     
  17. ivan.stojanovic

    ivan.stojanovic New Member

    Joined:
    Jan 21, 2014
    Messages:
    7
    Likes Received:
    0
    Hi Jas-mx,

    I managed to compile and deploy kernel, update u-boot as you suggested and boot successfully using your boot script. I used the root file system you suggested. That part works fine.

    The problem that I have is that I can't get HDMI (via HDMI to DVI cable) monitor nor 15" panel touchscreen display working. I used following boot arguments:
    - for monitor: video=mxcfb0:dev=hdmi,1280x720M@60,bpp=32
    - for touchscreen: video=mxcfb0:dev=ldb,LDB-WXGA,if=RGB24,bpp=32

    The output I get when I use monitor is following ("dmesg | grep mxc" just after board boots):
    mxc_sdc_fb fb.17: register mxc display driver hdmi
    mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1
    mxc_hdmi 20e0000.hdmi_video: Read EDID again
    mxc_hdmi 20e0000.hdmi_video: No modes read from edid
    mxc_hdmi 20e0000.hdmi_video: create default modelist


    The output I get when I use 15" panel:
    mxc_sdc_fb fb.17: register mxc display driver ldb
    mxc_sdc_fb fb.17: NO mxc display driver found!


    Am I doing something wrong here? Ok, it might not work on the 15" panel yet, but I was expecting it will work with the monitor. If you make any progress on any of those two, I am looking forward testing it :)

    Thanks,
    Ivan
     
  18. jas-mx

    jas-mx Active Member

    Joined:
    Dec 31, 2013
    Messages:
    407
    Likes Received:
    118
    Unfortunately it won't work with a 'HDMI to DVI' adapter, there we some kernel patches for 'HDMI-DVI' support but these gave inconsisent results. It should work a HDMI to VGA adapter.

    As mentioned in the initial post I haven't configured LCD support in the dts file because I don't have a LCD display to test against. If you know what you are doing, you could try adding the configuration to the dts file.
     
  19. eljefe

    eljefe New Member

    Joined:
    Apr 9, 2014
    Messages:
    1
    Likes Received:
    0
    Hi jas-mx,

    I think you have a typo in your boot.scr list:

    Code:
    root=root=/dev/mmcblk0p1
    won't let my udoo finish booting, it hangs on 'waiting for root device', but changing it to:

    Code:
    root=/dev/mmcblk0p1
    allows it to complete booting.

    Thanks for all of your work on this!

    -eljefe
     
  20. moon.linux

    moon.linux New Member

    Joined:
    Feb 17, 2014
    Messages:
    6
    Likes Received:
    0
    Hi Jas-mx,

    Each time I have to boot into this kernel I need to set the boot loader command. I tried to do "saveenv" but it's of no use. Please share me how to save these command.

    Is their any chance to see a firmware upgrade using this kernel in the future.

    -Anand Moon
     

Share This Page