Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with host installed libfdt headers #2

Open
wants to merge 5 commits into
base: v2018.01-solidrun-a38x
Choose a base branch
from

Conversation

baruchsiach
Copy link

Cherry pick a number of patches from upstream that make sure we use the correct libdft headers.

Add another local fix for missing CONFIG_MVEBU_UBOOT_DFLT_NAME definition.

masahir0y and others added 5 commits May 3, 2018 14:07
libfdt_env.h exists to contain system-dependent defines:

  - typedef of fdt*_t
  - fdt*_to_cpu(), cpu_to_fdt*

working_fdt and FDT_RAMDISK_OVERHEAD are unrelated to the environment,
so they must get out of this header.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 25ad202)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
libfdt_env.h is supposed to provide system-dependent defines.

scripts/dtc/libfdt/libfdt_env.h from upstream DTC is suitable
for user-space, so we should use this for USE_HOSTCC case.

For compiling U-Boot, we need to override such system-dependent
defines, so use <linux/libfdt_env.h> imported from Linux.

<libfdt.h> selects a proper one.  Maybe, we should split header
inclusion completely, but I do not want too many patches at one.

I can rip off the include/libfdt_env.h from HOST_EXTRACFLAGS.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 6622822)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.

tools/Makefile has the following line:

  HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \

All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT.  Then, <stdbool.h> is indirectly included
as follows:

     include/libfdt_env.h
  -> include/linux/types.h
  -> <stdbool.h>

I am fixing this horrible crap.  In advance, I need to add necessary
include directives explicitly.  tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit d2bf115)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
There are no headers for libfdt in lib/libfdt, as they are instead
located in scripts/dtc/libfdt. Specifying lib/libfdt for headers
inclusion in host tools results in using the system libfdt headers,
which is not what we want. Change this to the proper path.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
(cherry picked from commit e0d20dc)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Commit 2fde99b (mvebu: bubt: Key default bubt image rom based on
selected boot device) made CONFIG_MVEBU_UBOOT_DFLT_NAME depend on
CONFIG_ENV_IS_ON_SELECTED_BOOT_DEVICE. This breaks the build when
CONFIG_ENV_IS_ON_SELECTED_BOOT_DEVICE is not defined:

cmd/mvebu/bubt.c: In function ‘do_bubt_cmd’:
cmd/mvebu/bubt.c:944:10: error: ‘CONFIG_MVEBU_UBOOT_DFLT_NAME’ undeclared (first use in this function); did you mean ‘CONFIG_SMBIOS_PRODUCT_NAME’?
          CONFIG_MVEBU_UBOOT_DFLT_NAME,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

clearfog_defconfig does not define
CONFIG_ENV_IS_ON_SELECTED_BOOT_DEVICE, so this config is currently
broken.

Remove the dependency to make sure CONFIG_MVEBU_UBOOT_DFLT_NAME is
always defined.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
@jnettlet
Copy link
Member

jnettlet commented May 3, 2018

We cannot remove the dependency for CONFIG_MVEBU_UBOOT_DFLT_NAME or else it will always default to the default. This is an issue with Kconfig because it sets defaults at parsing time not at selection time. To fix this build error it needs to just be added in the clearfog config where I catch. #ifndef CONFIG_ENV_IS_ON_SELECTED_BOOT_DEVICE

Josua-SR pushed a commit to Josua-SR/u-boot that referenced this pull request Oct 17, 2019
i.MX8MQ has two USB3 controllers. Previously we only added the SolidRun#2
controller support in driver. This patch adds the address for SolidRun#1
controller.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Jun Li <jun.li@nxp.com>
(cherry picked from commit 3172dab)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants