Unable to build kernel module, not even the example


#1

I was trying to add wireless firmware to my application but kept getting errors. Therefore I tried the example_module as is without any modifications and I am still getting the same errors.

Here is part of my Docker file. Please let me know anything else that is needed and I appreciate the assistance.

FROM resin/%%RESIN_MACHINE_NAME%%-node:8

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
  curl \
  wget \
  build-essential \
  rsync \
  scrot \
  xdotool \
  cups \
  cron \
  cec-utils \
  x11vnc \
  unclutter \
  chromium \
  xserver-xorg-core \
  xserver-xorg-input-all \
  xserver-xorg-video-fbdev \
  xorg \
  libxcb-image0 \
  libxcb-util0 \
  xdg-utils \
  libdbus-1-dev \
  libgtk2.0-dev \
  libnotify-dev \
  libgnome-keyring-dev \
  libgconf2-dev \
  libasound2-dev \
  libcap-dev \
  libcups2-dev \
  libxtst-dev \
  libxss1 \
  libnss3-dev \
  libsmbclient \
  libssh-4 \
  mlocate \
  libexpat-dev \
  x11-xserver-utils \
  sqlite3 \
  fbset \
  libgl1-mesa-dri \
  xserver-xorg-video-modesetting \
  xserver-xorg-video-vesa \
  xwit \
  xinit \
  xscreensaver \
  matchbox-window-manager \
  xautomation \
  feh \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
  && echo "" >> /etc/X11/xinit/xserverrc \
  && echo 'exec /usr/bin/X -s 0 dpms -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc
  
COPY . /usr/src/app
WORKDIR /usr/src/app

RUN chmod +x ./build.sh && ./build.sh %%RESIN_MACHINE_NAME%% '2.12.5+rev1.prod' example_module
CMD bash ./run.sh

make: Entering directory ‘/tmp/tmp.MpwBKsoF2p’
[main] CC [M] /usr/src/app/example_module_intel-nuc_2.12.5+rev1.prod/hello.o
[main] /bin/sh: 1: scripts/basic/fixdep: not found
[main]
[main] scripts/Makefile.build:308: recipe for target ‘/usr/src/app/example_module_intel-nuc_2.12.5+rev1.prod/hello.o’ failed
[main] make[1]: *** [/usr/src/app/example_module_intel-nuc_2.12.5+rev1.prod/hello.o] Error 127
[main]
[main] Makefile:1515: recipe for target ‘module/usr/src/app/example_module_intel-nuc_2.12.5+rev1.prod’ failed
[main] make: Leaving directory ‘/tmp/tmp.MpwBKsoF2p’
[main] make: *** [module/usr/src/app/example_module_intel-nuc_2.12.5+rev1.prod] Error 2