Bug#833561: arm64: dtbs no longer installed in vendor subdir

2016-08-25 Thread Ben Hutchings
On Sat, 06 Aug 2016 11:38:21 +0100 Ian Campbell  wrote:
[...]
> Or similar to your original:
> 
> $ make -n -C debian/build/build_arm64_none_arm64/ dtbs_install 
> INSTALL_DTBS_PATH=$HOME/tmp/dtbs V=1 | head -n 15
> make: Entering directory 
> '/local/scratch/ijc/development/debian/pkg-kernel/master.git/debian/build/build_arm64_none_arm64'
> make -C /local/scratch/ijc/development/debian/pkg-kernel/master.git 
> O=/local/scratch/ijc/development/debian/pkg-kernel/master.git/debian/build/build_arm64_none_arm64/.
>  dtbs_install
> make -C 
> /local/scratch/ijc/development/debian/pkg-kernel/master.git/debian/build/build_arm64_none_arm64
>  KBUILD_SRC=/local/scratch/ijc/development/debian/pkg-kernel/master.git \
> -f /local/scratch/ijc/development/debian/pkg-kernel/master.git/Makefile 
> dtbs_install
> /local/scratch/ijc/development/debian/pkg-kernel/master.git/Makefile:681: 
> Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not 
> supported by compiler

I can reproduce this by running:

debian/rules setup
/usr/bin/make -C debian/build/build_arm64_none_arm64 dtbs
/usr/bin/make -C debian/build/build_arm64_none_arm64 dtbs_install 
INSTALL_DTBS_PATH=$PWD/debian/linux-image-4.7.0-rc7-arm64-unsigned/usr/lib/linux-image-4.7.0-rc7-arm64

The problem is with this definition in Makefile.dtbinst:

export dtbinst-root ?= $(obj)

This should define and export dtbinst-root when handling the root dts
directory, and do nothing in the subdirectories.  But it does not get
exported to the environment, probably because it contains a hyphen.  It
does somehow get through to a sub-make if and only if we perform an in-
tree build, but the Debian package always does out-of-tree builds.

This looks like a bug in make, but we can at least work around it by
using a non-hyphenated variable name.

The current make documentation says that:

"Except by explicit request, 'make' exports a variable only if it is
either defined in the environment initially or set on the command line,
and if its name consists only of letters, numbers, and underscores.
Some shells cannot cope with environment variable names consisting of
characters other than letters, numbers, and underscores."

That implies that an explicit export of a variable whose name contains
a hyphen should be OK.

Ben.

-- 
Ben Hutchings
Editing code like this is akin to sticking plasters on the bleeding
stump
of a severed limb. - me, 29 June 1999

signature.asc
Description: This is a digitally signed message part


Bug#833561: arm64: dtbs no longer installed in vendor subdir

2016-08-06 Thread Martin Michlmayr
* Ian Campbell  [2016-08-06 11:38]:
> But indeed in https://packages.debian.org/experimental/arm64/linux-imag
> e-4.7.0-rc7-arm64-unsigned/filelist the subdirectory is missing.

linux-image-4.7.0-rc3-arm64-unsigned from snapshot has the problem too.

-- 
Martin Michlmayr
http://www.cyrius.com/



Bug#833561: arm64: dtbs no longer installed in vendor subdir

2016-08-06 Thread Ian Campbell
On Sat, 2016-08-06 at 11:14 +0100, Ian Campbell wrote:
> On Fri, 2016-08-05 at 18:37 -0700, Martin Michlmayr wrote:
> > 
> > I ran dtbs_install manually to verify:
> > 
> > ARCH=arm64 make  -n -C debian/build/build_arm64_none_arm64
> > dtbs_install INSTALL_DTBS_PATH=/home/tbm/debian/linux-4.7~rc7/x
> > echo '  INSTALL arch/arm64/boot/dts/amd/amd-overdrive.dtb'; mkdir
> > -p
> > /home/tbm/debian/linux-4.7~rc7/x; cp arch/arm64/boot/dts/amd/amd-
> > overdrive.dtb /home/tbm/d ebian/linux-4.7~rc7/x
> 
> With pristine upstream 4.7-rc7 I see the subdirs, must be something
> in
> our local patches?
> 
> $ make ARCH=arm64 defconfig dtbs dtbs_install
> INSTALL_DTBS_PATH=$HOME/tmp/dtbs -j12 CROSS_COMPILE=aarch64-linux-
> gnu- -s &&  find ~/tmp/dtbs | head -n 10
> /home/ijc/tmp/dtbs
> /home/ijc/tmp/dtbs/altera
> /home/ijc/tmp/dtbs/altera/socfpga_stratix10_socdk.dtb
> /home/ijc/tmp/dtbs/mediatek
> /home/ijc/tmp/dtbs/mediatek/mt6795-evb.dtb
> /home/ijc/tmp/dtbs/mediatek/mt8173-evb.dtb
> /home/ijc/tmp/dtbs/broadcom
> /home/ijc/tmp/dtbs/broadcom/ns2-svk.dtb
> /home/ijc/tmp/dtbs/broadcom/vulcan-eval.dtb
> /home/ijc/tmp/dtbs/amd

Things seem ok with the debian/4.7_rc7-1_exp1 tag in our git repo:

git reset --hard debian/4.7_rc7-1_exp1
git clean -fdqx debian
./debian/rules orig
./debian/rules debian/control
make -f debian/rules.gen setup_arm64
cd debian/build/build_arm64_none_arm64/
rm -rf ~/tmp/dtbs && make ARCH=arm64 dtbs dtbs_install 
INSTALL_DTBS_PATH=$HOME/tmp/dtbs CROSS_COMPILE=aarch64-linux-gnu- -s &&  find 
~/tmp/dtbs | head -n 10

Results in :
/home/ijc/tmp/dtbs
/home/ijc/tmp/dtbs/amd
/home/ijc/tmp/dtbs/amd/amd-overdrive.dtb
/home/ijc/tmp/dtbs/amd/amd-overdrive-rev-b1.dtb
/home/ijc/tmp/dtbs/amd/amd-overdrive-rev-b0.dtb
/home/ijc/tmp/dtbs/amd/husky.dtb
/home/ijc/tmp/dtbs/nvidia
/home/ijc/tmp/dtbs/nvidia/tegra210-smaug.dtb
/home/ijc/tmp/dtbs/nvidia/tegra132-norrin.dtb
/home/ijc/tmp/dtbs/nvidia/tegra210-p2371-2180.dtb

Or similar to your original:

$ make -n -C debian/build/build_arm64_none_arm64/ dtbs_install 
INSTALL_DTBS_PATH=$HOME/tmp/dtbs V=1 | head -n 15
make: Entering directory 
'/local/scratch/ijc/development/debian/pkg-kernel/master.git/debian/build/build_arm64_none_arm64'
make -C /local/scratch/ijc/development/debian/pkg-kernel/master.git 
O=/local/scratch/ijc/development/debian/pkg-kernel/master.git/debian/build/build_arm64_none_arm64/.
 dtbs_install
make -C 
/local/scratch/ijc/development/debian/pkg-kernel/master.git/debian/build/build_arm64_none_arm64
 KBUILD_SRC=/local/scratch/ijc/development/debian/pkg-kernel/master.git \
-f /local/scratch/ijc/development/debian/pkg-kernel/master.git/Makefile 
dtbs_install
/local/scratch/ijc/development/debian/pkg-kernel/master.git/Makefile:681: 
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not 
supported by compiler
make -f 
/local/scratch/ijc/development/debian/pkg-kernel/master.git/scripts/Makefile.dtbinst
 obj=arch/arm64/boot/dts
mkdir -p /home/ijc/tmp/dtbs
make -f 
/local/scratch/ijc/development/debian/pkg-kernel/master.git/scripts/Makefile.dtbinst
 obj=arch/arm64/boot/dts/al
make[4]: Nothing to be done for '__dtbs_install'.
make -f 
/local/scratch/ijc/development/debian/pkg-kernel/master.git/scripts/Makefile.dtbinst
 obj=arch/arm64/boot/dts/altera
make[4]: Nothing to be done for '__dtbs_install'.
make -f 
/local/scratch/ijc/development/debian/pkg-kernel/master.git/scripts/Makefile.dtbinst
 obj=arch/arm64/boot/dts/amd
echo '  mkdir -p /home/ijc/tmp/dtbs/amd; cp 
arch/arm64/boot/dts/amd/amd-overdrive.dtb /home/ijc/tmp/dtbs/amd'; mkdir -p 
/home/ijc/tmp/dtbs/amd; cp arch/arm64/boot/dts/amd/amd-overdrive.dtb 
/home/ijc/tmp/dtbs/amd
echo '  mkdir -p /home/ijc/tmp/dtbs/amd; cp 
arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb /home/ijc/tmp/dtbs/amd'; mkdir 
-p /home/ijc/tmp/dtbs/amd; cp arch/arm64/boot/dts/amd/amd-overdrive-rev-b0.dtb 
/home/ijc/tmp/dtbs/amd
echo '  mkdir -p /home/ijc/tmp/dtbs/amd; cp 
arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb /home/ijc/tmp/dtbs/amd'; mkdir 
-p /home/ijc/tmp/dtbs/amd; cp arch/arm64/boot/dts/amd/amd-overdrive-rev-b1.dtb 
/home/ijc/tmp/dtbs/amd
echo '  mkdir -p /home/ijc/tmp/dtbs/amd; cp arch/arm64/boot/dts/amd/husky.dtb 
/home/ijc/tmp/dtbs/amd'; mkdir -p /home/ijc/tmp/dtbs/amd; cp 
arch/arm64/boot/dts/amd/husky.dtb /home/ijc/tmp/dtbs/amd

But indeed in https://packages.debian.org/experimental/arm64/linux-imag
e-4.7.0-rc7-arm64-unsigned/filelist the subdirectory is missing.

I'm at a complete loss as to why you and the buildd have such different
results.



Bug#833561: arm64: dtbs no longer installed in vendor subdir

2016-08-06 Thread Ian Campbell
On Fri, 2016-08-05 at 18:37 -0700, Martin Michlmayr wrote:
> I ran dtbs_install manually to verify:
> 
> ARCH=arm64 make  -n -C debian/build/build_arm64_none_arm64
> dtbs_install INSTALL_DTBS_PATH=/home/tbm/debian/linux-4.7~rc7/x
> echo '  INSTALL arch/arm64/boot/dts/amd/amd-overdrive.dtb'; mkdir -p
> /home/tbm/debian/linux-4.7~rc7/x; cp arch/arm64/boot/dts/amd/amd-
> overdrive.dtb /home/tbm/d ebian/linux-4.7~rc7/x

With pristine upstream 4.7-rc7 I see the subdirs, must be something in
our local patches?

$ make ARCH=arm64 defconfig dtbs dtbs_install INSTALL_DTBS_PATH=$HOME/tmp/dtbs 
-j12 CROSS_COMPILE=aarch64-linux-gnu- -s &&  find ~/tmp/dtbs | head -n 10
/home/ijc/tmp/dtbs
/home/ijc/tmp/dtbs/altera
/home/ijc/tmp/dtbs/altera/socfpga_stratix10_socdk.dtb
/home/ijc/tmp/dtbs/mediatek
/home/ijc/tmp/dtbs/mediatek/mt6795-evb.dtb
/home/ijc/tmp/dtbs/mediatek/mt8173-evb.dtb
/home/ijc/tmp/dtbs/broadcom
/home/ijc/tmp/dtbs/broadcom/ns2-svk.dtb
/home/ijc/tmp/dtbs/broadcom/vulcan-eval.dtb
/home/ijc/tmp/dtbs/amd

Ian.



Bug#833561: arm64: dtbs no longer installed in vendor subdir

2016-08-05 Thread Martin Michlmayr
Package: linux
Version: 4.7~rc7-1~exp1
Severity: important

DTBs on arm64 are normally installed in vendor subdirectories, e.g.:

./usr/lib/linux-image-4.6.0-1-arm64/nvidia/tegra210-p2371-2180.dtb

But this is no longer true in 4.7:

./usr/lib/linux-image-4.7.0-rc7-arm64/tegra210-p2371-2180.dtb

I am not sure why.  It seems scripts/Makefile.dtbinst and arch/arm64/Makefile
weren't modified upstream and we use dtbs_install.

I didn't have much time to investigate but I hope someone can look into this.


I ran dtbs_install manually to verify:

ARCH=arm64 make  -n -C debian/build/build_arm64_none_arm64 dtbs_install 
INSTALL_DTBS_PATH=/home/tbm/debian/linux-4.7~rc7/x
echo '  INSTALL arch/arm64/boot/dts/amd/amd-overdrive.dtb'; mkdir -p 
/home/tbm/debian/linux-4.7~rc7/x; cp arch/arm64/boot/dts/amd/amd-overdrive.dtb 
/home/tbm/d ebian/linux-4.7~rc7/x

-- 
Martin Michlmayr
http://www.cyrius.com/