Compile error on Rasperry PI arm64 in arch/arm64/kvm/hyp/nvhe/gen-hyprel
Philipp Hortmann
philipp.g.hortmann at gmail.com
Mon Apr 1 07:58:37 EDT 2024
Hi,
I tried to compile the mainline kernel on a Rasperry PI 32-Bit OS.
Here the commands for preparation:
make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- -j4
Image.gz modules dtbs
kernel at raspberrypi:~/Documents/git/staging $ git status
On branch staging-testing
Your branch is up to date with 'origin/staging-testing'.
nothing to commit, working tree clean
kernel at raspberrypi:~/Documents/git/staging $
I think that the compillation should work no matther if it is 32Bit or
64Bit. See below:
AS arch/arm64/kvm/hyp/nvhe/../../../lib/memcpy.nvhe.o
AS arch/arm64/kvm/hyp/nvhe/../../../lib/memset.nvhe.o
CC kernel/time/timer_list.o
HOSTCC arch/arm64/kvm/hyp/nvhe/gen-hyprel
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function ‘section_by_off’:
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:163:33: warning: format ‘%lu’
expects argument of type ‘long unsigned int’, but argument 4 has type
‘Elf64_Off’ {aka ‘long long unsigned int’} [-Wformat=]
163 | fprintf(stderr, "error: %s: " fmt "\n",
\
| ^~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:183:25: note: in expansion of macro
‘fatal_error’
183 | fatal_error("assertion " #lhs " " #op "
" #rhs \
| ^~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:190:41: note: in expansion of macro
‘assert_op’
190 | #define assert_ne(lhs, rhs, fmt) assert_op(lhs, rhs,
fmt, !=)
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:230:9: note: in expansion of macro
‘assert_ne’
230 | assert_ne(off, 0UL, "%lu");
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function ‘init_elf’:
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:163:33: warning: format ‘%lu’
expects argument of type ‘long unsigned int’, but argument 4 has type
‘__off64_t’ {aka ‘long long int’} [-Wformat=]
163 | fprintf(stderr, "error: %s: " fmt "\n",
\
| ^~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:183:25: note: in expansion of macro
‘fatal_error’
183 | fatal_error("assertion " #lhs " " #op "
" #rhs \
| ^~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:192:41: note: in expansion of macro
‘assert_op’
192 | #define assert_ge(lhs, rhs, fmt) assert_op(lhs, rhs,
fmt, >=)
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:276:9: note: in expansion of macro
‘assert_ge’
276 | assert_ge(stat.st_size, sizeof(*elf.ehdr), "%lu");
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:163:33: warning: format ‘%lu’
expects argument of type ‘long unsigned int’, but argument 5 has type
‘unsigned int’ [-Wformat=]
163 | fprintf(stderr, "error: %s: " fmt "\n",
\
| ^~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:183:25: note: in expansion of macro
‘fatal_error’
183 | fatal_error("assertion " #lhs " " #op "
" #rhs \
| ^~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:192:41: note: in expansion of macro
‘assert_op’
192 | #define assert_ge(lhs, rhs, fmt) assert_op(lhs, rhs,
fmt, >=)
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:276:9: note: in expansion of macro
‘assert_ge’
276 | assert_ge(stat.st_size, sizeof(*elf.ehdr), "%lu");
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function ‘emit_rela_abs64’:
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:340:26: warning: format ‘%lu’
expects argument of type ‘long unsigned int’, but argument 2 has type
‘size_t’ {aka ‘unsigned int’} [-Wformat=]
340 | printf(".reloc %lu, R_AARCH64_PREL32, %s%s + 0x%lx\n",
| ~~^
| |
| long unsigned int
| %u
341 | reloc_offset, HYP_SECTION_SYMBOL_PREFIX,
sh_orig_name,
| ~~~~~~~~~~~~
| |
| size_t {aka unsigned int}
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:340:58: warning: format ‘%lx’
expects argument of type ‘long unsigned int’, but argument 5 has type
‘__uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
340 | printf(".reloc %lu, R_AARCH64_PREL32, %s%s + 0x%lx\n",
| ~~^
| |
| long
unsigned int
| %llx
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function ‘emit_rela_section’:
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:163:33: warning: format ‘%lx’
expects argument of type ‘long unsigned int’, but argument 4 has type
‘__uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
163 | fprintf(stderr, "error: %s: " fmt "\n",
\
| ^~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:183:25: note: in expansion of macro
‘fatal_error’
183 | fatal_error("assertion " #lhs " " #op "
" #rhs \
| ^~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:191:41: note: in expansion of macro
‘assert_op’
191 | #define assert_lt(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, <)
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:376:17: note: in expansion of macro
‘assert_lt’
376 | assert_lt(elf64toh(rela->r_offset),
elf64toh(sh_orig->sh_size), "0x%lx");
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:163:33: warning: format ‘%lx’
expects argument of type ‘long unsigned int’, but argument 5 has type
‘__uint64_t’ {aka ‘long long unsigned int’} [-Wformat=]
163 | fprintf(stderr, "error: %s: " fmt "\n",
\
| ^~~~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:183:25: note: in expansion of macro
‘fatal_error’
183 | fatal_error("assertion " #lhs " " #op "
" #rhs \
| ^~~~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:191:41: note: in expansion of macro
‘assert_op’
191 | #define assert_lt(lhs, rhs, fmt) assert_op(lhs, rhs, fmt, <)
| ^~~~~~~~~
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:376:17: note: in expansion of macro
‘assert_lt’
376 | assert_lt(elf64toh(rela->r_offset),
elf64toh(sh_orig->sh_size), "0x%lx");
| ^~~~~~~~~
LD arch/arm64/kvm/hyp/nvhe/kvm_nvhe.tmp.o
HYPREL arch/arm64/kvm/hyp/nvhe/hyp-reloc.S
AS arch/arm64/kvm/hyp/nvhe/hyp-reloc.o
LD arch/arm64/kvm/hyp/nvhe/kvm_nvhe.rel.o
HYPCOPY arch/arm64/kvm/hyp/nvhe/kvm_nvhe.o
Bye Philipp
More information about the Kernelnewbies
mailing list