Hi,Probably an over estimate unless you don't have any SSD hardware for
Debian provides a kernel for Raspberry Pi Zero (W) and 1, but that targets the armel architecture. I want to compile a/the Debian kernel that does use the
HW capabilities of the RPi 0/1, similarly to how raspbian.org recompiles
the Debian packages. Except AFAIK the Debian kernel.
I know that Debian won't change their RPi kernel for armel, but this is for private use. But I don't know what the best way to go about that is.
I found the following link wrt building a cross compiler https://solarianprogrammer.com/2018/05/06/building-gcc-cross-compiler-raspberry-pi/
which in turn references https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
and that does look promising.
But before diving full into it, I'd like to know whether this is the proper approach or not. And if someone has good/better links, I'd appreciate it if you'd share them :-)
While I (technically) could setup a system to compile natively, I want to use cross compilation (on amd64 PC). I think it would otherwise take days.
But knowing how to compile natively would be nice too.
I do know how to compile Debian's kernels, both natively and cross building.
Cheers,
Diederik
Hi,
Debian provides a kernel for Raspberry Pi Zero (W) and 1, but that targets the armel architecture. I want to compile a/the Debian kernel that does use the
HW capabilities of the RPi 0/1, similarly to how raspbian.org recompiles
the Debian packages. Except AFAIK the Debian kernel.
I know that Debian won't change their RPi kernel for armel, but this is for private use. But I don't know what the best way to go about that is.
I found the following link wrt building a cross compiler https://solarianprogrammer.com/2018/05/06/building-gcc-cross-compiler-raspberry-pi/
which in turn references https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
and that does look promising.
I am probably missing some context but I wanted to point to the armel
cross compiler in Debian - gcc-arm-linux-gnueabi. Is there some reason
to build the cross-compiler yourself?
On maandag 24 oktober 2022 11:16:42 CEST Punit Agrawal wrote:
I am probably missing some context but I wanted to point to the armel
cross compiler in Debian - gcc-arm-linux-gnueabi. Is there some reason
to build the cross-compiler yourself?
I don't want to build for armel, but for raspbian.org's variant of armhf, which is not the same as Debian's armhf.
The RPi 0/1 fall somewhere in the middle of Debian's armel and armhf and that's the whole reason raspbian.org was created.
But it can be that I'm looking at this problem all wrong and/or have some tunnel vision towards building a cross compiler.
That is an important reason for making this ML thread.
W dniu 25.10.2022 o 00:03, Punit Agrawal pisze:
IIUC, for the kernel, either compiler should be fine. The
documentation[0] for compiling the RPi Zero kernel seems to bear this
out - it even uses the "CROSS_COMPILE=arm-linux-gnueabihf-". If you've
got access to the hardware it should be easy to test before kicking off
the Debian kernel package build.
Raspbian uses own definition of armhf (armv6) while Debian (and other distros) use armv7 for armhf.
So using any documentation which mentions armhf and r/pi needs to be done in careful way.
IIUC, for the kernel, either compiler should be fine. The
documentation[0] for compiling the RPi Zero kernel seems to bear this
out - it even uses the "CROSS_COMPILE=arm-linux-gnueabihf-". If you've
got access to the hardware it should be easy to test before kicking off
the Debian kernel package build.
Diederik de Haas <didi.debian@cknow.org> writes:
But it can be that I'm looking at this problem all wrong and/or have some
tunnel vision towards building a cross compiler.
That is an important reason for making this ML thread.
IIUC, for the kernel, either compiler should be fine. The
documentation[0] for compiling the RPi Zero kernel seems to bear this
out - it even uses the "CROSS_COMPILE=arm-linux-gnueabihf-". If you've
got access to the hardware it should be easy to test before kicking off
the Debian kernel package build.
On Tuesday, 25 October 2022 10:02:09 CEST Andrew M.A. Cater wrote:
Debian armel runs fine without recompilation at a slight penalty.
It is exactly this 'slight penalty' that I want to verify.
I have a Zero W running Debian's armel kernel and I find that device to be annoyingly slow.
I also have a RPi 1 running raspbian.org's 4.9 kernel, which is a special kernel build by plugwash and compiled like the rest of raspbian.org packages, which I do not find (annoyingly) slow.
Debian armel runs fine without recompilation at a slight penalty.
and entirely based on the kernel patches that are added on top of mainline as well as the configuration.
IIUC, for the kernel, either compiler should be fine. The
documentation[0] for compiling the RPi Zero kernel seems to bear this
out - it even uses the "CROSS_COMPILE=arm-linux-gnueabihf-". If you've
got access to the hardware it should be easy to test before kicking off
the Debian kernel package build.
That is correct: it's the same compiler backend, the only difference
between an arm-linux-gnuabihf- and an arm-linux-gnueabi- toolchain are
which CPU and floating pointing ABI are set when building with the
default flags. The kernel itself is always built as soft-float even
for armv7 using an armhf toolchain, and the CPU is always set to
the minimum configured target machine, so both compilers will produce
the same kernel binary.
I have a Zero W running Debian's armel kernel and I find that device to be annoyingly slow.
I also have a RPi 1 running raspbian.org's 4.9 kernel, which is a special kernel build by plugwash and compiled like the rest of raspbian.org packages, which I do not find (annoyingly) slow.
The difference between the two kernels is almost certainly unrelated
to the toolchain they are built with,
and entirely based on the kernel patches that are added on top of mainline
as well as the configuration.
If there is a huge difference, my first guess would be the CPU frequency scaling driver: if the CPU runs a different operating point, that
would have a much larger impact than anything the kernel itself
can do.
Another obvious difference may be the GPU support
If you have a fast Raspbian kernel and a slow Debian kernel for
the same source version, can you take a look at the /boot/config-*
files, and the list of loaded kernel modules, to see if there
are any obvious differences?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 02:59:42 |
Calls: | 10,386 |
Calls today: | 1 |
Files: | 14,057 |
Messages: | 6,416,587 |