linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] builddeb improvements
@ 2015-04-02 11:27 riku.voipio
  2015-04-02 11:27 ` [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture riku.voipio
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: riku.voipio @ 2015-04-02 11:27 UTC (permalink / raw)
  To: linux-kbuild, mmarek, debian-kernel; +Cc: Riku Voipio

From: Riku Voipio <riku.voipio@linaro.org>

A collection of patches to improve the make deb-pkg target
first three patches should be quite straight-forward changes,
but the last one is more complicated. 

Ben Hutchings (1):
  deb-pkg: Add automatic support for armhf architecture

Riku Voipio (3):
  builddeb: install dtbs
  builddeb: simplify directory creation
  RFC: builddeb: add linux-tools package with perf

 scripts/package/builddeb | 67 ++++++++++++++++++++++++++++++++++++------------
 1 file changed, 50 insertions(+), 17 deletions(-)

-- 
2.1.4


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

* [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture
  2015-04-02 11:27 [PATCH 0/4] builddeb improvements riku.voipio
@ 2015-04-02 11:27 ` riku.voipio
  2015-04-02 12:01   ` Arnaud Patard
  2015-04-02 11:27 ` [PATCH 2/4] builddeb: install dtbs riku.voipio
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: riku.voipio @ 2015-04-02 11:27 UTC (permalink / raw)
  To: linux-kbuild, mmarek, debian-kernel; +Cc: Ben Hutchings, debian-arm

From: Ben Hutchings <ben@decadent.org.uk>

The Debian armhf architecture uses the ARM EABI hard-float variant,
whereas armel uses the soft-float variant.  If the compiler used
to compile the kernel uses the __ARM_PCS_VFP ABI, the compiler
targets armhf architecture.

v3 by Riku: Use gcc define instead of CONFIG_VFP

Cc: debian-arm@lists.debian.org
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/builddeb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 88dbf23..146b74f 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -45,7 +45,16 @@ create_package() {
 	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 $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
+				debarch=armhf
+			else
+				debarch=armel
+			fi
+		else
+			debarch=arm
+		fi
+		;;
 	*)
 		echo "" >&2
 		echo "** ** **  WARNING  ** ** **" >&2
-- 
2.1.4


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

* [PATCH 2/4] builddeb: install dtbs
  2015-04-02 11:27 [PATCH 0/4] builddeb improvements riku.voipio
  2015-04-02 11:27 ` [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture riku.voipio
@ 2015-04-02 11:27 ` riku.voipio
  2015-04-02 11:56   ` Arnaud Patard
  2015-04-02 11:27 ` [PATCH 3/4] builddeb: simplify directory creation riku.voipio
  2015-04-02 11:27 ` [PATCH 4/4] RFC: builddeb: add linux-tools package with perf riku.voipio
  3 siblings, 1 reply; 13+ messages in thread
From: riku.voipio @ 2015-04-02 11:27 UTC (permalink / raw)
  To: linux-kbuild, mmarek, debian-kernel; +Cc: Riku Voipio

From: Riku Voipio <riku.voipio@linaro.org>

When kernel is built with CONFIG_OF, install all built device
tree files built. The installation location used is same as
toplevel INSTALL_DTBS_PATH.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/builddeb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 146b74f..147264e 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -174,6 +174,10 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
 	fi
 fi
 
+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then
+	$MAKE dtbs_install KBUILD_SRC= INSTALL_DTBS_PATH="$tmpdir/boot/dtbs/$version/"
+fi
+
 if [ "$ARCH" != "um" ]; then
 	$MAKE headers_check KBUILD_SRC=
 	$MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr"
-- 
2.1.4


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

* [PATCH 3/4] builddeb: simplify directory creation
  2015-04-02 11:27 [PATCH 0/4] builddeb improvements riku.voipio
  2015-04-02 11:27 ` [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture riku.voipio
  2015-04-02 11:27 ` [PATCH 2/4] builddeb: install dtbs riku.voipio
@ 2015-04-02 11:27 ` riku.voipio
  2015-04-02 11:27 ` [PATCH 4/4] RFC: builddeb: add linux-tools package with perf riku.voipio
  3 siblings, 0 replies; 13+ messages in thread
From: riku.voipio @ 2015-04-02 11:27 UTC (permalink / raw)
  To: linux-kbuild, mmarek, debian-kernel; +Cc: Riku Voipio

From: Riku Voipio <riku.voipio@linaro.org>

Every package needs /usr/share/doc/$package_name and
DEBIAN directory, so create them as part of create_package
function.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/builddeb | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 147264e..36185d6 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -15,6 +15,8 @@ set -e
 create_package() {
 	local pname="$1" pdir="$2"
 
+	mkdir -m 755 -p "$pdir/DEBIAN"
+	mkdir -p "$pdir/usr/share/doc/$pname"
 	cp debian/copyright "$pdir/usr/share/doc/$pname/"
 	cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
 	gzip -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
@@ -118,25 +120,13 @@ BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
 
 # Setup the directory structure
 rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir"
-mkdir -m 755 -p "$tmpdir/DEBIAN"
-mkdir -p  "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
-mkdir -m 755 -p "$fwdir/DEBIAN"
-mkdir -p "$fwdir/lib/firmware/$version/" "$fwdir/usr/share/doc/$fwpackagename"
-mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
-mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
-mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
-mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
+mkdir -p "$tmpdir/lib" "$tmpdir/boot"
+mkdir -p "$fwdir/lib/firmware/$version/"
 mkdir -p "$kernel_headers_dir/lib/modules/$version/"
-if [ "$ARCH" = "um" ] ; then
-	mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
-fi
-if [ -n "$BUILD_DEBUG" ] ; then
-	mkdir -p "$dbg_dir/usr/share/doc/$dbg_packagename"
-	mkdir -m 755 -p "$dbg_dir/DEBIAN"
-fi
 
 # Build and install the kernel
 if [ "$ARCH" = "um" ] ; then
+	mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" "$tmpdir/usr/share/doc/$packagename"
 	$MAKE linux
 	cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
 	cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
@@ -194,6 +184,7 @@ if grep -q '^CONFIG_BLK_DEV_INITRD=y' $KCONFIG_CONFIG; then
 else
 	want_initrd=No
 fi
+mkdir -m 755 -p "$tmpdir/DEBIAN"
 for script in postinst postrm preinst prerm ; do
 	mkdir -p "$tmpdir$debhookdir/$script.d"
 	cat <<EOF > "$tmpdir/DEBIAN/$script"
-- 
2.1.4


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

* [PATCH 4/4] RFC: builddeb: add linux-tools package with perf
  2015-04-02 11:27 [PATCH 0/4] builddeb improvements riku.voipio
                   ` (2 preceding siblings ...)
  2015-04-02 11:27 ` [PATCH 3/4] builddeb: simplify directory creation riku.voipio
@ 2015-04-02 11:27 ` riku.voipio
  3 siblings, 0 replies; 13+ messages in thread
From: riku.voipio @ 2015-04-02 11:27 UTC (permalink / raw)
  To: linux-kbuild, mmarek, debian-kernel; +Cc: Riku Voipio

From: Riku Voipio <riku.voipio@linaro.org>

Perf is shipped in debian in linux-tools-$version package. Extend
the existing to builddeb script to build perf if BUILD_TOOLS=y
is added the make deb-pkg line

Some features of this patch I'm uncomfortable with:

1. Relative paths are resoved to absolute ones
   Especially with separate O= buildd, perf build from tools/perf dir
   fail.

2. Unsetting LDFLAGS
   make -> shell (builddeb) -> make expands variables. The LDFLAGS as
   set by toplevel makefile are for kernel, so we just unset the flag
   here.

3. Replaces ubuntu/debian packages instead attempting to fit to
   the linux-base/linux-tools-common frameworks. I think people who
   want to run "make deb-pkg" for their kernels would rather keep this
   simple.

4. More tools than just perf could be built - unfortunately most
   tools fail to have a working "install" target and/or else have
   build process inconsistent with other tools. A topic for another
   patch series.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
 scripts/package/builddeb | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 36185d6..2d6d547 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -92,11 +92,13 @@ fwdir="$objtree/debian/fwtmp"
 kernel_headers_dir="$objtree/debian/hdrtmp"
 libc_headers_dir="$objtree/debian/headertmp"
 dbg_dir="$objtree/debian/dbgtmp"
+tools_dir="$objtree/debian/toolstmp"
 packagename=linux-image-$version
 fwpackagename=linux-firmware-image-$version
 kernel_headers_packagename=linux-headers-$version
 libc_headers_packagename=linux-libc-dev
 dbg_packagename=$packagename-dbg
+tools_packagename=linux-tools-$version
 
 if [ "$ARCH" = "um" ] ; then
 	packagename=user-mode-linux-$version
@@ -119,7 +121,7 @@ esac
 BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
 
 # Setup the directory structure
-rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir"
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$tools_dir"
 mkdir -p "$tmpdir/lib" "$tmpdir/boot"
 mkdir -p "$fwdir/lib/firmware/$version/"
 mkdir -p "$kernel_headers_dir/lib/modules/$version/"
@@ -387,4 +389,31 @@ EOF
 	create_package "$dbg_packagename" "$dbg_dir"
 fi
 
+if [ -n "$BUILD_TOOLS" ]
+then
+	# HACK - change output dir from relative to absolute
+	mkdir -p $tools_dir
+	tools_dest=`readlink -f $tools_dir`
+	if [ -n "$O" ]
+	then
+		output=`readlink -f $objtree`
+		mkdir -p $output/tools/perf
+		output="O=$output/tools/perf"
+	fi
+	$MAKE -C $srctree/tools/perf $output LDFLAGS= srctree=$KBUILD_SRC prefix=$tools_dest/usr install
+	cat <<EOF >> debian/control
+
+Package: $tools_packagename
+Architecture: any
+Replaces: linux-base, linux-tools-common
+Depends: \${shlibs:Depends}
+Description: Performance analysis tools for Linux $version
+ This package contains the 'perf' performance analysis tools for Linux
+ kernel version $version .
+EOF
+
+	dpkg-shlibdeps $tools_dest/usr/bin/* $tools_dest/usr/lib/traceevent/plugins/*
+	create_package "$tools_packagename" "$tools_dir"
+fi
+
 exit 0
-- 
2.1.4


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

* Re: [PATCH 2/4] builddeb: install dtbs
  2015-04-02 11:27 ` [PATCH 2/4] builddeb: install dtbs riku.voipio
@ 2015-04-02 11:56   ` Arnaud Patard
  2015-04-02 12:17     ` Arnaud Patard
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaud Patard @ 2015-04-02 11:56 UTC (permalink / raw)
  To: riku.voipio; +Cc: linux-kbuild, mmarek, debian-kernel

riku.voipio@linaro.org writes:

Hi,

> From: Riku Voipio <riku.voipio@linaro.org>
>
> When kernel is built with CONFIG_OF, install all built device
> tree files built. The installation location used is same as
> toplevel INSTALL_DTBS_PATH.

Already sent a "better" patch for that (your patch is not handling
system with CONFIG_OF and without dtbs_install):
http://www.spinics.net/lists/linux-kbuild/msg10794.html
but looks like not yet merged.

Arnaud

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

* Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture
  2015-04-02 11:27 ` [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture riku.voipio
@ 2015-04-02 12:01   ` Arnaud Patard
  2015-04-02 13:14     ` Riku Voipio
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaud Patard @ 2015-04-02 12:01 UTC (permalink / raw)
  To: riku.voipio
  Cc: linux-kbuild, mmarek, debian-kernel, Ben Hutchings, debian-arm

riku.voipio@linaro.org writes:

> From: Ben Hutchings <ben@decadent.org.uk>
>
> The Debian armhf architecture uses the ARM EABI hard-float variant,
> whereas armel uses the soft-float variant.  If the compiler used
> to compile the kernel uses the __ARM_PCS_VFP ABI, the compiler
> targets armhf architecture.
>
> v3 by Riku: Use gcc define instead of CONFIG_VFP
>
> Cc: debian-arm@lists.debian.org
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
> ---
>  scripts/package/builddeb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> index 88dbf23..146b74f 100755
> --- a/scripts/package/builddeb
> +++ b/scripts/package/builddeb
> @@ -45,7 +45,16 @@ create_package() {
>  	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 $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then

Actually, I guess there's nothing preventing you building a armhf kernel
with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
we should take care of this case. One can always use KBUILD_DEBARCH=armhf.

Arnaud

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

* Re: [PATCH 2/4] builddeb: install dtbs
  2015-04-02 11:56   ` Arnaud Patard
@ 2015-04-02 12:17     ` Arnaud Patard
  2015-04-02 12:29       ` Riku Voipio
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaud Patard @ 2015-04-02 12:17 UTC (permalink / raw)
  To: riku.voipio; +Cc: linux-kbuild, mmarek, debian-kernel

Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> writes:

(replying to self)

> riku.voipio@linaro.org writes:
>
> Hi,
>
>> From: Riku Voipio <riku.voipio@linaro.org>
>>
>> When kernel is built with CONFIG_OF, install all built device
>> tree files built. The installation location used is same as
>> toplevel INSTALL_DTBS_PATH.
>
> Already sent a "better" patch for that (your patch is not handling
> system with CONFIG_OF and without dtbs_install):
> http://www.spinics.net/lists/linux-kbuild/msg10794.html

Oops. Wrong version. The right one is v4:
http://www.spinics.net/lists/linux-kbuild/msg10832.html

Arnaud

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

* Re: [PATCH 2/4] builddeb: install dtbs
  2015-04-02 12:17     ` Arnaud Patard
@ 2015-04-02 12:29       ` Riku Voipio
  2015-04-02 17:46         ` Arnaud Patard
  0 siblings, 1 reply; 13+ messages in thread
From: Riku Voipio @ 2015-04-02 12:29 UTC (permalink / raw)
  To: Arnaud Patard; +Cc: linux-kbuild, mmarek, debian-kernel

On 2 April 2015 at 15:17, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
> Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> writes:
>> Already sent a "better" patch for that (your patch is not handling
>> system with CONFIG_OF and without dtbs_install):
>> http://www.spinics.net/lists/linux-kbuild/msg10794.html

> Oops. Wrong version. The right one is v4:
> http://www.spinics.net/lists/linux-kbuild/msg10832.html

Your version looks good. What needs to happen for it to get merged?

Riku

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

* Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture
  2015-04-02 12:01   ` Arnaud Patard
@ 2015-04-02 13:14     ` Riku Voipio
  2015-04-02 14:18       ` Michal Marek
  0 siblings, 1 reply; 13+ messages in thread
From: Riku Voipio @ 2015-04-02 13:14 UTC (permalink / raw)
  To: Arnaud Patard
  Cc: linux-kbuild, mmarek, debian-kernel, Ben Hutchings, debian-arm

On 2 April 2015 at 15:01, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
> riku.voipio@linaro.org writes:
>> --- a/scripts/package/builddeb
>> +++ b/scripts/package/builddeb
>> @@ -45,7 +45,16 @@ create_package() {
>>       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 $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
>
> Actually, I guess there's nothing preventing you building a armhf kernel
> with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
> we should take care of this case. One can always use KBUILD_DEBARCH=armhf.

I think the common use cases would be a) native compilers or b)
cross-compiler targeting the same debian architecture as the rootfs.
This patch provides automatic detection for both cases. For corner
cases, one will have to manually specify KBUILD_DEBARCH - which one
already had to do if one was targeting armhf.

Riku

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

* Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture
  2015-04-02 13:14     ` Riku Voipio
@ 2015-04-02 14:18       ` Michal Marek
  2015-04-09  7:43         ` Riku Voipio
  0 siblings, 1 reply; 13+ messages in thread
From: Michal Marek @ 2015-04-02 14:18 UTC (permalink / raw)
  To: Riku Voipio, Arnaud Patard
  Cc: linux-kbuild, debian-kernel, Ben Hutchings, debian-arm

On 2015-04-02 15:14, Riku Voipio wrote:
> On 2 April 2015 at 15:01, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
>> riku.voipio@linaro.org writes:
>>> --- a/scripts/package/builddeb
>>> +++ b/scripts/package/builddeb
>>> @@ -45,7 +45,16 @@ create_package() {
>>>       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 $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
>>
>> Actually, I guess there's nothing preventing you building a armhf kernel
>> with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
>> we should take care of this case. One can always use KBUILD_DEBARCH=armhf.
> 
> I think the common use cases would be a) native compilers or b)
> cross-compiler targeting the same debian architecture as the rootfs.
> This patch provides automatic detection for both cases.

$CC should be used together with $KBUILD_CFLAGS to behave the same as
when building the kernel.

Michal

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

* Re: [PATCH 2/4] builddeb: install dtbs
  2015-04-02 12:29       ` Riku Voipio
@ 2015-04-02 17:46         ` Arnaud Patard
  0 siblings, 0 replies; 13+ messages in thread
From: Arnaud Patard @ 2015-04-02 17:46 UTC (permalink / raw)
  To: Riku Voipio; +Cc: linux-kbuild, mmarek, debian-kernel

Riku Voipio <riku.voipio@linaro.org> writes:

> On 2 April 2015 at 15:17, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
>> Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> writes:
>>> Already sent a "better" patch for that (your patch is not handling
>>> system with CONFIG_OF and without dtbs_install):
>>> http://www.spinics.net/lists/linux-kbuild/msg10794.html
>
>> Oops. Wrong version. The right one is v4:
>> http://www.spinics.net/lists/linux-kbuild/msg10832.html
>
> Your version looks good. What needs to happen for it to get merged?

No idea. I was hoping that someone would take it.

Arnaud


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

* Re: [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture
  2015-04-02 14:18       ` Michal Marek
@ 2015-04-09  7:43         ` Riku Voipio
  0 siblings, 0 replies; 13+ messages in thread
From: Riku Voipio @ 2015-04-09  7:43 UTC (permalink / raw)
  To: Michal Marek
  Cc: Arnaud Patard, linux-kbuild, debian-kernel, Ben Hutchings, debian-arm

On 2 April 2015 at 17:18, Michal Marek <mmarek@suse.cz> wrote:
> On 2015-04-02 15:14, Riku Voipio wrote:
>> On 2 April 2015 at 15:01, Arnaud Patard <arnaud.patard@rtp-net.org> wrote:
>>> riku.voipio@linaro.org writes:
>>>> --- a/scripts/package/builddeb
>>>> +++ b/scripts/package/builddeb
>>>> @@ -45,7 +45,16 @@ create_package() {
>>>>       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 $CC -dM -E - < /dev/null|grep -q __ARM_PCS_VFP; then
>>>
>>> Actually, I guess there's nothing preventing you building a armhf kernel
>>> with a compiler not having __ARM_PCS_VFP defined by default, but I'm not sure
>>> we should take care of this case. One can always use KBUILD_DEBARCH=armhf.
>>
>> I think the common use cases would be a) native compilers or b)
>> cross-compiler targeting the same debian architecture as the rootfs.
>> This patch provides automatic detection for both cases.

> $CC should be used together with $KBUILD_CFLAGS to behave the same as
> when building the kernel.

I just tested and it won't work. $KBUILD_CFLAGS has -msoft-float so
__ARM_PCS_VFP wont be set. Which makes sense - we wouldn't want kernel
to pass anything in float registers. Given the constraint, would you
prefer Ben's original patch that checks CONFIG_VFP[1], or my version
using CC without KBUILD_CFLAGS?

[1] https://lists.debian.org/debian-arm/2014/06/msg00016.html

Riku

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

end of thread, other threads:[~2015-04-09  7:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02 11:27 [PATCH 0/4] builddeb improvements riku.voipio
2015-04-02 11:27 ` [PATCH 1/4] deb-pkg: Add automatic support for armhf architecture riku.voipio
2015-04-02 12:01   ` Arnaud Patard
2015-04-02 13:14     ` Riku Voipio
2015-04-02 14:18       ` Michal Marek
2015-04-09  7:43         ` Riku Voipio
2015-04-02 11:27 ` [PATCH 2/4] builddeb: install dtbs riku.voipio
2015-04-02 11:56   ` Arnaud Patard
2015-04-02 12:17     ` Arnaud Patard
2015-04-02 12:29       ` Riku Voipio
2015-04-02 17:46         ` Arnaud Patard
2015-04-02 11:27 ` [PATCH 3/4] builddeb: simplify directory creation riku.voipio
2015-04-02 11:27 ` [PATCH 4/4] RFC: builddeb: add linux-tools package with perf riku.voipio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).