Re: [PATCH] scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 12, 2021 at 08:16:04AM -0600, Rob Herring wrote:
> On Thu, Feb 11, 2021 at 9:31 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> >
> > Hi Rob,
> >
> > On Wed, Feb 03, 2021 at 03:26:03PM -0600, Rob Herring wrote:
> > > This adds the following commits from upstream:
> > >
> > > 183df9e9c2b9 gitignore: Ignore the swp files
> > > 0db6d09584e1 gitignore: Add cscope files
> > > 307afa1a7be8 Update Jon Loeliger's email
> > > ca16a723fa9d fdtdump: Fix gcc11 warning
> > > 64990a272e8f srcpos: increase MAX_SRCFILE_DEPTH
> > > 163f0469bf2e dtc: Allow overlays to have .dtbo extension
> > > 3b01518e688d Set last_comp_version correctly in new dtb and fix potential version issues in fdt_open_into
> > > f7e5737f26aa tests: Fix overlay_overlay_nosugar test case
> > > 7cd5d5fe43d5 libfdt: Tweak description of assume-aligned load helpers
> > > a7c404099349 libfdt: Internally perform potentially unaligned loads
> > > bab85e48a6f4 meson: increase default timeout for tests
> > > f8b46098824d meson: do not assume python is installed, skip tests
> > > 30a56bce4f0b meson: fix -Wall warning
> > > 5e735860c478 libfdt: Check for 8-byte address alignment in fdt_ro_probe_()
> > > 67849a327927 build-sys: add meson build
> > > 05874d08212d pylibfdt: allow build out of tree
> > > 3bc3a6b9fe0c dtc: Fix signedness comparisons warnings: Wrap (-1)
> > > e1147b159e92 dtc: Fix signedness comparisons warnings: change types
> > > 04cf1fdc0fcf convert-dtsv0: Fix signedness comparisons warning
> > > b30013edb878 libfdt: Fix kernel-doc comments
> > >
> > > Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> >
> > This patch causes my little-endian microblaze qemu emulations to fail
> > silently (no console output) in next-20210211. Reverting this patch
> > together with "scripts: dtc: Build fdtoverlay tool" fixes the problem.
> 
> My guess would be something in libfdt. Maybe 7cd5d5fe43d5 or
> a7c404099349, though that should return to historical behavior.
> 

7cd5d5fe43d5 is just a comment change, so that won't be it.
Reverting a7c404099349 didn't help, but reverting 5e735860c478 did the trick.
This does the trick as well:

index 3e893073da05..6ab627e52a21 100644
--- a/scripts/dtc/libfdt/fdt.c
+++ b/scripts/dtc/libfdt/fdt.c
@@ -23,8 +23,9 @@ int32_t fdt_ro_probe_(const void *fdt)
                return totalsize;

        /* The device tree must be at an 8-byte aligned address */
-       if ((uintptr_t)fdt & 7)
-               return -FDT_ERR_ALIGNMENT;
+       if ((uintptr_t)fdt & 7) {
+               // return -FDT_ERR_ALIGNMENT;
+       }

with some debugging ... aha:

Compiled-in FDT at c043f804

and in arch/microblaze/kernel/vmlinux.lds.S:

        . = ALIGN (4) ;
        __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
                _fdt_start = . ;                /* place for fdt blob */

So the fix is to either remove the 8-byte alignment check or:

diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S
index df07b3d06cd6..fb31747ec092 100644
--- a/arch/microblaze/kernel/vmlinux.lds.S
+++ b/arch/microblaze/kernel/vmlinux.lds.S
@@ -45,7 +45,7 @@ SECTIONS {
                _etext = . ;
        }
 
-       . = ALIGN (4) ;
+       . = ALIGN (8) ;
        __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) {
                _fdt_start = . ;                /* place for fdt blob */
                *(__fdt_blob) ;                 /* Any link-placed DTB */

Thanks,
Guenter




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux