Comments (11)
Wonder if it'll be any faster in native AArch64 compile on the new Apple Silicon Macs, not that I'd recommend buying them considering a 10 minute compile time on your current one is already pretty good.
from raspberry-pi-pcie-devices.
As a follow-on, rather than having to mess with ejecting SD cards, mounting them, copying, unmounting, and putting the SD card back in.
- do the modules_install and copy of image files and DTBS to local directories (keep them separate)
- (if you want to SSH in with a password, enable SSH for root on the Pi (
sudo nano /etc/ssh/sshd_config
and changePermitRootLogin yes
. Usesudo passwd root
to set the root password) - reboot or restart sshd
- copy your SSH public key to /root/.ssh/authorized_keys so it doesn't prompt for a password
- use
scp -r
or rsync to copy all the files across your network
It's also far easier to do it that way on a CM with onboard EMMC than messing with rpiboot to mount the EMMC as a USB storage device.
(edited to make enabling root password optional. It's a significant security risk to do so).
from raspberry-pi-pcie-devices.
First attempt: I dropped the job count (using -j
), and increased the VirtualBox vb.cpus
to 6
, and let it rip.
Things got... shaky.
A lot of things would compile, and the VM was using ~570% CPU the whole time, but I noticed a lot of compile warnings and errors, like:
CC [M] drivers/media/common/siano/smscoreapi.o
CC drivers/mfd/arizona-core.o
compilation terminated.
compilation terminated.
compilation terminated.
CC [M] net/ipv6/netfilter/nf_conntrack_reasm.o
AR drivers/iio/resolver/built-in.a
aarch64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
aarch64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
aarch64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
aarch64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
aarch64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
compilation terminated.
compilation terminated.
from raspberry-pi-pcie-devices.
From this comment by norse-dougbert:
Don't know how many cpus on your build machine, but after years of kernel building my
make -j $PARALLEL
parameter became 1.6 times actual cpus, hence 8 cores became-j 12
or13
. Of course drives are much faster now then back then
So going to try -j10
on another build after resetting the environment.
from raspberry-pi-pcie-devices.
Results:
$ time make -j10 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
...
real 10m12.872s
user 55m31.871s
sys 5m29.739s
CPU load was around 580% from VBoxHeadless, laptop got... very nice and toasty. It was on my lap, probably should not do that next time!
But 10 minutes! My Mac is running faster than the Focus was nowβthough I didn't optimize the runs on the Focus either. I'm going to crank it up, giving the VM 8 cores and going to 14 jobs!
from raspberry-pi-pcie-devices.
Whee! That got the laptop cranking... 94Β°C and ~750% avg CPU usage. I'm also going to add an optimization to the vagrantfile to automatically set half the logical cores on the machine.
But not a huge gain, all said and done:
real 9m11.867s
user 65m27.295s
sys 6m48.170s
I might go a little insane and try consuming more. Bad idea? Maybe. For science? It must be done.
from raspberry-pi-pcie-devices.
Now trying with 14 logical cores (using updated algorithm of [total logical cores] - 2
and:
make -j22 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
Heh... CPU up to ~1080%, temp went straight up to 94Β°C again within 30s. Let's see how fast this thing will run, though! Here's the result:
real 9m47.122s
user 118m15.642s
sys 15m35.538s
(As an aside: this kills the battery.)
from raspberry-pi-pcie-devices.
Looks like diminishing returns (or even slower process) once we pass up 20 concurrent jobs. Trying again with 14 logical cores and 16 jobs:
real 11m23.431s
user 114m36.113s
sys 14m20.233s
So maybe VirtualBox's warning about using half the logical cores (same as number of physical cores) has something to it!
from raspberry-pi-pcie-devices.
Back to 8 CPU cores (logical CPU count / 2
), and -j12
:
$ time make -j12 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
...
real 9m16.682s
user 65m53.267s
sys 6m51.502s
I think I'll push a commit with these changes and move on from there!
from raspberry-pi-pcie-devices.
@6by9 - That's almost exactly what I'm doing now: https://github.com/geerlingguy/raspberry-pi-pcie-devices/tree/master/extras/cross-compile#copying-built-kernel-via-remote-sshfs-filesystem
It was especially important as I rearranged my desk and now it's almost impossible to get to my card reader (I had to order a new one with a long cable so I can put it back on top of my desk)... much easier to not have to swap cards!
from raspberry-pi-pcie-devices.
Did you think about putting the whole builddir/container/vm in a tmpfs? ππ
Will probably not make it much faster but as the CPU seems to have reached its limit, this could squeeze out some more seconds ππ
from raspberry-pi-pcie-devices.
Related Issues (20)
- Add 52Pi PD Power HAT HOT 4
- Add NVPI5-2242T and NVPI5-2280B HAT HOT 1
- 2.5 Gigabit M.2 M+B key Ethernet Card NIC HOT 1
- Pi 5 nvme expansion boards hat testing HOT 1
- Waveshare PCIe To M.2 Adapter for Raspberry Pi 5 Testing HOT 4
- tested - SK Hynix Gold P31 1TB NVME Pi 5 4GB
- Add Waveshare PoE HAT (F) for Raspberry Pi 5 HOT 18
- Add HAT: Mcuzone MP4GM 4G LTE Module for Pi 5
- Add HAT: Mcuzone MPW7 E-Key WiFi 7 HAT HOT 1
- ASMedia Technology Inc. Device 1064 M.2 NVME to Mini SAS Expansion Card Support 4 Ports SATA3.0 6Gbps HDD SSD SATA Controller SFF8087 HOT 1
- Add HAT: Dual M.2 X1004 Board from Geekworm HOT 1
- Add Pi 5 HAT: Mcuzone MP2.5GD Pi 5 Dual 2.5 Gbps Ethernet HAT
- Test LSI 9440-8i on rpi5 with "FW in FAULT state" HOT 1
- Add PI-2230-SSD, an SSD expansion board for Raspberry PI 5 HOT 1
- Delock NVME Ethernet I225-V Adapter on RPI5 HOT 12
- Add HAT: NVMe Base Duo HOT 1
- Add LSI SAS 9211-8i / Dell PERC H310 SAS HBA raid controller HOT 1
- Add Pineberry Pi HatBRICK! Commander HOT 2
- Add Geekworm X1010 PCIe x4 slot expansion board for Pi 5
- Add Pi 5 HAT: Mcuzone MPS2242 POE HAT (Combined NVME and POE)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspberry-pi-pcie-devices.