From patchwork Mon Sep 4 20:12:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 809821 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="KB+NgFn6"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xmLcz6JG8z9t2R for ; Tue, 5 Sep 2017 06:13:07 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 821FDC21E1C; Mon, 4 Sep 2017 20:12:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7437AC21E1C; Mon, 4 Sep 2017 20:12:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C2C0BC21E8A; Mon, 4 Sep 2017 20:12:52 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by lists.denx.de (Postfix) with ESMTPS id 561B1C21E23 for ; Mon, 4 Sep 2017 20:12:52 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id i145so10033685wmf.1 for ; Mon, 04 Sep 2017 13:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id; bh=0fcw8CUCUlmqK08zlTpr/O98ARXzAwSWMpuYgWLDfpk=; b=KB+NgFn6/x9Vb7KS7/Y9Vi1EvO/+ZQFhJKX1XdhApWFNjLBXsWDgJSdkHLzYOb4Y+Z 2ENXzOqs4nVss7Um/ZqYE/6BNmpqe4UsRUiqZQb34Naxx9xB8ZmOyrKb9LjI68lZSHRK rdGiY2CbBkvAJXPl/+hVd1zJxAM8jns7buXHQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0fcw8CUCUlmqK08zlTpr/O98ARXzAwSWMpuYgWLDfpk=; b=s1ELTMh/xkrKoIMuNC6VK1VxUv2oCPLJrKpfbeaO6joO/tYbhSKPz4DPEDv30PWsax spqgiZPtxGyU9wV+KfcoImlUrs/cLvl2imCal09FeNRttNmI1+Ua51nSVDHtOnmXqKBy hbsGMQ8MNqVqe5HJZ21O5XPr+BVcSC8dfMBNxc3G9vlc7iu3tF+cODMr3NUNirA1bV60 QQ7Xms8dnaK33469IyY/K8oh/1c2yfD+SoXJHLsR7JJbgvJ0txRu9bmagxXKe7dB/pwb f9rDcnGpnwEP71oKybeMLmf5dNRpMJOg8P/zJEfDMrIp9GQ9oT+N5rgorBCiwQZLs/8W 4mBw== X-Gm-Message-State: AHPjjUg8M+lnBgkhbuhdedocvxhrL9zIk74z+dF9z8A5Cplx3NRCgwzp JVm+lSIfe30LHw5u X-Google-Smtp-Source: ADKCNb475V6wiwXGTpFVoZig+L9HNnIfK6pjbHFnX5T8Xtom7W0IO7ncKmORZc70X96goJVqBo02Rw== X-Received: by 10.28.18.21 with SMTP id 21mr1284295wms.48.1504555971845; Mon, 04 Sep 2017 13:12:51 -0700 (PDT) Received: from localhost.localdomain ([195.97.110.117]) by smtp.gmail.com with ESMTPSA id u8sm3720435wrc.92.2017.09.04.13.12.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 13:12:49 -0700 (PDT) From: Pantelis Antoniou To: Tom Rini Date: Mon, 4 Sep 2017 23:12:09 +0300 Message-Id: <1504555943-12893-1-git-send-email-pantelis.antoniou@konsulko.com> X-Mailer: git-send-email 2.1.4 Cc: Marek Vasut , Pantelis Antoniou , Tero Kristo , u-boot@lists.denx.de, Maxime Ripard , Stefan Roese , Alan Ott Subject: [U-Boot] [PATCH v3 00/14] uboot overlays, FIT image & unittest X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patchset allows uboot to handle overlays in a manner that uses a base DT blob and an arbitrary number of DT overlays blobs. While it is intended to be used with FIT images since handling a multitude of device tree blobs manually is a chore, manual fdt overlay application is supported and described. Changes since v2: * Addressed review comments by splitting patches and documenting methods. * Patch preserving extra configuration on fit-load The patchset is available at https://github.com/pantoniou/u-boot/tree/uboot-overlays and is against mainline u-boot as pulled today, 4/9/2017. Franklin S Cooper Jr (1): doc: overlays: Tweak documentation regarding overlays Pantelis Antoniou (13): Introduce fdt_setprop_placeholder() method fdt: Introduce helper method fdt_overlay_apply_verbose() fdt: Switch to using the verbose overlay application method fdt: Allow stacked overlays phandle references fit: Allow multiple images per property fit: Do not throw away extra configuration on fit_image_load() fit: Introduce methods for applying overlays on fit-load fit: fdt overlays doc doc: Document how to apply fdt overlays dtbo: make dtbos special config: sandbox: Add unit tests ut: fix fdt_getprop_u32() change test: overlay: Add unit test for stacked overlay cmd/fdt.c | 7 +- common/fdt_support.c | 31 ++++ common/image-fdt.c | 7 +- common/image-fit.c | 210 ++++++++++++++++++++++-- configs/sandbox_defconfig | 2 + doc/README.fdt-overlays | 114 ++++++++++++++ doc/uImage.FIT/command_syntax_extensions.txt | 12 +- doc/uImage.FIT/overlay-fdt-boot.txt | 225 ++++++++++++++++++++++++++ doc/uImage.FIT/source_file_format.txt | 6 +- include/fdt_support.h | 2 + include/image.h | 25 +++ lib/libfdt/fdt_overlay.c | 228 ++++++++++++++++++++++++--- lib/libfdt/fdt_rw.c | 20 ++- lib/libfdt/libfdt.h | 31 ++++ scripts/Makefile.lib | 17 ++ test/overlay/Makefile | 1 + test/overlay/cmd_ut_overlay.c | 50 ++++-- test/overlay/test-fdt-overlay-stacked.dts | 21 +++ 18 files changed, 953 insertions(+), 56 deletions(-) create mode 100644 doc/README.fdt-overlays create mode 100644 doc/uImage.FIT/overlay-fdt-boot.txt create mode 100644 test/overlay/test-fdt-overlay-stacked.dts