1 Reply Latest reply on Aug 16, 2016 6:46 AM by mpapini

    SPI DMA Mode patches and latest IOT release (20160606)

    mpapini

      Has anyone had any success in getting the SPI DMA patches to build into a usable kernel/ image?

       

      Background:

       

      As we all know SPI on Edison has some "issues" and at this point, I've lost track of what all of them are, but I can say that I have more success bit-banging than using the hardware SPI, and that's pretty sad.  I stumbled across Primiano's patch set (GitHub - primiano/edison-kernel: Kernel (v3.10.17 + Intel patch) for Intel Edison IoT module  ) and subsequently drcrallen's Yocto layer to implement them (GitHub - drcrallen/meta-primiano-dma: Bitbake recipes for @primiano's dma patch set ).  I have been unable to successfully build for a number of reasons, all of which boil down to my own inability to understand Yocto and the current source release structure.

       

      What I Have Tried:

       

      1)  Incorporating drcrallen's layer directly into the build_edison/conf/bblayers.conf.  Having performed all of the sanity checks that I know, it seemed to fit in there, however, a simple re-invocation of bitbake edison-image uboot resulted in nothing much happening ... perhaps somebody knows the incantation that I should be using to at least get a little bit further.

      2) In a fit of suicidal dementia, I tried applying the patch sets by hand - I highly recommend against this for the sake your own personal sanity ... the patch sets had some conflicts (or I created some -yet to be understood), that I gave a good try at resolving and again re-launched bitbake, which proceeded to overwrite the lovingly modified files (which I had luckily backed up). I have little hope in this working since the patch sets are massive and the probability that I did all of the changes correctly is vanishingly small...

      3) creating a do_unpack() that simply copied over the code from 2) above, into the source directory, but a subsequent do_patch() which I have yet to track down fails subsequently saying that some files don't match the index ...

       

      What I'm asking:

       

      Has anybody been able to get this to work? If so, how?  Does anybody know what incantation I should use in attempt 1) above, to get a bit further?

       

      Any help, support or indications would be most welcome ... barring great insights, I'll just go back to the version that was used by drcrallen.

       

      As a final question addressed at Intel, why weren't these patches included in the latest release since they have been in the wild for over a year???

       

      Mario.

        • 1. Re: SPI DMA Mode patches and latest IOT release (20160606)
          mpapini

          Well, my conclusion is that the new kernel is just not worth it.

           

          Instead I am running Primiano's kernel directly and have modified my linux-externalsrc.bb to build directly out of primiano's git.  This works for me at  25 MHz on SPI.  Until Intel decides to include patches that are publicly available, I have no real choice.  Attached, for anyone that would like seemingly functional SPI (seemingly because my testing thus far is limited) , I have attached my linux-externalsrc.bb.  As a matter of interest, this could be similarly modified to build other kernels directly into the image.  A big thanks to Primiano and drcrallen for having blazed a trail that, for me at least, has been useful and helpful.

           

          Mario.