linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Cross-building Kernel packages for linux-headers adds x86 binaries
@ 2021-04-12 14:11 Carlos Eduardo de Paula
  2021-04-12 14:57 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Eduardo de Paula @ 2021-04-12 14:11 UTC (permalink / raw)
  To: linux-riscv

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-12 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 14:11 Cross-building Kernel packages for linux-headers adds x86 binaries Carlos Eduardo de Paula
2021-04-12 14:57 ` Andreas Schwab

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