micro-iot / meta-linkit7688

3 stars 1 forks source link

/sbin/depmod: Command not found #2

Open IniterWorker opened 5 years ago

IniterWorker commented 5 years ago

Hello,

I'm using the warrior revision of poky. I don't think it's a big deal in this issue. I'm wondering if you know about this issue of /sbin/depmod: Command not found. Do you have any idea about the dependency problem?

| make[1]: /sbin/depmod: Command not found
Build Configuration:
BB_VERSION           = "1.42.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "mipsel-poky-linux-musl"
MACHINE              = "linkit7688"
DISTRO               = "poky-tiny"
DISTRO_VERSION       = "0.1"
TUNE_FEATURES        = "o32 mips32r2 24kec"
TARGET_FPU           = "soft"
meta                 
meta-poky            
meta-yocto-bsp       
meta-mt              = "warrior:02eafa0f96e2d913db067e6e4a04aacd89a1918c"
meta-micro-iot       = "master:25dd7796ea43688c4ab61ebd7d438608815a3bc2"
meta-linkit7688      = "kernel_4_14_95:7d990b69196dbf08a03ac95b390216ea4419b9d8"

Initialising tasks: 100% |########################################################################| Time: 0:00:00
Sstate summary: Wanted 19 Found 5 Missed 14 Current 477 (26% match, 97% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: kernel-module-backports-git-r0 do_install: oe_runmake failed
ERROR: kernel-module-backports-git-r0 do_install: Function failed: do_install (log file is located at /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/temp/log.do_install.26677)
ERROR: Logfile of failure stored in: /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/temp/log.do_install.26677
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/workdir/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-connectivity/openssl/openssl_1.1.1b.bb:do_populate_sysroot', '/workdir/meta/recipes-devtools/binutils/binutils-cross_2.32.bb:do_populate_sysroot', '/workdir/meta/recipes-core/musl/musl_git.bb:do_populate_sysroot', '/workdir/meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot', '/workdir/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-extended/bc/bc_1.07.1.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', '/workdir/meta/recipes-devtools/gcc/gcc-cross_8.3.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-bsp/u-boot/u-boot-tools_2019.01.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-extended/xz/xz_5.2.4.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-devtools/bison/bison_3.0.4.bb:do_populate_sysroot', 'virtual:native:/workdir/meta/recipes-support/lzop/lzop_1.04.bb:do_populate_sysroot', 'virtual:native:/workdir/meta-linkit7688/tools/openwrt-lzma/openwrt-lzma_1.0.bb:do_populate_sysroot', 'virtual:native:/workdir/meta-linkit7688/tools/kconf/kconf_git.bb:do_populate_sysroot', '/workdir/meta/recipes-kernel/kmod/kmod-native_git.bb:do_populate_sysroot', 'virtual:native:/workdir/meta-linkit7688/tools/image-patch/image-patch_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['kern-tools-native', 'pkgconfig-native', 'openssl-native', 'binutils-cross-mipsel', 'musl', 'quilt-native', 'gcc-runtime', 'bc-native', 'pseudo-native', 'gcc-cross-mipsel', 'u-boot-tools-native', 'xz-native', 'bison-native', 'lzop-native', 'openwrt-lzma-native', 'kconf-native', 'kmod-native', 'image-patch-native', 'autoconf-native', 'automake-native', 'gnu-config-native', 'libtool-native', 'texinfo-dummy-native', 'zlib-native', 'flex-native', 'bsd-headers', 'libssp-nonshared', 'linux-libc-headers', 'libgcc', 'readline-native', 'libmpc-native', 'mpfr-native', 'gmp-native', 'gettext-minimal-native', 'lzo-native', 'ncurses-native', 'python3-native', 'gtk-doc-native', 'm4-native', 'libffi-native', 'util-linux-native', 'sqlite3-native', 'libnsl2-native', 'libtirpc-native', 'bzip2-native', 'gdbm-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| NOTE: make -j 12 -C /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01 EXTRA_CFLAGS=-I/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/include KLIB_BUILD=/workdir/build/tmp/work-shared/linkit7688/kernel-build-artifacts MODPROBE=true KLIB=/workdir/build/tmp/work-shared/linkit7688/kernel-build-artifacts KERNEL_SUBLEVEL=73 KBUILD_LDFLAGS_MODULE_PREREQ= DEPMOD=echo MODLIB=/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/image/lib/modules/4.14.95-yocto-standard-custom INSTALL_FW_PATH=/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/image/lib/firmware CC=mipsel-poky-linux-musl-gcc  -fuse-ld=bfd -fmacro-prefix-map=/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0=/usr/src/debug/kernel-module-backports/git-r0                      -fdebug-prefix-map=/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0=/usr/src/debug/kernel-module-backports/git-r0                      -fdebug-prefix-map=/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/recipe-sysroot=                      -fdebug-prefix-map=/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/recipe-sysroot-native=  -fdebug-prefix-map=/workdir/build/tmp/work-shared/linkit7688/kernel-source=/usr/src/kernel LD=mipsel-poky-linux-musl-ld.bfd  O=/workdir/build/tmp/work-shared/linkit7688/kernel-build-artifacts modules_install
| make: Entering directory '/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01'
| make[1]: 'Kconfig.versions' is up to date.
| make[3]: 'Kconfig.versions' is up to date.
| #
| # configuration written to .config
| #
| Building backport-include/backport/autoconf.h ... done.
|   Building modules, stage 2.
|   MODPOST 3 modules
|   INSTALL /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/compat/compat.ko
|   INSTALL /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/net/mac80211/mac80211.ko
|   INSTALL /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/net/wireless/cfg80211.ko
|   DEPMOD  4.14.95-yocto-standard-custom
| modinfo: ERROR: Module alias mac80211 not found.
| depmod will prefer updates/ over kernel/ -- OK!
| make[1]: /sbin/depmod: Command not found
| Makefile.real:97: recipe for target 'install' failed
| make[1]: *** [install] Error 127
| Makefile:119: recipe for target 'modules_install' failed
| make: *** [modules_install] Error 2
| make: Leaving directory '/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_install (log file is located at /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/temp/log.do_install.26677)
ERROR: Task (/workdir/meta-linkit7688/recipes-kernel/linux-4.14.95/kernel-module-backports/kernel-module-backports_git.bb:do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1557 tasks of which 1553 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory

Summary: 1 task failed:
  /workdir/meta-linkit7688/recipes-kernel/linux-4.14.95/kernel-module-backports/kernel-module-backports_git.bb:do_install
Summary: There were 14 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/Makefile.real

.PHONY: install
install: modules
    @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR)         \
        INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG)      \
        modules_install
    @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR)
    @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR)
    @./scripts/check_depmod.sh
    @/sbin/depmod -a
    @./scripts/update-initramfs.sh $(KLIB)
    @echo
    @echo Your backported driver modules should be installed now.
    @echo Reboot.
    @echo
IniterWorker commented 5 years ago

I tried to install the native kmod package from my docker container. I walked one step forward but I didn't get a full build because now the build uses the native to compute the target depmod operation.

| make: Entering directory '/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01'
| make[1]: 'Kconfig.versions' is up to date.
| make[3]: 'Kconfig.versions' is up to date.
| #
| # configuration written to .config
| #
| Building backport-include/backport/autoconf.h ... done.
|   Building modules, stage 2.
|   MODPOST 3 modules
|   INSTALL /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/compat/compat.ko
|   INSTALL /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/net/mac80211/mac80211.ko
|   INSTALL /workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01/net/wireless/cfg80211.ko
|   DEPMOD  4.14.95-yocto-standard-custom
| modinfo: ERROR: Module alias mac80211 not found.
| depmod will prefer updates/ over kernel/ -- OK!
| depmod: ERROR: could not open directory /lib/modules/4.19.79-1-MANJARO: No such file or directory
| depmod: FATAL: could not search modules: No such file or directory
| Makefile.real:97: recipe for target 'install' failed
| make[1]: *** [install] Error 1
| Makefile:119: recipe for target 'modules_install' failed
| make: *** [modules_install] Error 2
| make: Leaving directory '/workdir/build/tmp/work/linkit7688-poky-linux-musl/kernel-module-backports/git-r0/backports-2017-11-01'
LetoThe2nd commented 5 years ago

Looks very much like you the Makefile of the kernel modules you are trying to backport needs fixing. Especially the hardcoded path to /sbin/depmoddoesn't only scream for trouble but actually cause you the headcahes that you are seeing. I suggest to get rid of about everything besides the actual compile command, and let bitbake figure out the module packaging, we have mechanisms for that. Find more inforamtion here

IniterWorker commented 4 years ago

@LetoThe2nd, I'd like to thank you a lot for your advice.

I got a build. But, I don't have much time to handle the test. I have some trouble with sysupgrade. I don't know how to use it correctly. Because I have tried to flash an ubifs, but I didn't get a boot. Some shitty magic code maybe unallowed by the u-boot of the product provider. Maybe, @micro-iot, could you share some examples about flashing your device?

B.r

LetoThe2nd commented 4 years ago

@IniterWorker I would love to help, but flashing procedures are highly board specific, and I have never used that board, not even touched anything MIPS for over 10 years - Sorry. Your best chance is to reach out for @micro-iot as they seem to have experience concerning that board.

micro-iot commented 4 years ago

@IniterWorker Linkit Smart 7688 needed only downloading via TFTP and flashing (option nr. 2) in u-boot console, which was the original one supplied by Mediatek.

IniterWorker commented 4 years ago

@micro-iot, can you describe a bit of your procedure in terms of command line? I don't have the mt7688. I have the mt7620.

Thanks for your advice.