NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .



The following reply was made to PR port-arm/48193; it has been noted by GNATS.

From: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>
To: gnats-bugs%NetBSD.org@localhost, matt%3am-software.com@localhost
Cc: 
Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi,
 MACHINE_ARCH returns earm, but *hf* is expected in
 /usr/share/mk/bsd.own.mk .
Date: Sat, 14 Sep 2013 10:40:38 +0900 (JST)

 From: Matt Thomas <matt%3am-software.com@localhost>, Date: Sat, 14 Sep 2013 
00:40:00 +0000 (UTC)
 
 > The following reply was made to PR port-arm/48193; it has been noted by 
 > GNATS.
 > 
 > From: Matt Thomas <matt%3am-software.com@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: port-arm-maintainer%netbsd.org@localhost,
 >  gnats-admin%netbsd.org@localhost,
 >  netbsd-bugs%netbsd.org@localhost,
 >  ryoon%NetBSD.org@localhost
 > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry Pi, 
 > MACHINE_ARCH returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk .
 > Date: Fri, 13 Sep 2013 17:39:17 -0700
 > 
 >  On Sep 13, 2013, at 5:25 PM, Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost> 
 > wrote:
 >  
 >  > The following reply was made to PR port-arm/48193; it has been noted =
 >  by GNATS.
 >  >=20
 >  > From: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>
 >  > To: gnats-bugs%NetBSD.org@localhost
 >  > Cc:=20
 >  > Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 >  Pi,
 >  > MACHINE_ARCH returns earm, but *hf* is expected in
 >  > /usr/share/mk/bsd.own.mk .
 >  > Date: Sat, 14 Sep 2013 09:23:55 +0900 (JST)
 >  >=20
 >  > Hi,
 >  >=20
 >  > From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>, Date: Tue, 10 
 > Sep 2013 =
 >  14:30:01 +0000 (UTC)
 >  >=20
 >  >> The following reply was made to PR port-arm/48193; it has been noted =
 >  by GNATS.
 >  >>=20
 >  >> From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
 >  >> To: gnats-bugs%NetBSD.org@localhost
 >  >> Cc: tsutsui%ceres.dti.ne.jp@localhost
 >  >> Subject: Re: port-arm/48193: On NetBSD/evbearmv6hf-el for Raspberry =
 >  Pi, MACHINE_ARCH
 >  >>   returns earm, but *hf* is expected in /usr/share/mk/bsd.own.mk =
 >  .
 >  >> Date: Tue, 10 Sep 2013 23:28:42 +0900
 >  >>=20
 >  >> <arm/param.h> doesn't have proper *hf defines for =
 >  sysctl.hw.machine_arch.
 >  >> http://nxr.netbsd.org/xref/src/sys/arch/arm/include/param.h?r=3D1.18#5
 >  >=20
 >  > Thank you.
 >  >=20
 >  > make -V MACHINE_ARCH returns earmhf for evbearmv6hf-el
 >  > Raspberry Pi with the following patch.
 >  >=20
 >  > pkgsrc/sysutils/checkpems is built successfully.
 >  >=20
 >  > Index: param.h
 >  > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 >  > RCS file: /cvsroot/src/sys/arch/arm/include/param.h,v
 >  > retrieving revision 1.18
 >  > diff -u -r1.18 param.h
 >  > --- param.h       22 Apr 2013 07:53:29 -0000      1.18
 >  > +++ param.h       14 Sep 2013 00:02:22 -0000
 >  > @@ -55,16 +55,26 @@
 >  >  # ifndef MACHINE_ARCH                    /* XXX For now */
 >  >  #  ifndef __ARMEB__
 >  >  #   ifdef __ARM_EABI__
 >  > -#    define      _MACHINE_ARCH   earm
 >  > -#    define      MACHINE_ARCH    "earm"
 >  > +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#     define     _MACHINE_ARCH   earmhf
 >  > +#     define     MACHINE_ARCH    "earmhf"
 >  > +#    else /* softfloat */
 >  > +#     define     _MACHINE_ARCH   earm
 >  > +#     define     MACHINE_ARCH    "earm"
 >  > +#    endif
 >  >  #   else
 >  >  #    define      _MACHINE_ARCH   arm
 >  >  #    define      MACHINE_ARCH    "arm"
 >  >  #   endif
 >  >  #  else
 >  >  #   ifdef __ARM_EABI__
 >  > -#    define      _MACHINE_ARCH   earmeb
 >  > -#    define      MACHINE_ARCH    "earmeb"
 >  > +#    if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#     define     _MACHINE_ARCH   earmhfeb
 >  > +#     define     MACHINE_ARCH    "earmhfeb"
 >  > +#    else /* softfloat */
 >  > +#     define     _MACHINE_ARCH   earmeb
 >  > +#     define     MACHINE_ARCH    "earmeb"
 >  > +#    endif
 >  >  #   else
 >  >  #    define      _MACHINE_ARCH   armeb
 >  >  #    define      MACHINE_ARCH    "armeb"
 >  > @@ -80,16 +90,26 @@
 >  >  # define MACHINE         "arm"
 >  >  # ifndef __ARMEB__
 >  >  #  ifdef __ARM_EABI__
 >  > -#   define       _MACHINE_ARCH   earm
 >  > -#   define       MACHINE_ARCH    "earm"
 >  > +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#    define      _MACHINE_ARCH   earmhf
 >  > +#    define      MACHINE_ARCH    "earmhf"
 >  > +#   else /* softfloat */
 >  > +#    define      _MACHINE_ARCH   earm
 >  > +#    define      MACHINE_ARCH    "earm"
 >  > +#   endif
 >  >  #  else
 >  >  #   define       _MACHINE_ARCH   arm
 >  >  #   define       MACHINE_ARCH    "arm"
 >  >  #  endif
 >  >  # else
 >  >  #  ifdef __ARM_EABI__
 >  > -#   define       _MACHINE_ARCH   earmeb
 >  > -#   define       MACHINE_ARCH    "earmeb"
 >  > +#   if (defined(__VFP_FP__) && !defined(__SOFTFP__)) /* hardfloat */
 >  > +#    define      _MACHINE_ARCH   earmhfeb
 >  > +#    define      MACHINE_ARCH    "earmhfeb"
 >  > +#   else /* softfloat */
 >  > +#    define      _MACHINE_ARCH   earmeb
 >  > +#    define      MACHINE_ARCH    "earmeb"
 >  > +#   endif
 >  >  #  else
 >  >  #   define       _MACHINE_ARCH   armeb
 >  >  #   define       MACHINE_ARCH    "armeb"
 >  
 >  That doesn't really work since the kernel is always softfloat.
 >  
 >  I fixed it differently by embedding the MACHINE_ARCH in a note
 >  in the executable.  The kernel records the supplied MACHINE_ARCH
 >  in and returns when a sysctl for hw.machine_arch is done.
 
 Which commit is for this fix?
 Could you show me the diff?
 I want to learn the way.
 
 Thank you.
 
 --
 Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
 PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
 


Home | Main Index | Thread Index | Old Index