LINUX.ORG.RU

не получается построить Makefile для firmware

 


0

1

доброго вечера!

я тут понял, что забыл как сделать простой deb-пакет с фирмварью
есть Makefile

KERNELDIR := /lib/modules/`uname -r`/build

#obj-$(CONFIG_SND_SOC_SIMPLE_MUX)       += snd-soc-simple-mux.o

obj-m += src/soc/

all:
        $(MAKE) -C $(KERNELDIR) M=`pwd` modules
        $(shell INSTALL_MOD_DIR="debian/es8336-avs/lib/modules/`uname -r`/misc"; \
                for f in `find src/soc -name "*.ko"`; do \
                DIR="$${INSTALL_MOD_DIR}/`dirname $$f | sed -e 's#^src/##g'`"; \
                mkdir -p $${DIR}; cp "$$f" $${DIR}/; done)
        $(shell cp -r ./firmware debian/es8336-avs/lib/)

bindeb-pkg:
        $(shell mkdir -p debian/tmp/lib)
        $(shell cp -r ./firmware debian/tmp/lib/)
        $(shell echo "es8336-avs (`uname -r`-`git rev-list HEAD --count`) unstable; urgency=medium" > debian/changelog)
        $(shell echo >> debian/changelog)
        $(shell echo "  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>" >> debian/changelog)
        $(shell echo >> debian/changelog)
        $(shell echo " -- unknown <build@buildhost>  `date | awk '{printf(\"%s, %s %s %s %s +0300\", $$1, $$2, $$3, $$4, $$5);}'`" >> debian/changelog)
        dpkg-buildpackage -nc --no-post-clean -b

install: all
        $(MAKE) INSTALL_MOD_DIR=misc -C $(KERNELDIR) M=`pwd` modules_install
        $(shell depmod `uname -r`)
        $(shell ./scripts/mkmodprobe.sh)
        $(shell ./scripts/mksndconfigs.sh)
        $(shell cp -r ./firmware /lib/)

clean:
        $(MAKE) -C $(KERNELDIR) M=`pwd` clean

но `sudo make bindeb-pkg` заканчивается так:
   dh_install
dh_install: warning: Cannot find (any matches for) "lib/firmware/intel/avs/skl/dsp_basefw.bin" (tried in ., debian/tmp)

dh_install: warning: es8336-avs-firmware missing files: lib/firmware/intel/avs/skl/dsp_basefw.bin
dh_install: warning: Cannot find (any matches for) "lib/firmware/intel/avs/hda-8086280b-tplg.bin" (tried in ., debian/tmp)

dh_install: warning: es8336-avs-firmware missing files: lib/firmware/intel/avs/hda-8086280b-tplg.bin
dh_install: warning: Cannot find (any matches for) "lib/firmware/intel/avs/hda-8086280b-tplg.conf" (tried in ., debian/tmp)

dh_install: warning: es8336-avs-firmware missing files: lib/firmware/intel/avs/hda-8086280b-tplg.conf
dh_install: warning: Cannot find (any matches for) "lib/firmware/intel/avs/es8336-tplg.bin" (tried in ., debian/tmp)

dh_install: warning: es8336-avs-firmware missing files: lib/firmware/intel/avs/es8336-tplg.bin
dh_install: warning: Cannot find (any matches for) "lib/firmware/intel/avs/es8336-tplg.conf" (tried in ., debian/tmp)

dh_install: warning: es8336-avs-firmware missing files: lib/firmware/intel/avs/es8336-tplg.conf
dh_install: error: missing files, aborting
make[1]: *** [debian/rules:18: binary] Error 255
make[1]: Leaving directory '/home/sbauer/devel/es8336-avs'
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make: *** [Makefile:24: bindeb-pkg] Error 2


диспозиция:
sbauer@astra ~/devel/es8336-avs master$ find . -name "*.bin"
./firmware/intel/avs/es8336-tplg.bin
./firmware/intel/avs/hda-8086280b-tplg.bin
./firmware/intel/avs/skl/dsp_basefw.bin
./debian/es8336-avs/lib/firmware/intel/avs/es8336-tplg.bin
./debian/es8336-avs/lib/firmware/intel/avs/hda-8086280b-tplg.bin
./debian/es8336-avs/lib/firmware/intel/avs/skl/dsp_basefw.bin
sbauer@astra ~/devel/es8336-avs master$ ll ./debian/es8336-avs-firmware.install
-rwxr-xr-x 1 sbauer sbauer 280 Nov 12 21:02 ./debian/es8336-avs-firmware.install
sbauer@astra ~/devel/es8336-avs master$ cat ./debian/es8336-avs-firmware.install
#!/usr/bin/dh-exec --with-scripts=filter-arch,filter-build-profiles
lib/firmware/intel/avs/skl/dsp_basefw.bin
lib/firmware/intel/avs/hda-8086280b-tplg.bin
lib/firmware/intel/avs/hda-8086280b-tplg.conf
lib/firmware/intel/avs/es8336-tplg.bin
lib/firmware/intel/avs/es8336-tplg.conf
sbauer@astra ~/devel/es8336-avs master$ ll debian/tmp/
total 0
sbauer@astra ~/devel/es8336-avs master$ 


подскажите, плиз, куда копать?

p.s. пробовал и `dpkg-buildpackage -nc --no-post-clean -b`, но результат тот же
p.p.s `dpkg-buildpackage -nc --no-post-clean -b` не помогает - debian/tmp обнуляется постоянно
p.p.s. пустой «override_dh_clean:» тоже не помог
p.p.p.s. решилось с
override_dh_install:
#       cp -r ./firmware debian/tmp/lib/
        dh_install
        install firmware/intel/avs/skl/dsp_basefw.bin debian/es8336-avs-firmware/lib/firmware/intel/avs/skl/dsp_basefw.bin

в debian/rules

★★★★★

Последнее исправление: metawishmaster (всего исправлений: 6)