[U-Boot] building u-boot x86 with device tree disabled , still refers to device tree function

Ding, ChiX chix.ding at intel.com
Wed Aug 17 15:01:23 CEST 2016


Hi Bin
Thanks for the reply.
I'm building for Intel Harrisonville board with Denverton chipset.

Cheers,
Chi

-----Original Message-----
From: Bin Meng [mailto:bmeng.cn at gmail.com] 
Sent: Friday, August 12, 2016 5:12 AM
To: Ding, ChiX <chix.ding at intel.com>; Simon Glass <sjg at chromium.org>
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] building u-boot x86 with device tree disabled , still refers to device tree function

Hi,

On Thu, Aug 11, 2016 at 10:36 PM, Ding, ChiX <chix.ding at intel.com> wrote:
> Hi there
> I'm building u-boot as payload for x86 platform. I didn't enable 
> device tree in menuconfig (CONFIG_OF_CONTROL is not set) because I use 
> a board config file coreboot.h. When I built u-boot, it reports error 
> during linking stage : undefined reference to dm_scan_fdt_dev
>

Which board are you building?

> arch/x86/lib/built-in.o:(.u_boot_list_2_uclass_2_lpc+0x8): undefined reference to `dm_scan_fdt_dev'
> common/built-in.o:(.u_boot_list_2_uclass_2_usb_hub+0x8): undefined reference to `dm_scan_fdt_dev'
> drivers/built-in.o:(.u_boot_list_2_uclass_2_pch+0x8): undefined reference to `dm_scan_fdt_dev'
> drivers/pci/built-in.o:(.u_boot_list_2_uclass_2_pci+0x8): undefined reference to `dm_scan_fdt_dev'
> drivers/spi/built-in.o:(.u_boot_list_2_uclass_2_spi+0x8): undefined reference to `dm_scan_fdt_dev'
> drivers/usb/host/built-in.o:(.u_boot_list_2_uclass_2_usb+0x8): more 
> undefined references to `dm_scan_fdt_dev' follow
> Makefile:1189: recipe for target 'u-boot' failed
>
> I looked at the code and see arch/x86/lib/lpc-uclass.c refers to a 
> function "dm_scan_fdt_dev " which is defined in drivers/core/root.c 
> and it looks like a device tree function
>
>
> UCLASS_DRIVER(lpc) = {
>         .id             = UCLASS_LPC,
>         .name           = "lpc",
>         .post_bind      = dm_scan_fdt_dev,
> };
>
> Because device tree isn't enabled, the function isn't compiled and causes the problem while linking.
> It's only compiled when the following is true #if 
> CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA) If I 
> comment out the line, it would compile and build. But I'm not sure if it's the right way to do it.
>
> Is it normal behavior? I thought that when not enabling device tree, the code shouldn't use device tree function?
> Can anyone help on this please?
>

Please refer to README.x86 for how to build U-Boot as the coreboot payload.

Regards,
Bin
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.


More information about the U-Boot mailing list