linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Carlos Eduardo de Paula <me@carlosedp.com>
To: linux-riscv <linux-riscv@lists.infradead.org>
Subject: Cross-building Kernel packages for linux-headers adds x86 binaries
Date: Mon, 12 Apr 2021 11:11:14 -0300	[thread overview]
Message-ID: <CADnnUqfOfDSb3yACo+WcEtLqWvfKw9p0PgCHV=gj94k0SyC6KA@mail.gmail.com> (raw)

I've been cross-building .deb Kernel packages and recently tried to
build an external module using dkms
(https://github.com/gnab/rtl8812au).

I saw an error that the build process complained about fixdep and
later modpost. When I looked into it they were x86 binaries and not
riscv ones. I believe the cross-build process doesn't add these as
target binaries.

My build command is: make CROSS_COMPILE=riscv64-unknown-linux-gnu-
ARCH=riscv INSTALL_MOD_STRIP=1 -j`nproc` bindeb-pkg

❯ file scripts/basic/fixdep
scripts/basic/fixdep: ELF 64-bit LSB pie executable, x86-64, version 1
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
BuildID[sha1]=fc5b93fa068bb02ca6fa1f1e2eeb99fa74a19c84, for GNU/Linux
3.2.0, not stripped

Then I tried to rebuild them using "sudo make scripts" in
/usr/src/linux-headers-$(uname -r) and got:

❯ sudo make scripts
  SYNC    include/config/auto.conf.cmd
scripts/kconfig/conf: 30: Syntax error: "(" unexpected
make[2]: *** [scripts/kconfig/Makefile:71: syncconfig] Error 2
make[1]: *** [Makefile:602: syncconfig] Error 2
make: *** [Makefile:710: include/config/auto.conf.cmd] Error 2

In the end I've cloned the full Kernel tree and built the scripts
manually, replacing them in the
/usr/src/linux-headers-$(uname -r). It worked.

Any tips on having the correct arch binaries in the linux-headers
package or what could be wrong in the rebuild "make scripts" command?

Thanks!
-- 
________________________________________
Carlos Eduardo de Paula
me@carlosedp.com
http://carlosedp.com
https://twitter.com/carlosedp
https://www.linkedin.com/in/carlosedp/
________________________________________

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2021-04-12 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 14:11 Carlos Eduardo de Paula [this message]
2021-04-12 14:57 ` Cross-building Kernel packages for linux-headers adds x86 binaries Andreas Schwab

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='CADnnUqfOfDSb3yACo+WcEtLqWvfKw9p0PgCHV=gj94k0SyC6KA@mail.gmail.com' \
    --to=me@carlosedp.com \
    --cc=linux-riscv@lists.infradead.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).