Photon OS

 View Only
  • 1.  How to install and configure Wi-Fi drivers in Photon OS

    Posted Oct 11, 2022 03:46 PM

    This is to post how to setup drivers properly for Photon OS for Wireless usage



  • 2.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Posted Oct 11, 2022 03:48 PM

    Here is an example for installing fimware/drivers for Intel wireless network adapters:

    ##Install packages needed for Wifi make process
    #Reference https://communities.vmware.com/t5/Photon-OS-Discussions/Photon-4R1-how-to-passthrough-usb/td-p/2875454
    tdnf distro-sync -y
    tdnf install -y dkms build-essential git linux-api-headers linux-devel usbutils pciutils wpa_supplicant linux-firmware
    tdnf update -y

     

    ##Download and install Intel Firmware/Driver
    cd /tmp
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git --depth 1
    cd linux-firmware
    #sudo wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/iwlwifi-7265D-29.ucode
    sudo cp iwlwifi-* /lib/firmware/

     

    ##Enable Wifi Services
    systemctl enable wpa_supplicant@wlan0.service

     

    ##reboot
    reboot



    ##Validate drivers are loaded at boot
    dmesg | grep iwlwifi


    ##Check Driver status
    lsmod | grep iwlwifi



  • 3.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Posted Oct 13, 2022 01:02 PM

    Hi  ,

    Any advice for module signing for secure boot?

    Actually I'm trying to make work the Realtek wifi drivers on Photon OS unfortunately without success.

    From https://github.com/lwfinger/rtw89 the recipe there is quite comprehensive, however the installation of mokutil fails. Tried some cross linux distros e.g. https://rpmfind.net/linux/fedora/linux/updates/36/Everything/x86_64/Packages/m/mokutil-0.6.0-3.fc36.x86_64.rpm as well.

     



  • 4.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Posted Oct 13, 2022 02:15 PM

    Hey ,

    Unfortunately I have not had a business reason to use secure boot for PhotonOS yet, so I have not run across this. This would be another great thing to request VMware to make some documentation on for us. They are going to make some documentation for how to install drivers. This would be a good thing for them to add too I would think. Create a feature request for this and tag this posting in it. Feature requests are found here: https://github.com/vmware/photon/issues

    Reach out to Mike Roy to talk about adding this to Photon OS documentation too might help.



  • 5.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Posted Oct 13, 2022 09:11 PM

    Ah, spotted your initiative there for additional docs chapters. Let's see which docs progress is doable. Mike Roy and the team there work hard to maintain the open-source version of Photon OS, too.

    btw - progress classification :

    Create a feature/issue ticket = 15 minutes++
    Often I consider myself here. It's easy to open a feature/issue ticket. Fire'n'Forget  - because the community solves it. Works in a bustling and very rich rich community - users get business-like help for free.

    Create a workaround = 15 hours++
    After having being trained on how to write package installer scripts, writing an automation recipe minor than a thousand code lines is a nobrainer and solves the urgent issue. Glad when it works - and it encourages others to share their code snippets with the community, too.
    But guess what, here's the gap (!) because an automation recipe is not a Github pull request.

    Create a pull request = 15 days++
    Imho pretested SPECS packages in the future for (shim) drivers, AI model libraries, inferencing tools, etc. is the Achilles' area. Pretesting the content through reproducible test case automation and successful iso build automation often is critical business time.

    These are the numbers. Shrink the payload.



  • 6.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Broadcom Employee
    Posted Oct 20, 2022 10:43 PM

    Hi , Photon OS shim does not support MOK as there was no such request. We can consider adding it to Photon OS 5.0.

    Current solution is to add custom certificate in DER format to VM's UEFI DB:

    uefi.secureBoot.dbDefault.file0 = "custom-cert.der"



  • 7.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Posted Oct 21, 2022 12:48 AM

     woot, woot! heads up, these are awesome news! Will there be a participation possibility for the Photon OS 5.0 beta ? 

    After 6.5 with vSphere 7.0 there were some culprits.

    Not easy one, cross cloud from ground up over x86_64, arm64, AWS, GCE, Azure, ... Definitely worth to carefully check all combinations, let's do it ... and contribute by writing pull requests. Really wonder with which Linux kernel. Still can't believe it, folks, 5.0 !!



  • 8.  RE: How to install and configure Wi-Fi drivers in Photon OS

    Posted Jan 30, 2023 01:28 PM

    In ESXi, adding a PCI device to a vm makes e.g. a PCIe Wireless Ethernet Adapter available to the vm operating system.

    Here an additional short recipe for how to configure a Realtek wireless network adapter in Photon OS.

    1. Install the prerequisites to install additional drivers. With Photon OS 5.0, more drivers will be built-in included.
    tdnf install usbutils pciutils wpa_supplicant git make build-essential linux-api-headers linux-devel linux-firmware dkms
    
    #realtek 8852
    git clone https://github.com/lwfinger/rtw89.git
    cd ./rtw89
    make
    make install
    modprobe -v rtw_8852ae
    lsmod | grep 8852
    
    # realtek8821
    cd ../
    git clone https://github.com/tomaspinho/rtl8821ce
    cd ./rtl8821ce
    ./dkms-install.sh
    lsmod | grep 8821

    2. Enable wpa_supplicant and configure the wifi network scan settings (wlan0)

    systemctl enable wpa_supplicant@wlan0.service
    wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
    
    wpa_cli
    > add_network 0
    > set_network 0 ssid "MYSSID"
    > set_network 0 psk "passphrase"
    > enable_network 0
    > save_config
    > quit
    3. Configure the wifi network ip settings e.g. for dhcp
    cd /etc/systemd/network/
    cp 99-dhcp-en.network 98-dhcp-wl.network
    chmod 644 98-dhcp-wl.network
    sed "s/Name=e/Name=wlan/" 99-dhcp-en.network > 98-dhcp-wl.network
    systemctl restart systemd-networkd
    
    networkctl status wlan0