Skip to content

Automate DKMS setup and source code updates#214

Open
rawenger wants to merge 2 commits intomkubecek:masterfrom
rawenger:dkms-setup
Open

Automate DKMS setup and source code updates#214
rawenger wants to merge 2 commits intomkubecek:masterfrom
rawenger:dkms-setup

Conversation

@rawenger
Copy link
Copy Markdown

@rawenger rawenger commented Sep 8, 2023

I appreciate you setting all of this up @mkubecek, it's a total godsend. I recently had to automate the process of getting the VMware modules up and running through DKMS on a handful of machines, so I wrote this script. I've made some additions to make it as distro-agnostic as possible--let me know what you think. I've included an overview of the script's functionality at the top of dkms-setup.sh.

Edit to add: There should be no change in workflow to anyone not wishing to use DKMS.

========== COMMIT SUMMARY============

DKMS is a convenient framework for managing out-of-tree kernel modules, such as the ones in this repo. The dkms-setup.sh script will add the modules here (vmmon & vmnet, as of this writing) to the system's DKMS configuration, allowing them to be automatically rebuilt and resigned whenever the kernel is upgraded.

CHANGES:
- Add dkms.conf to .gitignore. The setup script will generate a dkms.conf file from the template dkms.conf.in.
- Add an optional override to the VM_UNAME variable in the Makefile. This is required to build for any non-running kernel (which DKMS will do whenever a new kernel is installed by the system package manager).

ADDITIONS:
- dkms-setup.sh: Shell script to manage setup and updates of the modules in this repo.
- dkms.conf.in: Template DKMS configuration file to be populated by the setup script.

DKMS is a convenient framework for managing out-of-tree kernel modules,
such as the ones in this repo. The `dkms-setup.sh` script will add the
modules here (vmmon & vmnet, as of this writing) to the system's DKMS
configuration, allowing them to be automatically rebuilt and resigned
whenever the kernel is upgraded.

CHANGES:
	- Add `dkms.conf` to `.gitignore`. The setup script will
	  generate a `dkms.conf` file from the template `dkms.conf.in`.
	- Add an optional override to the `VM_UNAME` variable in the
	  `Makefile`. This is required to build for any non-running
	  kernel (which DKMS will do whenever a new kernel is installed
	  by the system package manager).

ADDITIONS:
	- `dkms-setup.sh`: Shell script to manage setup and updates of
	  the modules in this repo.
	- `dkms.conf.in`: Template DKMS configuration file to be
	  populated by the setup script.
@vasi
Copy link
Copy Markdown

vasi commented Mar 5, 2024

This is a great idea, but it doesn't work quite right for me. We checkout a different branch name, and then attempt to process dkms.conf.in, but it's no longer present!

Obviously that'd be fine if we integrated dkms.conf.in to all branches, but it makes it a bit hard to test.

@vasi
Copy link
Copy Markdown

vasi commented Mar 5, 2024

I think just moving the dkms.conf generation above the branch-switch should fix this.

J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Apr 21, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Test build:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Apr 21, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Apr 21, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Apr 21, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Apr 27, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```
@rawenger
Copy link
Copy Markdown
Author

Fixed! Good catch @vasi

J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Aug 15, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```

Applied fix for newer kernel:

mkubecek#239
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Oct 31, 2024
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```

Applied fix for newer kernel:

mkubecek#239

Applied another fix for newer kernel:

mkubecek#243 (comment)
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Jul 12, 2025
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```

Applied fix for a newer kernel:

mkubecek#239

Applied another fix for a newer kernel:

mkubecek#243 (comment)

Applied another fix for a newer kernel:

mkubecek#306 (comment)
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Jul 12, 2025
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```

Applied fix for a newer kernel:

mkubecek#239

Applied another fix for a newer kernel:

mkubecek#243 (comment)

Applied another fix for a newer kernel:

mkubecek#306 (comment)
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Sep 10, 2025
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```

Applied fix for a newer kernel:

mkubecek#239

Applied another fix for a newer kernel:

mkubecek#243 (comment)

Applied another fix for a newer kernel:

mkubecek#306 (comment)

Applied another fix for a newer kernel:

```c
linux/hostif.c: In function ‘HostIF_SafeRDMSR’:
linux/hostif.c:3413:10: error: implicit declaration of function ‘rdmsrl_safe’; did you mean ‘rdmsrq_safe’? [-Wimplicit-function-declaration]
 3413 |    err = rdmsrl_safe(msr, &v);
      |          ^~~~~~~~~~~
      |          rdmsrq_safe
```
J-Pai added a commit to J-Pai/vmware-host-modules that referenced this pull request Nov 2, 2025
Similar to mkubecek#214, add
akmod configuration/support to vmware-host-modules.

This will ensure Fedora users are able to get a fresh build of
vmware-host-modules each time the kernel updates.

Spec configuration and installation based on
https://github.com/Fred78290/nct6687d.

Installation for RPM:

```
make akmod
```

Test/Dev flow:

```
make clean
make akmod/clean && make akmod && sudo akmods
sudo systemctl start vmware.service
```

Applied fix for a newer kernel:

mkubecek#239

Applied another fix for a newer kernel:

mkubecek#243 (comment)

Applied another fix for a newer kernel:

mkubecek#306 (comment)

Applied another fix for a newer kernel:

```c
linux/hostif.c: In function ‘HostIF_SafeRDMSR’:
linux/hostif.c:3413:10: error: implicit declaration of function ‘rdmsrl_safe’; did you mean ‘rdmsrq_safe’? [-Wimplicit-function-declaration]
 3413 |    err = rdmsrl_safe(msr, &v);
      |          ^~~~~~~~~~~
      |          rdmsrq_safe
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants