From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAFC42FFDC9 for ; Wed, 17 Sep 2025 18:00:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758132049; cv=none; b=svbQFeznW6fiEHDS7o5Obf2yRXW7NXkMJZWK2tk1RW7Y+5Rm3BihHQDIpl+k2vHa4xsqFPyeUXKX1yXRtBkRUwGRo3Fz+pP2/S0lkZXLVuU0txGFAAWsm+P8T7b5Mi4iw7xp5Rm04ZMTv+DqwWwmyaGp8rjwLEm8yd/Eqi+6Bxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758132049; c=relaxed/simple; bh=DLDcGQ3mu3T/MPVKq0NF9V2I5Jn6ILZwFaw9KVQfhOo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=SEpLowpb9c2WeJrgZZOOtpRLXKLMYE+WRJ6LCbzqb4b8CdAnchR4i0x0HOgLb5B1V+cSQQ7rGxb4GWB/vlxxUPU84whDGQ4BnZBCobTe0tP0FmJQKIXJN8MQIwRbtuodMy0/NsPqveo5UW40MjMxEdzf9QCxhLY/dDUD3z5ZiHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net; spf=pass smtp.mailfrom=amacapital.net; dkim=pass (2048-bit key) header.d=amacapital-net.20230601.gappssmtp.com header.i=@amacapital-net.20230601.gappssmtp.com header.b=g1LtUuBN; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=amacapital.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amacapital.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amacapital-net.20230601.gappssmtp.com header.i=@amacapital-net.20230601.gappssmtp.com header.b="g1LtUuBN" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-577232b26a6so101904e87.2 for ; Wed, 17 Sep 2025 11:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20230601.gappssmtp.com; s=20230601; t=1758132044; x=1758736844; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0Pv4dFUExNQfPloEDat7jfEF9BkjeLOy7zrinjdnc80=; b=g1LtUuBN2lj4qvyQzWAdLKTewMPpvB0BMgAm3EhYmOSEcT379TNMgVSmJk7DCmgjc/ T0eHokwlFMY3Yd+mXYCz+ekytPn0ndF69T0GJJIC1YMQr15FXnETUToESn8hAOjjN4TJ wc+dE3joK8Hj6X0qrUlvmHpmCBRx7/hVESh3NV1/RSPbebawN77L/JxPYbAY8rno5NPR h45BlMuQrVS79kOiLhszZHO32mHd/xwXNvhKNiRJJPEEOxGanxAq7D4RvCoxMPnsrP0o gtEy+UX8pbw1CA/Tbhp0++SKDmI4SgqYBJ/2EKyXEOwvuyrgRQgYTYLI+VQny1h7rWhV /NkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758132044; x=1758736844; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Pv4dFUExNQfPloEDat7jfEF9BkjeLOy7zrinjdnc80=; b=XLIVHg/mnquBuHmrfKYrm1LBI/vlrozVBupfAUx04aRg3rh9MH8ZX5h/1ZfquHzFwO hTSKFK+Ofb7X5ZxKJI/NyEnHhul2HaHGaZjOT/FT1eDon1jiLN8K4ixog3PlGdYsfpKF DAJsoW88anlQdWpD9iXKLP3RbXxbF8kSMKQQDKOU3zG57fzmXQrFdKuWvgkWUUyPkrlt gwPcBC/WCmF1wED3Hh0/Ypvv1VwRUDVgM8lFzTXxzqk/NeTNBwZcOlME3Pzh7zV54R+A 7/wFbQw3FenMHN7mFCAIGQjkV8rzBtqmlVRuqYqx6A3KM6bmOvGkO+qy27eIFXxQ2Q8V y4gw== X-Forwarded-Encrypted: i=1; AJvYcCUiGltk+29UKj9NjL3R12AbcnVvPKE69rFufJRj71yGfofQIPG2lbhnPAs8bVWWeAREcslnMUe7vFlasJPWjA==@vger.kernel.org X-Gm-Message-State: AOJu0YyuXq1b4P+3DgDW0HiGvzTN1hw3XTsq6iqeraKl41XYMe9BJPou foA7xSzDZ77PQpvPOiBe/DHIq09fCtETuYulhnrqzD7ciBYjPFvHWAJMzpJXm4HbZbzsl1Iq5kZ JaViIZ8oNPJ/jJmRMdYDwGtXyMvUvMabZlHBd00CR X-Gm-Gg: ASbGncuuOk8VsTAqpeeCxXNk/hBF09SpMrRz5475Mdzzmkab9FPCIjrqwG3rYIDAQe7 z4mhobnI0kbN+oe3ybDG8+lxTv+6lppOtNgxQi68inRNPYdKVF09z9gx2hSoDzsNNo6zwQE2G51 f2lw0Ujf1CL9qHlAGDgirFvX+HGo5vWznsozoCMDEXOLdZgcZhoClw2xtNjPCLtkkJdneDmdaI0 fTRjQ== X-Google-Smtp-Source: AGHT+IGI+xF2OSgRbI6+fabXiqu9Xwuf5bxWYwnja/rNGOUuSmNzhH42MNUAKuR34Ox7ov8nmiujA9clDhMS84oRbmU= X-Received: by 2002:ac2:4e09:0:b0:576:d217:3f2f with SMTP id 2adb3069b0e04-57796b5e819mr1028160e87.3.1758132043747; Wed, 17 Sep 2025 11:00:43 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-openrisc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20250912223937.3735076-1-safinaskar@zohomail.com> <0342fbda-9901-4293-afa7-ba6085eb1688@landley.net> In-Reply-To: <0342fbda-9901-4293-afa7-ba6085eb1688@landley.net> From: Andy Lutomirski Date: Wed, 17 Sep 2025 11:00:32 -0700 X-Gm-Features: AS18NWAGwakGZ9zjxjq7MnfN8O7ZgOJb6fmKIJ0JIML7P3j0NnlDZ27eNb5S7Es Message-ID: Subject: Re: [PATCH 00/62] initrd: remove classic initrd support To: Rob Landley Cc: Askar Safin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds , Greg Kroah-Hartman , Christian Brauner , Al Viro , Jan Kara , Christoph Hellwig , Jens Axboe , Andy Shevchenko , Aleksa Sarai , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Julian Stecklina , Gao Xiang , Art Nikpal , Andrew Morton , Eric Curtin , Alexander Graf , Lennart Poettering , linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org, Ingo Molnar , linux-block@vger.kernel.org, initramfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-ext4@vger.kernel.org, "Theodore Y . Ts'o" , linux-acpi@vger.kernel.org, Michal Simek , devicetree@vger.kernel.org, Luis Chamberlain , Kees Cook , Thorsten Blum , Heiko Carstens , patches@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 15, 2025 at 10:09=E2=80=AFAM Rob Landley wrot= e: > While you're at it, could you fix static/builtin initramfs so PID 1 has > a valid stdin/stdout/stderr? > > A static initramfs won't create /dev/console if the embedded initramfs > image doesn't contain it, which a non-root build can't mknod, so the > kernel plumbing won't see it dev in the directory we point it at unless > we build with root access. I have no current insight as to whether there's a kernel issue here, but why are you trying to put actual device nodes in an actual filesystem as part of a build process? It's extremely straightforward to emit devices nodes in cpio format, and IMO it's far *more* straightforward to do that than to make a whole directory, try to get all the modes right, and cpio it up. I wrote an absolutely trivial tool for this several years ago: https://github.com/amluto/virtme/blob/master/virtme/cpiowriter.py it would be barely more complicated to strip the trailer off an cpio file from some other source, add some device nodes, and stick the trailer back on. But it's also really, really, really easy to emit an entire, functioning cpio-formatted initramfs from plain user code with no filesystem manipulation at all. This also makes that portion of the build reproducible, which is worth quite a bit IMO. --Andy