Trying to compile a tinycore linux kernel leads to Error 2
0
votes
1
answer
73
views
EDIT 1 - Following instructions from : https://github.com/on-prem/tinycore-kernel
EDIT 2 - after trying **make os**, it fails giving an **Error 2** compiler error. i know that it has something to do with the modern GCC version im using,not being compatible with the older version of GCC. Specifically, something to do with a security flaw or risk being registered by **objtool** during the **make os** process. so, this version of tinycore was compiled with an older version of GCC. In addition to that, i am using the most recent linux kernel (6.11) to compile it, and tinycore uses a more outdated kernel (4.19). it is an error having to do with **objtool** and thats as far as i can see. perhaps also, something in the script is missing or no longer available, a missing file, corepure64.gz is not available unless manually installed, and this doesnt change the output, same **Error 2** message
I am using the new Ubuntu 25.04, I am compiling within the regular terminal window. I have followed the steps as they are listed in the tinycore github. the first two steps worked after some packages were installed, but at the third step, it gives me **Error 2**, which seems common and easy to fix. this version of tinycore is using a specific kernel, version 4.19. I think that came out in 2018 or 2019.
I entered into the terminal
sudo make kernel
then, I ran
sudo make extensions
and finally, the **Error 2** comes in when I enter
sudo make os
These are the steps listed in the README and on the github, but here's the exact error I receive.
luma@luma-virtualbox ~/D/tinycore-kernel (master)> sudo make os
rm -rf /tmp/tinycore-kernel-build/os-corepure64
mkdir -p /tmp/tinycore-kernel-build/os-corepure64
cd /tmp/tinycore-kernel-build/os-corepure64 && \
gunzip -c /opt/tinycore/11.x/x86_64/release/distribution_files/corepure64.gz | cpio -id && \
rm -rf lib/modules/* && \
mkdir -p lib/modules/4.19.152-tinycore64 && \
cp -rp /tmp/tinycore-kernel-build/modules-base/usr/local/lib/modules/4.19.152-tinycore64/kernel lib/modules/4.19.152-tinycore64/
gzip: /opt/tinycore/11.x/x86_64/release/distribution_files/corepure64.gz: No such file or directory
cpio: premature end of archive
make: *** [Makefile:94: os] Error 2
What can I do from here?
To note, I was able to compile the standard linux kernel listed by Linus on github. yet, I had this exact same **Error 2** when I did **sudo make os.**. I found a fix where it had something to do with module signing and disabling a key.
When I compiled that kernel, I was able to **sudo make os**, and it did not output **Error 2.** I no longer have access to it and I wanted a smaller alternative.
Asked by kernel1111111
(1 rep)
Jun 7, 2025, 08:22 AM
Last activity: Jun 8, 2025, 10:34 AM
Last activity: Jun 8, 2025, 10:34 AM