Open craftyguy opened 2 years ago
If Martijn agrees, I'll start building for the new release.
Yes I agree
Seems like the IMX8 BL31 fails to compile on GCC 12 due to some warnings.
+ make PLAT=imx8mq CROSS_COMPILE=aarch64-linux-gnu- bl31
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make
rule.
make[1]: Entering directory '/tmp/Jumpdrive/build/u-boot/librem5/arm-trusted-
firmware'
CC plat/imx/imx8mq/imx8mq_bl31_setup.c
CC plat/imx/imx8mq/src.c
In file included from plat/imx/imx8mq/src.c:13:
In function 'mmio_read_8',
inlined from 'imx_soc_handler' at plat/imx/imx8mq/src.c:59:16:
include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of
'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
19 | return *(volatile uint8_t*)addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~
In function 'mmio_read_8',
inlined from 'imx_soc_handler' at plat/imx/imx8mq/src.c:61:17:
include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of
'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
19 | return *(volatile uint8_t*)addr;
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:711: build/imx8mq/release/bl31/src.o] Error 1
make[1]: Leaving directory '/tmp/Jumpdrive/build/u-boot/librem5/arm-trusted-
firmware'
make: *** [Makefile:247: u-boot-librem5.bin] Error 2
@Danct12 using the following gets me past the array-bound
errors:
CFLAGS="--param=min-pagesize=0" make -j $(nproc) purism-librem5.tar.xz
See this gcc
bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
but I get fatal error: inttypes.h: No such file or directory
:
m4_main.c:6:10: fatal error: inttypes.h: No such file or directory
6 | #include <inttypes.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: m4_main.o] Error 1
make[1]: Leaving directory '/home/ebeale/Projects/development/gits/Jumpdrive/build/u-boot/librem5/Cortex_M4'
make: *** [Makefile:247: u-boot-librem5.bin] Error 2
Okay, I got it to build successfully. In my case I needed the arm-none-eabi-newlib
package installed. Then I pointed gcc
at it's inttypes.h
header file location:
CFLAGS='--param=min-pagesize=0 -I /usr/arm-none-eabi/include/' make -j $(nproc) purism-librem5.tar.xz
Friendly request to make a new release, as I also ran into an issue with my Librem 5.
@Danct12, @MartijnBraam any chance you could make a new release? there aren't a lot of changes between 0.8 and master[1], but it includes two useful fixes. The librem5 kernel upgrade is especially important since the kernel used in 0.8 will frequently cause jumpdrive to fail to boot on that device.