Loading ...
Sorry, an error occurred while loading the content.

Kernel patches to fix floating point issues @ NSLU2

Expand Messages
  • r2004roellig
    Hello, the Netwinder FP emulator implementation for ARM in the linux kernel 2.4 and 2.6 has floating point sign issues. Those became especially visible when I
    Message 1 of 5 , Jan 1, 2005
    • 0 Attachment
      Hello,

      the Netwinder FP emulator implementation for ARM in the linux kernel 2.4
      and 2.6 has floating point sign issues. Those became especially visible
      when I have tried to compile Perl @ NSLU natively.

      Based on Lennert's suggestion in message
      http://groups.yahoo.com/group/nslu2-linux/message/3031
      I was able to patch the kernel for unslung 3.16 and to prove that
      these issues can be fixed.

      Therefore I'd like to ask the OE developers (I don't have OE developer
      access yet) to incorporate the 2 patches below. This would enable
      all users of future unslung releases to benefit from working fp.
      Of course the patch should be applied to openslug too, however here
      just the instructions for unslung.

      Maybe the fixes should be driven into the linux kernel tree too?

      Thanks,
      Rene.

      1. add file :
      openembedded/packages/linux/unslung-kernel-2.3r25/arm-sign.patch
      (this comes from
      http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-October/024909.html
      )


      diff -urN linux-2.4.22/arch/arm/nwfpe/double_cpdo.c
      linux-2.4.22/arch/arm/nwfpe/double_cpdo.c
      --- linux-2.4.22/arch/arm/nwfpe/double_cpdo.c 2004-08-14
      07:36:11.000000000 +0200
      +++ linux-2.4.22/arch/arm/nwfpe/double_cpdo.c 2004-10-10
      20:29:15.514512796 +0200
      @@ -75,7 +75,11 @@
      union float64_components u;

      u.f64 = rFm;
      +#ifdef __ARMEB__
      + u.i[0] ^= 0x80000000;
      +#else
      u.i[1] ^= 0x80000000;
      +#endif

      return u.f64;
      }
      @@ -85,7 +89,11 @@
      union float64_components u;

      u.f64 = rFm;
      +#ifdef __ARMEB__
      + u.i[0] &= 0x7fffffff;
      +#else
      u.i[1] &= 0x7fffffff;
      +#endif

      return u.f64;
      }







      2. modify file :
      openembedded/packages/linux/unslung-standard-kernel_2.3r25.bb:

      ===== unslung-standard-kernel_2.3r25.bb 1.23 vs edited =====
      --- 1.23/packages/linux/unslung-standard-kernel_2.3r25.bb
      2004-12-26 03:45:26 +01:00
      +++ edited/unslung-standard-kernel_2.3r25.bb 2004-12-31 15:20:48 +01:00
      @@ -19,6 +19,7 @@
      file://usbnet.patch;patch=1 \
      file://missing-usb-ioctls.patch;patch=1 \
      file://anonymiser.patch;patch=1 \
      + file://arm-sign.patch;patch=1 \
      ${UNSLUNG_KERNEL_EXTRA_SRC_URI}"

      FILESPATH = "${@base_set_filespath([
      '${FILE_DIRNAME}/unslung-kernel-${PV}/${UNSLUNG_VARIANT}',
      '${FILE_DIRNAME}/unslung-kernel-${PV}',
      '${FILE_DIRNAME}/nslu2-linksys-kernel-2.4.22',
      '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
    • Rod Whitby
      ... Done. Join us in the IRC channel to organise developer write access to the OE repo. -- Rod
      Message 2 of 5 , Jan 1, 2005
      • 0 Attachment
        On Sun, 02 Jan 2005 00:38:14 -0000, r2004roellig <r2004roellig@...> wrote:
        > Therefore I'd like to ask the OE developers (I don't have OE developer
        > access yet) to incorporate the 2 patches below. This would enable
        > all users of future unslung releases to benefit from working fp.
        > Of course the patch should be applied to openslug too, however here
        > just the instructions for unslung.

        Done.

        Join us in the IRC channel to organise developer write access to the OE repo.

        -- Rod
      • Lennert Buytenhek
        ... The fixes are in 2.6 already, if you want to submit them for 2.4 then be my guest. Submit a patch to rmk s ARM patch tracker and refer to ARM bug id
        Message 3 of 5 , Jan 2, 2005
        • 0 Attachment
          On Sun, Jan 02, 2005 at 12:38:14AM -0000, r2004roellig wrote:

          > Maybe the fixes should be driven into the linux kernel tree too?

          The fixes are in 2.6 already, if you want to submit them for 2.4 then
          be my guest. Submit a patch to rmk's ARM patch tracker and refer to
          ARM bug id 2178/1, ie.

          http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=2178/1

          My main interest for the NSLU2 at the moment is to get a 2.6 kernel with
          full functionality running on it ASAP.


          cheers,
          Lennert
        • dyoung8888
          There is a usable buildable 2.6.9; check out OpenSlug in the wiki www.nslu2-linux.org . It doesnt have compelete functionality for all the goodies like GPIO s
          Message 4 of 5 , Jan 2, 2005
          • 0 Attachment
            There is a usable buildable 2.6.9; check out OpenSlug in the wiki
            www.nslu2-linux.org . It doesnt have compelete functionality for
            all the goodies like GPIO's yet; but its all there.

            Thanks Lennert for all your past and future help with the weird
            problems that seem unsolvable!


            --- In nslu2-linux@yahoogroups.com, Lennert Buytenhek <buytenh@w...>
            wrote:
            > On Sun, Jan 02, 2005 at 12:38:14AM -0000, r2004roellig wrote:
            >
            > > Maybe the fixes should be driven into the linux kernel tree too?
            >
            > The fixes are in 2.6 already, if you want to submit them for 2.4
            then
            > be my guest. Submit a patch to rmk's ARM patch tracker and refer
            to
            > ARM bug id 2178/1, ie.
            >
            > http://www.arm.linux.org.uk/developer/patches/viewpatch.php?
            id=2178/1
            >
            > My main interest for the NSLU2 at the moment is to get a 2.6
            kernel with
            > full functionality running on it ASAP.
            >
            >
            > cheers,
            > Lennert
          • Lennert Buytenhek
            ... Ah, cool, wasn t aware of that. I ll have a look at it and try to fill in the missing bits as soon as I get home. BTW, the mnf/abs patch refered below
            Message 5 of 5 , Jan 2, 2005
            • 0 Attachment
              On Sun, Jan 02, 2005 at 09:32:44AM -0000, dyoung8888 wrote:

              > There is a usable buildable 2.6.9; check out OpenSlug in the wiki
              > www.nslu2-linux.org . It doesnt have compelete functionality for
              > all the goodies like GPIO's yet; but its all there.

              Ah, cool, wasn't aware of that. I'll have a look at it and try to
              fill in the missing bits as soon as I get home.

              BTW, the mnf/abs patch refered below didn't go into 2.6 until 2.6.10
              (IIRC), so you might want to add it to your build process if you use
              2.6.9.


              > Thanks Lennert for all your past and future help with the weird
              > problems that seem unsolvable!

              No problem!


              --L
            Your message has been successfully submitted and would be delivered to recipients shortly.