Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1025335pxb; Wed, 6 Apr 2022 07:01:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzp+ruPMuNXXVPiiIqJ1FlXG0dctRPBMZAdOAeX20t7sv+dIzIV8TP9sH4icpq4M3ZT2SOL X-Received: by 2002:a05:6870:d59b:b0:de:3ca3:3463 with SMTP id u27-20020a056870d59b00b000de3ca33463mr3905279oao.263.1649253708486; Wed, 06 Apr 2022 07:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649253708; cv=none; d=google.com; s=arc-20160816; b=N99MkrM+wkLRIwo5+jW4YyOYkhEus9rF7sf3WSUgrL+HK5o+LIekfm7468f+ykCi1p AZAb1D4xhlvwC5GDPoUYqQIeRYkTEH7AaD3kfCkcz1AqfAim1BK5hAKg9CJCa09dunov Mb30or92m+XjsVtaF+4FP+aVWYK0w1NKYvpCZ1+ieGcVkkewKRVzZGtE/dZFx+2qGUX1 DFgXquy9czY7ynq06YfrSzOSpzOSP5FHGuGe47aEO2+C+PyUqvChr02hbzoKZZLLfU/+ UH5di8IUQaAU/C0RuzlSOhIMSwiXMG/2qm6CqEPqard0qlnJfLn+uUbicXgDbZ6hAa8l MD6w== 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=3/S4H9J6ogf2dPbMFoSfKIvsunrW0/4OhIHy46cuWYw=; b=F2J95KH/61Oog49v5XpOQCHiWydTD4d2SJjC6SuAnDwwNcfKRPI/06zeW0Iu3H0nLb FHC+WHq57+UQtDIIAb+hu5l2E5Zbp/Jmv3QzuH5e81ep/F9fOhc24AOArRKQtmLxiKNp PgkQ1AQhSki3FaGPT0DjonLgxLV2ndsQSA1HDYSOHz/HOut2RmNuABlLiLRJg2hotWYl jR57gC+EcPHtW93dL6Ey+Ewkv37z7dLJO/BPjddL82Xoau3QGw9A5Uy4JugqlwRvhEJB nkFLr4zdoTeE00YWtgiLg2wTSyznCX8o1HaG48ndieq0xF24ORMvBA10JFMLpExDUE/i sfvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D0s611Au; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e19-20020a9d5613000000b005cb2fc137efsi9296146oti.107.2022.04.06.07.01.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:01:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=D0s611Au; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3487759F7C2; Wed, 6 Apr 2022 04:52:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245626AbiDFIfE (ORCPT + 99 others); Wed, 6 Apr 2022 04:35:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241000AbiDFIbl (ORCPT ); Wed, 6 Apr 2022 04:31:41 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CAA31DE6FF; Tue, 5 Apr 2022 19:30:56 -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 sin.source.kernel.org (Postfix) with ESMTPS id B7351CE20C3; Wed, 6 Apr 2022 02:30:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83A41C385A1; Wed, 6 Apr 2022 02:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649212253; bh=kMvDwsLnby/GtbPEZOS6QFj4PiJhpG5J89iehidYyqk=; h=From:To:Cc:Subject:Date:From; b=D0s611AuDog/P1rH2bxfW6i93GJXw3xFSVkYcsSK8ZTn0D7N0GXBglI7ZAJYSICcB pIQge7cNsjIzaTtD+sD9FzRgEvGbxSpx44M1DuJO7sumchaLXP1+fCko1rksqEZMws 77XREAht9+1A9S3LXIAKqpNvcxHfwRxX3wP8IsCVSVqE7EJmYXWcIKAl6CvA5GANtA v/NC1DudsTJdjhhqXtozbYRjKSTc+4GYSEy9q2kVuGV6iRm9407B6FW6D18mN0ssZR yorREqmSSt30gXRESA20aC9+lqO14XXSqP96aPdjRVzjZShBzyRaNqMdNjLwh8pujL n/M2x3NHuki/Q== From: Masami Hiramatsu To: Steven Rostedt Cc: Masami Hiramatsu , Padmanabha Srinivasaiah , LKML , Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Nick Desaulniers , Sami Tolvanen , Nathan Chancellor , llvm@lists.linux.dev, Masahiro Yamada , Linux Kbuild mailing list Subject: [PATCH v8 0/4] bootconfig: Support embedding a bootconfig in kernel for non initrd boot Date: Wed, 6 Apr 2022 11:30:48 +0900 Message-Id: <164921224829.1090670.9700650651725930602.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=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 8th version of the patchset to enable kernel embedded bootconfig for non-initrd kernel boot environment. This version fixes a build error when CONFIG_BLK_DEV_INITRD=n. Previous version is here [1]; [1] https://lore.kernel.org/all/164871505771.178991.7870442736805590948.stgit@devnote2/T/#u 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_BOOT_CONFIG_EMBED=y and set the file path to CONFIG_BOOT_CONFIG_EMBED_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). The CONFIG_BOOT_CONFIG_EMBED_FILE can take both absolute and relative path. This is requested by Padmanabha at the below thread[2]; [2] https://lore.kernel.org/all/20220307184011.GA2570@pswork/T/#u Thank you, --- Masami Hiramatsu (4): bootconfig: Make the bootconfig.o as a normal object file 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 | 31 ++++++++++++++++++++++-- MAINTAINERS | 1 + include/linux/bootconfig.h | 10 ++++++++ init/Kconfig | 21 ++++++++++++++++- init/main.c | 38 +++++++++++++++--------------- lib/.gitignore | 1 + lib/Makefile | 10 +++++++- lib/bootconfig-data.S | 10 ++++++++ lib/bootconfig.c | 13 ++++++++++ 9 files changed, 111 insertions(+), 24 deletions(-) create mode 100644 lib/bootconfig-data.S -- Masami Hiramatsu (Linaro)