Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2766899pxp; Mon, 14 Mar 2022 04:40:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygOfKgugdCbPTDehr1mrH3hQhlhw5Z1ZlRqDv7ImNUf+ag8uCBom6Qfliyg7atdqClxrCA X-Received: by 2002:a17:90b:1d0e:b0:1bf:2a24:2716 with SMTP id on14-20020a17090b1d0e00b001bf2a242716mr35629949pjb.60.1647258034559; Mon, 14 Mar 2022 04:40:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647258034; cv=none; d=google.com; s=arc-20160816; b=lof+hBDH2e8OoXocUr1+dXtOMNXar8seMCYambwh2EeV8DJunyRQZPmE2g99CTIxPP 3esd2iwK/0+ViupPDa1l4Lfo1i24smp2n5pxBRgz55krDPo3sxjw/819l2eL7+d3a44J CdS2whhZYfLQl3Z7ov5a8piXjWgU+Mj24vY0XX5FM8dYggfGtb1Iab8UW4/iImNVLsyw GEelg+NZw6SfkUM18lveZMOvgKaov5MLiGMKTFxvvrB5OzGLzARX8DyGvyICbTOkHuIc j6VG7/5v6ldI7QWEk7UxUVWghmb9BIFsrveKgPXJKzmFdghndSJMUzQBgMAnIvibKNtX Hk2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=T0uRgPPDyquwykDiYqvd7QnZABKm2TIaL7T7CJqANNc=; b=D0GycflhDTIMJNRmZLl6vURKRMhTyLJ1Pogwd6Yhcxmg1ckTOC+iSwixvnqEhYXMtw sAISM98RhX2RY2luNS0Uc2utKwyT8q+0+5Q7lSjD1veJgKCaGxGy2g5gHlY53Nm8JHFR Elpve9wkvImpt4ACEGZsDOqFR7IWsTAP5cegMn9zOHaif4uAxirdTjTGat9CH5BgBCcw zORXX1gVWFxPhHmItYi2J72wIEtJkQKhW8x447hKDL/OcScM6ou8xFkCTV6iZ30Cpko+ MCO20c9z/3ZRldRKAYz6JR5CdVhuVeYsh7S7ObWYuABh38hWVrX8dXleLwcEHZd9/hHD xXIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="s7J/Kh0T"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h33-20020a632121000000b00370de8333desi15513223pgh.702.2022.03.14.04.40.23; Mon, 14 Mar 2022 04:40:34 -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=@kernel.org header.s=k20201202 header.b="s7J/Kh0T"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230486AbiCNBzL (ORCPT + 99 others); Sun, 13 Mar 2022 21:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiCNBzJ (ORCPT ); Sun, 13 Mar 2022 21:55:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E99321B6; Sun, 13 Mar 2022 18:54:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B39E2B80CAA; Mon, 14 Mar 2022 01:53:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6A41C340E8; Mon, 14 Mar 2022 01:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647222838; bh=CvpvrASUJIVEEli1BWz2c038fnfHgRtVIsm0V2TZ6pA=; h=From:To:Cc:Subject:Date:From; b=s7J/Kh0TgkewmYZbhLwi3y/OiTkF+GuBqKr9H/q4BveZRBDlLEwvsEQjCrfNSF7Cb A0b/4ZF1X2GK0Is6jFgQg/US2sxa6tCLZTcADAH6MdqlftRf+192lT/mt5NTofbNz0 9pgrHNnIwYe+E4q3jne8L/H7x6uDh/j4OczJfb0olE3xxk4gjSKCdc3zXNqlZC62cR cc5m6llXRfelAEfBtabbTDi8DP2U+5krvX1kUysEJrhjAm9QxlYGXc8JKWNSJUg4d6 Vr7030mDxyavRujsC5N37Ex5IQM/TwlGcQUZtNCjjxpNVsNHEnm++jrBSxouBMfJbF xWmuXPIvCvBNA== From: Masami Hiramatsu To: Steven Rostedt Cc: Masami Hiramatsu , Padmanabha Srinivasaiah , LKML , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 0/3] bootconfig: Support embedding a bootconfig in kernel for non initrd boot Date: Mon, 14 Mar 2022 10:53:53 +0900 Message-Id: <164722283333.689258.144495814460576707.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi, Here are the 2nd version of the patchset to enable kernel embedded bootconfig for non-initrd kernel boot environment. You can embed a bootconfig file into the kernel as a default bootconfig, which will be used if there is no initrd or no bootconfig is attached to initrd. This needs 2 options: CONFIG_EMBED_BOOT_CONFIG=y and set the file path to CONFIG_EMBED_BOOT_CONFIG_FILE. Even if you embed the bootconfig file to the kernel, it will not be enabled unless you pass "bootconfig" kernel command line option at boot. Moreover, since this is just a "default" bootconfig, you can override it with a new bootconfig if you attach another bootconfig to the initrd (if possible). CONFIG_EMBED_BOOT_CONFIG_FILE can take both absolute and relative path, but to simplify and make it independent from the build environment, I recommend you to use an absolute path for that. This is requested by Padmanabha at the below thread; https://lore.kernel.org/all/20220307184011.GA2570@pswork/T/#u Thank you, --- Masami Hiramatsu (3): bootconfig: Check the checksum before removing the bootconfig from initrd bootconfig: Support embedding a bootconfig file in kernel docs: bootconfig: Add how to embed the bootconfig into kernel Documentation/admin-guide/bootconfig.rst | 30 ++++++++++++++++++++++++++--- include/linux/bootconfig.h | 10 ++++++++++ init/Kconfig | 21 ++++++++++++++++++++ init/main.c | 31 +++++++++++++++--------------- lib/.gitignore | 1 + lib/Makefile | 12 ++++++++++++ lib/bootconfig.c | 23 ++++++++++++++++++++++ 7 files changed, 110 insertions(+), 18 deletions(-) -- Masami Hiramatsu (Linaro)