Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4421176pxf; Tue, 30 Mar 2021 07:27:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1IIbEUu39zsw1KnpNLmYCRI1eQleeX5lQ+zxTh0xDofKJ+2WLovdZHczaakKe4divZel4 X-Received: by 2002:a17:906:6a94:: with SMTP id p20mr34312370ejr.68.1617114425470; Tue, 30 Mar 2021 07:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617114425; cv=none; d=google.com; s=arc-20160816; b=j768MDFtBL2JL2d43lmNpUVIi9rnbKUMnfZuQ4ZLJfUg74BbCg7+nyndmm4tdRJCtX McqD4yB9ETgXnP4sjpXRxYF51J27ZnCdpuWBXF+uaGZ/jGMwY8juP+dtM1G8GI3NvtZH JKwcNXZKn2JkwDtVNGuCPhuGc4rG+P/LLYn0sCAtzKclrrzTUWSQARwTY71uobPn30Lh AUl+7Wn1T3SZvsv3yI2IHoIAK570kl2CKmWYVjG0Po0+ykX0dsbl7bA4PUcN1govkdML aHicm9wC9i9T/8AENkE03znwxEdd/JcyEiQRQx68mI7hIhV/zYjcEr0E/QYcrmijSZ9j PQPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=CWVQZ3dgwDGO/7cVJfh4ZhslYBptDXGh4pIE96jqygQ=; b=VSSwodeY2RNTHerwL7sl5qxfP40e8hClaWnxAKk8V0zUStGQMzViAaVJEU8uPMznkh +8wZp0dFVYFLEcjXO5CMfQ4LJRUiMiyrwupgYV+pxXTfhhS6omG2l8GODF1NKrrsy2Xi qMgux2pjSYYV2gG/VSoVluPxJBeE+prPx1l3/BKhsRuTqPUiOlt+53heLDcH8t1GiZZ9 N01+YOz2Zqh/KIaj1+pASUwlMh3nW8qQ4mCHfPRzzBAlgPpdQryCoowBQPHLgu7ivty+ Z7aWHHO/sUiWNuQKgSPAzkdgfwLbvYU2ouG8yG1DSpMP77sINcG15Bs6o+anNA1b4kBy l5AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M/uY+p86"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si14685451ejr.332.2021.03.30.07.26.42; Tue, 30 Mar 2021 07:27:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="M/uY+p86"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232010AbhC3OXI (ORCPT + 99 others); Tue, 30 Mar 2021 10:23:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:47858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232004AbhC3OWf (ORCPT ); Tue, 30 Mar 2021 10:22:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E7E47619CB for ; Tue, 30 Mar 2021 14:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617114155; bh=9SKmTqEFK1r5v1fz1CKjaNtXuwV6YyJw5e+rK8/Jr0M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=M/uY+p862pkpbMcuBBRFozn9LPxozcKN07+wu1XlwKSzLchymmhxy96mC8I1Ct6iI 3Hur5fYcTC/oNDWmRB35r4n/EriZyn5hGdYvU/4425iS+O0SZZ3ivMwLbNh0P2obB9 m0eeH6y0RBLRQMF0pycPOLVH/ZMjOPrNMK3R54EY3K6+aG03YlV+llBEYUEPE6sK5Y RIxrhl2ppGp2GTldnEOlAmF6tN3Q6o4crBi9b7+mKflyfDO5xTjqzG95cjr6yt6xhz y+79AyYC3k/gbLahNvuEPatxtdQzVV84qGDJwEsQOOyhfxAKFG6wYYc6+lNxd4c+Lt DA1mJ5kyQF1Jg== Received: by mail-ot1-f46.google.com with SMTP id m21-20020a9d7ad50000b02901b83efc84a0so15694667otn.10 for ; Tue, 30 Mar 2021 07:22:34 -0700 (PDT) X-Gm-Message-State: AOAM530W5SKeb5ppiXhJmAiWw5EGxFvlxBzs1MRpBxzmvM/TnEBxVw1h bhC9y9cTDAOSzssXCdYly/RE25yvRTwS1FfUVrc= X-Received: by 2002:a9d:758b:: with SMTP id s11mr4011779otk.305.1617114154260; Tue, 30 Mar 2021 07:22:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Tue, 30 Mar 2021 16:22:19 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Compiling kernel-3.4.xxx with gcc-9.x. Need some help. To: Fawad Lateef Cc: Greg KH , kernelnewbies , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 30, 2021 at 3:23 PM Fawad Lateef wrote: > 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). The nand flash controller node for a20 was added in commit b2a83ad217b8 ("ARM: dts: sun7i: Add NFC node to Allwinner A20 SoC") The driver was merged first but not hooked up in the dt. For the specific board file, you need to still need to either enable the device and add a partition map in the dts (as described in the howto), or have a boot loader that fills out that information. > 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. I think the custom nand driver in that tree was trying to avoid the patents for nand flash by using an independently developed implementation, but that of course leads to copyright issues with incompatible licenses. The new driver is a regular mtd driver. I don't know whether the layout of the data is compatible at all, so it's possible that you have to backup all the data using the old kernel and write back the file system using a new kernel. Arnd