WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: linux-kernel-sources-env fails if there is no internet connection  (Read 1233 times)

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
I have TCL installed on my laptop, and sometimes I am in places where no internet connection is available, and loading linux-kernel-sources-env.sh is impossible because it depends on an active connection to load his components.

What I did is to download the files Module.symvers-4.14.10-tinycore.gz, config-4.14.10-tinycore and linux-4.14.10-patched.txz to /opt and write this in /opt/bootlocal.sh
Code: [Select]
ln -s /opt/Module.symvers-4.14.10-tinycore.gz /tmp/Module.symvers-4.14.10-tinycore.gz
ln -s /opt/config-4.14.10-tinycore /tmp/config-4.14.10-tinycore
ln -s /opt/linux-4.14.10-patched.txz /tmp/linux-4.14.10-patched.txz
so the script can load those files from the disk, but was still failing, then I tried to look at the code, after a review I did this:
Code: [Select]
#for s in $kersrc ; do
  #echo "checking repo for $s"
  #wget --spider -T 20 "${srchttp}/$s"
    #case $? in
      #0) k_patched="$s"; break;;
    #esac
#done
k_patched="linux-${kerver%-*}-patched.txz"
echo "linux-${kerver%-*}-patched.txz"
in few words, I commented the whole loop and added the last two lines, with that change the script skips the internet search and extract the files normally, I consider this important to be fixed, in case the files are available on disk, skip the internet search

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: linux-kernel-sources-env fails if there is no internet connection
« Reply #1 on: January 25, 2019, 02:19:09 AM »
Hi julcar, thanks for the advise.
iirc originally there was a valid reason to verify current version  or something,  I’ll review and see if we can come to a compromise or update
Regards


Sent from my iPhone using Tapatalk