Hello everyone!
I have compilation problem
If build with gcc
$ make GEN build.h CC romstage.inc src/mainboard/gigabyte/ma785gmt/romstage.c: In function 'cache_as_ram_main': src/mainboard/gigabyte/ma785gmt/romstage.c:220:1: error: bp cannot be used in asm here } ^ make: *** [build/mainboard/gigabyte/ma785gmt/romstage.pre.inc] Error 1
I've tried gcc-4.4, gcc-4.8
If build with clang
$ make GEN build.h CC romstage.inc In file included from src/mainboard/gigabyte/ma785gmt/romstage.c:68: In file included from src/cpu/amd/model_10xxx/init_cpus.c:29: In file included from src/northbridge/amd/amdfam10/raminit_amdmct.c:45: src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:442:45: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] int nbPstate1supported = ! (msr.hi && (1 << (NB_GfxNbPstateDis -32))) ; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:442:45: note: use '&' for a bitwise operation int nbPstate1supported = ! (msr.hi && (1 << (NB_GfxNbPstateDis -32))) ; ^~ & src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:442:45: note: remove constant to silence this warning int nbPstate1supported = ! (msr.hi && (1 << (NB_GfxNbPstateDis -32))) ; ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:459:39: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] int powerDown = dRAMConfigHi && (1 << PowerDownEn ) ; ^ ~~~~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:459:39: note: use '&' for a bitwise operation int powerDown = dRAMConfigHi && (1 << PowerDownEn ) ; ^~ & src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:459:39: note: remove constant to silence this warning int powerDown = dRAMConfigHi && (1 << PowerDownEn ) ; ~^~~~~~~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:460:33: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] int ddr3 = dRAMConfigHi && (1 << Ddr3Mode ) ; ^ ~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:460:33: note: use '&' for a bitwise operation int ddr3 = dRAMConfigHi && (1 << Ddr3Mode ) ; ^~ & src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:460:33: note: remove constant to silence this warning int ddr3 = dRAMConfigHi && (1 << Ddr3Mode ) ; ~^~~~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:462:37: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] int pchgPDModeSel = dRAMMRS && (1 << PchgPDModeSel ) ; ^ ~~~~~~~~~~~~~~~~~~~~~ src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:462:37: note: use '&' for a bitwise operation int pchgPDModeSel = dRAMMRS && (1 << PchgPDModeSel ) ; ^~ & src/northbridge/amd/amdfam10/../amdmct/wrappers/mcti_d.c:462:37: note: remove constant to silence this warning int pchgPDModeSel = dRAMMRS && (1 << PchgPDModeSel ) ; ~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from src/mainboard/gigabyte/ma785gmt/romstage.c:68: In file included from src/cpu/amd/model_10xxx/init_cpus.c:29: In file included from src/northbridge/amd/amdfam10/raminit_amdmct.c:46: src/northbridge/amd/amdfam10/../amdmct/mct_ddr3/mct_d.c:3383:24: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((pDCTstat->Speed == 3)) ~~~~~~~~~~~~~~~~^~~~ src/northbridge/amd/amdfam10/../amdmct/mct_ddr3/mct_d.c:3383:24: note: remove extraneous parentheses around the comparison to silence this warning if ((pDCTstat->Speed == 3)) ~ ^ ~ src/northbridge/amd/amdfam10/../amdmct/mct_ddr3/mct_d.c:3383:24: note: use '=' to turn this equality comparison into an assignment if ((pDCTstat->Speed == 3)) ^~ = In file included from src/mainboard/gigabyte/ma785gmt/romstage.c:68: In file included from src/cpu/amd/model_10xxx/init_cpus.c:29: In file included from src/northbridge/amd/amdfam10/raminit_amdmct.c:61: src/northbridge/amd/amdfam10/../amdmct/mct_ddr3/mhwlc_d.c:505:41: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((pDCTData->MaxDimmsInstalled == 4)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ src/northbridge/amd/amdfam10/../amdmct/mct_ddr3/mhwlc_d.c:505:41: note: remove extraneous parentheses around the comparison to silence this warning if ((pDCTData->MaxDimmsInstalled == 4)) ~ ^ ~ src/northbridge/amd/amdfam10/../amdmct/mct_ddr3/mhwlc_d.c:505:41: note: use '=' to turn this equality comparison into an assignment if ((pDCTData->MaxDimmsInstalled == 4)) ^~ = 6 errors generated. make: *** [build/mainboard/gigabyte/ma785gmt/romstage.pre.inc] Error 1
.config in attachement
Am 20.11.2013 15:33, schrieb Tcendrovskii Vladislav:
src/mainboard/gigabyte/ma785gmt/romstage.c:220:1: error: bp cannot be used in asm here
I've tried gcc-4.4, gcc-4.8
This is a known issue with gcc-4.8 and 4.9. 4.4 should work - or at least present a different issue, but certainly not this one. You might have to delete .xcompile when switching compilers.
If build with clang
clang support isn't complete yet.
If in doubt, use our cross compiler: make crossgcc (and then wait until it builds the compilers).
Patrick
Patrick Georgi wrote:
Am 20.11.2013 15:33, schrieb Tcendrovskii Vladislav:
src/mainboard/gigabyte/ma785gmt/romstage.c:220:1: error: bp cannot be used in asm here
I've tried gcc-4.4, gcc-4.8
This is a known issue with gcc-4.8 and 4.9. 4.4 should work - or at least present a different issue, but certainly not this one. You might have to delete .xcompile when switching compilers.
If build with clang
clang support isn't complete yet.
If in doubt, use our cross compiler: make crossgcc (and then wait until it builds the compilers).
Patrick
I've tried to start from the beginning with gcc 4.7
Warning: no suitable GCC for x86. Warning: no suitable GCC for armv7. Warning: no suitable GCC for aarch64. # # configuration written to .config #
*** End of coreboot configuration. *** Execute 'make' to build or try 'make help'.
$ make
bin/sh: -print-libgcc-file-name: команда не найдена /bin/sh: -print-libgcc-file-name: команда не найдена HOSTCC nvramtool/cli/nvramtool.o HOSTCC nvramtool/cli/opts.o HOSTCC nvramtool/cmos_lowlevel.o HOSTCC nvramtool/cmos_ops.o HOSTCC nvramtool/common.o HOSTCC nvramtool/compute_ip_checksum.o HOSTCC nvramtool/hexdump.o HOSTCC nvramtool/input_file.o HOSTCC nvramtool/layout.o HOSTCC nvramtool/accessors/layout-common.o HOSTCC nvramtool/accessors/layout-text.o HOSTCC nvramtool/accessors/layout-bin.o HOSTCC nvramtool/lbtable.o HOSTCC nvramtool/reg_expr.o HOSTCC nvramtool/cbfs.o HOSTCC nvramtool/accessors/cmos-mem.o HOSTCC nvramtool/nvramtool (link) OPTION option_table.h /bin/sh: --version: команда не найдена /bin/sh: --version: команда не найдена /bin/sh: --version: команда не найдена GEN build.h CC romstage.inc make: MMD: Команда не найдена POST romstage.inc sed: невозможно прочитать build/mainboard/gigabyte/ma785gmt/romstage.pre.inc: Нет такого файла или каталога make: *** [build/mainboard/gigabyte/ma785gmt/romstage.inc] Ошибка 2
$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.3-8' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.3 (Debian 4.7.3-8)
Vladislav
Am 20.11.2013 17:59, schrieb Tcendrovskii Vladislav:
OPTION option_table.h /bin/sh: --version: команда не найдена /bin/sh: --version: команда не найдена /bin/sh: --version: команда не найдена GEN build.h CC romstage.inc make: MMD: Команда не найдена POST romstage.inc sed: невозможно прочитать build/mainboard/gigabyte/ma785gmt/romstage.pre.inc: Нет такого файла или каталога make: *** [build/mainboard/gigabyte/ma785gmt/romstage.inc] Ошибка 2
I'm not quite sure what that is, but it looks different from the earlier error. could you please rerun that with LC_ALL=C?
Thanks, Patrick
Patrick Georgi wrote:
Am 20.11.2013 17:59, schrieb Tcendrovskii Vladislav:
OPTION option_table.h /bin/sh: --version: команда не найдена /bin/sh: --version: команда не найдена /bin/sh: --version: команда не найдена GEN build.h CC romstage.inc make: MMD: Команда не найдена POST romstage.inc sed: невозможно прочитать build/mainboard/gigabyte/ma785gmt/romstage.pre.inc: Нет такого файла или каталога make: *** [build/mainboard/gigabyte/ma785gmt/romstage.inc] Ошибка 2
I'm not quite sure what that is, but it looks different from the earlier error. could you please rerun that with LC_ALL=C?
make /bin/sh: -print-libgcc-file-name: command not found /bin/sh: -print-libgcc-file-name: command not found /bin/sh: --version: command not found /bin/sh: --version: command not found /bin/sh: --version: command not found GEN build.h CC romstage.inc make: MMD: Command not found POST romstage.inc sed: can't read build/mainboard/gigabyte/ma785gmt/romstage.pre.inc: No such file or directory make: *** [build/mainboard/gigabyte/ma785gmt/romstage.inc] Error 2
Thanks, Patrick
Am 2013-11-20 21:58, schrieb Tcendrovskii Vladislav:
GEN build.h CC romstage.inc
make: MMD: Command not found
This looks like it didn't find any gcc now (so "$(CC) -MMD ..." was interpreted as "-MMD ...", where the initial "-" is a special character for make and hence dropped).
you can try to run util/xcompile/xcompile manually to see what's going on there. It's the tool we use to generate the .xcompile file.
Patrick