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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54902C433DB for ; Tue, 30 Mar 2021 13:23:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 938B2619AE for ; Tue, 30 Mar 2021 13:23:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 938B2619AE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1lREL6-0005kL-Mr; Tue, 30 Mar 2021 09:23:24 -0400 Received: from mail-ua1-x92a.google.com ([2607:f8b0:4864:20::92a]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lREL5-0005kG-ER for kernelnewbies@kernelnewbies.org; Tue, 30 Mar 2021 09:23:23 -0400 Received: by mail-ua1-x92a.google.com with SMTP id h34so5026858uah.5 for ; Tue, 30 Mar 2021 06:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vnRPvrLCFh9Rb5V7QOjNedJzmRFaTUrJgJXfMYyI5Ko=; b=E/C1YMyhQ5bGfLGjoTtO9P3h+LjgtbU1N51MgwaBx8X4/FRUH6BxTN7PhGdGy/Ljex 0lcXkZFzYcWCDebWfawSA8L3O+0SuUDwUr9jO1p1CAjTHiac0ZOwFpDzdpR6O86b8iYY YsRogn+2yksvtjQX12V3f+PuKznSamEiBpHFHzbLWYBW4fGePtAtNr3CQ2LfeIWuQChj f4DQk6GVUJ0FDJ3QwLxTvFAEkyztz66YuZ9KM2ZUlikl2wBQy2Si2v4WuoVh19d070xg yq0dEdVe4Wz4hOtGCFSFINTr3MJs1OHol+m6ASqCA5RDvWzH/z0S1rPhWsrbTdar8XM3 EZbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vnRPvrLCFh9Rb5V7QOjNedJzmRFaTUrJgJXfMYyI5Ko=; b=dZB8iVV0YNPbLvJRdtn4zUFZQzlO2dWbDqzMDwQa56YMwd5FByaRHRyb7UmvEybtB5 V6B+ozKWYlUwOJeVIOG7LzVelysfC1/PE6zml4s6Ri2754Ex0RoNYHBZPJsmtaj6q0Ok ROfmh+KcbpLNYp8Muby1FyT7rx69wYeuDdDZWroDBgLt8qbEsbwvDkjvIvwDMXEia7SV cvT+NhcWD8ZUFg1azYe0tQakc0I3kp99FxX1zJmoRsa0jNmbgNZYAoD476BZzFqIXDAu ZnikBTj5+505BPZaI28Jovj/jtk5h/kdS6nKlTyXMwN046oC7PIIrMIGaDxWOxVhP7fh qzZA== X-Gm-Message-State: AOAM532bz8T/FejV50Rj9WW06nmoYb9mDmHzZykwnxRlr6fB2RDZ4cPQ fmrkWXMwxMKnNB/4DIy3BUy2kBze8JTMy9XR6JTG5c8eiA0= X-Google-Smtp-Source: ABdhPJwnwS1Lq8gZtQKsdgDXFU4spd7UomuUbTHxDeul2pvsdmEOPdT5gTQNlPKNunGP1rB+Lb8hhADyqEdDoXgEIq8= X-Received: by 2002:ab0:7406:: with SMTP id r6mr16750423uap.28.1617110602595; Tue, 30 Mar 2021 06:23:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fawad Lateef Date: Tue, 30 Mar 2021 15:23:10 +0200 Message-ID: Subject: Re: Compiling kernel-3.4.xxx with gcc-9.x. Need some help. To: Arnd Bergmann Cc: Greg KH , Linux Kernel Mailing List , 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 Hi Arnd, On Mon, 29 Mar 2021 at 22:06, Arnd Bergmann wrote: > > On Mon, Mar 29, 2021 at 9:23 PM Fawad Lateef wrote: > > > > On Mon, 29 Mar 2021 at 06:57, Greg KH wrote: > > > > > > On Sun, Mar 28, 2021 at 10:20:50PM +0200, Fawad Lateef wrote: > > > > Hi > > > > > > > > I am using an Olimex A20 SOM with NAND and due to some binary blob for > > > > NAND driver, I am stuck with the sunxi kernel 3.4.xxx version. (Repo > > > > here: https://github.com/linux-sunxi/linux-sunxi) > > > > > > Please work with the vendor that is forcing you to use this obsolete and > > > insecure kernel version. You are paying for that support, and they are > > > the only ones that can support you. > > > > > > > The problem is vendor Olimex now have eMMC based SOM which is > > supported by mainline kernel _but_ they still selling NAND SOM and > > only supporting 3.4 kernel (as this is the only latest version from > > sunxi with NAND support, after that sunxi is now moved away from NAND > > too). > > From a very quick look at the git history, I can tell that A20 NAND driver > support was added in linux-4.8. Have you actually tried a modern kernel? > I tried compiling and booting kernel v4.4 (from sunxi repo on github) but unable to make it boot. Stuck at "Starting kernel". By the way I am booting from RAM (using the sunxi usbboot/usb-otg option). You mentioned that it's supported from linux-4.8 (from your quick look at git history); can you tell me which driver/files? As I was able to see some sort of sunxi NAND driver even in v4.4 kernel (https://lxr.missinglinkelectronics.com/linux+v4.4/drivers/mtd/nand/sunxi_nand.c). When I tried to compare with the sunxi-3.4 kernel code, I found that the kernel has code for "nfc" but no reference to "nfd" (I don't know what they are referring to). The sunxi 3.4 kernel NAND driver at quick look seems quite different. (https://github.com/linux-sunxi/linux-sunxi/tree/sunxi-3.4/drivers/block/sunxi_nand) I will try the v4.8 or above kernel. > There is also a howto document at > https://linux-sunxi.org/Mainline_NAND_Howto > I somehow missed this earlier :( And the prerequisite says kernel 4.10 above and some extra patch set). Will look into it too. Thanks for the link > The olimex board specific dts files seem to be missing the entry for > the nand controller. If you have trouble figuring out how to enable that > from the howto above, Olimex should be able to prove a small patch > for it. > Will see. As above link have some details regarding this which might be helpful. > > > > I am currently using buildroot-2016 and gcc-5.5 for building the > > > > kernel and every other package needed. > > > > > > > > Now the requirement is to move to the latest version of gcc-9.x, so > > > > that we can have glibc++ provided by the gcc-9.1 toolchain. > > > > > > > > Main problem for moving to later versions of buildroot is the kernel > > > > 3.4 which we couldn't to work with gcc-6 a few years ago _but_ now the > > > > gcc-9.1 requirement is mandatory so now have to look into compiling > > > > linux-3.4 with gcc-9.1 or above. > > There is no need to compile user space and kernel with the same compiler. > So can I still use kernel-3.4 compiled with gcc-5.5, and boot full user-space with gcc-9.1? I was expecting it to be possible but might not work due to incompatibility? As I know that when I tried to compile buildroot-2019 (with latest version of openssl and others) it needs kernel headers and then I likely can't use 3.4 kernel. I will still give it a try. Thanks again > Arnd _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies