From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54C80C77B7A for ; Wed, 17 May 2023 08:23:09 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1pzCQt-0007QC-0O; Wed, 17 May 2023 04:22:51 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pzCQg-0007Q0-1g for kernelnewbies@kernelnewbies.org; Wed, 17 May 2023 04:22:49 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id BEB77320031A; Wed, 17 May 2023 04:22:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 17 May 2023 04:22:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1684311753; x=1684398153; bh=1R b7H0/oX78P8NfBQxcoyof+0YiL0RPRvygFVrWDN5o=; b=myjxGVxbtCG6BsL9AZ DayB4mRX8KcWSK4XvRTvZcOeTPChcTq/k5ZZ/xphlh9UCJi7/jhpmCnEwieQtqgy OpTSde+OQrBS7aUt3/9ZE2uYCiivLa91viHagi1JT9B6wDDGrPaUQgpi6nQO+J0y q6U/OD9QGBg+vex7G3wVzQvPulaYCMkHmaGUjGJ9unB+cqvijG/DKf1PDMjcMYml iIOvzB2GD8fVh5r6WKnioy4Z/Noe/kndqFz3patlcIV562IRIgmi+1/mSZkk8DA2 0p/PB7F3chH6/m/+AzwAnB5fq+ar5sF/g9SG8tM1/fnj0dmKvzEZYdQ2GoBlYEqq 7hyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1684311753; x=1684398153; bh=1Rb7H0/oX78P8 NfBQxcoyof+0YiL0RPRvygFVrWDN5o=; b=JEdFxSPhFtkCAWW7u3H1PcwI0++Y6 PjW24Sqb1TJb6lwbsCKbn7PGElsyx5du2X7iEjNYjQ6d74IZxuaVZH3ajSDFYw1A swhcnEBB+/mqI1ws9m3WdYfzf2Gb/x2trZN7PCVG6wQFrTKLePXy8T53NbCZfQLo z+PSylva/VolTDR89KPdXdDBczr9T5XHg0hOvrOuTgrfrhbG9ntQXSVjsvtl1/Ck tRJNm3J2bOBnyggn/zy3oxW8rOYobhw+5Ew7mnqsECJNkUWuU9ftncMcc6vQJ6c6 tqsI+S80CgasvhVabmadNNFpBrKUknvSTydNGaxjtpFcPbLP6Qkv9iCzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeiuddgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepheegvd evvdeljeeugfdtudduhfekledtiefhveejkeejuefhtdeufefhgfehkeetnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhm X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 May 2023 04:22:32 -0400 (EDT) Date: Wed, 17 May 2023 10:22:26 +0200 From: Greg KH To: Lucas Tanure Subject: Re: Build mainline driver for another Kernel Version Message-ID: <2023051753-bagginess-buffed-764c@gregkh> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Wed, May 17, 2023 at 09:16:45AM +0100, Lucas Tanure wrote: > Hi, > > Can I build a driver in the mainline kernel to a previous kernel version? Not easily, and you really do not want to do that as the whole kernel source, drivers included, are a snapshot in time and depend on each other. > Like, in the mainline kernel, I have a Z driver, and I want to use > that driver for my current stable driver in my embedded system with > version kernel 5.15. Is there a procedure to build a kernel driver > against other specific kernel headers? Update to a newer kernel version, it will be much easier and simpler overall. Drivers consume _everything_ from the core kernel, and are not stand-alone at all. They depend on everything else, trying to pick one out and put it into a different kernel is not how Linux works at all, sorry. What prevents you from just using a newer kernel? thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies