postinst of *-dkms package is broken on armbian

Recommended Posts

I'm doing some driver work, and distribute these driver via DKMS package.

when installed on armbian, there is some problem.


Test Environment

* Board: OrangePi Plus 2E

* Armbian: 5.85

* OS: Ubuntu 18.04.2


Reproduce step

* install dkms and kernel header: `sudo apt-get install dkms linux-headers-next-sunxi`

* install some *-dkms package, acpi-call-dkms for example: `sudo apt-get install acpi-call-dkms`

* you get some error in _/var/lib/dkms/acpi-call/1.1.0/build/make.log_


DKMS make.log for acpi-call-1.1.0 for kernel 4.19.38-sunxi (armv7l)
Fri May 10 14:56:03 CST 2019
make: Entering directory '/usr/src/linux-headers-4.19.38-sunxi'
Makefile:619: arch//Makefile: No such file or directory
make: *** No rule to make target 'arch//Makefile'.  Stop.
make: Leaving directory '/usr/src/linux-headers-4.19.38-sunxi'



but if you manually build with `dkms` command, it built with no error.

`sudo dkms build acpi-call/1.1.0`


then I check the source of dkms at https://github.com/dell/dkms

and found that in the postinst hook, ARCH variable is set to empty. so

`ARCH= dkms build acpi-call/1.1.0`

will get the same error as in the `apt-get install` command


but ARCH is set to arm in `/etc/environment`


finally, as manually build of *-dkms is OK, unable to auto install DKMS package is not a very big problem.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.