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=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 6C6B6C19F36 for ; Fri, 23 Jul 2021 21:06:46 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCCEC60EBC for ; Fri, 23 Jul 2021 21:06:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BCCEC60EBC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A993782D96; Fri, 23 Jul 2021 23:06:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gateworks-com.20150623.gappssmtp.com header.i=@gateworks-com.20150623.gappssmtp.com header.b="aj+mfsML"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E687482D96; Fri, 23 Jul 2021 23:06:41 +0200 (CEST) Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3943682DB1 for ; Fri, 23 Jul 2021 23:06:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: by mail-pj1-x1034.google.com with SMTP id pf12-20020a17090b1d8cb0290175c085e7a5so10745941pjb.0 for ; Fri, 23 Jul 2021 14:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yXt28CEWPzIj6vhkG+DJfpVr9H239lLI7qYSXBH0LeE=; b=aj+mfsMLSW2LfMNVlzLypsjiGG98O1ry+SmOgO8l2JXzpexFlQK2YUbYvVgXYiZaF9 gxwRkJaFWG/Z08/rCI+iGQ0s2A4uR0Ml0WPsvk5DgcNgKUT1yHSkYevAEkr/pItG4LwA dVtuCnHR2CclbyHOEA+Als3MaoE3QorH1Gi4vQy3NMBRBcfIKLVjeYClKZAmQS0d31wq iVJkuZA5C50PVuOaEQ0XXyGjsjKFnmLQsmguZ5yFzymYKkLhedVSYJutmddqip97wSqF L+3g2/uz/3icxnpxVi8MvLguO22B3GumybuJMVbTEIiaCYrmEFh4pvBcZRyRA836H2Ly ht9A== 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=yXt28CEWPzIj6vhkG+DJfpVr9H239lLI7qYSXBH0LeE=; b=Djg/4c/j1MSoK5POuVmgG3Tw/YncE3dmGz2WCRdms7oarkCAMDjDNYCd1zPg6Q4kry FePo+ejkgo5HXzfgOmxqOf281RmA41YcTUxK00UA/HCuiPeyksKd8zA0NJWNR/MdZn75 ifT42vHVugIQoEaFB40fsjnHj5M8+abB+Kk49mAqdX38dwAXXaVtd+8Vwe17Q2eUc6K1 3+FCfdoAPDmNmdO7nGTyppv2IBl1E20OhC4L7RAoMdWuMJzJ0j0Sv/KrwOwfwSqH0USd Xh9sJGuqov6Vl8IAN52KmYnWigptEohoUVk6i6o5F2OQoMwnl/6+vSPbxKfMyx9E9l2F V4yw== X-Gm-Message-State: AOAM532emZOBSacdbkwAShBF4N5RPE5uR2kpHVCBT+kNGTcv2IT2SSXm k5S8yCVYisZHomWBPdUqypI1nOpASRwiI9dUCgTNJg== X-Google-Smtp-Source: ABdhPJynPfqi+RMHEzLduz9tgfDpkjJVvY7vivN+jpJeS/a2u5cNq2KtlNu7POryzAds7hLzyBmCRfyF/33f4vL+2xw= X-Received: by 2002:a63:4e51:: with SMTP id o17mr6712305pgl.126.1627074396277; Fri, 23 Jul 2021 14:06:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tim Harvey Date: Fri, 23 Jul 2021 14:06:24 -0700 Message-ID: Subject: Re: using binman fails boot To: Simon Glass Cc: u-boot Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Thu, Jul 22, 2021 at 8:07 PM Simon Glass wrote: > > Hi Tim, > > On Mon, 19 Jul 2021 at 17:23, Tim Harvey wrote: > > > > On Sat, Jul 17, 2021 at 7:22 PM Simon Glass wrote: > > > > > [..] > > > > > But isn't blob-ext@4 a correct name? I can't use 'blob-ext-4' as > > > > that's an unknown entry type. > > > > > > Well you can use any name and specify the type: > > > > > > my-name { > > > type = "blob-ext"; > > > }; > > > > > > > Ok - I understand. > > > > > > > > > > > > > > > > If you can push your tree somewhere (with this problem) I'll see if I > > > > > can figure out why. > > > > > > > > > > > > > Sure, I pushed it to > > > > https://github.com/Gateworks/uboot-venice/tree/WIP-venice-binman > > > > make imx8mm_venice_defconfig > > > > make > > > > > > OK > > > > > > > > > > > > > > > > > > > BINMAN_VERBOSE=4 indeed prints out a tone of stuff but I'm not seeing > > > > > > anything for 'blob' below that would seem to indicate one node name vs > > > > > > another: > > > > > > > > > > Oops you need BINMAN_VERBOSE=5 - see elf.py LookupAndWriteSymbols() > > > > > which has tout.Debug() which is level 5. > > > > > > > > > > > > > LookupAndWriteSymbols ends up doing nothing because > > > > syms.get('__image_copy_start') returns None. > > > > > > Well that is likely the problem. > > I sent a patch to make binman report this as an error. > > I pushed the resulting tree to: > > https://github.com/sjg20/u-boot/tree/try-tim > > Now the error is: > > binman: Section '/binman/u-boot-spl-ddr': Symbol > '_binman_u_boot_any_prop_image_pos' > > in entry '/binman/u-boot-spl-ddr/u-boot-spl/u-boot-spl-nodtb': > Entry 'u-boot-any' not found in list > (u-boot-spl-nodtb,u-boot-spl-dtb,u-boot-spl,blob-ext@1,blob-ext@2,blob-ext@3,blob-ext@4,main-section) > > The problem seems to be that you are asking binman to generate three > independent images. U-Boot is in a FIT which is not in the same image > as SPL. So it is not possible to locate the flash offset of U-Boot > (with in the FIT). > > Can you give me a bit more info about your intent here? Is it to load > U-Boot from the FIT? I so, I suppose it is possible to make binman > access an independent image, if it is told where it starts. > > But why is everything not in one image? > Simon, I would rather have 1 image. I was going off of the imx8mm_evk switch to binman which creates the separate images. The whole point of what I'm investigating here has to do with the SPL. OCRAM is at a premium and the current way the IMX8M is handling DDR firmware is to tack it on after the code in the SPL image and it gets padded to make it easy to locate which is a huge waste of space. I figured we can use binman to locate the blobs without the padding. So, if you take 'just' the spl image here: spl: u-boot-spl-ddr { filename = "u-boot-spl-ddr.bin"; pad-byte = <0xff>; align-size = <4>; align = <4>; u-boot-spl { align-end = <4>; }; blob_1: blob-ext@1 { filename = "lpddr4_pmu_train_1d_imem.bin"; size = <0x8000>; }; blob_2: blob-ext@2 { filename = "lpddr4_pmu_train_1d_dmem.bin"; size = <0x4000>; }; blob_3: blob-ext@3 { filename = "lpddr4_pmu_train_2d_imem.bin"; size = <0x8000>; }; blob_4: blob-ext@4 { filename = "lpddr4_pmu_train_2d_dmem.bin"; size = <0x4000>; }; }; My intention is to remove the size arguments above which are currently forcing wasted padding and locate the blobs at runtime with binman. Based on your other patch it it would seem I'm missing something from my lds to add __image_copy_start yet in arch/arm/cpu/armv8/u-boot-spl.lds I see: .text : { . = ALIGN(8); *(.__image_copy_start) CPUDIR/start.o (.text*) *(.text*) } >.sram My understanding of linker files is pretty slim so perhaps there's something missing above. Regards, Tim