Mac Mini with T2 chip
-
@Sebastian-Roth said in Mac Mini with T2 chip:
Please try increasing the kernel log level (web UI -> FOG Configuration -> FOG Settings -> FOG Boot Settings -> KERNEL LOGLEVEL) to see if you get any further messages on screen that way.
FWIW: He’ll have to change this in the grub.cfg file on the USB drive. There is a log level entry. I think the default was 4, for more debugging it should be changed to 7
-
I compiled the linux 5.6.4 kernel against the FOS Linux settings for 4.19.65 (FOG 1.5.7 base). I added in support for USB-C and Thunderbolt. The unpatched kernel is here: https://drive.google.com/open?id=1CAxobMHal1XZt57QqKz7x_LtxhaQFRNE
I added in the patches from the github site below and recompiled the kernel. I discovered that the patched code was not added into the kernel. By doing some reverse engineering I found that the patched code was only added in when device drivers->hw mon was included in the config. Once hwmon was enabled then I enabled apple hwmon support and recompiled. The patched 5.4.6 kernel is here as bzImageT2 https://drive.google.com/open?id=10j8fZ3i3Y_uICxcMgX5lpiuQ2ci9bCJG I have no way of testing this with a mac since I don’t own one. I have a low confidence that it will work, but according to the articles below it should work. To test rename bzImage on the usb flash drive and then copy the bzImageT2 to the flash drive as bzImage (watch your case). If this works I’ll upload the current kernel config used to build this image.
-
@george1421 Yes. Secure boot is disabled (Mac won’t allow to boot to external device if it’s enable). I tried the new kernel and it gets a bit further. Kernel log level has been set to 7. Where does the log write to? I can’t seem to find it anywhere.
I noticed there are more errors before it gets to USB fog menu (wrong efi file?)
Video: https://s.amsu.ng/JWcj5VGc5USN@Sebastian-Roth When the screen goes to power saving mode, machine is still on. It does not response to mouse or keyboard.
-
@TaTa The “log” is just output on the screen. Nothing written to a file.
Seems like you took some kind of slow motion video to grab the further output seen on the screen. Great idea. Though the picture is not clear enough to read anything. Can you please do the same thing again but this time rest the camera/phone on a pile of books in front of the screen and pay attention to it being focused on the text on screen.
When the screen goes to power saving mode, machine is still on. It does not response to mouse or keyboard.
So it’s not just a screen resolution/graphics card issue?! What you say doesn’t respond to mouse or keyboard… does this mean you cannot toggle NUM or CAPS lock? Any chance you can hook up the network card to an old hub or modern switch using a port mirror to capture all the network traffic?
-
@Sebastian-Roth Apparently, it does not like usb-c to vga adapter. I connected to another monitor through DVI and saw a lot more. I went to a place where it’s trying to connect to fog server x.x.x/fog//index.php but failed to get an IP from DHCP through enp1s0 interface. I noticed it uses Atheros driver (00:13s) instead of Aquantia AQtion (Ethernet maker for this mini Mac).
My apologize for the out of focus and shaky hands. You might need to download it to be able to read the text.
https://s.amsu.ng/f8cHjL2HeJON (fixed) -
@TaTa said in Mac Mini with T2 chip:
Apparently, it does not like usb-c to vga adapter
I did not enable this feature in the 5.3.4 kernel I built. I also did not add the kernel patches for the mouse and keyboard because they should have been included in the 5.3.x series of linux kernels. I can enable both and recompile the T2 kernel if needed.
Just to be clear you are testing with the kernel I built (bzImageT2) with your current testing. I want to make sure we are talking about the same thing with your testing.
Lastly your link to the latest video is damaged and can’t be viewed.
-
I used USB-c ethernet cable instead and it went to uploading image screen. It’s currently uploading now. I will let you know how it goes.
-
@TaTa I have a new T2 kernel (bzImageT2b) where I enabled the apple usb display and a few other usb attached display adapters, plus I applied the patch for the apple HID devices.
https://drive.google.com/open?id=12St-Wix1io0s0oXhgxAuLlQOVoT9548LBTW: 9.5GB/m is doing pretty good after 30 seconds. It would be interesting to know what the rate settles to after 3 minutes.
-
@george1421 Thank you. I will try it out once i’m done testing this.
It’s at 71% now and still going strong. Uploading speed is 6.66GB/min. -
@george1421 Uploaded successfully but getting the error below. I’m downloading it now and will report back.
-
@george1421 Downloaded successfully but with error below. Rebooted the machine and tested both Mac OS and BootCamp partitions. Everything’s working fine. Thanks a million @george1421 & @Sebastian-Roth
I tried T2b kernel. USB-C to vga adapter still does not work (screen went power saving). Built-in ethernet are not able to get an IP from DHCP.
-
@TaTa said:
Failed to read back partitions (runPartprobe) Args Passed: /dev/nvme0n
As far as I know this issue should be fixed in the latest inits already. From what I see in the pictures (partclone v0.2.89, ramdisk_size=127000) you seem to use an older version of the init files.
Please download the latest inits (64 bit, 32 bit) and make sure you update your grub.conf file to use
ramdisk_size=275000
!! -
@Sebastian-Roth The init’s kind of indicate the fix wasn’t in for those files. Notice the Parclone version is still 0.2.89
-
@TaTa said in Mac Mini with T2 chip:
Built-in ethernet are not able to get an IP from DHCP.
Do you want to work on this error? We can probably fix it.
Secondly I just want to confirm that 5.3.4 linux kernel with the T2 patches worked and imaged the computer correctly through the T2 chip? I’ll need to write up what I changed for the developers so they can look at adding it to a future release of FOG.
-
@george1421 Yes. I want to be able to use built-in ethernet card (and usb-c to vga adapter if possible).
Yes. 5.3.4 with T2 paches worked through HDMI and I was able to upload/download image correctly. -
@TaTa OK for both lets see if we can get the hardware IDs of both of them.
From the USB stick make sure option #6 (debug) uses the new 5.3.4 kernel. Then usb boot using option 6. After several screens of text you need to clear with the enter key. Eventually you will be dropped to a FOS linux command (just a note, if the system will boot with the usb video adapter installed, install it before you boot into option #6). Once at the linux command prompt key in the following
lspci -nn | grep -i net
Take a clear picture of the output the closer the better. I need the values that look like this [8086:15cd] (totally made up number). But I need the hex values in the squared brackets with the description. The next one is going to be a bit of hunt and pecking to find the right numbers for the usb interlaces. I don’t think that the FOS Linux command gives us as much detail as on a conventional linux distribution.lsusb
from there I need to get the hardware numbers of the video adapter.Now your MAC OS may provide a better and quicker way to get the hardware ID than booting through FOS linux. The numbers will be constructed similarly. So you might try OSX first. In windows these values are avaialble via the device manager in the form of “vend_id=8086;device_id=15cd”
Once I have the device ids I can then start tracking back the drivers needed for them.
Oh one last feedback on the T2b kernel, did the keyboard and mouse work on this one vs just the T2 patches? I just wanted to know the effectiveness of the HID patch.
-
Keyboard and mouse works on both T2 and T2b.
-
@TaTa Ah that is a 10G adapter. The last time I looked not all of the 10G adapters were enabled in FOS Linux
So for the network adapter I need Aquantia AQtion [1D6A:07B1]
For the video
05AC:1461 05ac Apple, Inc.Off to search now
-
@TaTa For the network adapter, that driver has been in the linux kernel since 4.12. It is still in the current release and is enabled in the FOS Linux kernel. For the next steps I will need you to boot into debug mode on the usb stick and run a few commands.
ip addr show
Confirm that the network adapter doesn’t an ip address. Post the output here so I can see what it looks like, wait 30 seconds after booting then key in
/sbin/udhcpc -i $iface --now
Now you will need to replace the variiable$iface
with the kernel name of the network adapter. This kernel name will come from theip addr show
command.
again run the ip address show to see if time fixes the issue.
ip addr show
for the video, I’ll need you to run the
lsusb
command to see if the kernel sees the driver with the USB ID 05AC:1461 -
Patch linux kernel 5.4.6 (disregard my references to other series 5.x.x kernels in previous posts. I used and compiled against 5.4.6 and not what I thought I was building against 5.4.3 or what ever I said).
I started with the 5.4.6 base kernel and applied the FOG configurations from FOS Linux 1.5.7 config file. I enabled thunerbolt and usb type-c drivers in the code, plus a bunch of other things I can’t remember at the moment.
The config file used to build the bzImageT2b is here:
Config.T2Chip.txtThe diff from the 1.5.7 kernel loaded into the 5.4.6 kernel config space vs the bzImageT2b config file above is here:
apple_T2_diff.patch.txtBasically these are the changes made from FOS Linux 1.5.7 after they were loaded into the 5.4.6 kernel builder tool and the changes I made enabling what I thought this apple hardware needed.
Here are the T2 kernel patches that were supplied via the github link https://github.com/MCMrARM/mbp2018-etc/tree/master/applesmc These patches must be applied to the linux 5.4.6 kernel in numeric order.
0001-applesmc-convert-static-structures-to-drvdata.patch.txt
0002-applesmc-make-io-port-base-addr-dynamic.patch.txt
0003-applesmc-switch-to-acpi_device-from-platform.patch.txt
0004-applesmc-key-interface-wrappers.patch.txt
0005-applesmc-basic-mmio-interface-implementation.patch.txt
0006-applesmc-fan-support-on-T2-Macs.patch.txt