LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   Slackware ARM VM's on Apple M1 Macs? (https://www.linuxquestions.org/questions/slackware-arm-108/slackware-arm-vms-on-apple-m1-macs-4175694106/)

eduardr 04-22-2021 12:16 PM

Slackware ARM VM's on Apple M1 Macs?
 
Parallels Desktop 16.5 on Apple M1 (ARM) Macs currently supports:

Quote:

"Linux distributives Ubuntu 20.04, Kali Linux 2021.1, Debian 10.7 and Fedora Workstation 33-1.2"
https://www.parallels.com/blogs/parallels-desktop-m1/

VMWare Fusion should be announcing support for M1 Macs "any day now" and will almost certainly support Linux as well.

Curious if anyone knows or has a guess whether Slackware ARM 32-bit or upcoming aarch64 is likely to run in VM's under these virtual environments on M1 Macs. It's been fun running Slackware ARM on Raspberry Pi's but would be nice to be able to run Slackware ARM on higher performance hardware.

mralk3 04-22-2021 01:43 PM

My only experience with ARM on virtualization is Qemu. Qemu emulates Virtual Express ARM Ltd (vexpress-a9) and runs extremely slow. It took nearly 10 minutes to boot the virtual machine last night. I do not recommened Qemu as an option. I haven't tried anything like that with Aarch64 and likely will not in the future. LXC seems like the better choice. Here is the documentation I wrote on the topic.

https://docs.slackware.com/howtos:ha..._slackware_arm

eduardr 04-22-2021 02:38 PM

@mralk3 thanks - no surprise that emulating ARM under x86 might be slow.

But ARM VM's under an ARM machine (Linux ARM under Mac ARM) would run with excellent performance. I haven't tried ARM Linux under an ARM M1 Mac yet but expect it would run very well.

mralk3 04-22-2021 02:57 PM

Quote:

Originally Posted by eduardr (Post 6243893)
@mralk3 thanks - no surprise that emulating ARM under x86 might be slow.

But ARM VM's under an ARM machine (Linux ARM under Mac ARM) would run with excellent performance. I haven't tried ARM Linux under an ARM M1 Mac yet but expect it would run very well.

Let me know what you find out. Hopefully someone else has more experience and can provide you with a better answer.

tramtrist 02-27-2022 11:07 AM

I've been watching this communities activity for a few months. It's getting really promising with GPU acceleration on the way. I may buy a 2022 Macbook Air to get Slackware working on it.
https://asahilinux.org/

jloco 05-09-2023 12:57 PM

vmware fusion/aarch64
 
I recently have successfully gotten the aarch64 port running on VMWare Fusion. Unfortunately, the stock slackware kernel does not support virtualization it seems. Likely missing the needed modules within the kernel. I've taken the config from Debian bookworm (which boots and runs nicely) and built a special kernel for this with it. I'm unsure exactly how many modules are needed for slackware to officially support vmware currently, as there are large differences in the two configs. But basically I have a slackware-built replica of the current Debian kernel which boots it (along with grub).

What I'm curious of is if anyone would have interest in a vmware image of the aarch64 port, kernel configs, packages or anything else? I do not know if it will run on UTM (I will test this eventually) or parallels. I'm sure at least UTM is possible, as it's just qemu underneath, but I'm not buying commercial virtualization software (parallels) when there's quality, free options available and I can already run slackware natively on the M1. Running it in a vm is just a convenience thing.

I'd hate for the information to go to waste, or be forgotten about by me. So if anyone is interested in virtualizing slackware on MacOS (or even wants some info on slackware-asahi), please let me know. I don't have a lot of time to set aside to write documentation, make images, packages, etc, if there is no interest out of any Slackware/Mac users out there (I'm not the only one am I?).

I'd like to at least get the correct modules into slackware's config so this is possible in the future, but any extra stuff, that is all based on community interest if it's worth going that far. I'll post again with some configs/diffs after I sort it out.

drmozes 05-10-2023 03:27 AM

Quote:

Originally Posted by jloco (Post 6429856)
I recently have successfully gotten the aarch64 port running on VMWare Fusion. Unfortunately, the stock slackware kernel does not support virtualization it seems. Likely missing the needed modules within the kernel.

Code:

CONFIG_VIRTUALIZATION=y
and various other KVM options are set already. What else is required?

I can put them into the next Kernel package. I wonder if you will need them within the OS InitRD as well. If it does I guess it'd be drivers for storage and perhaps an RTC.

eduardr 05-10-2023 05:25 AM

That's great you were able to get it running. I'd certainly like to be able to run a Slackware ARM VM sometime (for now running a Debian VM in UTM). If you figure out which kernel modules in particular are required, might be possible to use the stock Slackware kernel while adding those modules to the initrd, assuming those modules are present in the Slackware /lib/modules.

jloco 05-10-2023 09:10 PM

Quote:

Originally Posted by drmozes (Post 6429977)
Code:

CONFIG_VIRTUALIZATION=y
and various other KVM options are set already. What else is required?

Here's a 'lsmod' of the Debian kernel running on Slackware. This one is 6.1.20, the latest they are shipping is 6.1.25.

Code:

Module                  Size  Used by
cfg80211              782336  0
8021q                  32768  0
garp                  20480  1 8021q
mrp                    20480  1 8021q
stp                    16384  1 garp
llc                    16384  2 stp,garp
rfkill                36864  1 cfg80211
efivarfs              20480  1
snd_hda_codec_generic    77824  1
aes_ce_blk            32768  0
ledtrig_audio          16384  1 snd_hda_codec_generic
aes_ce_cipher          16384  1 aes_ce_blk
polyval_ce            16384  0
polyval_generic        16384  1 polyval_ce
ghash_ce              20480  0
gf128mul              16384  2 polyval_generic,ghash_ce
sha3_ce                16384  0
sha3_generic          16384  1 sha3_ce
sha512_ce              16384  0
sha512_arm64          20480  1 sha512_ce
snd_hda_intel          45056  0
sha2_ce                16384  0
snd_intel_dspcfg      20480  1 snd_hda_intel
snd_hda_codec        126976  2 snd_hda_codec_generic,snd_hda_intel
sha256_arm64          24576  1 sha2_ce
evdev                  28672  7
joydev                32768  0
snd_hda_core          86016  3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec
snd_hwdep              20480  1 snd_hda_codec
sha1_ce                16384  0
snd_pcm              114688  3 snd_hda_intel,snd_hda_codec,snd_hda_core
efi_pstore            16384  0
snd_timer              40960  1 snd_pcm
snd                    98304  6 snd_hda_codec_generic,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore              16384  1 snd
loop                  36864  0
ext4                  765952  1
crc16                  16384  1 ext4
mbcache                20480  1 ext4
jbd2                  139264  1 ext4
crc32c_generic        16384  2
hid_generic            16384  0
usbhid                57344  0
hid                  135168  2 usbhid,hid_generic
sr_mod                28672  0
cdrom                  61440  1 sr_mod
nvme                  45056  1
nvme_core            114688  2 nvme
t10_pi                16384  1 nvme_core
ahci                  49152  0
libahci                40960  1 ahci
vmwgfx                339968  1
libata                299008  2 libahci,ahci
crc64_rocksoft        20480  1 t10_pi
drm_ttm_helper        16384  1 vmwgfx
crc64                  20480  1 crc64_rocksoft
ttm                    69632  2 vmwgfx,drm_ttm_helper
crc_t10dif            20480  1 t10_pi
scsi_mod              229376  2 libata,sr_mod
drm_kms_helper        139264  1 vmwgfx
scsi_common            16384  3 scsi_mod,libata,sr_mod
drm                  442368  5 vmwgfx,drm_kms_helper,drm_ttm_helper,ttm
e1000e                266240  0
xhci_pci              24576  0
crct10dif_generic      16384  0
xhci_hcd              258048  1 xhci_pci
ehci_pci              20480  0
ehci_hcd              90112  1 ehci_pci
crct10dif_ce          16384  1
crct10dif_common      16384  3 crct10dif_ce,crct10dif_generic,crc_t10dif
usbcore              266240  5 xhci_hcd,ehci_pci,usbhid,ehci_hcd,xhci_pci
ptp                    32768  1 e1000e
pps_core              24576  1 ptp
usb_common            16384  3 xhci_hcd,usbcore,ehci_hcd

Here's a link to the file: https://slackware.lngn.net/pub/lsmod...-debkern-armv8

TBH, I'm not sure which module(s) it is that makes the difference. In the URL above, the dir also has 2 slackware packages of the Debian kernel and modules for use/testing. I haven't used them on real hardware yet, it's been an awfully long day of yard work. The only oddity I've noticed is tty1 likes to randomly press Enter while attempting to input a password. Using another tty and it's fine.

I'm willing to test changes made to the official kernel package, whenever we narrow down whats missing. I'll make attempts to poke at this next week, as my free time is officially over for this one.

drmozes 05-11-2023 03:02 AM

Compared to Slackware AArch64 running on a RockPro64, only the modules below aren't modules in Slackware AArch64.

Some of them such as crc16 and a number of others I checked are compiled into the Slackware Kernel, and others such as snd and e1000 have no relevance to the Kernel booting.


Code:

crc16
crc32c_generic
crc_t10dif
crct10dif_common
crct10dif_generic
drm_ttm_helper
e1000e
efi_pstore
efivarfs
evdev
hid_generic
joydev
ledtrig_audio
libata
loop
pps_core
ptp
scsi_common
scsi_mod
sha3_ce
sha3_generic
sha512_arm64
sha512_ce
snd_hda_codec
snd_hda_codec_generic
snd_hda_core
snd_hda_intel
snd_hwdep
snd_intel_dspcfg
ttm
usb_common
vmwgfx


drmozes 05-11-2023 05:11 AM

Once you figure out which Kernel modules are required, you'll need to make a module loader plugin for the OS InitRD.
You should also look at /proc/cmdline to see if there are any particular Kernel paramaters which might be required (apart from the obvious ones like root= and stuff like that)

See the first post in this thread for this.
Once you've got this started I can bundle it into the Kernel package to make it easier going forwards.

jloco 05-11-2023 07:13 AM

I'll dig into it once my work week-end is over. I need to setup a build of modules on the same version kernel so i can "drag & drop" ones I think are hopeful, until I find what works.

Side note: sound starts properly on runlevel 4 with the debian kernel, so hopefully I'll be able to figure that out as well.

jloco 05-24-2023 12:24 PM

I feel like I'm a dog chasing my tail with this, but after tampering with things for a while I've got os-initrd-mgr to make me a new initrd with modules from my installed debian kernel, but for some reason it don't find my rootdev, which should be passed to it from grub by UUID. I've looked through the scripts inside the initrd slightly but can't see any reason why it won't find my root. Manually mounting it from the emergency shell works and boot finishes so at least it works.

Here's a broader set of modules that it loads into the initrd:
Code:

snd_seq_dummy
snd_seq
snd_seq_device
fuse
cfg80211
8021q
garp
mrp
stp
llc
rfkill
nls_ascii
nls_cp437
vfat
fat
aes_ce_blk
aes_ce_cipher
polyval_ce
polyval_generic
snd_hda_codec_generic
ghash_ce
gf128mul
ledtrig_audio
sha3_ce
sha3_generic
sha512_ce
sha512_arm64
sha2_ce
snd_hda_intel
snd_intel_dspcfg
snd_hda_codec
snd_hda_core
snd_hwdep
joydev
sha256_arm64
snd_pcm
evdev
sha1_ce
efi_pstore
snd_timer
snd
soundcore
loop
ext4
crc16
mbcache
jbd2
crc32c_generic
hid_generic
usbhid
hid
sr_mod
cdrom
sd_mod
nvme
nvme_core
t10_pi
crc64_rocksoft
ahci
crc64
crc_t10dif
crct10dif_generic
libahci
e1000e
vmwgfx
libata
ptp
pps_core
crct10dif_ce
crct10dif_common
scsi_mod
xhci_pci
drm_ttm_helper
ehci_pci
ttm
ehci_hcd
xhci_hcd
drm_kms_helper
scsi_common
drm
usbcore
usb_common

Obviously it's different since debian ships the kernel with different items built-in vs how slackware does, but I'm posting this because my efforts at building numerous kernels have all been met with various problems, I figure the universe is telling me something...

EDIT I realize it's probably not a module that prevents booting but something else, but everything that should be there appears to be, so I've got a dead end at the moment.

drmozes 05-26-2023 12:04 PM

Quote:

Originally Posted by jloco (Post 6432655)
I feel like I'm a dog chasing my tail with this, but after tampering with things for a while I've got os-initrd-mgr to make me a new initrd with modules from my installed debian kernel, but for some reason it don't find my rootdev, which should be passed to it from grub by UUID. I've looked through the scripts inside the initrd slightly but can't see any reason why it won't find my root. Manually mounting it from the emergency shell works and boot finishes so at least it works.

Is rootdev= making it to the running Kernel (cat /proc/cmdline). If you're not already, use the 'slkpbs' boot parameter for console access during the boot process.
Check the response I made on the Rock5 integration thread about finding the device driver for your storage. When I've been doing this myself, I tend to use a mixture of that script and just loading everything from within /lib/modules from the slkpbs shell and seeing what comes up.

So for example, if you booted into the slkpbs shell, exited stages 1&2 then at stage three (when the AArch64 base line set of modules has been loaded), do something like:
Code:

find /lib/modules/$(uname -r) -type f -name '*.ko.*' | while read mod; do modprobe $( basename $mod .ko.xz ) ; done
I don't know if there's a more elegant way to do that - you can probably examine one of the files in /lib/modules as well.
You might need to restrict the scope of 'find' though, incase you bring the system down (it's always possible that loading some modules will cause a Kernel panic).

leeeoooooo 12-28-2023 12:01 PM

Slackware on Apple Silicon??
 
I'm currently running Kali Linux and OpenSuSE Tumbleweed under VMware Fusion on my new M1 MacBook Air, but I really would prefer to be running Slackware!
I'm dual-booting my OG white polycarbonate MacBook from 2006 between Mac OS X 10.6.8 "Snow Leopard" and Slackware -current.
This old MacBook is running a 32-bit-only intel CoreDuo "Yonah" CPU, and while Snow Leopard was a dandy OS back in the day, it won't support modern web browsers or much modern software at all. That's what I use Slackware for.

For several years I rocked an ASUS EeePC 2G Surf running a full install of Slackware -current. It was delightful! Linux in my jacket pocket, anywhere I wanted to go.

Asahi Linux is a project that is bringing Linux to Apple Silicon as a dual-boot install. They're starting with Fedora and will soon also offer Ubuntu, if not Debian.

I would love to be able to run Slackware on my new M1 MacBook Air, either in VMware or under Asahi's dual-boot system.

From what I've been able to find out, Slackware on Aarch64 isn't quite ready for prime time yet.

Maybe I could make do with a Raspberry Pi or something, but however I do it, I really want to be on Aarch64.


All times are GMT -5. The time now is 09:47 AM.