Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp835393rwb; Mon, 26 Sep 2022 06:30:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ZLVuGnAd+X2go/yownQXC5NIUaewWVBJA18FvQ+M52ziHYxi3OrQXpB1Y5ZQImwexzYt7 X-Received: by 2002:a17:90a:fd08:b0:203:7b5d:89bf with SMTP id cv8-20020a17090afd0800b002037b5d89bfmr35870773pjb.98.1664199047824; Mon, 26 Sep 2022 06:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664199047; cv=none; d=google.com; s=arc-20160816; b=MXLj0wTP2Zw6YHYItoHvEdyFkwZaSRqYxq29v0XIzYbigIM3JhEzKgrR7DIZrJBKu9 UZh6t8gyvB8DpCRHWYAXwcj9QSjTjSdW5QI9hb1A2Fb6+N43/HJ2IAyLAkzLUWSv39n5 tga5udsv30VOI4mYDLvEEWa2Exu0kOhvj+fPR7G9Tu3DUKqHyp8OvyIH+6SBI3nQwsNp ORuyl6L4zw0By5ul0k2Xx+UfHTI2vbhW8lvih36YNH35EhFmW2nRjrW7FHLP6E0BF9Nv FLnum0twtqA+KHJERcBThREYBYZGQsDS94MFCt22H6v+T70vATtnX3LCFFACpY+oGMRQ 2ZWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=LWF+C0UUG5QYob7lW7EHfGKlOJJpCWdbhCcD42KjdLI=; b=J1p3WEBfzHrhBYCIiBnljb0tbgv26cbknWiIQyKIpUxrjWjWeULMEEyguilU+joLtk 8+yLpMg/HhkGtPF3Qyz6jS4G35Ugo2WG2E3QNabp7rmbJNQvxKLihc8ppVnV/vbw9Bmv 4shqIn6xz7cgGz31Bpefgv8/VT2roMruEQk4TljSMbCj3uMtEYwCxa5AYtn7t40/ohhp yIaEWQrUYIOmoGJASiht7kSJIgiXyvsC94k63b0VHxNCKpOwqIfzZnk9bO4cwcL7g9Y1 tb2A8Tq2Y3+vxbu6sb8gm7U9IkuviWdoB1dZt3gVeAI8pMnI0rBtwIfiQN7sdxe0Thwk OJ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=JzqNXDip; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f132-20020a636a8a000000b0043c05e17c63si15356145pgc.90.2022.09.26.06.30.35; Mon, 26 Sep 2022 06:30:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=JzqNXDip; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235817AbiIZMs4 (ORCPT + 99 others); Mon, 26 Sep 2022 08:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237637AbiIZMsf (ORCPT ); Mon, 26 Sep 2022 08:48:35 -0400 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4102D4504C; Mon, 26 Sep 2022 04:24:18 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id B11BF41EF0; Mon, 26 Sep 2022 11:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1664190994; bh=rOuuto//9X2yVHXbZW7PA1Ohl4IJGMNIa4F1RVFPT7M=; h=Date:To:Cc:References:From:Subject:In-Reply-To; b=JzqNXDipIlQwwGnZOEmalB3DCXA8ACeevo7PBd8Tf6hEgVGX8isUPzkW2pkT3TtrA jK2QtBtlw1//90TBODlINJXWWtTgxXPhGRYI+6zRp6gcfkotBZUYzmPl9KlEMWYdq4 FuhYGRNq02QRNZhBJ+LmEp4u573KWSoFJaFFimNCmSyEFbvRmGw8sC++BivEXZRPlE VLD1Wc8cTTlRULjmgZajaeDnjwTXGnNwVc723YEI9/54We+zjglFfPJTntTsOj+LYd 0Fr/FQ8jUs80yWnhNI2q/+9Eufc2tUiGsq+XjHik8Fbh1xciHEgyOm3OyYiwV9QdIO 8ftjoKBp5TheQ== Message-ID: <4fdda77e-6aed-b148-ddbc-52ef2d29b565@marcan.st> Date: Mon, 26 Sep 2022 20:16:28 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: es-ES To: =?UTF-8?Q?Martin_Povi=c5=a1er?= , Sven Peter , Nick Desaulniers Cc: Linus Torvalds , Masahiro Yamada , Nick Desaulniers , clang-built-linux , Linux Kbuild mailing list , Linux Kernel Mailing List , asahi@lists.linux.dev, linux-arm Mailing List References: <478D9484-E404-4A96-908C-4DE0F7C23997@cutebit.org> From: Hector Martin Subject: Re: Any interest in building the Linux kernel from a MacOS host? In-Reply-To: <478D9484-E404-4A96-908C-4DE0F7C23997@cutebit.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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