t2linux / wiki

Repository for the t2linux.org wiki
https://wiki.t2linux.org
Creative Commons Attribution Share Alike 4.0 International
166 stars 60 forks source link

Firmware: Add multiple other options to move firmware to Linux #533

Closed AdityaGarg8 closed 1 month ago

AdityaGarg8 commented 1 month ago

@soopyc , any chance the changes in this PR can be useful for nixOS?

AdityaGarg8 commented 1 month ago

This PR adds 2 new options:

  1. Adds ability to rename firmware using python on macOS.
  2. Adds ability to create distribution packages (currently deb has been added only).

I don't know how to make rpm packages, would need @sharpenedblade 's help

soopyc commented 1 month ago

On 5/12/24 02:00, Aditya Garg wrote:

@soopyc , any chance the changes in this PR can be useful for nixOS?

Option 2 looks great for use in exotic distros, though I've yet to test. Should still work though. Thanks!

-- Best regards, Cassie Cheung (she/they)

AdityaGarg8 commented 1 month ago

Latest commit adds Arch package as well. @NoaHimesaka1873 @Redecorating , can you test the Arch bit whenever you get time?

AdityaGarg8 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

AdityaGarg8 commented 1 month ago

I just remembered, the wiki will also have to be updated:(

NoaHimesaka1873 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

AdityaGarg8 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

AdityaGarg8 commented 1 month ago

Updated the Wi-Fi guide as well

AdityaGarg8 commented 1 month ago

https://adityagarg8.github.io/wiki/guides/wifi-bluetooth/

For a preview

sharpenedblade commented 1 month ago

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

If its not there on arch I would prefer that its also removed from the rpm package since it doesnt really belong there and telling users to reboot isnt that bad.

AdityaGarg8 commented 1 month ago

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

If its not there on arch I would prefer that its also removed from the rpm package since it doesnt really belong there and telling users to reboot isnt that bad.

When I tried installing on a Live EOS ISO, it was trying to remake the initramfs inspite of not specifying it. But since the live CD doesn't have a vmlinuz in /boot, it was failing. So I thought on a real installation, Pacman maybe smart enough to reprobe the driver. I don't think there is anything wrong in simply running a modprobe -r brcmfmac after installing firmware. Why force a user to reboot when there is a simpler way. I guess we should try not to complicate things for users just for sake of standardization or it works but doesn't belong here.

AdityaGarg8 commented 1 month ago

Looks fine apart from the headings.

Fixed

sharpenedblade commented 1 month ago

When I tried installing on a Live EOS ISO, it was trying to remake the initramfs inspite of not specifying it. But since the live CD doesn't have a vmlinuz in /boot, it was failing. So I thought on a real installation, Pacman maybe smart enough to reprobe the driver. I don't think there is anything wrong in simply running a modprobe -r brcmfmac after installing firmware. Why force a user to reboot when there is a simpler way. I guess we should try not to complicate things for users just for sake of standardization or it works but doesn't belong here.

AFAIK modprobe doesnt call any package manager stuff and just tells the kernel to load a module, but I guess its fine to leave it in, just add a note to the arch/eos section to reboot.

AdityaGarg8 commented 1 month ago

When I tried installing on a Live EOS ISO, it was trying to remake the initramfs inspite of not specifying it. But since the live CD doesn't have a vmlinuz in /boot, it was failing. So I thought on a real installation, Pacman maybe smart enough to reprobe the driver. I don't think there is anything wrong in simply running a modprobe -r brcmfmac after installing firmware. Why force a user to reboot when there is a simpler way. I guess we should try not to complicate things for users just for sake of standardization or it works but doesn't belong here.

AFAIK modprobe doesnt call any package manager stuff and just tells the kernel to load a module, but I guess its fine to leave it in, just add a note to the arch/eos section to reboot.

I guess PKGBUILD has a post_install section as well. I'll probably add it later. Will also have to test on an Arch installation.

NoaHimesaka1873 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

AdityaGarg8 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

Is it reloading the driver automatically?

NoaHimesaka1873 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

Is it reloading the driver automatically?

No. For that you have to create apple-firmware.install, put post_install() function there, and add install=apple-firmware.install to PKGBUILD. Reference: https://wiki.archlinux.org/title/PKGBUILD#install

AdityaGarg8 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

Is it reloading the driver automatically?

No. For that you have to create apple-firmware.install, put post_install() function there, and add install=apple-firmware.install to PKGBUILD. Reference: https://wiki.archlinux.org/title/PKGBUILD#install

Should apple-firmware.install be in the same directory as PKGBUILD?

NoaHimesaka1873 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

Is it reloading the driver automatically?

No. For that you have to create apple-firmware.install, put post_install() function there, and add install=apple-firmware.install to PKGBUILD. Reference: https://wiki.archlinux.org/title/PKGBUILD#install

Should apple-firmware.install be in the same directory as PKGBUILD?

Yes.

AdityaGarg8 commented 1 month ago

Can you test now @NoaHimesaka1873 . I've pushed a change.

AdityaGarg8 commented 1 month ago

Can you test now @NoaHimesaka1873 . I've pushed a change.

It's regarding automatic reloading of driver btw

AdityaGarg8 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

Is it reloading the driver automatically?

No. For that you have to create apple-firmware.install, put post_install() function there, and add install=apple-firmware.install to PKGBUILD. Reference: https://wiki.archlinux.org/title/PKGBUILD#install

The latest commit (https://github.com/t2linux/wiki/pull/533/commits/4037f5e77a2367289944da7ccf96f3e2beb6bb05) seems to be reloading the driver on atleast EOS live environment on a VM. I would be nice if I could get a feed back from a bare metal installation.

AdityaGarg8 commented 1 month ago

@soopyc , do you want to make changes to the nixOS guide alongwith this PR? I've noticed something regarding wifi over there.

soopyc commented 1 month ago

On 5/23/24 18:14, Aditya Garg wrote:

@soopyc , do you want to make changes to the nixOS guide alongwith this PR? I've noticed something regarding wifi over their.

Sure, I'll work on that now. -- Best regards, Cassie Cheung (she/they)

AdityaGarg8 commented 1 month ago

A final request for review before we can merge this. IMO its complete now.

The code looks good to me. Lets wait for @Redecorating or @NoaHimesaka1873 to look at the arch code.

@sharpenedblade @AdityaGarg8 Will test this in Wednesday when I have free time.

Thanks. Also, I'm not really sure whether modprobe -r brcmfmac && modprobe brcmfmac is needed on Arch as a post install script. I haven't added them yet for now.

@AdityaGarg8 It works. LGTM

Is it reloading the driver automatically?

No. For that you have to create apple-firmware.install, put post_install() function there, and add install=apple-firmware.install to PKGBUILD. Reference: https://wiki.archlinux.org/title/PKGBUILD#install

The latest commit (4037f5e) seems to be reloading the driver on atleast EOS live environment on a VM. I would be nice if I could get a feed back from a bare metal installation.

Tested on a EOS installation, it works

AdityaGarg8 commented 1 month ago

Alright I am merging this, @soopyc you can open a new PR for nixos. If you want to add support in some way to the script, you can do that as well.