Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: cmk on August 30, 2022, 02:04:17 AM

Title: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 02:04:17 AM
Hey what's up guys, I've just joined the forum, thanks for letting in.
TinyCore is so great that I'm now seriously thinking about migrating
to TinyCore form linux mint.

I had some success with remastering ISO via ezremaster tool in the GUI,
also manually playing around with boot codes and providing permanent /tce
folder on my USB flash drive worked like a charm.

What I'm looking for now is automating the creation of the custom TInyCore ISO with my preferred packages
so that I could generate/burn ISO by running a single shell script.

If I use existing /tce/optional + onboot.lst then everything is fine but say I want to add a new package.
Doing this under the TinyCore itself is trivial but any attempts to bring tce-load script suits from TinyCore
to linux mint didn't work for me.

So what I want to achieve is to be able to download .tcz packages with .md5 files and generating .dep files
outside of TinyCore. Is that possible?

I was thinking about writing my own script to download the tcz files but what I don't understand is how the dependencies
are getting resolved. I saw depmod is used in the tce-load script but after googling about depmod command it feels
like it depends on the current kernel configuration hence running depmod under linux mint might not have a sense.

In a perfect world it would've been nice to have existing .dep files that can be downloaded along with tcz files.
But I don't want to reinvent the wheel so is there any option to download tcz packages with all the dependencies
outside of TinyCore?

Thanks in advance!

Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: AlejandroPadrino on August 30, 2022, 02:51:58 AM
From applications manager you will download your wanted .tcz package and all needed dependencies.  .tcz packages are in squashfs format, and core.gz after gzip decompressed is in cpio format.  This is all you need to build your custom TC.  :-)
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 03:02:41 AM
Hello, Alejandro

Like I've mentioned in the original post - it's trivial to do it from under the TinyCore either in GUI or via tce-load (for bulk downloading for instance),
now what I'm looking for is to achieve the same result but from the outside of the TinyCore so that the workflow goes the following way:

1. Downloading all the needed packages with deps from non TinyCore distro
2. Saving them to /tce folder
3. Creating new ISO (say with xorriso) including newly created /tce folder
4. Testing it it qemu or burning to the USB flash drive

I was wondering if anyone did this before?
Is there tce-load for other than TInyCore linux distros?
Or is there an alternative to tce-load?

But the major question is how to resolve the dependencies from the outside of the TinyCore
because it feels like the deps might be resolved properly only under the TinyCore kernel (I might be wrong though)
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 03:22:17 AM
Ahhh!!! What a noob I am!
.dep files are already there!

If someone else is gonna be searching for this, here's how the deps can get resolved:
Say, to download nano we do:
1. download http://repo.tinycorelinux.net/13.x/x86_64/tcz/nano.tcz
2. download http://repo.tinycorelinux.net/13.x/x86_64/tcz/nano.tcz.md5.text
3. download download http://repo.tinycorelinux.net/13.x/x86_64/tcz/nano.tcz.dep
4. recursively download dependencies from the .dep file
It's that simple!

Thanks to tce-load script for this insight!
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: Juanito on August 30, 2022, 03:23:08 AM
@Rich wrote FetchExt.sh - see here: http://forum.tinycorelinux.net/index.php/topic,23034.msg164745.html

The repo contains files *dep and *tree with the deps and recursive deps respectively.
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 05:16:02 AM
@Rich wrote FetchExt.sh - see here: http://forum.tinycorelinux.net/index.php/topic,23034.msg164745.html

The repo contains files *dep and *tree with the deps and recursive deps respectively.

Thank you, Juanito!
FetchExt.sh is exactly what I've been looking for.
Quite a fun thing that I've almost completed my own tool in python which literally does the same thing)
Thank you for your support again, TInyCore is awesome!
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 08:23:09 AM
If someone is interested, I've just made a python script that fetches tcz modules and dependenices:
https://github.com/maksimKorzh/tce-download

And here's a video demo on how to use it and how to enable /tce folder onboot (real hardware demo):
https://www.youtube.com/watch?v=bAY2xAUv5YQ
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: patrikg on August 30, 2022, 08:50:26 AM
Thank you for making a video and explaining tiny core.

I see in the video, you using qemu in linux environment.
Have you tried add the "-enable-kvm" to the command line to make qemu faster.

Code: (bash) [Select]
-enable-kvm     enable KVM full virtualization support

Code: (bash) [Select]
qemu-system-x86_64 --cdrom CorePure64-current.iso -enable-kvm
You have to enable virtualization support in the bios.

Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 09:14:07 AM
Thank you for making a video and explaining tiny core.

I see in the video, you using qemu in linux environment.
Have you tried add the "-enable-kvm" to the command line to make qemu faster.

Code: (bash) [Select]
-enable-kvm     enable KVM full virtualization support

Code: (bash) [Select]
qemu-system-x86_64 --cdrom CorePure64-current.iso -enable-kvm
You have to enable virtualization support in the bios.

Oh, thank you Patrik! I didn't since I run it on the real hardware, but thanks for kindly pointing out!
I didn't know that!

Btw, I've added a checksum checking a moment ago and now debugging the script by downloading
gnome-desktop dependencies. In a couple of hours script should be stable enough for use by others)
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: patrikg on August 30, 2022, 09:23:37 AM
Thanks you also, by the way:
I have also test another way of doing what you doing, you can follow this article to make some images that you can burn to some usb thumb drives or to some ssd or to some spinning disks using qemu :)

https://fabianstumpf.de/articles/tinycore_images.htm

Don't forget then burning the image to the usb thumb drive or to ssd or to disk, you have to expand the partition to correct size after you booting the system natively.
You need to do the following:
Thanks to @bmarkus at this forum for the original text:

1) Start fdisk partitioning tool as root:

   
Code: (bash) [Select]
sudo fdisk -u /dev/sda
   Now list partitions with 'p' command and write down the starting and
   ending sectors of partition.

2) Delete partition with 'd' than recreate it with 'n' command.
   Use the same starting sector as deleted had and provide end
   sector or size greater than deleted had having enough free space
   for Mounted Mode. When finished, exit fdisk with 'w' command. Now
   partition size increased but file system size is not yet changed.

3) Reboot. It is necessary to make Kernel aware of changes.

4) After reboot expand file system to the new partition boundaries with
   typing the following command as root:

Code: (bash) [Select]
   sudo resize2fs /dev/sda1
Now you are ready to use the bigger partition.
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 11:32:28 AM
Thanks you also, by the way:
I have also test another way of doing what you doing, you can follow this article to make some images that you can burn to some usb thumb drives or to some ssd or to some spinning disks using qemu :)

https://fabianstumpf.de/articles/tinycore_images.htm

Don't forget then burning the image to the usb thumb drive or to ssd or to disk, you have to expand the partition to correct size after you booting the system natively.
You need to do the following:
Thanks to @bmarkus at this forum for the original text:

1) Start fdisk partitioning tool as root:

   
Code: (bash) [Select]
sudo fdisk -u /dev/sda
   Now list partitions with 'p' command and write down the starting and
   ending sectors of partition.

2) Delete partition with 'd' than recreate it with 'n' command.
   Use the same starting sector as deleted had and provide end
   sector or size greater than deleted had having enough free space
   for Mounted Mode. When finished, exit fdisk with 'w' command. Now
   partition size increased but file system size is not yet changed.

3) Reboot. It is necessary to make Kernel aware of changes.

4) After reboot expand file system to the new partition boundaries with
   typing the following command as root:

Code: (bash) [Select]
   sudo resize2fs /dev/sda1
Now you are ready to use the bigger partition.

Yeah, I read that a few times already.
I do it in a bit different way:
1. Download smallest ISO
2. Download packages
3. Extract files from ISO, alter boot codes
4. Copy packages to ISO folder (extracted one)
5. Create new ISO with xorriso

And when I need to manually alter /home/.profile (like to enable alsa for instance) I just do it afterwards and since
I use home=sdb changes are persistent.

Btw I'm really wondering how many guys here are using TinyCore as their main system?
I'm gonna try to migrate to TInyCore from Linux Mint to at least be capable of producing my YouTube programming tutorials.
I love minimalism and freedom above all and TinyCore is just perfect solution I think.
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: patrikg on August 30, 2022, 11:58:12 AM
There is a very good wikipedia page that has links to some linux distributions that runs in ram.

https://en.wikipedia.org/wiki/List_of_Linux_distributions_that_run_from_RAM

And one of them is TC. :)

I think Alpine is the most used one today, because of many use cases in docker.
I got in contact with the one of the first one long time ago, it was LRP.

Linux Router Project. Just run from one 1.44MB floppy.
https://en.wikipedia.org/wiki/Linux_Router_Project
https://web.archive.org/web/20030624030005/http://www.linuxrouter.org/
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 12:21:51 PM
Package downloader update:
https://github.com/maksimKorzh/tce-download

 - added md5 checksums checking
 - added dependency tree verification
 - extensively tested (repo admins, sorry for torturing the repo during testing!)

Here's the package list I've successfully downloaded via my script (64-bit):
Code: [Select]
wifi.tcz
firmware-atheros.tcz
firmware-ipw2100.tcz
firmware-ipw2200.tcz
firmware-iwimax.tcz
firmware-iwl8000.tcz
firmware-iwl9000.tcz
firmware-iwlwifi.tcz
firmware-marvel.tcz
firmware-myri10ge.tcz
firmware-netxen.tcz
firmware-openfwwf.tcz
firmware-ralinkwifi.tcz
firmware-rtlwifi.tcz
firmware-ti-connectivity.tcz
firmware-ueagle-atm.tcz
firmware-vxge.tcz
firmware-zd1211.tcz

Now I have CorePure64-current with WiFI support running on my laptop!

P.S. I can't see Xvesa.tcz on 64-bit repo db, downloading Xfbdev results in a fail when running 'startx',
can someone please kindly tell me which packages do I need to download to a basic GUI setup like in CorePlus-current (32-bit)?
Thanks in advance!
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: Juanito on August 30, 2022, 12:30:39 PM
Xvesa is 32bit only, so if you don’t want to use Xorg-7.7, you need to use Xfbdev.

If you run the first line of .xsession from the console prompt you might get more info on why Xfbdev doesn’t start.

As a minimum you need Xfbdev, flwm, aterm and wbar.
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: patrikg on August 30, 2022, 12:31:39 PM
There is a file called mirrors.tcz
The contents of that file is:
cat /usr/local/share/mirrors
http://repo.tinycorelinux.net/
http://distro.ibiblio.org/tinycorelinux/
http://ftp.nluug.nl/os/Linux/distr/pub/linux/distributions/tinycorelinux/
http://ftp.vim.org/os/Linux/distr/pub/linux/distributions/tinycorelinux/
http://sunsite.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
http://sunsite2.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
http://ftp.cc.uoc.gr/mirrors/linux/tinycorelinux/
http://kambing.ui.ac.id/tinycorelinux/
http://mirror.cedia.org.ec/tinycorelinux/
http://mirror.epn.edu.ec/tinycorelinux/
http://mirrors.dotsrc.org/tinycorelinux/
http://mirror.cpsc.ucalgary.ca/mirror/tinycorelinux/
http://mirrors.163.com/tinycorelinux/
ftp://distro.ibiblio.org/tinycorelinux/
ftp://ftp.gtlib.gatech.edu/pub/tinycore/
ftp://ftp.nluug.nl:21/pub/ibiblio/distributions/tinycorelinux/
ftp://ftp.vim.org:21/pub/ibiblio/distributions/tinycorelinux/
ftp://sunsite.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
ftp://sunsite2.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
ftp://ftp.cc.uoc.gr/mirrors/linux/tinycorelinux
ftp://mirror.cedia.org.ec/tinycorelinux/
ftp://mirrors.dotsrc.org/tinycorelinux/
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 12:32:28 PM
Xvesa is 32bit only, so if you don’t want to use Xorg-7.7, you need to use Xfbdev.

If you run the first line of .xsession from the console prompt you might get more info on why Xfbdev doesn’t start.

Awesome! Thank you!
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 30, 2022, 12:39:17 PM
There is a file called mirrors.tcz
The contents of that file is:
cat /usr/local/share/mirrors
http://repo.tinycorelinux.net/
http://distro.ibiblio.org/tinycorelinux/
http://ftp.nluug.nl/os/Linux/distr/pub/linux/distributions/tinycorelinux/
http://ftp.vim.org/os/Linux/distr/pub/linux/distributions/tinycorelinux/
http://sunsite.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
http://sunsite2.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
http://ftp.cc.uoc.gr/mirrors/linux/tinycorelinux/
http://kambing.ui.ac.id/tinycorelinux/
http://mirror.cedia.org.ec/tinycorelinux/
http://mirror.epn.edu.ec/tinycorelinux/
http://mirrors.dotsrc.org/tinycorelinux/
http://mirror.cpsc.ucalgary.ca/mirror/tinycorelinux/
http://mirrors.163.com/tinycorelinux/
ftp://distro.ibiblio.org/tinycorelinux/
ftp://ftp.gtlib.gatech.edu/pub/tinycore/
ftp://ftp.nluug.nl:21/pub/ibiblio/distributions/tinycorelinux/
ftp://ftp.vim.org:21/pub/ibiblio/distributions/tinycorelinux/
ftp://sunsite.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
ftp://sunsite2.icm.edu.pl/pub/Linux/sunsite.unc.edu/distributions/tinycorelinux/
ftp://ftp.cc.uoc.gr/mirrors/linux/tinycorelinux
ftp://mirror.cedia.org.ec/tinycorelinux/
ftp://mirrors.dotsrc.org/tinycorelinux/

Cool, I didn't know that, thank you!
Btw I just tried -enable-kvm - lighting fast!
As for my script, MIRROR can be altered here:
https://github.com/maksimKorzh/tce-download/blob/main/tce-download.py#L91
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: patrikg on August 30, 2022, 12:49:03 PM
Glad you like TinyCore, but my daily driver is Arch, but when it comes to Raspberry Pi it's picore :)
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on August 31, 2022, 01:28:10 AM
Glad you like TinyCore, but my daily driver is Arch, but when it comes to Raspberry Pi it's picore :)
I would've considered Arch if only not system.d, well and because of Xorg of course. I love using X frame buffer on Tiny core - it's such a cool concept. If I didn't need to produce programming videos on YouTube I would've dropped GUI completely. For instance my minimalist setup is just a core + wifi firmware + python/pip and that's it.
What amazes me the most in Tiny core is that you can avoid touching the core and install your packages on top of it meanwhile having a bootable USB that stores both user data in home directory and newly installed packages.
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on September 02, 2022, 03:42:39 AM
Hey guys, my python script now seems to be working properly, I've managed to download the following packages in one run:
Code: [Select]
wifi.tcz
firmware-atheros.tcz
firmware-ipw2100.tcz
firmware-ipw2200.tcz
firmware-iwimax.tcz
firmware-iwl8000.tcz
firmware-iwl9000.tcz
firmware-iwlwifi.tcz
firmware-marvel.tcz
firmware-myri10ge.tcz
firmware-netxen.tcz
firmware-openfwwf.tcz
firmware-ralinkwifi.tcz
firmware-rtlwifi.tcz
firmware-ti-connectivity.tcz
firmware-ueagle-atm.tcz
firmware-vxge.tcz
firmware-zd1211.tcz
aterm.tcz
bzip2-lib.tcz
fltk-1.3.tcz
flwm_topside.tcz
freetype.tcz
glib2.tcz
graphite.tcz
harfbuzz.tcz
imlib2-bin.tcz
imlib2.tcz
libffi.tcz
libfontenc.tcz
libICE.tcz
libjpeg-turbo.tcz
libpng.tcz
libSM.tcz
libX11.tcz
libXau.tcz
libxcb.tcz
libXdmcp.tcz
libXext.tcz
libXfont.tcz
libXmu.tcz
libXt.tcz
pcre.tcz
wbar.tcz
Xorg-7.7.tcz
Xlibs.tcz
Xprogs.tcz
firefox_getLatest.tcz
guvcview.tcz
alsa.tcz
alsa-config.tcz
pulseaudio.tcz
mplayer-cli.tcz
recordmydesktop.tcz

After I've added following boot codes to CorePure64-current:
Code: [Select]
waitusb=5 tce=sdb home=sdb opt=sdb (and a few more)which has resulted in having a distro allowing me recording programming videos for youtube:
https://www.youtube.com/watch?v=lRiZL9A1byE (https://www.youtube.com/watch?v=lRiZL9A1byE)

Later I've managed to run my custom webcam app in python (opencv) but in both cases - for guvcview and my own app
the recorded video is a bit laggy and I guess it's because of the recordmydesktop. Anyways I'm now trying to compile
SimpleScreenRecorder https://github.com/MaartenBaert/ssr (https://github.com/MaartenBaert/ssr) and if it works I would probably try to make a tcz package out of it.

    [EDIT]:  Added code tags.  Rich
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: Rich on September 02, 2022, 09:19:47 AM
Hi cmk
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.
Title: Re: Loading TCE packages outside of TinyCoreLinux
Post by: cmk on September 03, 2022, 02:22:41 AM
Hi cmk
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Hi Rich, understood. Thanks for kindly pointing out!