From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c
Date: Tue, 16 Jun 2015 15:07:33 -0600 [thread overview]
Message-ID: <CAPnjgZ30UjRW9NkR15VKX6=cOuq5dkfU1m=EDF8Hu_01arGbRQ@mail.gmail.com> (raw)
In-Reply-To: <20150616200450.GB28577@bill-the-cat>
+Masahiro, who might have some clues
Hi Tom,
On 16 June 2015 at 14:04, Tom Rini <trini@konsulko.com> wrote:
> On Tue, Jun 16, 2015 at 12:24:01PM -0600, Simon Glass wrote:
>> Hi Peter,
>>
>> On 15 June 2015 at 13:40, Peter Robinson <pbrobinson@gmail.com> wrote:
>> > 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
>>
>> 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
next prev parent reply other threads:[~2015-06-16 21:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 19:40 [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c Peter Robinson
2015-06-15 19:40 ` [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c due to a with with the following error: Peter Robinson
2015-06-16 18:24 ` [U-Boot] [PATCH] If CONFIG_SANDBOX isn't defined the build fails in fw_env.c Simon Glass
2015-06-16 20:04 ` Tom Rini
2015-06-16 21:07 ` Simon Glass [this message]
2015-06-17 11:29 ` Masahiro Yamada
2015-06-17 15:06 ` Simon Glass
2015-06-17 15:26 ` Peter Robinson
2015-06-17 16:00 ` Peter Robinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPnjgZ30UjRW9NkR15VKX6=cOuq5dkfU1m=EDF8Hu_01arGbRQ@mail.gmail.com' \
--to=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.