Jailhouse Compile Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Jailhouse Compile Error

1,074 Views
Majidbahmani
Contributor II

Hi,

Hope you are all doing well.

I have bitbaked "nxp-image-real-time-edge" yocto project for IMX8MP. and build Jailhouse repository by devtool. However, when I compile the Jaihouse, I get the following error:

 

xxx@LinuxForiMX:~/nxp/Repositories/Jailhouse/imx-jailhouse$ make
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
MODPOST /home/xxx/nxp/Repositories/Jailhouse/imx-jailhouse/Module.symvers
ERROR: modpost: "ioremap_page_range" [/home/xxx/nxp/Repositories/Jailhouse/imx-jailhouse/driver/jailhouse.ko] undefined!
ERROR: modpost: "__get_vm_area_caller" [/home/xxx/nxp/Repositories/Jailhouse/imx-jailhouse/driver/jailhouse.ko] undefined!
ERROR: modpost: "lapic_timer_period" [/home/xxx/nxp/Repositories/Jailhouse/imx-jailhouse/driver/jailhouse.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:145: /home/xxx/nxp/Repositories/Jailhouse/imx-jailhouse/Module.symvers] Error 1
make[1]: *** [Makefile:1877: modpost] Error 2
make: *** [Makefile:40: modules] Error 2

 

Does anyone know how to resolve this error?

 

Thank you

 

 

0 Kudos
Reply
2 Replies

1,046 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

This t’s a compilation error. Take a look here: Warning Options (Using the GNU Compiler Collection (GCC)) 4 for what array-bounds implies.

Can you tell us what compilation flags you are using? It should be a warning but you’ve got some flags enabled that convert warnings to errors (-Werror etc.)

regards

0 Kudos
Reply

1,020 Views
Majidbahmani
Contributor II

Thank you for your reply.

I found and commented "-Werror" in tools/Makefile 

```

KBUILD_CFLAGS := -g -O3 -DLIBEXECDIR=\"$(libexecdir)\" \
-Wall -Wextra -Wmissing-declarations -Wmissing-prototypes \ # -Werror \
-D__LINUX_COMPILER_TYPES_H \
-DJAILHOUSE_VERSION=\"$(shell cat $(src)/../VERSION)\" $(EXTRA_CFLAGS)

```

But now I get another error:

```

Your configuration files at build-imx8mpevk-bm have not been touched.
meta-freescale directory found
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
UPD /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/hypervisor/include/generated/version.h
CC [M] /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/driver/main.o
LD [M] /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/driver/jailhouse.o
CC /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/hypervisor/setup.o
LD /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/hypervisor/hypervisor-amd.o
OBJCOPY /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/hypervisor/jailhouse-amd.bin
LD /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/hypervisor/hypervisor-intel.o
OBJCOPY /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/hypervisor/jailhouse-intel.bin
CC /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/tools/jailhouse.o
/home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/tools/jailhouse.c: In function ‘main’:
/home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/tools/jailhouse.c:581:58: error: ‘JAILHOUSE_VERSION’ undeclared (first use in this function); did you mean ‘JAILHOUSE_DEVICE’?
581 | printf("Jailhouse management tool %s\n", JAILHOUSE_VERSION);
| ^~~~~~~~~~~~~~~~~
| JAILHOUSE_DEVICE
/home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/tools/jailhouse.c:581:58: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [scripts/Makefile.build:243: /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/tools/jailhouse.o] Error 1
make[2]: *** [scripts/Makefile.build:481: /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse/tools] Error 2
make[1]: *** [Makefile:1925: /home/xxx/nxp/RT/yocto-real-time-edge/build-imx8mpevk-bm/workspace/sources/jailhouse] Error 2
make: *** [Makefile:40: modules] Error 2

```

Jailhouse options in menuconfige:

Majidbahmani_0-1730404367520.png

 

 

 

 

0 Kudos
Reply