dreemurrs-embedded / Jumpdrive

Flash/Rescue SD Card image for PinePhone and PineTab. This is NOT a bootloader
GNU General Public License v2.0
479 stars 59 forks source link

new release? #75

Open craftyguy opened 2 years ago

craftyguy commented 2 years ago

@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.

  1. https://github.com/dreemurrs-embedded/Jumpdrive/compare/0.8%E2%80%A6master
Danct12 commented 2 years ago

If Martijn agrees, I'll start building for the new release.

MartijnBraam commented 2 years ago

Yes I agree

Danct12 commented 2 years ago

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
zetaomegagon commented 1 year ago

@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
zetaomegagon commented 1 year ago

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
janvlug commented 5 months ago

Friendly request to make a new release, as I also ran into an issue with my Librem 5.