Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: onelife on September 08, 2021, 01:59:09 PM
-
Hi Forum,
I'm wondering if it is possible to keep TC 8.1.5 (Yes I know an old version - but it has all the "things" I need working on it) but update the "firmware" to the latest so that the OS can run on Raspberry Pi 3B+. I think the boot partition would be where I start - But I know I can't modify the modules etc so I am wondering if the files required to boot the 3B+ are simply not possible on 8.1.5 OR maybe it is :) - Any suggestions on how this could be done?
Many Thanks.
-
Nothing is impossible, but that’s why we release new version of piCore. The 3B+ when it was released, needed a newer kernel too. You could build your own kernel, and remaster the version 8 image, but we are not going to do it globally.
piCore 13 is the latest.
-
Thank you Paul - Yip, fully think the better option is to give a total upgrade a try again. I last tried on 10.x and at the time there were no alsa modules - so compiling those were way out of my depth. However, I now see 13.x has ALSA :) :) woop woop.
So I am trying again to build a new system - I'll start another thread - But do you have any idea how we can add :
vtun.tcz
visudo.tcz
to the 13.x repo? I've tried to install these but I see not available.
Chat when you can - Thank you!
-
If you had them on your old system, you can just copy them to the new system, they will probably work.
-
Very odd - I can't reply to this thread with my message - I keep getting internal server error - Sending this short message as a test.
-
So that worked, but not the attached comment :( - Any idea why
-
You would need to recompile vtun against the latest openssl extension - the build script is here: http://tinycorelinux.net/6.x/armv6/tcz/src/vtun/
Are you looking to add a user to piCore or use a different user name - you can use a boot code for the latter.
-
Thank you Juanito,
I think I've tried the right thing to make - but I get this error at the end :
make: *** [Makefile:59: lfd_encrypt.o] Error 1
I can't see if this is a missing tcz make needs?
Any ideas?
-
“make V=1” will give more error details.
-
I added the V=1 to the make command? is that right? I don't get anything different in doing that :(
-
I thought I'd attached a copy of the make.log and see if maybe you can see where I'm going wrong.
Thank you!
-
I guess I could be far off - but is this maybe something related :
https://sourceforge.net/p/vtun/patches/25/
Thank you!
-
Hi onelife
lib.h: In function 'read_n':
lib.h:74:13: warning: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]
74 | if( (w = read(fd, buf, len)) < 0 ){
| ^~~~
| fread
lib.h: In function 'write_n':
lib.h:93:14: warning: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
93 | if( (w = write(fd, buf, len)) < 0 ){
| ^~~~~
| fwrite
read and write prototypes are supplied by unistd.h.
Did you install compiletc.tcz ?
-
yes, compiletc.tcz is installed - not sure if that was needed but sounded like the compile?
-
Oh I also now tried with vtun 3.0.4 source and updated the build script - But I get the same errors :(
Sorry, I'm really not a dev so this is "shots in the dark" here - Anyway anyone else might already have compiled vtun for TC13?
Kind Regards
-
Hi onelife
... not sure if that was needed ...
Yes, that is needed. When you load compiletc.tcz it loads all of the extensions required for a proper tool chain. In the
past I've seen people have problems because they loaded just gcc, make, and a couple of others instead of compiletc.
-
Okay. Great - yay one thing right. Now to understand the error. But as I say I could be doing completely the wrong thing, although it's a script you just run so I'm sure something can't be right unless I'm really missing something.
Looking at all the lines of code that run during the compile I can't say I know enough to move forward.
Any suggestions on how we can build vtun?
Thank you.
-
The main problem is that the new openssl breaks vtun.
You'll need the patch set from here: http://deb.debian.org/debian/pool/main/v/vtun/vtun_3.0.4-2.debian.tar.xz
..then, using vtun-3.0.4
* load the compiletc, openssl-dev and lzo-dev extensions
* apply the patch set
* overwrite config.sub and config.guess with the files from the libtool extension
* edit the configure script and correct the lines staring with for p in $LZO_HDR_DIR, $SSL_HDR_DIR, $BLOWFISH_HDR_DIR..
* ...for the actual location of the headers
* run the configure script with the piCore standard flags
* make
* sudo make install
-
Thank you for that Juanito,
I can try but this isn't something I haven't done before and not really sure - As I'm using vtun commercially I'm more than happy to pay for this to be do - Are you in a position to maybe do this? If so we can chat and send me a paypal invoice to tackle it?
I have no idea how long that would take even though the steps sound simple - But happy to make it worth your time and effort - Please let me know.
Kind Regards.
-
The extensions in the repo are user contributed for free :)
I'll try to compile vtun for piCore in the next couple of days.
-
posted - not tested
-
Wow - That is super awesome that you compiled it - Sadly I installed from the repo and it seems to not be working :(
It fires up but then dies immediately - I've tried with exact same config that works on other systems but no luck.
I thought maybe the openssl version would make a difference? The new vtun is :
OpenSSL 1.1.1g 21 Apr 2020
And on the server side is :
OpenSSL 1.1.1 11 Sep 2018
Would that maybe make a difference?
If not, I'm really not sure how would I check this should work beside a config that I have already done?
Sorry to be helpless here - But any ideas?
Thank you!
-
Does “sudo vtund -n” give any useful error messages?
Is the ipv6-netfilter kernel modules extension required?
-
nope, vtund -n gives the normal "usage" command - So I wonder if that info is given does that mean all is good?
I installed the ipv6 net filter and that seemed to make some difference in that now the tunnel comes and drops, up and drops - It's as if the session opens but then is immediately closed - rather odd.
I then also installed iptables as thought maybe that would help but no further progress. It's odd, on the server side I get the connection but then immediately closes again. On the client side I don't actually see the vtun interface come up at all.
Any other ticks you can think of that I might need to poke at?
Thank you again :)
-
The piCore-13.x openssl is 1.1.1k, so there maybe a mismatch, but I doubt it.
Vtun is old and many patches were applied - perhaps the problem is there?
-
Does vtun need pppd and/or the ppp kernel modules (the latter are not present in piCore-13.x)?
-
yes, it seems to reference that on the config - I in fact tried to look for ppp "tcz" but no luck - Is that something easy to bring into tv 13?
-
The ppp extension exists in the piCore armv6, armv7 and armv7l repos - which model of RPi are you using? (Note that I will add the ppp kernel module extensions shortly.)
If I understand correctly, you had vtun working without problems with piCore-8.x, but the ppp extension does not exist in the 8.x repos.
-
Yip, you are 100% right - our current TC 8 doesn't have pppd.tcz installed - but the config seems to reference it - So maybe it's not valid at all :(
If I compare modules - our current working TC 8 has :
Module Size Used by Tainted: G
tun 18881 2
i2c_dev 6500 0
brcmfmac 187979 0
brcmutil 5965 1 brcmfmac
cfg80211 443864 1 brcmfmac
snd_soc_bcm2835_i2s 6302 0
snd_soc_core 129843 1 snd_soc_bcm2835_i2s
snd_bcm2835 20533 1
snd_pcm_dmaengine 3467 1 snd_soc_core
snd_pcm 78164 4 snd_soc_core,snd_bcm2835,snd_pcm_dmaengine
snd_timer 19842 1 snd_pcm
snd 54703 5 snd_soc_core,snd_bcm2835,snd_pcm,snd_timer
squashfs 29810 76
rfkill 16951 2 cfg80211
bcm2835_wdt 3472 0
bcm2835_gpiomem 3207 0
i2c_bcm2708 4948 0
zram 22044 1
zsmalloc 12420 1 zram
lz4_compress 3092 1 zram
spi_bcm2835 6880 0
uio_pdrv_genirq 3202 0
uio 8755 1 uio_pdrv_genirq
While the latest TC 13 has :
Module Size Used by Tainted: G
tun 53248 0
ipv6 507904 18 [permanent]
brcmfmac 299008 0
brcmutil 20480 1 brcmfmac
cfg80211 798720 1 brcmfmac
rfkill 32768 2 cfg80211
snd_bcm2835 28672 1
snd_pcm 114688 2 snd_bcm2835
snd_timer 36864 1 snd_pcm
snd 77824 4 snd_bcm2835,snd_pcm,snd_timer
fixed 16384 0
squashfs 40960 159
raspberrypi_hwmon 16384 0
zram 28672 1
zsmalloc 28672 1 zram
Perhaps you can see something - Maybe the lz4compress? Although that tcz is installed on TC 13 - Maybe the module is just not loading in TC13?
Chat now - Thanks
-
ppp-modules-KERNEL added to piCore-13.x repos and ppp dep file added.
Note that the extension is called ppp and not pppd, but it contains pppd.
-
lz4_compress.ko is not included in any extensions in 13.x, but I doubt it is needed by vtun.
-
Sadly, even with ppp module added seems no luck :(
On our server side FYI, the "instant drop" and "reconnect" shows as this if it's any help :
Sep 17 12:15:04 server vtund[32982]: Session vpn_raspberry_new[41.216.204.144:51900] opened
Sep 17 12:15:04 server vtund[32982]: LZO compression[level 9] initialized
Sep 17 12:15:04 server vtund[32982]: Blowfish-128-ECB encryption initialized
Sep 17 12:15:04 server vtund[32982]: Connection closed by other side
Sep 17 12:15:04 server vtund[32982]: Session vpn_raspberry_new closed
Sep 17 12:15:10 server vtund[33131]: Use SSL-aware challenge/response
Sep 17 12:15:10 server vtund[33131]: Session vpn_raspberry_new[41.216.204.144:51901] opened
Sep 17 12:15:10 server vtund[33131]: LZO compression[level 9] initialized
Sep 17 12:15:10 server vtund[33131]: Blowfish-128-ECB encryption initialized
Sep 17 12:15:11 server vtund[33131]: Connection closed by other side
Sep 17 12:15:11 server vtund[33131]: Session vpn_raspberry_new closed
Sep 17 12:15:17 server vtund[33243]: Use SSL-aware challenge/response
Sep 17 12:15:17 server vtund[33243]: Session vpn_raspberry_new[41.216.204.144:51902] opened
Sep 17 12:15:17 server vtund[33243]: LZO compression[level 9] initialized
Sep 17 12:15:17 server vtund[33243]: Blowfish-128-ECB encryption initialized
Sep 17 12:15:17 server vtund[33243]: Connection closed by other side
Sep 17 12:15:17 server vtund[33243]: Session vpn_raspberry_new closed
So that is why the compress or encryption I suspect is the issue - But hummm, not sure what I can do to poke more?
Perhaps it's interesting to note that the vtun process doesn't "die" - IOW, it stays the same PID so I do think vtun is "working" and it's maybe something related that can be solved?
-
The lzo extension is a dep of vtun, so it should be loaded (/usr/local/lib/liblzo2.so*).
You can obtain the lz4_compress module from http://tinycorelinux.net/13.x/armv7/releases/RPi/src/kernel/5.10.16-piCore-v7_modules.tar.xz if you wish to try it.
For troubleshooting purposes you could try replacing the piCore vtun with the one from the RPi os or debian?
-
You could also try recompiling vtun - see http://tinycorelinux.net/13.x/armv7/tcz/src/vtun - without the debian patch 00-sslauth.patch (ref /dev/random, which is not present?).
-
Hi there Forum,
I thought for the benefit of this thread I would comment to say I've had no luck with another recompile of vtun :(
So for now I will attempt to move to open-vpn.
As mentioned, vtun is a very old programme so perhaps it has reached end of life.
BIG thank you to all who tried to assist me in making it work on TC 13 - Much appreciated.
-
You could try feeding /dev/random with the rng-tools extension and then retrying vtun?
$ sudo rngd --rng-device=/dev/hwrng