Do you have the command to clean up kodi only?
That would save me a lot of build time.
DEVICE=<....> ./scripts/clean kodi
Also if kodi package is changed then it is automatically rebuild.
I have built a small script to get the PKG_VERSION and PKG_SHA256 in one go via Powershell.
The only thing you need for this is aria2.
Open Powershell and enter this commands:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install aria2
In the .ps1 scripts, line 7 must be adapted because the output path.
XBMC_PKG_VERSION+PKG_SHA256.ps1 (1.1 KB)
Thanks for all your instructions. They seem to work fine. I now have a build running under WSL2 on an AMD 5900X with 32 GB memory and Windows 11. It’s excruciatingly slow though. After about 3 hours it’s now at:
[087/362] [DONE] build heimdal:host
Have to be patient I guess
interesting… might be WSL-related or slow download for some dependency…
i use a dedicated VM for this on a 5950x and full clean build takes less than an hour (and that’s on the slow spinner HDD, instead of SSD which would improve the speed by quite a bit)
With an 3600X and 16GB of Ram it took about an hour with WSL2 running Ubuntu 20.04.6LTS
Hmm, I wonder what I’m doing wrong then?
The CoreELEC directory is located on an SSD.
Top seems to show the system is busy compiling:
top - 12:05:55 up 3:26, 1 user, load average: 22.86, 22.74, 22.23
Tasks: 135 total, 4 running, 131 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.6 us, 7.7 sy, 0.0 ni, 91.7 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st
MiB Mem : 15955.5 total, 14969.1 free, 981.7 used, 298.6 buff/cache
MiB Swap: 4096.0 total, 4096.0 free, 0.0 used. 14973.9 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
782816 maurice 20 0 47152 29204 17412 D 4.3 0.2 0:00.34 cc1
782819 maurice 20 0 47056 29156 17340 D 4.3 0.2 0:00.34 cc1
782822 maurice 20 0 47028 28864 17356 D 4.3 0.2 0:00.33 cc1
782826 maurice 20 0 44928 28332 17408 D 4.3 0.2 0:00.32 cc1
782828 maurice 20 0 44916 28172 17344 D 4.3 0.2 0:00.32 cc1
782835 maurice 20 0 44384 26648 17416 D 4.3 0.2 0:00.29 cc1
782841 maurice 20 0 44120 25776 17304 D 4.3 0.2 0:00.24 cc1
782861 maurice 20 0 41928 24652 17304 D 4.3 0.2 0:00.15 cc1
782833 maurice 20 0 39688 20588 15064 D 4.0 0.1 0:00.29 cc1
782850 maurice 20 0 42028 25032 17044 D 4.0 0.2 0:00.22 cc1
782853 maurice 20 0 39352 19736 15060 D 4.0 0.1 0:00.21 cc1
782858 maurice 20 0 41936 25076 17316 D 4.0 0.2 0:00.17 cc1
782864 maurice 20 0 41540 23584 17040 R 4.0 0.1 0:00.14 cc1
782456 maurice 20 0 20484 18652 2644 D 3.7 0.1 0:02.25 armv8a-libreele
782838 maurice 20 0 44872 27648 17412 D 3.7 0.2 0:00.27 cc1
782846 maurice 20 0 39476 19816 15092 D 3.7 0.1 0:00.22 cc1
782855 maurice 20 0 42028 24812 17080 D 3.7 0.2 0:00.20 cc1
CPU load itself doesn’t seem to be very high though… is the CoreELEC dir located in WSL2 user’s dir (native FS) or on Windows partition that is mounted in WSL2? afair, for IO-heavy tasks there is a big difference in performance (WSL-native fs being faster). And also mind that the build is pretty space-hungry (like stated in the official howto)
WSL2 performance ticket (I think it’s still relevant, though closed):
Yeah it’s on a mounted NTFS partition at the moment.
Also, it just crashed on me
collect2: error: ld returned 1 exit status make[3]: *** [../Makerules:647: /mnt/f/CoreELEC/build.CoreELEC-Amlogic-ng.arm-21/build/glibc-44f757a6364a5463>make[3]: Leaving directory '/mnt/f/CoreELEC/build.CoreELEC-Amlogic-ng.arm-21/build/glibc-44f757a6364a54635980>make[2]: *** [Makefile:484: elf/subdir_lib] Error 2 make[2]: Leaving directory '/mnt/f/CoreELEC/build.CoreELEC-Amlogic-ng.arm-21/build/glibc-44f757a6364a54635980>make[1]: *** [Makefile:9: all] Error 2 make[1]: Leaving directory '/mnt/f/CoreELEC/build.CoreELEC-Amlogic-ng.arm-21/build/glibc-44f757a6364a54635980>^[[1;31mFAILURE: scripts/build glibc:target during make_target (default)^[[0m *********** FAILED COMMAND *********** make ${PKG_MAKE_OPTS_TARGET} ************************************** *********** FAILED COMMAND *********** ${SCRIPTS}/build "${1}" "${PARENT_PKG}" **************************************
^[[1;31mFAILURE: scripts/install glibc:target has failed!^[[0m
Ryzen 7 2700X with 16GB RAM and m.2 ssd on WSL2 takes ~1 hour for a fresh build.
Edit:
to get access to the WSL2 file system just enter this in Windows Explorer at the top of the bar:
\\wsl$
maybe we can reach out to each other in different forum?
We can do what you want but there’s no harm in sharing your steps here. they’ll help the others too.
I often compile CE21 using WSL2 running Ubuntu 22.04.06(?), and it definitely is taking a long time on my 5950X if I run a completely fresh build and clean Kodi first (because I have a small whitelisting patch to apply).
I feel the operation wouldn’t take so long if the compiler options weren’t verified all the time when building Kodi
For those building, CPM just posted another commit.
thx, easiest way is just subscribe to notifications via Watch → All Activity on GH without the need to constantly check it (though for force-pushes it doesn’t often work, if ever…)
I pointed out to him earlier that the last commit from yesterday was incorrect in one place and he fixed it and redid the commit. Only one line was changed.
Changed from:
{"video.dovi.source.min.nits", PLAYER_PROCESS_VIDEO_DOVI_SOURCE_MIN_NITS },
{"video.dovi.source.min.nits", PLAYER_PROCESS_VIDEO_DOVI_SOURCE_MAX_NITS },
to
{"video.dovi.source.min.nits", PLAYER_PROCESS_VIDEO_DOVI_SOURCE_MIN_NITS },
{"video.dovi.source.max.nits", PLAYER_PROCESS_VIDEO_DOVI_SOURCE_MAX_NITS },
So I moved the CE git directory from the mounted NTFS drive to WSL2’s native storage and I managed to get a lot further. Half-way through I also had to fix the package.mk file for the json-c package, but now I have another crash at step 316 out of 362:
depmod: WARNING: could not open modules.builtin.modinfo at /home/maurice/CoreELEC/build.CoreELEC-Amlogic-ng.arm-21/install_pkg/linux-3df0cde6a2158d05acf6c240521929fe2dd3ab76/usr/lib/kernel-overlays/base/lib/modules/4.9.269: No such file or directory
INSTALL glibc (init)
INSTALL libc (init)
INSTALL busybox (init)
INSTALL gcc (init)
INSTALL splash-image (init)
INSTALL util-linux (init)
INSTALL e2fsprogs (init)
INSTALL dosfstools (init)
INSTALL Python3 (host)
INSTALL terminus-font (init)
INSTALL bkeymaps (init)
INSTALL fakeroot (host)
INSTALL initramfs (init)
INSTALL initramfs (target)
sh: 1: cpio: not found
FAILURE: scripts/install initramfs during post_install (package.mk)
*********** FAILED COMMAND ***********
[ "$BUILD_ANDROID_BOOTIMG" = "yes" ]
**************************************
FAILURE: scripts/build linux:target during make_target (package.mk)
*********** FAILED COMMAND ***********
cp $module $BUILD/initramfs/usr/lib/modules
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
FAILURE: scripts/install linux:target has failed!
The following log for this failure is available:
/home/maurice/CoreELEC/build.CoreELEC-Amlogic-ng.arm-21/.threads/logs/222.log
>>> linux:target seq 222 >>>
[316/362] [FAIL] install linux:target
Any hints?
Is cpio installed ?
sudo apt-get install cpio
I followed the steps that @jamal2367 posted earlier in this thread:
- Ran: git clone hxxps://github.com/CoreELEC/CoreELEC.git
- Ran: cd CoreELEC
- Ran: git checkout coreelec-21
- Copied the two package.mk files that he uploaded to the correct locations
- Edited the package.mk file for the json-c package with the correct SHA256
- Ran: DEVICE=Amlogic-ng PROJECT=Amlogic-ce ARCH=ARM make
(Replace hxxps in step 1 with https)