All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture
@ 2013-10-06 17:04 Ben Hutchings
  2013-10-07 13:38 ` maximilian attems
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ben Hutchings @ 2013-10-06 17:04 UTC (permalink / raw)
  To: linux-kbuild; +Cc: maximilian attems, Michal Marek, Fathi Boudra, debian-arm

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

The Debian armhf architecture uses the ARM EABI hard-float variant,
whereas armel uses the soft-float variant.  Although the kernel
doesn't use FP itself, CONFIG_VFP must be enabled to support
hard-float userland and will probably be disabled when supporting a
soft-float userland.  So set the architecture to armhf by default when
CONFIG_AEABI and CONFIG_VFP are both enabled.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 scripts/package/builddeb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 90e521f..e14c56e 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -43,7 +43,16 @@ create_package() {
 	mips*)
 		debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
 	arm*)
-		debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
+		if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
+		    if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
+			debarch=armhf
+		    else
+			debarch=armel
+		    fi
+		else
+		    debarch=arm
+		fi
+		;;
 	*)
 		echo "" >&2
 		echo "** ** **  WARNING  ** ** **" >&2


-- 
Ben Hutchings
Who are all these weirdos? - David Bowie, reading IRC for the first time

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture
  2013-10-06 17:04 [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
@ 2013-10-07 13:38 ` maximilian attems
  2013-10-07 15:01 ` Fathi Boudra
  2013-10-08  0:23 ` Hector Oron
  2 siblings, 0 replies; 6+ messages in thread
From: maximilian attems @ 2013-10-07 13:38 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: linux-kbuild, Michal Marek, Fathi Boudra, debian-arm

On Sun, Oct 06, 2013 at 06:04:01PM +0100, Ben Hutchings wrote:
> The Debian armhf architecture uses the ARM EABI hard-float variant,
> whereas armel uses the soft-float variant.  Although the kernel
> doesn't use FP itself, CONFIG_VFP must be enabled to support
> hard-float userland and will probably be disabled when supporting a
> soft-float userland.  So set the architecture to armhf by default when
> CONFIG_AEABI and CONFIG_VFP are both enabled.
> 
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: maximilian attems <max@stro.at>
> ---
>  scripts/package/builddeb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 90e521f..e14c56e 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -43,7 +43,16 @@ create_package() {
>  	mips*)
>  		debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
>  	arm*)
> -		debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
> +		if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
> +		    if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
> +			debarch=armhf
> +		    else
> +			debarch=armel
> +		    fi
> +		else
> +		    debarch=arm
> +		fi
> +		;;
>  	*)
>  		echo "" >&2
>  		echo "** ** **  WARNING  ** ** **" >&2
> 
> 
> -- 
> Ben Hutchings
> Who are all these weirdos? - David Bowie, reading IRC for the first time



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture
  2013-10-06 17:04 [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
  2013-10-07 13:38 ` maximilian attems
@ 2013-10-07 15:01 ` Fathi Boudra
  2013-10-08  0:23 ` Hector Oron
  2 siblings, 0 replies; 6+ messages in thread
From: Fathi Boudra @ 2013-10-07 15:01 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: linux-kbuild, maximilian attems, Michal Marek, debian-arm

On 6 October 2013 20:04, Ben Hutchings <ben@decadent.org.uk> wrote:
> The Debian armhf architecture uses the ARM EABI hard-float variant,
> whereas armel uses the soft-float variant.  Although the kernel
> doesn't use FP itself, CONFIG_VFP must be enabled to support
> hard-float userland and will probably be disabled when supporting a
> soft-float userland.  So set the architecture to armhf by default when
> CONFIG_AEABI and CONFIG_VFP are both enabled.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Acked-by: Fathi Boudra <fathi.boudra@linaro.org>

> ---
>  scripts/package/builddeb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 90e521f..e14c56e 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -43,7 +43,16 @@ create_package() {
>         mips*)
>                 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
>         arm*)
> -               debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
> +               if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
> +                   if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
> +                       debarch=armhf
> +                   else
> +                       debarch=armel
> +                   fi
> +               else
> +                   debarch=arm
> +               fi
> +               ;;
>         *)
>                 echo "" >&2
>                 echo "** ** **  WARNING  ** ** **" >&2
>
>
> --
> Ben Hutchings
> Who are all these weirdos? - David Bowie, reading IRC for the first time

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture
  2013-10-06 17:04 [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
  2013-10-07 13:38 ` maximilian attems
  2013-10-07 15:01 ` Fathi Boudra
@ 2013-10-08  0:23 ` Hector Oron
  2013-10-13 19:59   ` Ben Hutchings
  2 siblings, 1 reply; 6+ messages in thread
From: Hector Oron @ 2013-10-08  0:23 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra, Debian ARM

Hello,

2013/10/6 Ben Hutchings <ben@decadent.org.uk>:
> The Debian armhf architecture uses the ARM EABI hard-float variant,
> whereas armel uses the soft-float variant.  Although the kernel
> doesn't use FP itself, CONFIG_VFP must be enabled to support
> hard-float userland and will probably be disabled when supporting a
> soft-float userland.  So set the architecture to armhf by default when
> CONFIG_AEABI and CONFIG_VFP are both enabled.

Debian armel userland can be run on any device, so it is suggested to
better rely on toolchain configuration rather than kernel config
symbols.

For arm-gnueabi(hf) toolchain something like:
  $ gcc -dumpspecs | grep multilib_defaults -A2 | grep -q soft && echo
"This is armel"
  $ gcc -dumpspecs | grep multilib_defaults -A2 | grep -q hard && echo
"This is armhf"
could be checked instead.

Best regards

> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  scripts/package/builddeb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 90e521f..e14c56e 100644
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -43,7 +43,16 @@ create_package() {
>         mips*)
>                 debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
>         arm*)
> -               debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
> +               if grep -q CONFIG_AEABI=y $KCONFIG_CONFIG; then
> +                   if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
> +                       debarch=armhf
> +                   else
> +                       debarch=armel
> +                   fi
> +               else
> +                   debarch=arm
> +               fi
> +               ;;
>         *)
>                 echo "" >&2
>                 echo "** ** **  WARNING  ** ** **" >&2
>
>
> --
> Ben Hutchings
> Who are all these weirdos? - David Bowie, reading IRC for the first time



-- 
 Héctor Orón  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . .-.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture
  2013-10-08  0:23 ` Hector Oron
@ 2013-10-13 19:59   ` Ben Hutchings
  2013-10-24 10:59     ` Hector Oron
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Hutchings @ 2013-10-13 19:59 UTC (permalink / raw)
  To: Hector Oron
  Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra, Debian ARM

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Tue, 2013-10-08 at 02:23 +0200, Hector Oron wrote:
> Hello,
> 
> 2013/10/6 Ben Hutchings <ben@decadent.org.uk>:
> > The Debian armhf architecture uses the ARM EABI hard-float variant,
> > whereas armel uses the soft-float variant.  Although the kernel
> > doesn't use FP itself, CONFIG_VFP must be enabled to support
> > hard-float userland and will probably be disabled when supporting a
> > soft-float userland.  So set the architecture to armhf by default when
> > CONFIG_AEABI and CONFIG_VFP are both enabled.
> 
> Debian armel userland can be run on any device, so it is suggested to
> better rely on toolchain configuration rather than kernel config
> symbols.
> 
> For arm-gnueabi(hf) toolchain something like:
>   $ gcc -dumpspecs | grep multilib_defaults -A2 | grep -q soft && echo
> "This is armel"
>   $ gcc -dumpspecs | grep multilib_defaults -A2 | grep -q hard && echo
> "This is armhf"
> could be checked instead.
[...]

Is the output of -dumpspecs really so stable that this is going to be
reliable?

Ben.

-- 
Ben Hutchings
Beware of bugs in the above code;
I have only proved it correct, not tried it. - Donald Knuth

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture
  2013-10-13 19:59   ` Ben Hutchings
@ 2013-10-24 10:59     ` Hector Oron
  0 siblings, 0 replies; 6+ messages in thread
From: Hector Oron @ 2013-10-24 10:59 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra, Debian ARM

Hello,

2013/10/13 Ben Hutchings <ben@decadent.org.uk>:
> On Tue, 2013-10-08 at 02:23 +0200, Hector Oron wrote:
>> Hello,
>>
>> 2013/10/6 Ben Hutchings <ben@decadent.org.uk>:
>> > The Debian armhf architecture uses the ARM EABI hard-float variant,
>> > whereas armel uses the soft-float variant.  Although the kernel
>> > doesn't use FP itself, CONFIG_VFP must be enabled to support
>> > hard-float userland and will probably be disabled when supporting a
>> > soft-float userland.  So set the architecture to armhf by default when
>> > CONFIG_AEABI and CONFIG_VFP are both enabled.
>>
>> Debian armel userland can be run on any device, so it is suggested to
>> better rely on toolchain configuration rather than kernel config
>> symbols.
>>
>> For arm-gnueabi(hf) toolchain something like:
>>   $ gcc -dumpspecs | grep multilib_defaults -A2 | grep -q soft && echo
>> "This is armel"
>>   $ gcc -dumpspecs | grep multilib_defaults -A2 | grep -q hard && echo
>> "This is armhf"
>> could be checked instead.
> [...]
>
> Is the output of -dumpspecs really so stable that this is going to be
> reliable?

I am not sure about it... but up to date, I have never found a system
that makes it faulty. I would be interesting to check on other
distributions besides Debian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-24 10:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-06 17:04 [PATCH 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
2013-10-07 13:38 ` maximilian attems
2013-10-07 15:01 ` Fathi Boudra
2013-10-08  0:23 ` Hector Oron
2013-10-13 19:59   ` Ben Hutchings
2013-10-24 10:59     ` Hector Oron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.