LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-14-2022, 01:47 AM   #1
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
[Tinycore TC64 13x] kernel environment commands


Hi

a couple of years ago, as coreplayer2's kernel-env TCE was no longer maintained,
I posted a kernel environment script. Script was a copy of paste from the terminal and I failed to noticed I left out some $ signs....very naughty and missed gettext.

I have corrected this below and its no longer a script. Then I built a out-of-tree module for usb dongle and can't find dongle to test fresh K module.

Run all commands as root if interested

Code:
KC=config-5.15.10-tinycore64
KM=Module.symvers-5.15.10-tinycore64.gz
KP=linux-5.15.10-patched.txz
KV=$(uname -r)
KB=/lib/modules/$KV/build
LB=/lib/modules/build
REPO=http://www.tinycorelinux.net/13.x/x86_64/release/src/kernel
SRC=/usr/src
SYM1=/lib/modules/build
SYM2=/lib/modules/$KV/build
USER=`cat /etc/sysconfig/tcuser`
LIST="compiletc wget glibc_apps automake bash ncursesw-dev xz bc elfutils-dev gettext"
for Z in $LIST
    do
    su -c "tce-load -i $Z" $USER
done
su -c "/usr/local/bin/wget -nc --no-check-certificate \
$REPO/$KP \
$REPO/$KC  \
$REPO/$KM " $USER

# now copy those downloads please

echo 'unpacking  kernel takes awhile and delete tar file'
xz -d linux-5.15.10-patched.txz
tar xvf linux-5.15.10*tar
rm -rf linux-5.15.10-patched.tar
echo 'unpacking module file'
gunzip $KM
echo 'start /usr/src stuff'
mkdir /usr/src
mv linux-5.15.10  /usr/src
cd $SRC/linux*
echo 'make mrproper,  make oldconfig, make prepare and  make modules_prepare takes seconds each'
make mrproper  # seconds
mv /tmp/$KC .config
make oldconfig # seconds
make prepare # 10 seconds
make modules_prepare    # seconds
mv /tmp/*symvers* Module.symvers
echo 'next command takes yonks....about 2 hours subject to PC hardware  '
make SUBDIRS=scripts/mod
export KBUILD=/usr/src/linux-${KV%%-*}
cd /
ln -s $KBUILD $SYM1 && ln -s $KBUILD $SYM2

# After script completes....I recommend copy /usr/src to your persistent dir
# as compile takes so long
# then on reboot or when needed use root powers to copy backup of /usr/src back to its correct dir
# and then repeat below
# KV=$(uname -r)
# SYM1=/lib/modules/build
# SYM2=/lib/modules/$KV/build
# export KBUILD=/usr/src/linux-${KV%%-*}
# ln -s $KBUILD $SYM1 && ln -s $KBUILD $SYM2 using root powers

ls -al /lib/modules/build
# expect to see
# /lib/modules/build -> /usr/src/linux-5.15.10
ls -al /lib/modules/5.15.10-tinycore64/build
# expect to see 
# /lib/modules/5.15.10-tinycore64/build -> /usr/src/linux-5.15.10

Last edited by aus9; 01-15-2022 at 05:35 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How I swapped a quirky intel sound on Tinycore aus9 Linux - General 2 01-14-2022 07:06 PM
[SOLVED] [TC64]gtk2 updated for keyboard inputs aus9 Linux - General 0 12-24-2019 07:44 AM
[TC64] vlc desktop icon fix, until it gets fixed 2019 Nov aus9 Linux - General 2 12-01-2019 04:41 AM
(Partly Solved) Need help with remix of TinyCore. nooby Linux - Distributions 7 05-19-2011 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration