02-07-2019 03:51 AM
I have started using petalinux (2018.2) for generation of linux images.
I thing I find annoying is that the build is very slow. Even if I change just one line in kernel, build easily takes 15~20 minutes. Even something like 'petalinux-build -c kernel' does not seem to make any difference.
Is there any way to speed up the build?
02-07-2019 04:25 AM
02-07-2019 06:41 AM
Please refer to UG1144 guide below (Page 33) which explains Build optimization techniques
02-07-2019 11:37 PM - edited 02-07-2019 11:38 PM
I have removed the fsbl and pmu as I don't need it to build every time.
I did see a parallel thread tab in yocto settings which was blank. I have set both the number of threads and parallel make to 4 (number of cpu cores). I don't see that this is mentioned in the user guide.
local Sstate looks like interesting option. I will need some time to download and set it up.
02-08-2019 12:59 AM - edited 02-08-2019 01:01 AM
See Building Ignoring Dependencies at p35 of ug1144
petalinux-build -b recipe ignore depencies of the recipe
You can set local sstate location from Yocto Setting using petalinux-config
09-24-2019 08:11 PM
It may be cliche to say but get a bigger system, mine is 32-core deskside. I can build 2018.2 for an ultra96 board from scratch in about 15 minutes. Something is wrong in 2018.3 since chrome and webkitgtk takes forever but disabling those and it's back to 16. But I agree that the overhead of petalinux and yocto is a lot but there are a lot of positives. If doing a lot of kernel work you can build it outside of yocto and use scripts/makefile to get around the overhead but it takes time to get that working.
09-30-2019 01:28 PM
I'm also building 32 core for the Ultra96 with 32GB of ram in petalinux 2019.1 takes 80 min, (due to swapping)
Building Chromium and webkitgtk push the memory usage up to Allmost 64GB, when running no other applications
(tops out at allmost 32GB of swap space) while Chromuim is building.
Since there is only options for reducing number of threads and number of parrallel jobs, I don't see
how that can be utilized to limit Chromiums memory build requirements without tradding off "muscle/time" elsewhere
(perhaps 8 threads pr job 2 parallel jobs only through the whole build to avoid swapping ???)
So I have instead ordered 32GB of ram upgrade....
09-30-2019 11:52 PM
This is a problem that started in 2018.3. My build was fine in 2018.2 and then chrome, WebKit and rootfs creation just killed it in 2018.3
The version of chrome remained the same so I’m not sure what has happened. I don’t need those packages so I’ve disable the packagegroup that contained them and my build time is back to something reasonable.
Sadly, I added PYNQ as a user layer today and my build time went up by 10 minutes.
10-19-2019 03:56 AM