Skip to content

Kenel build fail 6.1.y #5671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sadhanpawar opened this issue Oct 23, 2023 · 4 comments
Closed

Kenel build fail 6.1.y #5671

sadhanpawar opened this issue Oct 23, 2023 · 4 comments

Comments

@sadhanpawar
Copy link

Describe the bug

I'm trying to build kernel for raspiberrypi-4B with latest commit 5a52cae and I'm facing build issue as following:
../arch/arm64/include/asm/atomic_ll_sc.h:318:38: error: ‘__uint128_t’ undeclared (first use in this function); did you mean ‘int128’?
318 | : "=&r" (tmp), "=&r" (ret), "+Q" (*(__uint128_t *)ptr)

Steps to reproduce the behaviour

git clone --depth=1 https://github.com/raspberrypi/linux
KERNEL=kernel8
IMAGE=Image.gz
make O=./build/ bcm2711_defconfig
make O=./build/ -j $IMAGE modules dtbs

Device (s)

Raspberry Pi 4 Mod. B

System

Raspberry Pi reference 2022-09-22
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 8a42abcd1dbd8c9c1fdfca4e0c3778255b2f9cc4, stage4

Oct 17 2023 15:39:16
Copyright (c) 2012 Broadcom
version 30f0c5e4d076da3ab4f341d88e7d505760b93ad7 (clean) (release) (start)

Linux sadhanpi 6.1.58-v8+ #1692 SMP PREEMPT Thu Oct 19 17:06:12 BST 2023 aarch64 GNU/Linux

Logs

No response

Additional context

No response

@pelwell
Copy link
Contributor

pelwell commented Oct 23, 2023

If you are trying to build a 64-bit kernel on a 32-bit OS (file $(which ls) will tell you) then you need to treat is as a cross-compile; see https://www.raspberrypi.com/documentation/computers/linux_kernel.html#cross-compiling-the-kernel for instructions.

@sadhanpawar
Copy link
Author

ok, I've switched to build 32-bit kernel on 32-bit OS, but when I do that, I'm facing below issue.
KERNEL=kernel7l
make bcm2711_defconfig

make -j4 zImage modules dtbs
make: *** No rule to make target 'zImage'. Stop.

@pelwell
Copy link
Contributor

pelwell commented Oct 23, 2023

I always include the ARCH=arm declaration - does that help?

KERNEL=kernel7l
make ARCH=arm bcm2711_defconfig
make ARCH=arm -j4 zImage modules dtbs

(The KERNEL=kernel7l line is only necessary if you use it later on during the installation, e.g.
sudo cp arch/arm/boot/zImage /boot/firmware/$KERNEL.img)

@sadhanpawar
Copy link
Author

it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants