* [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
@ 2014-06-09 0:21 Ben Hutchings
2014-06-09 7:04 ` Ian Campbell
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ben Hutchings @ 2014-06-09 0:21 UTC (permalink / raw)
To: linux-kbuild
Cc: maximilian attems, Michal Marek, Fathi Boudra, debian-arm,
Hector Oron
[-- Attachment #1: Type: text/plain, Size: 1450 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>
---
v2: rebased
After discussion with Hector, we agreed this would be a worthwhile
change. Hector may later improve this by using gcc specs.
Ben.
scripts/package/builddeb | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f46e4dd..6756ed6 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 || true) ;;
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
+ ;;
*)
echo "" >&2
echo "** ** ** WARNING ** ** **" >&2
--
Ben Hutchings
One of the nice things about standards is that there are so many of them.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
2014-06-09 0:21 [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
@ 2014-06-09 7:04 ` Ian Campbell
2014-06-10 21:42 ` Ben Hutchings
2014-06-10 8:10 ` Fathi Boudra
2014-06-10 13:06 ` Riku Voipio
2 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-06-09 7:04 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra,
debian-arm, Hector Oron
On Mon, 2014-06-09 at 01:21 +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: Ian Campbell <ijc@hellion.org.uk>
We should also add the following. If there is some reason to do a v3
feel free to squash it into you patch (if you wish).
8<-------------------------
From 3746add23576c58ca567e53b65c4c0cb40f48deb Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc@hellion.org.uk>
Date: Mon, 9 Jun 2014 08:00:56 +0100
Subject: [PATCH] deb-pkg: Add automatic support for arm64 architecture.
The Debian arch corresponding the kernel ARCH=arm64 is arm64. List this
explicitly to prevent falling through to the 32-bit ARM autodetection.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
scripts/package/builddeb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index d035df4..8d97fa8 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -28,7 +28,7 @@ create_package() {
# Attempt to find the correct Debian architecture
local forcearch="" debarch=""
case "$UTS_MACHINE" in
- i386|ia64|alpha)
+ i386|ia64|alpha|arm64)
debarch="$UTS_MACHINE" ;;
x86_64)
debarch=amd64 ;;
--
1.9.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
2014-06-09 0:21 [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
2014-06-09 7:04 ` Ian Campbell
@ 2014-06-10 8:10 ` Fathi Boudra
2014-06-10 13:06 ` Riku Voipio
2 siblings, 0 replies; 7+ messages in thread
From: Fathi Boudra @ 2014-06-10 8:10 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-kbuild, maximilian attems, Michal Marek, debian-arm,
Hector Oron
On 9 June 2014 03:21, 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>
> ---
> v2: rebased
>
> After discussion with Hector, we agreed this would be a worthwhile
> change. Hector may later improve this by using gcc specs.
>
> Ben.
>
> scripts/package/builddeb | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index f46e4dd..6756ed6 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 || true) ;;
> 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
> + ;;
> *)
> echo "" >&2
> echo "** ** ** WARNING ** ** **" >&2
>
>
> --
> Ben Hutchings
> One of the nice things about standards is that there are so many of them.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
2014-06-09 0:21 [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
2014-06-09 7:04 ` Ian Campbell
2014-06-10 8:10 ` Fathi Boudra
@ 2014-06-10 13:06 ` Riku Voipio
2014-07-14 14:14 ` Riku Voipio
2 siblings, 1 reply; 7+ messages in thread
From: Riku Voipio @ 2014-06-10 13:06 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra,
debian-arm, Hector Oron
On Mon, Jun 09, 2014 at 01:21:34AM +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>
> ---
> v2: rebased
>
> After discussion with Hector, we agreed this would be a worthwhile
> change. Hector may later improve this by using gcc specs.
That should be easy:
-if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
+if $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
It worked at least for my cross-compile test a minute ago.
Riku
> Ben.
>
> scripts/package/builddeb | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index f46e4dd..6756ed6 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 || true) ;;
> 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
> + ;;
> *)
> echo "" >&2
> echo "** ** ** WARNING ** ** **" >&2
>
>
> --
> Ben Hutchings
> One of the nice things about standards is that there are so many of them.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
2014-06-09 7:04 ` Ian Campbell
@ 2014-06-10 21:42 ` Ben Hutchings
2014-06-11 6:33 ` Ian Campbell
0 siblings, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2014-06-10 21:42 UTC (permalink / raw)
To: Ian Campbell
Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra,
debian-arm, Hector Oron
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
On Mon, 2014-06-09 at 08:04 +0100, Ian Campbell wrote:
> On Mon, 2014-06-09 at 01:21 +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: Ian Campbell <ijc@hellion.org.uk>
>
> We should also add the following. If there is some reason to do a v3
> feel free to squash it into you patch (if you wish).
[...]
arm64 is already in -next. Actually, that means my patch is fuzzy as
it's based on v3.15. I hope that's OK.
Ben.
--
Ben Hutchings
DNRC Motto: I can please only one person per day.
Today is not your day. Tomorrow isn't looking good either.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
2014-06-10 21:42 ` Ben Hutchings
@ 2014-06-11 6:33 ` Ian Campbell
0 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2014-06-11 6:33 UTC (permalink / raw)
To: Ben Hutchings
Cc: linux-kbuild, maximilian attems, Michal Marek, Fathi Boudra,
debian-arm, Hector Oron
On Tue, 2014-06-10 at 22:42 +0100, Ben Hutchings wrote:
> On Mon, 2014-06-09 at 08:04 +0100, Ian Campbell wrote:
> > On Mon, 2014-06-09 at 01:21 +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: Ian Campbell <ijc@hellion.org.uk>
> >
> > We should also add the following. If there is some reason to do a v3
> > feel free to squash it into you patch (if you wish).
> [...]
>
> arm64 is already in -next.
Great, then please ignore my patch!
Cheers,
Ian.
> Actually, that means my patch is fuzzy as
> it's based on v3.15. I hope that's OK.
>
> Ben.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture
2014-06-10 13:06 ` Riku Voipio
@ 2014-07-14 14:14 ` Riku Voipio
0 siblings, 0 replies; 7+ messages in thread
From: Riku Voipio @ 2014-07-14 14:14 UTC (permalink / raw)
To: Riku Voipio
Cc: Ben Hutchings, linux-kbuild, maximilian attems, Michal Marek,
Fathi Boudra, debian-arm, Hector Oron
On Tue, Jun 10, 2014 at 04:06:39PM +0300, Riku Voipio wrote:
> On Mon, Jun 09, 2014 at 01:21:34AM +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>
> > ---
> > v2: rebased
> >
> > After discussion with Hector, we agreed this would be a worthwhile
> > change. Hector may later improve this by using gcc specs.
>
> That should be easy:
>
> -if grep -q CONFIG_VFP=y $KCONFIG_CONFIG; then
> +if $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
> It worked at least for my cross-compile test a minute ago.
It would be nice to have this change scheduled in any form to 3.17.
Most people building kernels these days do armhf, so Bens version is
already a material improvement for everyone.
Riku
> Riku
>
> > Ben.
> >
> > scripts/package/builddeb | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > index f46e4dd..6756ed6 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 || true) ;;
> > 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
> > + ;;
> > *)
> > echo "" >&2
> > echo "** ** ** WARNING ** ** **" >&2
> >
> >
> > --
> > Ben Hutchings
> > One of the nice things about standards is that there are so many of them.
>
>
>
> --
> To UNSUBSCRIBE, email to debian-arm-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: https://lists.debian.org/20140610130639.GA25366@afflict.kos.to
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-07-14 14:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-09 0:21 [PATCH v2 1/2] deb-pkg: Add automatic support for armhf architecture Ben Hutchings
2014-06-09 7:04 ` Ian Campbell
2014-06-10 21:42 ` Ben Hutchings
2014-06-11 6:33 ` Ian Campbell
2014-06-10 8:10 ` Fathi Boudra
2014-06-10 13:06 ` Riku Voipio
2014-07-14 14:14 ` Riku Voipio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox