Skip to content

Add ALS calibration extractor#406

Merged
jannau merged 3 commits intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:pyroxene
Mar 2, 2026
Merged

Add ALS calibration extractor#406
jannau merged 3 commits intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:pyroxene

Conversation

@WhatAmISupposedToPutHere
Copy link
Copy Markdown
Member

Extract ALS calibration, and add an ability to rebuild vendorfw for old installs

Comment thread src/util.py
Comment thread asahi_firmware/als.py
except:
log.warning("Unable to find ambient light sensor calibration data")
return
filename = "apple/aop-als-cal.bin"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for my development setup it would be helpful to make the calibration data machine specific. I use an generic initrd with appended kernel modules and a generic vendor firmware cpio. Not sure what would be a good solution for this except retroactively convincing Apple to let iboot insert the calibration data into the ADT.
I might rethink my setup because it's already got annoying when we started to put only the machine specific firmwares into vendorfw.

Apart from that I still see a limited value in making the calibration data machine specific just to make it harder to accidentally use the wrong calibration data and then to complain about bad experience. (not sure how dependent the results are on the calibration data). I'll can take care of the code changes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was unable to find an aop key for the serial number of the sensor on the redbird sensors. so, not sure how to match it from the driver there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with AsahiLinux/m1n1#548 I have now an alternate way to handle device specific firmware and calibration data

Comment thread src/stub.py
Comment thread src/main.py
Comment thread src/stub.py Outdated
fdcopy is used by more things than just the rootfs image

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
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