View previous topic :: View next topic |
Author |
Message |
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Wed Oct 09, 2024 6:50 am Post subject: late to party... armv6 for Raspberry Pi 2 share with 0W? |
|
|
I recently got a used Rpi2 and had a Rpi0W running Raspbian and never changed the OS. I stuck the 0W's raspbian µSD card into the 2 for testing, and it booted just fine. (Anyone had a Pi 2 fail due to SOC failure not due to twiddling with the GPIOs?)
Well, I figure I should be running Gentoo on these like all my other machines, as it seems like Raspbian is starting to break for old 32-bit units like the ones I have with repositories changing from old to oldold to wtfism. Figure that if x86 still works in Gentoo with amd64 becoming mainstream, arm should work after aarch64...
So the first quandary is using an armv6 stage 3... after playing with raspbian these Pis are slow (single core, my Atom N270 is faster than the Pi2 and my Celeron 500 beats the Pi0W) and I don't think I want to be building often so ideally I have one image that would work on either. So v6 stage3 should work on both the Pi2 and the 0w? If so, what would I be missing out not running the v7 stage3 on the Pi2?
Also was it a mistake to get the Pi2? Wasn't way too expensive, was a bit cheaper than what I paid for the 0W new, but with the 4/5's out that can do aarch64 I don't know. Alas I figure I won't be targeting the gpu much unless I get a display for either of them... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Wed Oct 09, 2024 12:44 pm Post subject: |
|
|
Later Pi2s are actually slow Pi3s without the wifi.
Thats 4 core aarch64. Did you get lucky?
dmesg or /proc/cpuinfo will tell.
THe boot time automatics will choose the right kernel unless the best kernel is missing from /boot or a kernel is forced in /boot/config.txt
ll the pis will run armv6 code. I have a feeling that the original kernel.img was not SMP enabled, so you ouly get one core.
uname -a
will be interesting too _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Wed Oct 09, 2024 2:17 pm Post subject: |
|
|
I highly doubt I'd be lucky, then again knowing that 1GiB and amd64 isn't pretty, 1GiB aarch64 won't be pretty either.
From the raspbian image I got thee things in /proc/cpuinfo,
Code: | model name : ARMv7 Processor rev 5 (v7l)
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
Hardware : BCM2835
Model : Raspberry Pi 2 Model B Rev 1.1
|
Code: | Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux |
Oh well? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1228 Location: Richmond Hill, Canada
|
Posted: Wed Oct 09, 2024 2:24 pm Post subject: |
|
|
So you have a V7 kernel running V6 code. I think you will miss out some floating point hardware usage. (not that kernel using floating point, just application not able)
I am not 100% sure but I think V6 code does not support neon extension, so also missing SIMD too. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Wed Oct 09, 2024 4:51 pm Post subject: |
|
|
hmm... so I suspect just like in x86 I can compile certain apps with v7 support and have a mixture of v6 and v7 binaries similar to having some binaries with sse2 on x86, if there's some that could benefit?
Supposedly the v6 0W (like perhaps all BCM2708/2835 SOC) should have hardware fp support, and the v7 2B definitely has hardware fp support, so I should be using the HardFP v6j stage3 and still get most of the benefit from both boards?
I would hope that Raspbian would assume hardware FP support as it was targeted for RPis, or are there RPis that don't have hardware FP (excluding the Pico)... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1228 Location: Richmond Hill, Canada
|
Posted: Wed Oct 09, 2024 6:10 pm Post subject: |
|
|
eccerr0r wrote: | hmm... so I suspect just like in x86 I can compile certain apps with v7 support and have a mixture of v6 and v7 binaries similar to having some binaries with sse2 on x86, if there's some that could benefit?
Supposedly the v6 0W (like perhaps all BCM2708/2835 SOC) should have hardware fp support, and the v7 2B definitely has hardware fp support, so I should be using the HardFP v6j stage3 and still get most of the benefit from both boards?
I would hope that Raspbian would assume hardware FP support as it was targeted for RPis, or are there RPis that don't have hardware FP (excluding the Pico)... |
arm usually work ok for backward compatibility. So yes, you can mix them. but depend on the build time gcc flags, it is possible create binary that have instructions that only targeted for one specific CPU. This is hard to detect. last time I try I was not able to simply examine ELF head for exact information.
I think your "Raspberry Pi 2 Model B Rev 1.1" is Cortex-A7 CPU, so it should have neon and vfp4.
Your v6 0W (BCM2835) and v7 2B (BCM2836) CPU are very different, BCM2835 is ARM11 (arm1176jzf-s, classical ) and BCM2836 is ARM Cortex A7 (modern) different CPU architecture.
you plan to use Raspbian (The OS) or use Gentoo stage3?
I think Raspbian compiled use generic ARM arch. so it can work for both. however I am not sure about the stage3. Last time I have opportunity to debug a build from alpinelinux vs armv7 stage3 (not direct related to Raspbian OS) it turn out the alpinelinux is build with neon instruction where as armv7 stage3 is not. And the kernel (not sure where it came from) build without support neon, so the application will not launch. just complain wrong instruction. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Wed Oct 09, 2024 6:52 pm Post subject: |
|
|
Well, want to get rid of raspbian because they seem to be slogging their 32-bit, but the same image runs on both the 2B and 0W.
I would hope I can do the same and run the same stage3 on both, but if there's a huge feature in the 2B that's missed, then will have to think things over again... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1228 Location: Richmond Hill, Canada
|
Posted: Wed Oct 09, 2024 7:11 pm Post subject: |
|
|
eccerr0r wrote: | Well, want to get rid of raspbian because they seem to be slogging their 32-bit, but the same image runs on both the 2B and 0W.
I would hope I can do the same and run the same stage3 on both, but if there's a huge feature in the 2B that's missed, then will have to think things over again... |
stage3 does not provide any significant features. the most significant thing in stage3 is just the compiler tool chain. And I think they were build support ARM arch, not specific CPU.
I think the kernel is more specific, if my memory serve me right, for arm (not aarch64) the kernel configuration changes depend on arm11 vs arm-v7.
however if you plan to use Gentoo's bin host, there might be something because what I said in the previous post.
I would suggest you start look into crossdev and may be chroot/container for build environment and possible QEMU static user (QEMU_USER_TARGETS=arm). |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Wed Oct 09, 2024 7:27 pm Post subject: |
|
|
I'd hope that the CFLAGS for the stage3 would still work for subsequently built binaries so that everything there and anything built subsequently will continue to be able to run on either.
Yeah, the kernel apparently needs to be different on both. That's annoying. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1228 Location: Richmond Hill, Canada
|
Posted: Wed Oct 09, 2024 7:38 pm Post subject: |
|
|
Quote: | I'd hope that the CFLAGS for the stage3 would still work... | Can't be much of help there. I don't have Cortex-A7 device so don't have a way to test.
However I do have Raspberry PI B (not plus) so should you need some testing I may be able to help there. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Fri Oct 11, 2024 6:07 am Post subject: |
|
|
kinda still worried about micro SD cards and burning them out while experimenting with them...had the same concern trying to build a Gentoo image for an x86 tablet which incidentally I gave up on, since the battery died in it and driver support for the Baytrail SOC was awful then. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1228 Location: Richmond Hill, Canada
|
Posted: Fri Oct 11, 2024 10:19 am Post subject: |
|
|
eccerr0r wrote: | kinda still worried about micro SD cards and burning them out while experimenting with them...had the same concern trying to build a Gentoo image for an x86 tablet which incidentally I gave up on, since the battery died in it and driver support for the Baytrail SOC was awful then. |
I have same concern. so my workaround is using several nodes with zram than share them over nbd to the build server. then on build server pool them together with LVM. then I will have large ramdisk for /var/tmp. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Fri Oct 11, 2024 1:34 pm Post subject: |
|
|
eccerr0r,
Rev 1.1 tells that its a 32 bit CPU. Your kernel is SMP enabled, so you would see all 4 cores, if you had them.
You can use the same kernel on both boards, if you force it. The automatics will pick the best kernel for the board it detects otherwise.
You need the foundation kernels too.
I thought Raspian was dead and replaced with PiOS?
The Pi2 will run the Pl0 code too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Fri Oct 11, 2024 3:43 pm Post subject: |
|
|
Yeah it seems that the autochooser did its job and the 0w / 2b got their proper kernels.
and that might be why raspbian updates were borked. So it's time to change OS, exactly what I had to do when Redhat 9 stopped being free (which is about the time when I got into Gentoo for x86...) _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9819 Location: almost Mile High in the USA
|
Posted: Tue Oct 15, 2024 3:02 pm Post subject: |
|
|
BTW, for those of you who run QEMU on x86 for arm target, how slow is it? Is it even competitive at least for execution?
While you can get gobs of RAM with QEMU, at least my last attempt of emulation (MIPS target for an old DECstation 3100) was pretty miserable. My Pentium4 2.4GHz at the time running emulation was about the same speed as the 16MHz DECstation native. I'd imagine emulating ARM is equally if not harder to emulate and though my i7 is gobs faster than my P4, a 700MHz ARM is considerably faster than a 16MHz MIPS... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
|