# permission problem with firmware install [solved]

## nobody13

I'm trying to install media-tv/v4l-dvb-hg-0.1-r2. The modules build fine. when it trys to write firmware to /lib/firmware it fails. I looked at the log and it says pretty much what's below here. Is there something in the ebuild that can be changed to fix this?

```
make -C firmware install

make[1]: Entering directory `/var/tmp/portage/media-tv/v4l-dvb-hg-0.1-r2/work/v4l-dvb/v4l/firmware'

Installing firmwares at /lib/firmware: vicam/firmware.fw ACCESS DENIED  open_wr:      /lib/firmware/vicam/firmware.fw

cp: cannot create regular file `/lib/firmware/vicam/firmware.fw': Permission denied

dabusb/firmware.fw ACCESS DENIED  open_wr:      /lib/firmware/dabusb/firmware.fw

cp: cannot create regular file `/lib/firmware/dabusb/firmware.fw': Permission denied

dabusb/bitstream.bin ACCESS DENIED  open_wr:      /lib/firmware/dabusb/bitstream.bin

cp: cannot create regular file `/lib/firmware/dabusb/bitstream.bin': Permission denied

ttusb-budget/dspbootcode.bin ACCESS DENIED  open_wr:      /lib/firmware/ttusb-budget/dspbootcode.bin

cp: cannot create regular file `/lib/firmware/ttusb-budget/dspbootcode.bin': Permission denied

cpia2/stv0672_vp4.bin ACCESS DENIED  open_wr:      /lib/firmware/cpia2/stv0672_vp4.bin

cp: cannot create regular file `/lib/firmware/cpia2/stv0672_vp4.bin': Permission denied

av7110/bootcode.bin ACCESS DENIED  open_wr:      /lib/firmware/av7110/bootcode.bin

cp: cannot create regular file `/lib/firmware/av7110/bootcode.bin': Permission denied

make[1]: [install] Error 1 (ignored)

make[1]: Leaving directory `/var/tmp/portage/media-tv/v4l-dvb-hg-0.1-r2/work/v4l-dvb/v4l/firmware'

>>> Completed installing v4l-dvb-hg-0.1-r2 into /var/tmp/portage/media-tv/v4l-dvb-hg-0.1-r2/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------

LOG FILE "/var/log/sandbox/sandbox-574.log"

VERSION 1.0

FORMAT: F - Function called

FORMAT: S - Access Status

FORMAT: P - Path as passed to function

FORMAT: A - Absolute Path (not canonical)

FORMAT: R - Canonical Path

FORMAT: C - Command Line

F: open_wr

S: deny

P: /lib/firmware/vicam/firmware.fw

A: /lib/firmware/vicam/firmware.fw

R: /lib64/firmware/vicam/firmware.fw

C: cp vicam/firmware.fw /lib/firmware/vicam/firmware.fw

F: open_wr

S: deny

P: /lib/firmware/dabusb/firmware.fw

A: /lib/firmware/dabusb/firmware.fw

R: /lib64/firmware/dabusb/firmware.fw

C: cp dabusb/firmware.fw /lib/firmware/dabusb/firmware.fw

F: open_wr

S: deny

P: /lib/firmware/dabusb/bitstream.bin

A: /lib/firmware/dabusb/bitstream.bin

R: /lib64/firmware/dabusb/bitstream.bin

C: cp dabusb/bitstream.bin /lib/firmware/dabusb/bitstream.bin

F: open_wr

S: deny

P: /lib/firmware/ttusb-budget/dspbootcode.bin

A: /lib/firmware/ttusb-budget/dspbootcode.bin

R: /lib64/firmware/ttusb-budget/dspbootcode.bin

C: cp ttusb-budget/dspbootcode.bin /lib/firmware/ttusb-budget/dspbootcode.bin

F: open_wr

S: deny

P: /lib/firmware/cpia2/stv0672_vp4.bin

A: /lib/firmware/cpia2/stv0672_vp4.bin

R: /lib64/firmware/cpia2/stv0672_vp4.bin

C: cp cpia2/stv0672_vp4.bin /lib/firmware/cpia2/stv0672_vp4.bin

F: open_wr

S: deny

P: /lib/firmware/av7110/bootcode.bin

A: /lib/firmware/av7110/bootcode.bin

R: /lib64/firmware/av7110/bootcode.bin

C: cp av7110/bootcode.bin /lib/firmware/av7110/bootcode.bin

--------------------------------------------------------------------------------

>>> Failed to emerge media-tv/v4l-dvb-hg-0.1-r2, Log file:

>>>  '/var/log/portage/media-tv:v4l-dvb-hg-0.1-r2:20090510-235342.log'

 * Messages for package media-tv/v4l-dvb-hg-0.1-r2:

 * Removing autoload-entry from stradis-driver.

 * Removing depmod-calls

```

ebuild 

```
# Copyright 1999-2008 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/media-tv/v4l-dvb-hg/v4l-dvb-hg-0.1-r2.ebuild,v 1.15 2008/05/21 13:30:44 zzam Exp $

: ${EHG_REPO_URI:=${V4L_DVB_HG_REPO_URI:-http://linuxtv.org/hg/v4l-dvb}}

inherit linux-mod eutils toolchain-funcs mercurial

DESCRIPTION="live development version of v4l&dvb-driver for Kernel 2.6"

SRC_URI=""

HOMEPAGE="http://www.linuxtv.org"

KEYWORDS="~amd64 ~x86"

SLOT="0"

LICENSE="GPL-2"

IUSE=""

S="${WORKDIR}/${EHG_REPO_URI##*/}/v4l"

pkg_setup()

{

linux-mod_pkg_setup

if [[ "${KV_MAJOR}.${KV_MINOR}" != "2.6" ]]; then

ewarn "other Kernel than 2.6.x are not supported at the moment."

die "unsupported Kernel (not 2.6.x)"

fi

MODULE_NAMES="dvb(dvb:${S})"

BUILD_PARAMS="KDIR=${KERNEL_DIR}"

BUILD_TARGETS="default"

if [[ -d ${ROOT}/lib/modules/${KV_FULL}/v4l-dvb-cvs ]]; then

ewarn "There are stale dvb-modules from the ebuild v4l-dvb-cvs."

ewarn "Please remove the directory /lib/modules/${KV_FULL}/v4l-dvb-cvs"

ewarn "with all its files and subdirectories and then restart emerge."

ewarn

ewarn "# rm -rf /lib/modules/${KV_FULL}/v4l-dvb-cvs"

die "Stale dvb-modules found, restart merge after removing them."

fi

}

src_unpack() {

# download and copy files

mercurial_src_unpack

cd "${S}"

#epatch ${FILESDIR}/${PN}-fix-makefile-recursion.diff

# apply local patches

if test -n "${DVB_LOCAL_PATCHES}";

then

ewarn "Applying local patches:"

for LOCALPATCH in ${DVB_LOCAL_PATCHES};

do

if test -f "${LOCALPATCH}";

then

if grep -q linux/drivers "${LOCALPATCH}"; then

cd "${S}"/..

else

cd "${S}"

fi

epatch "${LOCALPATCH}"

fi

done

else

einfo "No additional local patches to use"

fi

export ARCH=$(tc-arch-kernel)

make allmodconfig ${BUILD_PARAMS}

export ARCH=$(tc-arch)

echo

elog "Removing autoload-entry from stradis-driver."

sed -i "${S}"/../linux/drivers/media/video/stradis.c -e '/MODULE_DEVICE_TABLE/d'

cd "${S}"

sed -e '/-install::/s:rminstall::' \

-i Makefile

elog "Removing depmod-calls"

sed -e '/depmod/d' -i Makefile* scripts/make_makefile.pl scripts/make_kconfig.pl \

|| die "Failed removing depmod call from Makefile"

grep depmod * && die "Not removed depmod found."

mkdir "${WORKDIR}"/header

cd "${WORKDIR}"/header

cp "${S}"/../linux/include/linux/dvb/* .

sed -e '/compiler/d' \

-e 's/__user//' \

-i *.h

}

src_install() {

# install the modules

local DEST="${D}/lib/modules/${KV_FULL}/v4l-dvb"

make install \

DEST="${DEST}" \

KDIR26="${DEST}" \

KDIRA="${DEST}" \

|| die "make install failed"

cd "${S}"/..

dodoc linux/Documentation/dvb/*.txt

dosbin linux/Documentation/dvb/get_dvb_firmware

insinto /usr/include/v4l-dvb-hg/linux/dvb

cd "${WORKDIR}/header"

doins *.h

}

pkg_postinst() {

echo

elog "Firmware-files can be found in media-tv/linuxtv-dvb-firmware"

echo

linux-mod_pkg_postinst

echo

echo

elog "if you want to use the IR-port or networking"

elog "with the dvb-card you need to"

elog "install linuxtv-dvb-apps"

echo

}
```

Last edited by nobody13 on Mon May 11, 2009 6:08 pm; edited 3 times in total

----------

## Hu

This problem is already being discussed in Problem with media-tv/v4l-dvb-hg.

----------

## drescherjm

The way I have worked around this for the past month or so was to use the option that disables sandbox.

----------

## nobody13

 *Hu wrote:*   

> This problem is already being discussed in Problem with media-tv/v4l-dvb-hg.

 

I overlooked it. Thanks

----------

