sakaki- / gentoo-on-rpi-64bit

Bootable 64-bit Gentoo image for the Raspberry Pi4B, 3B & 3B+, with Linux 5.4, OpenRC, Xfce4, VC4/V3D, camera and h/w codec support, weekly-autobuild binhost
GNU General Public License v3.0
921 stars 126 forks source link

make: *** [Makefile:1021: vmlinux] Error 1 in raspberrypi-kernel_1.20180417-1 #48

Closed IEXWER closed 6 years ago

IEXWER commented 6 years ago

OK, I still follow the wiki to compile a linux system in my raspberry 3b with img in this git. When i compile kernel, the message show in my window.

lib/vsprintf.o:(ksymtab+vsprintf+0x8): dangerous relocation: unsupported relo cation lib/vsprintf.o:(ksymtab+vsscanf+0x0): dangerous relocation: unsupported reloc ation lib/vsprintf.o:(ksymtab+vsscanf+0x8): dangerous relocation: unsupported reloc ation lib/vsprintf.o:(ksymtab_gpl+bprintf+0x0): dangerous relocation: unsupported r elocation lib/vsprintf.o:(_ksymtab_gpl+bprintf+0x8): dangerous relocation: unsupported r elocation lib/vsprintf.o:(___ksymtab_gpl+bstrprintf+0x0): dangerous relocation: unsupport ed relocation lib/vsprintf.o:(ksymtab_gpl+bstr_printf+0x8): dangerous relocation: unsupport ed relocation lib/vsprintf.o:(_ksymtab_gpl+vbinprintf+0x0): dangerous relocation: unsupport ed relocation lib/vsprintf.o:(ksymtab_gpl+vbin_printf+0x8): dangerous relocation: unsupport ed relocation lib/win_minmax.o:(_ksymtab+minmax_running_max+0x0): dangerous relocation: unsu pported relocation lib/win_minmax.o:(_ksymtab+minmax_running_max+0x8): dangerous relocation: unsu pported relocation drivers/firmware/efi/libstub/lib-sort.stub.o: In function `efistub_$d': efistub_sort.c:(.init_ksymtab+sort+0x0): dangerous relocation: unsupported r elocation efistub_sort.c:(.init___ksymtab+sort+0x8): dangerous relocation: unsupported r elocation aarch64-unknown-linux-gnu-ld: warning: creating a DT_TEXTREL in a shared object. make: *** [Makefile:1021: vmlinux] Error 1

I think, is there a wrong step in my operation? My step is below. Because the img has crossdev ,so i don't need to setup crossdev. Then i download the kernel source code from raspberry github.The kernel'branch is rpi-4.14.y.The release tag raspberrypi-kernel_1.20180417-1 Merge remote-tracking branch 'stable/linux-4.14.y' into rpi-4.14.y.

and type make ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- distclean make ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- bcmrpi3_defconfig make ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- menuconfig after this type, i just exit the menuconfig, delete .config file ,download .config file in this repository to replace it. In the end, after type nice -n 19 make ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- -j$(nproc) the error emerge.The log message. That's all what i have done.

My english is poor,If there has some place you can't understand,please tell me. I will use the google translation to communicate with you. Thank you.

sakaki- commented 6 years ago

Hi @IEXWER,

First, if you are compiling a kernel on your RPi3 directly, you don't need the cross-compilation directives (you can just use e.g. make distclean rather than make ARCH=arm64 CROSS_COMPILE=aarch64-unknown-linux-gnu- distclean).

Second, the "dangerous relocation" problem is a known issue with the version of binutils shipped on the image (2.30). It is fixed upstream in a later release; and (if using gcc-6.4.0 or gcc-6.4.0-r1) the earlier version also works. So, to compile a kernel locally on your RPi3, you can either:

Hope that helps! sakaki

IEXWER commented 6 years ago

OK,I fix the problem and install my kernel.It works nice.Thanks.

But I want to know how to transplant another linux like ubuntu to this board.

sakaki- commented 6 years ago

If you have another image or rootfs, even if it is 32bit, you can start by running it in a chroot from within the booted gentoo-on-rpi3-64bit image, see e.g. my wiki post here.

Otherwise, porting other distros is a bit out of scope for an issue on this project. I suggest you look/post on the "Operating system distributions" board of the Raspberry Pi forum (here).

There is e.g. an Ubuntu 18.04 installer available from one of the contributors on there (see this post), but I haven't tried it myself. Good luck!

IEXWER commented 6 years ago

Ok,thanks.I will try it.

IEXWER commented 6 years ago

I'm very glad to get your help.

sakaki- commented 6 years ago

No problem ^-^

sakaki- commented 6 years ago

Closing as title issue has been addressed.