<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello Guys,<br>
    <br>
    Just an update from me, on the subject of kernel 4.0.4 and BPiR1 .
    The kernels have come and gone , and while waiting for 4.1 to come
    out I had a bit of a play to see if my original patch set would work
    on a series 4 kernel . And to cut a long story short it will not .
    So out came the spare board , and after a few hours of chasing new
    source for the switch we have a new patch . Hopefully there will not
    be a huge jump from 4.0.4 to 4.1 as far as the switch is concerned ,
    but anyway the new patch is a better starting place compared with
    the old one . If any of you guys wants to have a shot at it here is
    my compiling procedure and gzipped patch attached .<br>
    <br>
    <big><tt>Compiling method :</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Delete old files:</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  rm -rf BUILD/*</tt><tt><br>
      </tt><tt>  rm -rf BUILDROOT/*</tt><tt><br>
      </tt><tt>  rm -rf SOURCES/*</tt><tt><br>
      </tt><tt>  rm -rf SPECS/*</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Install KERNEL source:</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  rpm -ivh
        ../Downloads/ARM/SRPMS/kernel-4.0.4-202.fc21.src.rpm </tt><tt><br>
      </tt><tt><br>
      </tt><tt>Copy b53 driver patch to SOURCES:</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  cd SOURCES/</tt><tt><br>
      </tt><tt>  cp
        ../../Downloads/ARM/SOURCES/linux-4.0.4-202.fc21.BPi-R1.patch .</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Edit KERNEL config-generic to enable b53 drivers and
        f2fs:</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  vi config-generic</tt><tt><br>
      </tt><tt>  </tt><tt><br>
      </tt><tt>  add following:</tt><tt><br>
      </tt><tt>  </tt><tt><br>
      </tt><tt>  CONFIG_B53=y</tt><tt><br>
      </tt><tt>CONFIG_B53_SPI_DRIVER=y</tt><tt><br>
      </tt><tt>CONFIG_B53_PHY_DRIVER=y</tt><tt><br>
      </tt><tt>CONFIG_B53_SRAB_DRIVER=y</tt><tt><br>
      </tt><tt>CONFIG_B53_PHY_FIXUP=y</tt><tt><br>
      </tt><tt>CONFIG_SWCONFIG=y</tt><tt><br>
      </tt><tt>CONFIG_SWCONFIG_LEDS=y</tt><tt><br>
      </tt><tt>CONFIG_F2FS_FS=y</tt><tt><br>
      </tt><tt>CONFIG_F2FS_STAT_FS=y</tt><tt><br>
      </tt><tt>CONFIG_F2FS_FS_XATTR=y</tt><tt><br>
      </tt><tt>CONFIG_F2FS_FS_POSIX_ACL=y</tt><tt><br>
      </tt><tt>CONFIG_F2FS_FS_SECURITY=y</tt><tt><br>
      </tt><tt>CONFIG_F2FS_CHECK_FS=y</tt><tt><br>
      </tt><tt><br>
      </tt><tt><br>
      </tt><tt>Patch KERNEL spec file :</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  cd ../SPECS/</tt><tt><br>
      </tt><tt>  patch  &lt;
        /home/msou/Downloads/ARM/SOURCES/kspec_4.0.4.patch</tt><tt><br>
      </tt><tt><br>
      </tt><tt>Execute KERNEL Compiling command from SPECS dir:</tt><tt><br>
      </tt><tt><br>
      </tt><tt>  rpmbuild -ba --target armv7hl --without=perf
        --without=debuginfo --without=pae --define="_arch arm"
        --define="_build_arch arm" kernel.spec</tt><tt><br>
      </tt></big><br>
    You notice that I am enabling f2fs , I am using that file system on
    my production server . These days you probably do not need to do it
    as upstream is already doing it . It is just a carryover from my old
    script .<br>
    <br>
    The kernel spec patch looks like this :<br>
    <br>
    <tt>--- kernel.spec        2015-05-28 06:50:08.000000000 +1000<br>
      +++ kernel.spec.new    2015-06-06 20:48:20.759296131 +1000<br>
      @@ -25,6 +25,7 @@ Summary: The Linux kernel<br>
       %endif<br>
       <br>
       # % define buildid .local<br>
      +%define buildid .BPiR1<br>
       <br>
       # baserelease defines which build revision of this kernel version
      we're<br>
       # building.  We used to call this fedora_build, but the magical
      name<br>
      @@ -682,6 +683,9 @@ Patch26209: 0001-ktime-Fix-ktime_divns-t<br>
       Patch26211:
      mnt-Fail-collect_mounts-when-applied-to-unmounted-mo.patch<br>
       Patch26212:
      fs_pin-Allow-for-the-possibility-that-m_list-or-s_li.patch<br>
       <br>
      +# Bananapi R1 patch<br>
      +Patch41526: linux-4.0.4-202.fc21.BPi-R1.patch<br>
      +<br>
       # END OF PATCH DEFINITIONS<br>
       <br>
       %endif<br>
      @@ -1467,6 +1471,9 @@ ApplyPatch 0001-ktime-Fix-ktime_divns-to<br>
       ApplyPatch
      mnt-Fail-collect_mounts-when-applied-to-unmounted-mo.patch<br>
       ApplyPatch
      fs_pin-Allow-for-the-possibility-that-m_list-or-s_li.patch<br>
       <br>
      +# Patch for bananapi R1<br>
      +ApplyPatch linux-4.0.4-202.fc21.BPi-R1.patch<br>
      +<br>
       # END OF PATCH APPLICATIONS<br>
       <br>
       %endif</tt><br>
    <br>
    Happy compiling .<br>
    <br>
    <br>
    Best Regards<br>
    Milorad<br>
  </body>
</html>