rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gary Guo <gary@garyguo.net>
To: Rudraksha Gupta <guptarud@gmail.com>
Cc: "Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>,
	stable@vger.kernel.org, regressions@lists.linux.dev,
	rust-for-linux@vger.kernel.org, "Miguel Ojeda" <ojeda@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Benno Lossin" <lossin@kernel.org>,
	"Linux Kbuild mailing list" <linux-kbuild@vger.kernel.org>
Subject: Re: ARMv7 Linux + Rust doesn't boot when compiling with only LLVM=1
Date: Mon, 15 Dec 2025 11:19:41 +0000	[thread overview]
Message-ID: <20251215111941.6c7817cf.gary@garyguo.net> (raw)
In-Reply-To: <66cba90e-c9b1-4356-a021-e8beeff0b88d@gmail.com>

On Sat, 13 Dec 2025 23:34:31 -0800
Rudraksha Gupta <guptarud@gmail.com> wrote:

> On 12/13/25 22:06, Miguel Ojeda wrote:
> > On Sun, Dec 14, 2025 at 12:54 AM Rudraksha Gupta <guptarud@gmail.com> wrote:  
> >> - The kernel boots and outputs via UART when I build the kernel with the
> >> following:
> >>
> >> make LLVM=1 ARCH="$arm" CC="${CC:-gcc}"
> >>
> >> - The kernel doesn't boot and there is no output via UART when I build
> >> the kernel with the following:
> >>
> >> make LLVM=1 ARCH="$arm"
> >>
> >> The only difference being: CC="${CC:-gcc}". Is this expected?  
> > It depends on what that resolves to, i.e. your environment etc., i.e.
> > that is resolved before Kbuild is called.  
> 
> Sorry about that, I should've specified in the original email. The CC 
> resolves to armv7-alpine-linux-musleabihf-gcc.
> 
> When both LLVM=1 and the CC=gcc are used, I can insmod the sample rust 
> modules just fine. However, if I only use LLVM=1, my phone doesn't 
> output anything over UART, and I assume that it fails to boot. 
> Interestingly enough, if I just specify LLVM=1 (with no CC=gcc), and 
> remove the rust related configs from the pmos.config fragment, then my 
> phone boots and I can see logs over UART.

Which drivers have you enabled that use Rust? Just having core Rust
infrastructure enabled shouldn't cause issues on its own, apart from
slightly bigger kernel image.

If just enabling Rust but none of Rust drivers cause issue, I would start
looking at

1) if there're any symbols somehow being overwritten by the Rust object
files.

2) if the size of kernel is pushed above a certain threshold that your
bootloader/firmware is unhappy.

Best,
Gary

  reply	other threads:[~2025-12-15 11:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-13 23:54 ARMv7 Linux + Rust doesn't boot when compiling with only LLVM=1 Rudraksha Gupta
2025-12-14  6:06 ` Miguel Ojeda
2025-12-14  7:34   ` Rudraksha Gupta
2025-12-15 11:19     ` Gary Guo [this message]
2025-12-17 10:01       ` Rudraksha Gupta
2025-12-15 12:17     ` Christian Schrefl
2025-12-17 10:10       ` Rudraksha Gupta
2025-12-16 14:41 ` Christian Schrefl
2025-12-17 10:21   ` Rudraksha Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251215111941.6c7817cf.gary@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=guptarud@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).