[U-Boot] [PATCH v3] x86: zImage: Pass working device tree data to the kernel
Bin Meng
bmeng.cn at gmail.com
Fri Mar 30 08:10:41 UTC 2018
On Tue, Mar 27, 2018 at 9:06 AM, Ivan Gorinov <ivan.gorinov at intel.com> wrote:
> On x86 platforms, U-Boot does not pass Device Tree data to the kernel.
> This prevents the kernel from using FDT loaded by U-Boot.
>
> Read the working FDT address from the "fdtaddr" environment variable
> and add a copy of the FDT data to the kernel setup_data list.
>
> Signed-off-by: Ivan Gorinov <ivan.gorinov at intel.com>
> ---
> arch/x86/include/asm/bootparam.h | 7 +++++--
> arch/x86/lib/zimage.c | 34 ++++++++++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/bootparam.h b/arch/x86/include/asm/bootparam.h
> index 90768a9..6aba614 100644
> --- a/arch/x86/include/asm/bootparam.h
> +++ b/arch/x86/include/asm/bootparam.h
> @@ -10,8 +10,11 @@
> #include <asm/video/edid.h>
>
> /* setup data types */
> -#define SETUP_NONE 0
> -#define SETUP_E820_EXT 1
> +enum {
> + SETUP_NONE = 0,
> + SETUP_E820_EXT,
> + SETUP_DTB,
> +};
>
> /* extensible setup data list node */
> struct setup_data {
> diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
> index 2a82bc8..1ff77e9 100644
> --- a/arch/x86/lib/zimage.c
> +++ b/arch/x86/lib/zimage.c
> @@ -14,6 +14,7 @@
> */
>
> #include <common.h>
> +#include <malloc.h>
> #include <asm/acpi_table.h>
> #include <asm/io.h>
> #include <asm/ptrace.h>
Sorry to mention that I added "#include <linux/libfdt.h>" here to fix
build error seen on several x86 boards during a buildman testing.
Changed applied to u-boot-x86.
> @@ -95,6 +96,38 @@ static int get_boot_protocol(struct setup_header *hdr)
> }
> }
>
Regards,
Bin
More information about the U-Boot
mailing list