diff mbox

[v3] deb-pkg: Add automatic support for armhf architecture

Message ID 1443404080.2517.30.camel@decadent.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Hutchings Sept. 28, 2015, 1:34 a.m. UTC
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: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Fathi Boudra <fathi.boudra@linaro.org>
---
v2: rebased
v3: rebased

 scripts/package/builddeb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Riku Voipio Oct. 22, 2015, 10:28 a.m. UTC | #1
On 28 September 2015 at 04:34, 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: Ian Campbell <ijc@hellion.org.uk>
> Acked-by: Fathi Boudra <fathi.boudra@linaro.org>

Reviewed-by: Riku Voipio <riku.voipio@linaro.org>

> ---
> v2: rebased
> v3: rebased
>
>  scripts/package/builddeb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -52,7 +52,16 @@ set_debarch() {
>         arm64)
>                 debarch=arm64 ;;
>         arm*)
> -               debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
> +               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
> +               ;;
>         *)
>                 debarch=$(dpkg --print-architecture)
>                 echo "" >&2
> --
> Ben Hutchings
> All extremists should be taken out and shot.
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Marek Oct. 26, 2015, 9:36 p.m. UTC | #2
Dne 22.10.2015 v 12:28 Riku Voipio napsal(a):
> On 28 September 2015 at 04:34, 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: Ian Campbell <ijc@hellion.org.uk>
>> Acked-by: Fathi Boudra <fathi.boudra@linaro.org>
> 
> Reviewed-by: Riku Voipio <riku.voipio@linaro.org>

Applied to kbuild.git#misc.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -52,7 +52,16 @@  set_debarch() {
 	arm64)
 		debarch=arm64 ;;
 	arm*)
-		debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el || true) ;;
+		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
+		;;
 	*)
 		debarch=$(dpkg --print-architecture)
 		echo "" >&2