WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist  (Read 4873 times)

Offline hprem

  • Newbie
  • *
  • Posts: 12
In usr/local/bin/linux-kernel-sources-env.sh file from linux-kernel-sources-env.tcz package, seems that src_http is wrong and points to x86 repo instead of x86_64 repo

Code: (bash) [Select]
## kernel sources
## config-4.14.10-tinycore(64)
## Module.symvers-4.14.10-tinycore(64)
## linux-4.14.10-patched.txz

kerver=$(uname -r)
kerarch=$(uname -m)
tcbuild=$(getBuild)
tcver="$(cat /usr/share/doc/tc/release.txt)"
src_http="http://www.tinycorelinux.net/${tcver%%.*}.x/x86/release/src/kernel"   <===<<< This should have been x86_64/ instead of x86/
[ "${tcver%%.*}" == "5" ] || pkg='.gz'

This prevents us to install the kernel sources with the following error. Can someone please fix this and update the new pkg?
Code: [Select]
Verifying src files...                               
linux-4.14.10-patched.txz ready                       
 Error config-4.14.10-tinycore64 file not found!+ exit

Thanks
Prem

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #1 on: March 28, 2018, 09:54:09 PM »
Actually, the address is adjusted to Match the currently installed system so it is correct.

The script tests for both txz and tar.xz, as
A result one will always fail.


With linux-kernel-env.tcz loaded and an internet connection established please post the complete output of
Code: [Select]
sh -x  linux-kernel-env.sh
Please wrap with code tags to make the post more readable
Thanks

Additionally the tool assumes a valid internet connection before running, you might try that also.

Sent from my iPhone using Tapatalk
« Last Edit: March 28, 2018, 10:18:43 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #2 on: March 28, 2018, 11:59:19 PM »
Sorry the command should be
Code: [Select]
sh -x  linux-kernel-sources-env.sh

Offline hprem

  • Newbie
  • *
  • Posts: 12
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #3 on: March 29, 2018, 05:23:35 AM »
Thanks for your reply.
I have already wrapped the output with code tag, So I am not very sure why you say it is not readable

Here is the relevant output on running linux-kernel-sources-env.sh script. We are trying to download config-4.14.10-tinycore64 file from http://www.tinycorelinux.net/9.x/x86/release/src/kernel/. But the file exists only in http://www.tinycorelinux.net/9.x/x86_64/release/src/kernel/

Code: (bash) [Select]
~ $ sh -x /usr/local/bin/linux-kernel-sources-env.sh
...
+ src_http=http://www.tinycorelinux.net/9.x/x86/release/src/kernel
...
...
Searching for src files... + search_for_srcFiles
+ [ -f /tmp/linux-4.14.10-patched.txz ]
+ sudo find / -name linux-4.14.10-patched.txz -type f -exec sh -c exec cp -f "$@" /tmp X {} +
+ [ ! -f /tmp/linux-4.14.10-patched.txz ]
+ chkconn
+ set +x
please wait...
Connecting to tinycorelinux.net (89.22.99.37:80)
connection ok
downloading linux-4.14.10-patched.txz... please wait...
Connecting to tinycorelinux.net (89.22.99.37:80)
connection ok
downloading config-4.14.10-tinycore64... wget: server returned error: HTTP/1.1 404 Not Found
please wait...
Connecting to tinycorelinux.net (89.22.99.37:80)
connection ok
downloading Module.symvers-4.14.10-tinycore64.gz... wget: server returned error: HTTP/1.1 404 Not Found
+ printf \n\nVerifying src files...


Verifying src files... + unset k
+ [ -f /tmp/linux-4.14.10-patched.txz ]
+ printf \nlinux-4.14.10-patched.txz ready

linux-4.14.10-patched.txz ready+ [ -f /tmp/config-4.14.10-tinycore64 ]
+ printf \n Error config-4.14.10-tinycore64 file not found!

 Error config-4.14.10-tinycore64 file not found!+ sleep 3
+ exit 5
~ $

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #4 on: March 29, 2018, 10:43:43 AM »
Here is the relevant output on running linux-kernel-sources-env.sh script. We are trying to download config-4.14.10-tinycore64 file from http://www.tinycorelinux.net/9.x/x86/release/src/kernel/. But the file exists only in http://www.tinycorelinux.net/9.x/x86_64/release/src/kernel/

Thanks but like I said already, the script adapts the download address to suit your system which is why it's important to provide the complete output.   The output shown is not the relevant part. the function that modifies the address may not be completing the task but you've not included that part so help determine where the issue is..  It's possible I overlooked the change of address for the config file but the complete output would show this..

If you think this is the actual download link then you're not reading the script..
Code: [Select]
src_http=http://www.tinycorelinux.net/9.x/x86/release/src/kernel
You can also save the kernel files in a convenient location on your system where the script can find them and the script will use those files instead of downloading them each time.
« Last Edit: March 29, 2018, 10:58:39 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #5 on: March 30, 2018, 02:49:23 AM »
Hello hprem
Many changes have occurred since the extension was adapted and tested for tc-9.
While I’m currently attempting to restore my corepure64 install to test the script,  a complete output will really help..


Sent from my iPhone using Tapatalk

Offline hprem

  • Newbie
  • *
  • Posts: 12
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #6 on: March 30, 2018, 04:23:47 PM »
Here is the full o/p. Hope this helps  :)

Code: (bash) [Select]
~ $ sh -x /usr/local/bin/linux-kernel-sources-env.sh
+ . /etc/init.d/tc-functions
+ [ -f /proc/cmdline ]
+ CMDLINE=
+ cat /proc/cmdline
+ CMDLINE= BOOT_IMAGE=/boot/vmlinuz64 root=UUID=eecc732c-6eda-4d12-9fd8-e05c8554ca65 loglevel=3 quiet console=tty0 console=ttyS0,115200n8 rsyslog="-O /var/log/messages" nodhcp initrd=/boot/corepure64.gz
+ echo -e \r\033[K

+ echo -e \033[1;31m
+ RED=
+ echo -e \033[1;32m
+ GREEN=
+ echo -e \033[1;33m
+ YELLOW=
+ echo -e \033[1;34m
+ BLUE=
+ echo -e \033[1;35m
+ MAGENTA=
+ echo -e \033[1;36m
+ CYAN=
+ echo -e \033[1;37m
+ WHITE=
+ echo -e \033[0;39m
+ NORMAL=
+ useBusybox
+ . /etc/init.d/busybox-aliases
+ pkgname=B2
+ cfg=C3
+ kerver=D4
+ kerarch=E5
+ tcbuild=F6
+ kersrc=G7
+ cfg32=H8
+ cfg64=I9
+ tce_path=J0
+ tczinstalled=k1
+ ping1=0
+ k_patched=0
+ pkg=
+ tcver=l2
+ kerver=4.14.10-tinycore64
+ kerarch=x86_64
+ getBuild
+ BUILD=x86_64
+ [ -f /lib/ld-linux-x86-64.so.2 ]
+ echo x86_64
+ tcbuild=x86_64
+ cat /usr/share/doc/tc/release.txt
+ busybox cat /usr/share/doc/tc/release.txt
+ tcver=9.0
+ src_http=http://www.tinycorelinux.net/9.x/x86/release/src/kernel
+ [ 9 == 5 ]
+ pkg=.gz
+ clear
+ busybox clear
+ echo -e \nScript will prepare kernel sources and deps \nfor a 9.x x86_64 compile environment.

Script will prepare kernel sources and deps
for a 9.x x86_64 compile environment.
+ f_div
+ printf \n

+ stty size
+ cut -d  -f2
+ width=272
+ printf %*s 272
+ tr   /
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ printf \n\n


+ loaddeps
+ tceinstalled=/usr/local/tce.installed
+ optional_path=/etc/sysconfig/tcedir/optional
+ cd /etc/sysconfig/tcedir/optional
+ realpath /etc/sysconfig/tcedir
+ tce_path=/mnt/vda1/tce
+ deps=compiletc.tcz glibc_apps.tcz automake.tcz findutils.tcz bash.tcz ncurses-dev.tcz autoconf.tcz perl5.tcz xz.tcz bc.tcz
+ rotdash 930
+ pkgname=compiletc
+ [ ! -f /mnt/vda1/tce/optional/compiletc.tcz ]
+ [ ! -f /usr/local/tce.installed/compiletc ]
+ [ -f /usr/local/tce.installed/compiletc ]
+ echo -e compiletc.tcz loaded
compiletc.tcz   loaded
+ [ ! -f /usr/local/tce.installed/compiletc ]
+ rotdash 932
+ pkgname=glibc_apps
+ [ ! -f /mnt/vda1/tce/optional/glibc_apps.tcz ]
+ [ ! -f /usr/local/tce.installed/glibc_apps ]
+ [ -f /usr/local/tce.installed/glibc_apps ]
+ echo -e glibc_apps.tcz        loaded
glibc_apps.tcz  loaded
+ [ ! -f /usr/local/tce.installed/glibc_apps ]
+ rotdash 935
+ pkgname=automake
+ [ ! -f /mnt/vda1/tce/optional/automake.tcz ]
+ [ ! -f /usr/local/tce.installed/automake ]
+ [ -f /usr/local/tce.installed/automake ]
+ echo -e automake.tcz  loaded
automake.tcz    loaded
+ [ ! -f /usr/local/tce.installed/automake ]
+ rotdash 937
+ pkgname=findutils
+ [ ! -f /mnt/vda1/tce/optional/findutils.tcz ]
+ [ ! -f /usr/local/tce.installed/findutils ]
+ [ -f /usr/local/tce.installed/findutils ]
+ echo -e findutils.tcz loaded
findutils.tcz   loaded
+ [ ! -f /usr/local/tce.installed/findutils ]
+ rotdash 940
+ pkgname=bash
+ [ ! -f /mnt/vda1/tce/optional/bash.tcz ]
+ [ ! -f /usr/local/tce.installed/bash ]
+ [ -f /usr/local/tce.installed/bash ]
+ echo -e bash.tcz      loaded
bash.tcz        loaded
+ [ ! -f /usr/local/tce.installed/bash ]
+ rotdash 942
+ pkgname=ncurses-dev
+ [ ! -f /mnt/vda1/tce/optional/ncurses-dev.tcz ]
+ [ ! -f /usr/local/tce.installed/ncurses-dev ]
+ [ -f /usr/local/tce.installed/ncurses-dev ]
+ echo -e ncurses-dev.tcz       loaded
ncurses-dev.tcz loaded
+ [ ! -f /usr/local/tce.installed/ncurses-dev ]
+ rotdash 944
+ pkgname=autoconf
+ [ ! -f /mnt/vda1/tce/optional/autoconf.tcz ]
+ [ ! -f /usr/local/tce.installed/autoconf ]
+ [ -f /usr/local/tce.installed/autoconf ]
+ echo -e autoconf.tcz  loaded
autoconf.tcz    loaded
+ [ ! -f /usr/local/tce.installed/autoconf ]
+ rotdash 946
+ pkgname=perl5
+ [ ! -f /mnt/vda1/tce/optional/perl5.tcz ]
+ [ ! -f /usr/local/tce.installed/perl5 ]
+ [ -f /usr/local/tce.installed/perl5 ]
+ echo -e perl5.tcz     loaded
perl5.tcz       loaded
+ [ ! -f /usr/local/tce.installed/perl5 ]
+ rotdash 948
+ pkgname=xz
+ [ ! -f /mnt/vda1/tce/optional/xz.tcz ]
+ [ ! -f /usr/local/tce.installed/xz ]
+ [ -f /usr/local/tce.installed/xz ]
+ echo -e xz.tcz        loaded
xz.tcz  loaded
+ [ ! -f /usr/local/tce.installed/xz ]
+ rotdash 950
+ pkgname=bc
+ [ ! -f /mnt/vda1/tce/optional/bc.tcz ]
+ [ ! -f /usr/local/tce.installed/bc ]
+ [ -f /usr/local/tce.installed/bc ]
+ echo -e bc.tcz        loaded
bc.tcz  loaded
+ [ ! -f /usr/local/tce.installed/bc ]
+ kersrc=linux-4.14.10-patched.tar.xz linux-4.14.10-patched.txz
+ echo checking repo for linux-4.14.10-patched.tar.xz
checking repo for linux-4.14.10-patched.tar.xz
+ wget --spider -T 20 http://www.tinycorelinux.net/9.x/x86/release/src/kernel/linux-4.14.10-patched.tar.xz
+ busybox wget --spider -T 20 http://www.tinycorelinux.net/9.x/x86/release/src/kernel/linux-4.14.10-patched.tar.xz
Connecting to www.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
+ echo checking repo for linux-4.14.10-patched.txz
checking repo for linux-4.14.10-patched.txz
+ wget --spider -T 20 http://www.tinycorelinux.net/9.x/x86/release/src/kernel/linux-4.14.10-patched.txz
+ busybox wget --spider -T 20 http://www.tinycorelinux.net/9.x/x86/release/src/kernel/linux-4.14.10-patched.txz
Connecting to www.tinycorelinux.net (89.22.99.37:80)
+ k_patched=linux-4.14.10-patched.txz
+ break
+ [ xlinux-4.14.10-patched.txz == x0 ]
+ src=/usr/src
+ symlink_1=/lib/modules/build
+ symlink_2=/lib/modules/4.14.10-tinycore64/build
+ echo -e \n Cleaning up previous builds

 Cleaning up previous builds
+ old_files=/lib/modules/build /lib/modules/4.14.10-tinycore64/build /usr/src
+ [ -e /lib/modules/build ]
+ sudo find /lib/modules/build -delete
+ [ -e /lib/modules/build ]
+ echo /lib/modules/build       cleaned
/lib/modules/build      cleaned
+ [ -e /lib/modules/4.14.10-tinycore64/build ]
+ sudo find /lib/modules/4.14.10-tinycore64/build -delete
+ [ -e /lib/modules/4.14.10-tinycore64/build ]
+ echo /lib/modules/4.14.10-tinycore64/build    cleaned
/lib/modules/4.14.10-tinycore64/build   cleaned
+ [ -e /usr/src ]
+ sudo find /usr/src -delete
+ [ -e /usr/src ]
+ echo /usr/src cleaned
/usr/src        cleaned
+ [ x86_64 == x86_64 ]
+ [ x86_64 == x86_64 ]
+ [ /etc/sysconfig/tcedir/optional == /tmp ]
+ cd /tmp
+ kernel_src=linux-4.14.10-patched.txz config-4.14.10-tinycore64 Module.symvers-4.14.10-tinycore64.gz
+ rotdash 957
+ printf \nSearching for src files...

Searching for src files... + search_for_srcFiles
+ [ -f /tmp/linux-4.14.10-patched.txz ]
+ [ ! -f /tmp/linux-4.14.10-patched.txz ]
+ [ -f /tmp/linux-4.14.10-patched.txz ]
+ sudo chown tc:staff linux-4.14.10-patched.txz
+ [ -f /tmp/config-4.14.10-tinycore64 ]
+ sudo find / -name config-4.14.10-tinycore64 -type f -exec sh -c exec cp -f "$@" /tmp X {} +
+ [ ! -f /tmp/config-4.14.10-tinycore64 ]
+ chkconn
+ set +x
please wait...
Connecting to tinycorelinux.net (89.22.99.37:80)
connection ok
downloading config-4.14.10-tinycore64... wget: server returned error: HTTP/1.1 404 Not Found
+ printf \n\nVerifying src files...


Verifying src files... + unset k
+ [ -f /tmp/linux-4.14.10-patched.txz ]
+ printf \nlinux-4.14.10-patched.txz ready

linux-4.14.10-patched.txz ready+ [ -f /tmp/config-4.14.10-tinycore64 ]
+ printf \n Error config-4.14.10-tinycore64 file not found!

 Error config-4.14.10-tinycore64 file not found!+ sleep 3
+ exit 5
~ $

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #7 on: March 31, 2018, 03:38:10 AM »
as an aside, now that bash depends on ncursesw (via readline), it might make more sense to use ncursesw-dev to prepare the kernel

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #8 on: March 31, 2018, 04:45:49 AM »
Thanks for the heads up on that, will make the necessary changes thanks

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #9 on: April 02, 2018, 03:20:32 AM »
It turns out that the script was only updated for x86 version.   The dynamic address function from earlier versions appears to be missing,   My bad, sorry
[emoji52]
Am fixing this
« Last Edit: April 02, 2018, 03:30:51 AM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #10 on: April 02, 2018, 05:28:43 AM »
Hello hprem
Please try the updated attached script, I'll update the extension ASAP


regards

Offline hprem

  • Newbie
  • *
  • Posts: 12
Re: Wrong src_http in linux-kernel-sources-env.tcz package from 9.x dist
« Reply #11 on: April 03, 2018, 06:53:26 AM »
You fix works perfectly fine. Thanks for your help   :D