Skip to contentSkip to conversation

If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

PATCH New Peter Robinson 4 participants 9 messages Jun 15, 2015 – Jun 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Regards,
Peter

#1 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c due to a with with the following error:

error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS

A check to see if it's defined fixes this issue.

---
 include/configs/sandbox.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/sandbox.h +4 -0
index 3caa83c..f72675b 100644
@@ -6,6 +6,10 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#ifndef CONFIG_SANDBOX
+#define CONFIG_SANDBOX
+#endif
+
 #ifdef FTRACE
 #define CONFIG_TRACE
 #define CONFIG_CMD_TRACE
Signature · 1 line
2.4.3
#2 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

In reply to Peter Robinson

Hi Peter,

Quoted 9 lines · Peter Robinson

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

Quoted 8 lines
                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

CONFIG_SANDBOX is defined in arch/Kconfig. It ends up in your build directory in these files.

b/sandbox/include/config/auto.conf:CONFIG_SANDBOX=y b/sandbox/include/generated/autoconf.h:#define CONFIG_SANDBOX 1

autoconf.h is the one that matters. I wonder why this is not included in your case?

I notice that fw_env.h starts like this:

/* Pull in the current config to define the default environment */ #ifndef __ASSEMBLY__
#define __ASSEMBLY__ /* get only #defines from config.h */ #include <config.h>
#undef __ASSEMBLY__
#else
#include <config.h>
#endif
#include <generated/autoconf.h>

Should the inclusion of autoconf.h go above the inclusion of config.h, perhaps?

Regards,
Simon

#3 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

Quoted 21 lines · Simon Glass

Hi Peter,

Quoted 9 lines · Peter Robinson

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

Quoted 8 lines
                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Quoted 2 lines

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

I see it too. Make sure you start with an empty objdir. 'defconfig' and 'sandbox_defconfig' both do it for me.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150616/626ecdfe/attachment.sig>
#4 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

+Masahiro, who might have some clues

Hi Tom,

Quoted 22 lines · Tom Rini
Quoted 21 lines · Simon Glass

Hi Peter,

Quoted 17 lines · Peter Robinson

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Quoted 5 lines
Quoted 2 lines

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

I see it too. Make sure you start with an empty objdir. 'defconfig' and 'sandbox_defconfig' both do it for me.

OK, I see. The oldsilentconfig seem to do something odd. Without that it works for me. Why is it needed?

(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u> !rm rm -r b/sandbox
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u> make O=b/sandbox defconfig
make[1]: Entering directory `/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'

  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o

SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'sandbox_defconfig' #

# configuration written to .config
#
make[1]: Leaving directory
`/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u>
make O=b/sandbox tools-all -s
/usr/local/google/c/cosarm/src/third_party/u-boot/files/tools/easylogo/easylogo.c:
In function ?image_load_tga?:
/usr/local/google/c/cosarm/src/third_party/u-boot/files/tools/easylogo/easylogo.c:160:8:
warning: ignoring return value of ?fread?, declared with attribute
warn_unused_result [-Wunused-result]
  fread (&header, sizeof (header), 1, file);
        ^
/usr/local/google/c/cosarm/src/third_party/u-boot/files/tools/easylogo/easylogo.c:196:8:
warning: ignoring return value of ?fread?, declared with attribute
warn_unused_result [-Wunused-result]
  fread (image->data, image->size, 1, file);
        ^
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u> !rm
rm -r b/sandbox
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u>
make O=b/sandbox defconfig
make[1]: Entering directory
`/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'
  HOSTCC  scripts/basic/fixdep
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
*** Default configuration is based on 'sandbox_defconfig'
#
# configuration written to .config
#
make[1]: Leaving directory
`/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u>
make O=b/sandbox silentoldconfig
make[1]: Entering directory
`/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'
  GEN     ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: Leaving directory
`/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u>
make O=b/sandbox tools-all -s
In file included from
/usr/local/google/c/cosarm/src/third_party/u-boot/files/tools/env/fw_env.c:34:0:
/usr/local/google/c/cosarm/src/third_party/u-boot/files/tools/env/fw_env.h:11:20:
fatal error: config.h: No such file or directory
 #include <config.h>
                    ^
compilation terminated.
make[2]: *** [tools/env/fw_env.o] Error 1
make[1]: *** [env] Error 2
make: *** [sub-make] Error 2

So it seems to work fine without silentoldconfig. A normal 'defconfig' creates these files:

(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u> ls -l find b/sandbox/ -type f
-rw-r----- 1 sjg eng 5666 Jun 16 15:02 b/sandbox/.config
-rw-r----- 1 sjg eng 674 Jun 16 15:02 b/sandbox/Makefile
-rwxr-x--- 1 sjg eng 14005 Jun 16 15:02 b/sandbox/scripts/basic/fixdep
-rw-r----- 1 sjg eng 4293 Jun 16 15:02 b/sandbox/scripts/basic/.fixdep.cmd
-rwxr-x--- 1 sjg eng 115167 Jun 16 15:02 b/sandbox/scripts/kconfig/conf
-rw-r----- 1 sjg eng 109 Jun 16 15:02 b/sandbox/scripts/kconfig/.conf.cmd
-rw-r----- 1 sjg eng 22712 Jun 16 15:02 b/sandbox/scripts/kconfig/conf.o
-rw-r----- 1 sjg eng 3873 Jun 16 15:02 b/sandbox/scripts/kconfig/.conf.o.cmd

-rw-r----- 1 sjg eng  12255 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.hash.c
-rw-r----- 1 sjg eng  58266 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.lex.c
-rw-r----- 1 sjg eng  75191 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.tab.c

-rw-r----- 1 sjg eng 155336 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.tab.o
-rw-r----- 1 sjg eng 5213 Jun 16 15:02
b/sandbox/scripts/kconfig/.zconf.tab.o.cmd
(try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u>

But with silentoldconfig we get a lot more:

make O=b/sandbox silentoldconfig
make[1]: Entering directory `/usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: Leaving directory /usr/local/google/c/cosarm/src/third_party/u-boot/files/b/sandbox' (try-peter=0155f0: -- b/ index.html index.html.1 sandbox/ test/) u> ls -l find b/sandbox/ -type f`
-rw-r----- 1 sjg eng 5666 Jun 16 15:02 b/sandbox/.config
-rw-r----- 1 sjg eng 1960 Jun 16 15:02 b/sandbox/include/config/auto.conf
-rw-r----- 1 sjg eng 18928 Jun 16 15:02 b/sandbox/include/config/auto.conf.cmd
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/bootstage.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/bootstage/report.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/bootstage/stash/addr.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/bootstage/stash/size.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/bootstage/user/count.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/cc/optimize/for/size.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/bootm.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/crc32.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/cros/ec.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/dm.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02

b/sandbox/include/config/cmd/exportenv.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/cmd/go.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/cmd/importenv.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/net.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/pmic.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02
b/sandbox/include/config/cmd/regulator.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cmd/sound.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cros/ec.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/cros/ec/keyb.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02

b/sandbox/include/config/cros/ec/sandbox.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/default/device/tree.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/dm/device/remove.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/eth.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/gpio.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/i2c.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/pci.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/pmic.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02

b/sandbox/include/config/dm/pmic/sandbox.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/dm/regulator.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/dm/regulator/sandbox.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/rtc.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/seq/alias.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/serial.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/spi/flash.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/spi.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/stdio.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/usb.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/dm/warn.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/errno/str.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/eth/sandbox.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02
b/sandbox/include/config/eth/sandbox/raw.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/expert.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/fit.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02

b/sandbox/include/config/fit/signature.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/fit/verbose.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/have/generic/board.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/localversion/auto.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/localversion.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/netdevices.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/net.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/of/control.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/of/hostfile.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/pci.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/pci/sandbox.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/regex.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/rsa.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02
b/sandbox/include/config/rsa/software/exp.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02
b/sandbox/include/config/sandbox/gpio/count.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/sandbox/gpio.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/sandbox.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02
b/sandbox/include/config/sandbox/serial.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/sandbox/spi.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/sound.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02

b/sandbox/include/config/sound/sandbox.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/spi/flash/sandbox.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/support/of/control.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/sys/arch.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/sys/board.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02

b/sandbox/include/config/sys/config/name.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/sys/extra/options.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/sys/generic/board.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/sys/hz.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/sys/i2c/sandbox.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/sys/malloc/clear/on/init.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/sys/malloc/f.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/sys/malloc/f/len.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/sys/vsnprintf.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/tpm/tis/sandbox.h
-rw-r----- 1 sjg eng 84 Jun 16 15:02 b/sandbox/include/config/tristate.conf
-rw-r----- 1 sjg eng 0 Jun 16 15:02 b/sandbox/include/config/unit/test.h
-rw-r----- 1 sjg eng 0 Jun 16 15:02
b/sandbox/include/config/usb/arch/has/hcd.h

-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/usb/emul.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/usb.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/usb/storage.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/ut/dm.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/ut/env.h
-rw-r----- 1 sjg eng      0 Jun 16 15:02 b/sandbox/include/config/ut/time.h

-rw-r----- 1 sjg eng 2673 Jun 16 15:02 b/sandbox/include/generated/autoconf.h
-rw-r----- 1 sjg eng 674 Jun 16 15:02 b/sandbox/Makefile
-rwxr-x--- 1 sjg eng 14005 Jun 16 15:02 b/sandbox/scripts/basic/fixdep
-rw-r----- 1 sjg eng 4293 Jun 16 15:02 b/sandbox/scripts/basic/.fixdep.cmd
-rwxr-x--- 1 sjg eng 115167 Jun 16 15:02 b/sandbox/scripts/kconfig/conf
-rw-r----- 1 sjg eng 109 Jun 16 15:02 b/sandbox/scripts/kconfig/.conf.cmd
-rw-r----- 1 sjg eng 22712 Jun 16 15:02 b/sandbox/scripts/kconfig/conf.o
-rw-r----- 1 sjg eng 3873 Jun 16 15:02 b/sandbox/scripts/kconfig/.conf.o.cmd

-rw-r----- 1 sjg eng  12255 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.hash.c
-rw-r----- 1 sjg eng  58266 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.lex.c
-rw-r----- 1 sjg eng  75191 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.tab.c

-rw-r----- 1 sjg eng 155336 Jun 16 15:02 b/sandbox/scripts/kconfig/zconf.tab.o
-rw-r----- 1 sjg eng 5213 Jun 16 15:02
b/sandbox/scripts/kconfig/.zconf.tab.o.cmd

Regards,
Simon

#5 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

In reply to Simon Glass

Hi.

2015-06-17 3:24 GMT+09:00 Simon Glass <[email protected]>:

Quoted 45 lines

Hi Peter,

Quoted 9 lines · Peter Robinson

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

Quoted 8 lines
                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

CONFIG_SANDBOX is defined in arch/Kconfig. It ends up in your build directory in these files.

b/sandbox/include/config/auto.conf:CONFIG_SANDBOX=y b/sandbox/include/generated/autoconf.h:#define CONFIG_SANDBOX 1

autoconf.h is the one that matters. I wonder why this is not included in your case?

I notice that fw_env.h starts like this:

/* Pull in the current config to define the default environment */ #ifndef __ASSEMBLY__
#define __ASSEMBLY__ /* get only #defines from config.h */ #include <config.h>
#undef __ASSEMBLY__
#else
#include <config.h>
#endif
#include <generated/autoconf.h>

Quoted 1 line

Should the inclusion of autoconf.h go above the inclusion of config.h, perhaps?

Right.

autoconf.h should be included earlier than any other headers. Besides, linux/kconfig.h is preferred to generated/autoconf.h

I posted a patch for this problem last year. See
http://patchwork.ozlabs.org/patch/417192/

I do not know why it was dismissed long.

And then, another patch was posted and picked up.

http://patchwork.ozlabs.org/patch/461411/

But, it was not good...

Signature · 2 lines
Best Regards
Masahiro Yamada
#6 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

Hi Peter,

Quoted 61 lines · Masahiro Yamada

Hi.

2015-06-17 3:24 GMT+09:00 Simon Glass <[email protected]>:

Quoted 45 lines

Hi Peter,

Quoted 9 lines · Peter Robinson

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

Quoted 8 lines
                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

CONFIG_SANDBOX is defined in arch/Kconfig. It ends up in your build directory in these files.

b/sandbox/include/config/auto.conf:CONFIG_SANDBOX=y b/sandbox/include/generated/autoconf.h:#define CONFIG_SANDBOX 1

autoconf.h is the one that matters. I wonder why this is not included in your case?

I notice that fw_env.h starts like this:

/* Pull in the current config to define the default environment */ #ifndef __ASSEMBLY__
#define __ASSEMBLY__ /* get only #defines from config.h */ #include <config.h>
#undef __ASSEMBLY__
#else
#include <config.h>
#endif
#include <generated/autoconf.h>

Quoted 1 line

Should the inclusion of autoconf.h go above the inclusion of config.h, perhaps?

Right.

autoconf.h should be included earlier than any other headers. Besides, linux/kconfig.h is preferred to generated/autoconf.h

I posted a patch for this problem last year. See
http://patchwork.ozlabs.org/patch/417192/

Quoted 8 lines

I do not know why it was dismissed long.

And then, another patch was posted and picked up.

http://patchwork.ozlabs.org/patch/461411/

But, it was not good...

With Masahiro's comments are you able to update your patch?

Regards,
Simon

#7 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

Hi Simon,

Quoted 65 lines · Masahiro Yamada
Quoted 64 lines

Hi.

2015-06-17 3:24 GMT+09:00 Simon Glass <[email protected]>:

Quoted 45 lines

Hi Peter,

Quoted 9 lines · Peter Robinson

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

Quoted 8 lines
                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

CONFIG_SANDBOX is defined in arch/Kconfig. It ends up in your build directory in these files.

b/sandbox/include/config/auto.conf:CONFIG_SANDBOX=y b/sandbox/include/generated/autoconf.h:#define CONFIG_SANDBOX 1

autoconf.h is the one that matters. I wonder why this is not included in your case?

I notice that fw_env.h starts like this:

/* Pull in the current config to define the default environment */ #ifndef __ASSEMBLY__
#define __ASSEMBLY__ /* get only #defines from config.h */ #include <config.h>
#undef __ASSEMBLY__
#else
#include <config.h>
#endif
#include <generated/autoconf.h>

Quoted 1 line

Should the inclusion of autoconf.h go above the inclusion of config.h, perhaps?

Right.

autoconf.h should be included earlier than any other headers. Besides, linux/kconfig.h is preferred to generated/autoconf.h

I posted a patch for this problem last year. See
http://patchwork.ozlabs.org/patch/417192/

I do not know why it was dismissed long.

Quoted 7 lines
Quoted 5 lines

And then, another patch was posted and picked up.

http://patchwork.ozlabs.org/patch/461411/

But, it was not good...

With Masahiro's comments are you able to update your patch?

Yes, based on the above comments I'll send a new patch through shortly, just testing it builds etc.

Peter

#8 lore raw

PATCH 1/1 If CONFIG_SANDBOX isn't defined the build fails in fw_env.c

In reply to Simon Glass

Hi Simon,

Quoted 58 lines
Quoted 58 lines
Quoted 43 lines · Peter Robinson
Quoted 9 lines

In our Fedora builds we get the below errors if we build the following using a vanilla u-boot 2015.07rc2. I'm not sure if it's the best fix but it fixes the build for rc2.

make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" defconfig V=1 O=builds/ make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all V=1 O=builds/

gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wp,-MD,tools/env/.fw_env.o.d -Itools/env -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafterinclude -idirafter../include -idirafter../arch/sandbox/include -idirafter ../tools/env -DUSE_HOSTCC -DTEXT_BASE= -c -o tools/env/fw_env.o ../tools/env/fw_env.c In file included from ../include/configs/sandbox.h:130:0,

Quoted 8 lines
                 from include/config.h:5,
                 from ../tools/env/fw_env.h:11,
                 from ../tools/env/fw_env.c:34:

../include/env_default.h:104:2: error: expected '}' before 'BOOT_TARGET_DEVICES_references_HOST_without_CONFIG_SANDBOX'
CONFIG_EXTRA_ENV_SETTINGS
^
scripts/Makefile.host:108: recipe for target 'tools/env/fw_env.o' failed
make[2]: *** [tools/env/fw_env.o] Error 1

Thanks for the report. I can't seem to repeat this. The build completes OK for me.

CONFIG_SANDBOX is defined in arch/Kconfig. It ends up in your build directory in these files.

b/sandbox/include/config/auto.conf:CONFIG_SANDBOX=y b/sandbox/include/generated/autoconf.h:#define CONFIG_SANDBOX 1

autoconf.h is the one that matters. I wonder why this is not included in your case?

I notice that fw_env.h starts like this:

/* Pull in the current config to define the default environment */ #ifndef __ASSEMBLY__
#define __ASSEMBLY__ /* get only #defines from config.h */ #include <config.h>
#undef __ASSEMBLY__
#else
#include <config.h>
#endif
#include <generated/autoconf.h>

Quoted 1 line

Should the inclusion of autoconf.h go above the inclusion of config.h, perhaps?

Right.

autoconf.h should be included earlier than any other headers. Besides, linux/kconfig.h is preferred to generated/autoconf.h

I posted a patch for this problem last year. See
http://patchwork.ozlabs.org/patch/417192/

I do not know why it was dismissed long.

Quoted 7 lines
Quoted 5 lines

And then, another patch was posted and picked up.

http://patchwork.ozlabs.org/patch/461411/

But, it was not good...

With Masahiro's comments are you able to update your patch?

Patch updated [1] and posted.

Peter

[1] http://lists.denx.de/pipermail/u-boot/2015-June/216866.html