[Solved] Apple SuperDrive support for B2

158 views
Skip to first unread message

SB

unread,
Dec 29, 2021, 8:35:19 AM12/29/21
to Brennan Forum
Hello Apple SuperDrive owners,

I have an Apple SuperDrive, which I wanted to use it with my Brennan B2. I am pleased to share a patch to the Brennan B2 to support the Apple SuperDrive.

As others have noted, the SuperDrive does not 'just work' when plugged in. After a little research, I found that the Apple SuperDrive needs an initialisation command to be sent to it to activate the drive (thanks to Apple's SuperDrive tweak for use with Linux.md).

It was not completely trivial to get the B2 to send this command to the device, as it needs the sg_raw utility which is not currently included in the B2's Linux image. I was though able to compile a static binary on a Raspberry Pi [1] and copy it across to the B2, which I found worked.

Attached is an install-superdrive.sh script file embedding: (1) the sg_raw binary (gzipped and base64 encoded); (2) a new file /etc/mdev/mdev.sr; (3) a patch to /etc/mdev.conf. Together, these provide that when the SuperDrive is connected, it is identified, and the initialisation command for the SuperDrive is automatically run.

WARNINGS AND INSTRUCTIONS

The attached script worked on my B2 but I can't vouch for it working on yours, due to possible differences in the version of the firmware you have installed, or potentially errors in my script. If you try it, try it at your own risk.

That said, the install script is written in a way that I hope is unlikely to break anything; it backs up /etc/mdev.conf to /etc/mdev.conf.orig before proceeding; and it will abort if it finds that /etc/mdev.conf.orig or /etc/mdev/mdev.sr already exist.

To install, from a Linux or MacOS computer (or possibly a Windows computer with SSH tools), run this command, taking care to replace [your-b2-ip] with your B2's IP address as displayed on the LED panel and replace [path/to/install-superdrive.sh] with the path to wherever you saved the script:

ssh root@[your-b2-ip] sh < [path/to/install-superdrive.sh]

(You'll need to enter the password for your B2, which will be as documented unless you've changed it).

If everything works, you should see the following output:

Starting Apple SuperDrive install for Brennan B2
patching file etc/mdev.conf
(1) OK: Correctly patched /etc/mdev.conf
(2) OK: Created /etc/mdev/mdev.sr
(3) OK: Created /opt/bin/sg_raw
Finished Apple Superdrive install for Brennan B2!

After doing this, plug in your Apple SuperDrive to USB C then reboot (via the control panel, go to Settings, Maintenance, Reboot). It should now work for ripping as per any normal external USB CD drive.

I hope this helps some other Apple SuperDrive users. Any issues, please let me know.

[1] In case anyone wants to compile their own sg_raw static binary on their Raspberry Pi running Raspbian - not for the faint-hearted - these are the steps I followed:

apt source sg3-utils
apt-get build-dep sg3-utils
cd sg3-utils-1.44
./configure CFLAGS="-static"
make LDFLAGS="-all-static"

install-superdrive.sh

Michael Barber

unread,
Dec 29, 2021, 10:46:12 AM12/29/21
to Brennan Forum
To the powers to be:  Is this something that could be added to B2B software in the future?

SB

unread,
Jan 3, 2022, 9:58:22 AM1/3/22
to Brennan Forum
Please use this version of the Apple SuperDrive install script. (The previous version did not set correct permissions on the /etc/mdev/mdev.sr file.)

Installation instructions remain the same.

install-apple-superdrive-v1.0.1.sh
Reply all
Reply to author
Forward
0 new messages