[Pdbg] [PATCH v2 19/22] libpdbg: Add parsing of backend device tree

Alistair Popple alistair at popple.id.au
Mon Sep 23 14:41:35 AEST 2019


Reviewed-by: Alistair Popple <alistair at popple.id.au>

On Friday, 20 September 2019 3:16:48 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  libpdbg/device.c | 3 +++
>  libpdbg/dtb.c    | 1 +
>  libpdbg/target.h | 1 +
>  3 files changed, 5 insertions(+)
> 
> diff --git a/libpdbg/device.c b/libpdbg/device.c
> index 62cac2b..1947665 100644
> --- a/libpdbg/device.c
> +++ b/libpdbg/device.c
> @@ -750,6 +750,9 @@ bool pdbg_targets_init(void *fdt)
>  	if (!pdbg_dt_root)
>  		return false;
>  
> +	if (dtb.backend)
> +		dt_expand(pdbg_dt_root, dtb.backend);
> +
>  	dt_expand(pdbg_dt_root, dtb.system);
>  
>  	pdbg_targets_init_virtual(pdbg_dt_root, pdbg_dt_root);
> diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
> index e793cf2..f548816 100644
> --- a/libpdbg/dtb.c
> +++ b/libpdbg/dtb.c
> @@ -232,6 +232,7 @@ void pdbg_default_dtb(struct pdbg_dtb *dtb)
>  	char *fdt = getenv("PDBG_DTB");
>  
>  	*dtb = (struct pdbg_dtb) {
> +		.backend = NULL,
>  		.system = NULL,
>  	};
>  
> diff --git a/libpdbg/target.h b/libpdbg/target.h
> index dad8ee9..6def1c2 100644
> --- a/libpdbg/target.h
> +++ b/libpdbg/target.h
> @@ -54,6 +54,7 @@ struct pdbg_target {
>  };
>  
>  struct pdbg_dtb {
> +	void *backend;
>  	void *system;
>  };
>  
> 






More information about the Pdbg mailing list