* Any interest in building the Linux kernel from a MacOS host? @ 2022-09-26 7:51 Nick Desaulniers 2022-09-26 8:09 ` Sven Peter 2022-09-26 8:56 ` Masahiro Yamada 0 siblings, 2 replies; 6+ messages in thread From: Nick Desaulniers @ 2022-09-26 7:51 UTC (permalink / raw) To: torvalds, Masahiro Yamada, marcan Cc: Nick Desaulniers, llvm, Linux Kbuild mailing list, Linux Kernel Mailing List, asahi, linux-arm-kernel Not sure if this is potentially interesting to anyone but I was able to get the kernel building from MacOS my M2 Air with a small amount of effort (read: duct tape and bailing wire). If this might seem helpful to anyone's workflow, I wouldn't mind pursuing this (with some cleanup, sending a more formal patch set). Maybe this helps us bootstrap or get Linux up and running sooner on these machines? Take a look at the commit message linked below for the trials & tribulations: https://github.com/ClangBuiltLinux/linux/commit/f06333e29addbc3d714adb340355f471c1dfe95a Thanks, ~Nick Desaulniers ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Any interest in building the Linux kernel from a MacOS host? 2022-09-26 7:51 Any interest in building the Linux kernel from a MacOS host? Nick Desaulniers @ 2022-09-26 8:09 ` Sven Peter 2022-09-26 9:06 ` Martin Povišer 2022-09-26 8:56 ` Masahiro Yamada 1 sibling, 1 reply; 6+ messages in thread From: Sven Peter @ 2022-09-26 8:09 UTC (permalink / raw) To: Nick Desaulniers, Linus Torvalds, Masahiro Yamada, Hector Martin Cc: Nick Desaulniers, clang-built-linux, Linux Kbuild mailing list, Linux Kernel Mailing List, asahi, linux-arm-kernel On Mon, Sep 26, 2022, at 09:51, Nick Desaulniers wrote: > Not sure if this is potentially interesting to anyone but I was able > to get the kernel building from MacOS my M2 Air with a small amount of > effort (read: duct tape and bailing wire). I originally tried exactly that last year but I guess my duct tape wasn't quite strong enough ;) > If this might seem helpful > to anyone's workflow, I wouldn't mind pursuing this (with some > cleanup, sending a more formal patch set). Maybe this helps us > bootstrap or get Linux up and running sooner on these machines? I've been either using a Linux VM or just a bare metal system running on these machine for quite a while now to build kernels. This would've been useful when I originally started though and VMs weren't working very well yet so maybe it's still worth pursuing. > > Take a look at the commit message linked below for the trials & > tribulations: > https://github.com/ClangBuiltLinux/linux/commit/f06333e29addbc3d714adb340355f471c1dfe95a > > Thanks, > ~Nick Desaulniers Best, Sven ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Any interest in building the Linux kernel from a MacOS host? 2022-09-26 8:09 ` Sven Peter @ 2022-09-26 9:06 ` Martin Povišer 2022-09-26 11:16 ` Hector Martin 2022-09-26 11:35 ` Eric Curtin 0 siblings, 2 replies; 6+ messages in thread From: Martin Povišer @ 2022-09-26 9:06 UTC (permalink / raw) To: Sven Peter, Nick Desaulniers Cc: Linus Torvalds, Masahiro Yamada, Hector Martin, Nick Desaulniers, clang-built-linux, Linux Kbuild mailing list, Linux Kernel Mailing List, asahi, linux-arm Mailing List FWIW my current workflow includes building the kernel under macOS, so there’s some interest from me, but that will pass once the porting project progresses enough. So far I get by with some local duct tape. > On 26. 9. 2022, at 10:09, Sven Peter <sven@svenpeter.dev> wrote: > > On Mon, Sep 26, 2022, at 09:51, Nick Desaulniers wrote: (...) >> If this might seem helpful >> to anyone's workflow, I wouldn't mind pursuing this (with some >> cleanup, sending a more formal patch set). Maybe this helps us >> bootstrap or get Linux up and running sooner on these machines? > > I've been either using a Linux VM or just a bare metal system running > on these machine for quite a while now to build kernels. This would've > been useful when I originally started though and VMs weren't working very > well yet so maybe it's still worth pursuing. I really wanted to do it in a VM as a saner path, but I didn't find a satisfactory way to share the working source tree between the macOS host and Linux guest (which wouldn't slow down the build). Martin >> >> Take a look at the commit message linked below for the trials & >> tribulations: >> https://github.com/ClangBuiltLinux/linux/commit/f06333e29addbc3d714adb340355f471c1dfe95a >> >> Thanks, >> ~Nick Desaulniers > > > Best, > > > Sven > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Any interest in building the Linux kernel from a MacOS host? 2022-09-26 9:06 ` Martin Povišer @ 2022-09-26 11:16 ` Hector Martin 2022-09-26 11:35 ` Eric Curtin 1 sibling, 0 replies; 6+ messages in thread From: Hector Martin @ 2022-09-26 11:16 UTC (permalink / raw) To: Martin Povišer, Sven Peter, Nick Desaulniers Cc: Linus Torvalds, Masahiro Yamada, Nick Desaulniers, clang-built-linux, Linux Kbuild mailing list, Linux Kernel Mailing List, asahi, linux-arm Mailing List On 26/09/2022 18.06, Martin Povišer wrote: > FWIW my current workflow includes building the kernel under macOS, so > there’s some interest from me, but that will pass once the porting > project progresses enough. So far I get by with some local duct tape. > >> On 26. 9. 2022, at 10:09, Sven Peter <sven@svenpeter.dev> wrote: >> >> On Mon, Sep 26, 2022, at 09:51, Nick Desaulniers wrote: > > (...) > >>> If this might seem helpful >>> to anyone's workflow, I wouldn't mind pursuing this (with some >>> cleanup, sending a more formal patch set). Maybe this helps us >>> bootstrap or get Linux up and running sooner on these machines? >> >> I've been either using a Linux VM or just a bare metal system running >> on these machine for quite a while now to build kernels. This would've >> been useful when I originally started though and VMs weren't working very >> well yet so maybe it's still worth pursuing. > > I really wanted to do it in a VM as a saner path, but I didn't find > a satisfactory way to share the working source tree between the macOS > host and Linux guest (which wouldn't slow down the build). > > Martin Just for context: Most of our (Asahi) developers' workflow involves loading kernels over USB from another machine. That other machine can be any OS, but if it's another M1/2 running macOS you get the additional perk of USB-PD tooling to remote-force-reboot the target machine as well as get a real physical serial port. The same tooling could be ported to Linux-on-M1/2 relatively easily, but nobody has done that yet (probably because these days we have a hypervisor that gives you a superset of that functionality anyway, over standard USB, so it's not that necessary). I personally use an x86 host and a hardware contraption to provide the same hard reboot/UART functionality (for the rare case when the hypervisor borks, to avoid having to hold down power buttons). So there are certainly some people who'd benefit from using a macOS machine as a build host, either for the special USB-PD functionality or because they just like macOS as a development environment. It sounds like getting it to work isn't that hard, so perhaps it's worth upstreaming? - Hector ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Any interest in building the Linux kernel from a MacOS host? 2022-09-26 9:06 ` Martin Povišer 2022-09-26 11:16 ` Hector Martin @ 2022-09-26 11:35 ` Eric Curtin 1 sibling, 0 replies; 6+ messages in thread From: Eric Curtin @ 2022-09-26 11:35 UTC (permalink / raw) To: Martin Povišer Cc: Sven Peter, Nick Desaulniers, Linus Torvalds, Masahiro Yamada, Hector Martin, Nick Desaulniers, clang-built-linux, Linux Kbuild mailing list, Linux Kernel Mailing List, asahi, linux-arm Mailing List On Mon, 26 Sept 2022 at 10:21, Martin Povišer <povik+lin@cutebit.org> wrote: > > FWIW my current workflow includes building the kernel under macOS, so > there’s some interest from me, but that will pass once the porting > project progresses enough. So far I get by with some local duct tape. > > > On 26. 9. 2022, at 10:09, Sven Peter <sven@svenpeter.dev> wrote: > > > > On Mon, Sep 26, 2022, at 09:51, Nick Desaulniers wrote: > > (...) > > >> If this might seem helpful > >> to anyone's workflow, I wouldn't mind pursuing this (with some > >> cleanup, sending a more formal patch set). Maybe this helps us > >> bootstrap or get Linux up and running sooner on these machines? > > > > I've been either using a Linux VM or just a bare metal system running > > on these machine for quite a while now to build kernels. This would've > > been useful when I originally started though and VMs weren't working very > > well yet so maybe it's still worth pursuing. > > I really wanted to do it in a VM as a saner path, but I didn't find > a satisfactory way to share the working source tree between the macOS > host and Linux guest (which wouldn't slow down the build). My way of doing this efficiently is to create throwaway commits, in git, just to push code around to various physical or virtual machines in my house. Because git is really fast at pushing incremental changes around: https://github.com/ericcurtin/staging/blob/master/git-push.sh But if you eventually find a way to share a filesystem (which wouldn't slow down the build) between MacOS and a Linux host via qemu or something like that I'd be interested, that's most ideal of course. > > Martin > > >> > >> Take a look at the commit message linked below for the trials & > >> tribulations: > >> https://github.com/ClangBuiltLinux/linux/commit/f06333e29addbc3d714adb340355f471c1dfe95a > >> > >> Thanks, > >> ~Nick Desaulniers > > > > > > Best, > > > > > > Sven > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Any interest in building the Linux kernel from a MacOS host? 2022-09-26 7:51 Any interest in building the Linux kernel from a MacOS host? Nick Desaulniers 2022-09-26 8:09 ` Sven Peter @ 2022-09-26 8:56 ` Masahiro Yamada 1 sibling, 0 replies; 6+ messages in thread From: Masahiro Yamada @ 2022-09-26 8:56 UTC (permalink / raw) To: Nick Desaulniers Cc: Linus Torvalds, marcan, Nick Desaulniers, clang-built-linux, Linux Kbuild mailing list, Linux Kernel Mailing List, asahi, linux-arm-kernel On Mon, Sep 26, 2022 at 4:51 PM Nick Desaulniers <nick.desaulniers@gmail.com> wrote: > > Not sure if this is potentially interesting to anyone but I was able > to get the kernel building from MacOS my M2 Air with a small amount of > effort (read: duct tape and bailing wire). If this might seem helpful > to anyone's workflow, I wouldn't mind pursuing this (with some > cleanup, sending a more formal patch set). Maybe this helps us > bootstrap or get Linux up and running sooner on these machines? > > Take a look at the commit message linked below for the trials & tribulations: > https://github.com/ClangBuiltLinux/linux/commit/f06333e29addbc3d714adb340355f471c1dfe95a > > Thanks, > ~Nick Desaulniers I see some efforts in this direction, for example, commit dd2a3acaecd7abb2d43b09a823cf2e4c967fa2ac Author: Andreas Bießmann <andreas@biessmann.de> Date: Fri Feb 24 08:23:53 2012 +0100 mod/file2alias: make modpost compile on darwin again I do not mind a small amount of code addition. It may be broken from time to time because there are less number of developers testing kernel builds on macOS. -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-09-26 13:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-09-26 7:51 Any interest in building the Linux kernel from a MacOS host? Nick Desaulniers 2022-09-26 8:09 ` Sven Peter 2022-09-26 9:06 ` Martin Povišer 2022-09-26 11:16 ` Hector Martin 2022-09-26 11:35 ` Eric Curtin 2022-09-26 8:56 ` Masahiro Yamada
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®