From c5d18ac19c3975a3b40f988bdc4c90604b9dbf6b Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Wed, 10 Nov 2021 15:54:21 +0100 Subject: [PATCH] Added DKMS Drivers for Broadcom --- .gitignore | 3 +- .vscode/tasks.json | 95 +++++++++++++++++++ Makefile | 6 ++ auto/config | 2 - config/package-lists/system.list.chroot | 15 +-- .../normal/0899-install-dkms-drivers.chroot | 23 +++++ 6 files changed, 128 insertions(+), 16 deletions(-) create mode 100644 .vscode/tasks.json create mode 100755 config_DKMS/hooks/normal/0899-install-dkms-drivers.chroot diff --git a/.gitignore b/.gitignore index 9065c8e..6f86afb 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,6 @@ binary build.log live-image* binary.modified_timestamps +Testing.nmconnection *.deb -*.iso \ No newline at end of file +*.iso diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..ebe83fe --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,95 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Build IMG all architectures", + "type": "shell", + "command": "make build", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build IMG amd64", + "type": "shell", + "command": "make build_amd64", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build IMG i386", + "type": "shell", + "command": "make build_amd64", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build IMG all architectures W DKMS", + "type": "shell", + "command": "make enable_DKMS build", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build IMG amd64 W DKMS", + "type": "shell", + "command": "make enable_DKMS build_amd64", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build IMG i386 W DKMS", + "type": "shell", + "command": "make enable_DKMS build_amd64", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Clean", + "type": "shell", + "command": "make clean", + "problemMatcher": [], + "group": { + "kind": "build", + "isDefault": true + } + } + ], + "inputs": [ + { + "id": "BuildVariant", + "description": "Wich Variant shoud be build", + "type": "promptString" + }, + { + "type": "pickString", + "id": "Distro", + "description": "Wich Distro shoud be used", + "options": [ + "Debian", + "Alpine", + "OtherTesting" + ], + "default": "Debian" + }, + ] +} \ No newline at end of file diff --git a/Makefile b/Makefile index 878c85b..54b8ab2 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,10 @@ install_buildenv: # Install packages required to build the image download_extra: #For downloading extra's for iso (not needed/tested) make -f Makefile.extra +#Current dkms drivers: Broadcom-STA +enable_DKMS: #Add customizations to enable dkms drivers + cp -r config_DKMS/* config + #Add 'download_extra' to build without third party software/dotfiles (not needed/tested) build: prep_buildenv install_buildenv build_amd64 build_i386 clean_env #Runs build for all architectures @@ -37,6 +41,8 @@ clean_env: #Clear all caches and archives sudo TargetArch=amd64 lb clean --all sudo TargetArch=i386 lb clean --all make -f Makefile.extra clean + rm -f config/hooks/normal/0899-install-dkms-drivers.chroot clean_iso: #Removes genereated iso's rm -f Custom-image-amd64.iso Custom-image-i386.iso + diff --git a/auto/config b/auto/config index 327bc45..5e1403d 100755 --- a/auto/config +++ b/auto/config @@ -2,8 +2,6 @@ # live-build configuration script # see 'man lb config' -#Add "linux-headers" to linux-packages when using nvidia driver - lb config noauto \ --apt-recommends false \ --apt-indices false \ diff --git a/config/package-lists/system.list.chroot b/config/package-lists/system.list.chroot index 9a8b77c..7613d63 100644 --- a/config/package-lists/system.list.chroot +++ b/config/package-lists/system.list.chroot @@ -106,19 +106,6 @@ xserver-xorg-video-intel xfonts-base hwdata -#Section nvidiaDriver -#nvidia-driver -##if ARCHITECTURES amd64 -#linux-headers-amd64 -##endif -##if ARCHITECTURES i386 -#linux-headers-686:i386 -##endif -#module-assistant -#dkms -#build-essential - - #Section: Kernel/boot/init systemd #os-prober @@ -130,6 +117,8 @@ libpam-systemd #Section: Firmwares firmware-linux-free firmware-linux-nonfree +firmware-b43-installer +firmware-b43legacy-installer amd64-microcode intel-microcode diff --git a/config_DKMS/hooks/normal/0899-install-dkms-drivers.chroot b/config_DKMS/hooks/normal/0899-install-dkms-drivers.chroot new file mode 100755 index 0000000..b15b535 --- /dev/null +++ b/config_DKMS/hooks/normal/0899-install-dkms-drivers.chroot @@ -0,0 +1,23 @@ +#!/bin/sh +#!/bin/sh +echo "I: running $0" + +#Install Kernel headers +if [ -f "/usr/bin/x86_64" ] ; then + apt install linux-headers-amd64 -y +else + apt install linux-headers-686-pae:i386 -y +fi +#Install General dkms support +apt install -y dkms + +#Install Broadcom sta Dkms Driver +apt install -y broadcom-sta-dkms + +#Note for potential NvidiaDriver packages +#nvidia-driver +#module-assistant +#build-essential + +#Cleanup unnecessary build tools after install +apt purge -y linux-headers* linux-kbuild* linux-compiler-gcc-10-x86 \ No newline at end of file