5 Replies Latest reply on Dec 24, 2015 10:56 AM by Intel_Alvarado

    Quark BSP Linux Kernel Patch Issue (1.2.0)




      In the quark_linux_v3.14+v1.2.0.tar.gz is a file: upstream.cfg

      that explains the upstream source to apply the patches to




      name = quark_linux

      url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

      tag = v3.14

      sha = 5d559a740483b867d79f8b7a6a94019271fca8f7


      Yet looking at the linux-stable tree, this sha commit id does not exist.

      The v3.14 tag is actually: 455c6fdbd219161bd09b1165f11699d6d73de11c

      in both the stable tree, and in Linus's tree.


      I created a branch from this tag and tried to `git am` the patches anyway.

      A few of the patches had whitespace issues and would not apply using `git am`, and had to be manually patched, then run `git am --continue` after adding the changed files.


      That was until I got to patch 0290: [PATCH 290/366] net: can: slcan: Added XSLCAN version of slcan module

      This patch did not apply cleanly, and I'm not familiar with this code.


      Is there something I'm missing?

        • 1. Re: Quark BSP Linux Kernel Patch Issue (1.2.0)

          Instead of going the `git am` route, I tried to just use gnu/patch.

          I downloaded the tarball of 3.14, and extracted it inside the directories with the Intel BSP tarballs, and did this for loop:


          for i in $(ls ../quark_linux_v3.14+v1.2.0/*.patch); do echo ${i}; patch -F3 -l -p1 < ${i} || break; done


          The -F3 gets me past an issue with patch 254: [PATCH 254/366] pch_udc: Pass VBUS GPIO from BSP

          where hunk #1 fails to apply to drivers/usb/gadget/Kconfig:




          patching file drivers/usb/gadget/Kconfig

          Hunk #1 FAILED at 467.

          1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/gadget/Kconfig.rej

          patching file drivers/usb/gadget/Makefile

          patching file drivers/usb/gadget/pch_gpio_vbus.c

          patching file drivers/usb/gadget/pch_udc.c

          Hunk #2 succeeded at 3168 (offset -10 lines).

          patching file include/linux/platform_data/pch_udc.h

          patching file include/linux/usb/pch_gpio_vbus.h



          the -l gets me past the whitespace issues in other patches (the kernel code style uses tabs, not spaces!).


          If the patch fails, the loop breaks and I know where it fails. So, as I mentioned in the previous post, here is the patch and the failure:




          patching file drivers/net/can/slcan.c

          Hunk #1 FAILED at 65.

          Hunk #2 succeeded at 135 (offset -2 lines).

          Hunk #3 succeeded at 170 (offset -2 lines).

          Hunk #4 succeeded at 212 (offset -2 lines).

          Hunk #5 succeeded at 247 (offset -2 lines).

          Hunk #6 FAILED at 305.

          Hunk #7 FAILED at 347.

          Hunk #8 succeeded at 359 (offset -12 lines).

          Hunk #9 succeeded at 377 (offset -12 lines).

          Hunk #10 succeeded at 388 (offset -12 lines).

          Hunk #11 succeeded at 397 (offset -12 lines).

          Hunk #12 succeeded at 412 (offset -12 lines).

          Hunk #13 succeeded at 480 (offset -12 lines).

          Hunk #14 FAILED at 519.

          Hunk #15 succeeded at 572 (offset -13 lines).

          Hunk #16 succeeded at 597 (offset -13 lines).

          Hunk #17 succeeded at 610 (offset -13 lines).

          Hunk #18 succeeded at 650 (offset -13 lines).

          Hunk #19 succeeded at 662 with fuzz 1 (offset -17 lines).

          Hunk #20 succeeded at 677 (offset -17 lines).

          Hunk #21 succeeded at 686 (offset -17 lines).

          Hunk #22 succeeded at 715 (offset -17 lines).

          Hunk #23 succeeded at 748 (offset -17 lines).

          Hunk #24 succeeded at 762 (offset -17 lines).

          Hunk #25 succeeded at 779 (offset -17 lines).

          4 out of 25 hunks FAILED -- saving rejects to file drivers/net/can/slcan.c.rej


          • 2. Re: Quark BSP Linux Kernel Patch Issue (1.2.0)



            We will investigate on this case. We will post a reply for you soon.



            • 3. Re: Quark BSP Linux Kernel Patch Issue (1.2.0)

              I noticed you’re using the kernel from kernel.org. Can you try to use the Yocto BSP for Quark? We built successfully BSP 1.2.0 on Ubuntu 14.04 LTS. The image built with the Quark BSP also builds a 3.14 kernel.



              • 4. Re: Quark BSP Linux Kernel Patch Issue (1.2.0)

                I'm using the upstream linux-stable v3.14, as that is what the upstream.cfg says is the upstream. Not the yocto version of the linux kernel.

                I am making a custom build that does not use yocto, and I expected the patches to apply to the upstream vanilla linux kernel.


                In the case that these patches only apply to the yocto version of the linux kernel, then the upstream.cfg should reflect that.

                • 5. Re: Quark BSP Linux Kernel Patch Issue (1.2.0)

                  The Yocto BSP is the only image we support. You can see more information here Download Intel® Quark™ BSP