kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Compile error on Rasperry PI arm64 in arch/arm64/kvm/hyp/nvhe/gen-hyprel
Date: Mon, 1 Apr 2024 13:58:37 +0200	[thread overview]
Message-ID: <796b2bd3-032e-4a91-8101-7f8c9db148b9@gmail.com> (raw)

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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

                 reply	other threads:[~2024-04-01 12:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=796b2bd3-032e-4a91-8101-7f8c9db148b9@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).