Bug 39552 - Linux buildsystem installs AMD Radeon firmware during "make install"
Summary: Linux buildsystem installs AMD Radeon firmware during "make install"
Status: RESOLVED INVALID
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Michal Marek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 07:59 UTC by Dennis Schridde
Modified: 2012-10-30 16:01 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.2.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
.config (2.6.39-gentoo-r3) (71.61 KB, application/octet-stream)
2011-07-19 07:59 UTC, Dennis Schridde
Details
/sbin/installkernel (2.33 KB, application/octet-stream)
2011-07-22 12:08 UTC, Dennis Schridde
Details
Log of "make V=1 modules_install" (129.29 KB, text/x-log)
2011-07-22 12:39 UTC, Dennis Schridde
Details

Description Dennis Schridde 2011-07-19 07:59:05 UTC
Created attachment 65962 [details]
.config (2.6.39-gentoo-r3)

I ran "make install" (NOT "make firmware_install") in the kernel sources of sys-kernel/gentoo-sources-2.6.39-r3 and found these lines at the end of the output:
  INSTALL /lib/firmware/radeon/R100_cp.bin
  INSTALL /lib/firmware/radeon/R200_cp.bin
  INSTALL /lib/firmware/radeon/R300_cp.bin
  INSTALL /lib/firmware/radeon/R420_cp.bin
  INSTALL /lib/firmware/radeon/RS690_cp.bin
  INSTALL /lib/firmware/radeon/RS600_cp.bin
  INSTALL /lib/firmware/radeon/R520_cp.bin
  INSTALL /lib/firmware/radeon/R600_pfp.bin
  INSTALL /lib/firmware/radeon/R600_me.bin
  INSTALL /lib/firmware/radeon/RV610_pfp.bin
  INSTALL /lib/firmware/radeon/RV610_me.bin
  INSTALL /lib/firmware/radeon/RV630_pfp.bin
  INSTALL /lib/firmware/radeon/RV630_me.bin
  INSTALL /lib/firmware/radeon/RV620_pfp.bin
  INSTALL /lib/firmware/radeon/RV620_me.bin
  INSTALL /lib/firmware/radeon/RV635_pfp.bin
  INSTALL /lib/firmware/radeon/RV635_me.bin
  INSTALL /lib/firmware/radeon/RV670_pfp.bin
  INSTALL /lib/firmware/radeon/RV670_me.bin
  INSTALL /lib/firmware/radeon/RS780_pfp.bin
  INSTALL /lib/firmware/radeon/RS780_me.bin
  INSTALL /lib/firmware/radeon/RV770_pfp.bin
  INSTALL /lib/firmware/radeon/RV770_me.bin
  INSTALL /lib/firmware/radeon/RV730_pfp.bin
  INSTALL /lib/firmware/radeon/RV730_me.bin
  INSTALL /lib/firmware/radeon/RV710_pfp.bin
  INSTALL /lib/firmware/radeon/RV710_me.bin

This does not seem correct, as there is a separate firmware_install target, which should install these files instead.

Gentoo claims this is an upstream issue and not caused by Gentoo patches.
cf. downstream bugreport: https://bugs.gentoo.org/show_bug.cgi?id=373223

Portage 2.2.0_alpha45 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r4, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5000+-with-gentoo-2.0.3
Timestamp of tree: Tue, 19 Jul 2011 06:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2, 3.2
dev-util/cmake:           2.8.5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.5.2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo kde pcsx2 oss-overlay sunrise qt-symbian-overlay gamerlay-stable local
Installed sets: @kdebase
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=athlon64-sse3 -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/neatx/home"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /e
tc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-pipe -O2 -march=athlon64-sse3 -ftree-vectorize"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--depclean-lib-check n --with-bdeps y --keep-going"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--hash-style=gnu"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/cache/portage/gentoo"
PORTDIR_OVERLAY="/var/cache/portage/layman/kde /var/cache/portage/layman/pcsx2 /var/cache/portage/layman/oss-overlay /var/cache/portage/layman/sunrise /var/cache/portage/layman/qt-symbian-overlay /var/cache/portage/layman/gamerlay /var/cache/portage/local"
[...]
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michal Marek 2011-07-22 09:13:56 UTC
Are you sure that it's not your /sbin/installkernel doing this? Please attach the full output of make V=1 install.
Comment 2 Dennis Schridde 2011-07-22 12:08:15 UTC
Created attachment 66352 [details]
/sbin/installkernel

This is /sbin/installkernel and /etc/kernel/postinst.d is empty.
Comment 3 Dennis Schridde 2011-07-22 12:39:36 UTC
Created attachment 66362 [details]
Log of "make V=1 modules_install"

First: Please excuse me, the firmware is installed by "modules_install", not "install".

The last thing "make -j3" did was:
  IHEX    firmware/radeon/R100_cp.bin
  IHEX    firmware/radeon/R200_cp.bin
  IHEX    firmware/radeon/R420_cp.bin
  IHEX    firmware/radeon/R300_cp.bin
  IHEX    firmware/radeon/RS690_cp.bin
  IHEX    firmware/radeon/RS600_cp.bin
  IHEX    firmware/radeon/R520_cp.bin
  IHEX    firmware/radeon/R600_pfp.bin
  IHEX    firmware/radeon/R600_me.bin
  IHEX    firmware/radeon/RV610_me.bin
  IHEX    firmware/radeon/RV610_pfp.bin
  IHEX    firmware/radeon/RV630_pfp.bin
  IHEX    firmware/radeon/RV630_me.bin
  IHEX    firmware/radeon/RV620_pfp.bin
  IHEX    firmware/radeon/RV620_me.bin
  IHEX    firmware/radeon/RV635_pfp.bin
  IHEX    firmware/radeon/RV635_me.bin
  IHEX    firmware/radeon/RV670_pfp.bin
  IHEX    firmware/radeon/RV670_me.bin
  IHEX    firmware/radeon/RS780_pfp.bin
  IHEX    firmware/radeon/RS780_me.bin
  IHEX    firmware/radeon/RV770_pfp.bin
  IHEX    firmware/radeon/RV730_pfp.bin
  IHEX    firmware/radeon/RV730_me.bin
  IHEX    firmware/radeon/RV770_me.bin
  IHEX    firmware/radeon/RV710_pfp.bin
  IHEX    firmware/radeon/RV710_me.bin

The log of the following "make V=1 modules_install" is attached.
Comment 4 Michal Marek 2011-07-22 19:47:17 UTC
That's correct behavior then, modules_install installs firmware files needed by the installed modules.
Comment 5 Dennis Schridde 2011-07-22 22:40:40 UTC
But thereby it might override files installed by the package manager.

I am judging by seeing these files being reinstalled everytime I compile a new kernel, since I am unable to fully understand scripts/Makefile.fwinst
Comment 6 Dennis Schridde 2011-07-22 22:41:02 UTC
But thereby it might override files installed by the package manager.

I am judging by seeing these files being reinstalled everytime I compile a new kernel, since I am unable to fully understand scripts/Makefile.fwinst
Or am I wrong? If so, how does it work?
Comment 7 Dennis Schridde 2012-01-27 12:50:39 UTC
(In reply to comment #4)
> That's correct behavior then, modules_install installs firmware files needed
> by
> the installed modules.
Can you please reply why the files installed by the package manager are not sufficient? All those files are already present, installed by a system package.
Comment 8 Michal Marek 2012-10-30 16:01:13 UTC
make <whatever>install simply (re)installs the files it is supposed to install, that's the same with every other project. You may argue with David Woodhouse about the default firmware install directory (/lib/firmware vs. /lib/firmware/$version), but there is no bug that these files are installed.

Note You need to log in before you can comment on or make changes to this bug.