Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: fodder on January 06, 2014, 01:24:26 PM
-
I am having trouble getting lm-sensors to work on Corepure64 5.1. Using lm-sensors on TC 4.x x86 on this same computer I am able to access the temperature sensor so I don't think it is hardware related, but am certainly not sure.
For starters, here is how I am booting into Corepure64:
- Boot LiveCD CorePlus 5.1 with Installation and create bootable USB (Frugal, Whole Disk, ext4, Core Only)
- Boot to USB and run the following commands:
- wget -qO - http://tinycorelinux.net/5.x/x86_64/release/distribution_files/vmlinuz64 > /mnt/sda1/tce/boot/vmlinuz64
- wget -qO - http://tinycorelinux.net/5.x/x86_64/release/distribution_files/rootfs64.gz > /mnt/sda1/tce/boot/rootfs64.gz
- wget -qO - http://tinycorelinux.net/5.x/x86_64/release/distribution_files/modules64.gz > /mnt/sda1/tce/boot/modules64.gz
- tce-load -wi nano
- Edit /mnt/sda1/tce/boot/extlinux/extlinux.conf to be:
DEFAULT Corepure64
LABEL Corepure64
KERNEL /tce/boot/vmlinuz64
APPEND initrd=/tce/boot/rootfs64.gz,/tce/boot/modules64.gz quiet waitusb=5:UUID="000...000" tce=UUID="000...000"
- wget -qO - http://mydomain.example/empty.txt > /mnt/sda1/tce/boot/onboot.lst
- rm -rf /mnt/sda1/tce/optional/*.*
- Reboot without backup and run:
tce-load -wi aterm fltk-1.1.10 Xlibs Xprogs flwm wbar Xorg-7.7
startx
At this point everything appears to be a correctly running install of Corepure64 5.1. For example, I can see a full 8 Gigs of memory listed as usable.
Then, I do the following to try and install lm-sensors:
- First, install all dependencies, grabbing libiconv from 4.x x86_64 repo:
- tce-load -wi compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64
- wget -O - http://ftp.vim.org/os/Linux/distr/tinycorelinux/4.x/x86_64/tcz/libiconv.tcz > /mnt/sda1/tce/optional/libiconv.tcz
- wget -O - http://ftp.vim.org/os/Linux/distr/tinycorelinux/4.x/x86_64/tcz/libiconv-dev.tcz > /mnt/sda1/tce/optional/libiconv-dev.tcz
- tce-load -i libiconv libiconv-dev
- Next, download and build lm-sensors:
- wget -O - http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.3.4.tar.bz2 > lm_sensors-3.3.4.tar.bz2
- tar -xvf lm_sensors-3.3.4.tar.bz2
- cd /home/tc/lm_sensors-3.3.4
- make all
- Last, create TCZ and install:
- make DESTDIR=/tmp/lm-sensors install
- mksquashfs /tmp/lm-sensors/ /mnt/sda1/tce/optional/lm-sensors.tcz
- tce-load -i lm-sensors
There do not appear to be any make errors, but when I try and run "sudo sensors-detect" I get:
sudo: unable to execute /usr/local/sbin/sensors-detect: No such file or directory
However, that file does exist and the /tmp/tcloop/ that it points to also exists.
I also tried just installing the version of lm-sensors in the 4.x x86 repo and everything installed fine, but I get the same error when trying to run sensors-detect.
There are quite a few directions I could go in - like compiling libiconv for 5.x x86_64, but I thought it would be wise to ask first in case it is something obvious with the move to 5.x x86_64 that I am unaware of.
Thanks for any help, thoughts, and/or points in the right direction,
fodder
-
I don't think it affects the result, but libiconv should not be needed - glibc provides the iconv functions in tc.
unable to execute /usr/local/sbin/sensors-detect: No such file or directory
This probably means that sensors-detect is a script looking for perl or python in /usr instead of /usr/local or perhaps for bash - if so, you can edit the script to correct the error.
-
This probably means that sensors-detect is a script looking for perl or python in /usr instead of /usr/local...
Ah that makes sense, thanks so much Juanito.
I looked at the sensors-detect script and saw that it is looking for Perl in /usr/bin/ so I tried this as a quick fix and everything works beautifully: sudo ln -s /usr/local/bin/perl /usr/bin/perl
Thanks again for the help!
fodder
-
So even though my first question was answered (thanks again, Juanito) I never got lm-sensors working on Pure64 5.x, but I had to set the project aside for a while. I have finally gotten back to it for the last week or so but am still stuck.
The easiest way to explain is, this compile process works:
- Boot Core 4.7.7 (x86)
- tce-load -wi compiletc squashfs-tools-4.x perl5 hwmon-3.0.21-tinycore
- cd /home/tc/
- wget -O - http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.3.5.tar.bz2 > /home/tc/lm_sensors-3.3.5.tar.bz2
- tar -xvf lm_sensors-3.3.5.tar.bz2
- cd /home/tc/lm_sensors-3.3.5
- make all
- make DESTDIR=/tmp/lm-sensors install
- mksquashfs /tmp/lm-sensors/ /mnt/sda1/tce/optional/lm-sensors.tcz
- tce-load -i lm-sensors
At that point I can run "sudo sensors-detect" and it both detects the coretemp sensor and finds the coretemp module.
However, this compile process does not work (on the same hardware):
- Boot Pure64 5.2
- tce-load -wi compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64
- ...the rest of the process in identical...
I have to run sensors-detect like this: sudo /usr/local/bin/perl /usr/local/sbin/sensors-detect
The script finds the coretemp sensor, but gives the following error, indicating that it cannot find the coretemp module:
Warning: the required module coretemp is not currently installed on your system.
I am confused by that error because hwmon-3.8.10-tinycore64 has "coretemp.ko.gz" listed just like hwmon-3.0.21-tinycore. (http://ftp.vim.org/os/Linux/distr/tinycorelinux/4.x/x86/tcz/hwmon-3.0.3-tinycore.tcz.list (http://ftp.vim.org/os/Linux/distr/tinycorelinux/4.x/x86/tcz/hwmon-3.0.3-tinycore.tcz.list))
Any help is always greatly appreciated.
fodder
-
does "lsmod" show if the coretemp module is loaded?
-
does "lsmod" show if the coretemp module is loaded?
No sir, here are the modules that are listed after loading all the needed TCZs (compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64):
cpufreq_userspace
cpufreq_stats
cpufreq_powersave
cpufreq_conservative
squashfs
loop
hid_logitech_d j
mperf
microcode
r8169
serio_raw
pcspkr
lpc_ich
xhci_hcd
mfd_core
-
Does "sudo modprobe coretemp" load it?
-
Does "sudo modprobe coretemp" load it?
Nope, I get:
modprobe: module coretemp not found in modules.dep
-
Boot Pure64 5.2
tce-load -wi compiletc squashfs-tools perl5 hwmon-3.8.10-tinycore64
...the rest of the process in identical...
You should be using hwmon-3.8.13-tinycore64 with corepure64-5.2 - it's maybe better to use "tce-load -i hwmon-KERNEL"
-
You should be using hwmon-3.8.13-tinycore64 with corepure64-5.2 - it's maybe better to use "tce-load -i hwmon-KERNEL"
Brilliant!!! I didn't realize that the "-KERNEL" option gave you the most current hwmon for the booted core.
Everything works as expected now, thanks a ton Juanito!
In summary, here is my full working process to get coretemp sensor readings:
- COMPILE AND INSTALL:
- Boot Pure64 5.2
- tce-load -wi compiletc squashfs-tools perl5 hwmon-KERNEL
- cd /home/tc/
- wget -O - http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.3.5.tar.bz2 > /home/tc/lm_sensors-3.3.5.tar.bz2
- tar -xvf lm_sensors-3.3.5.tar.bz2
- cd /home/tc/lm_sensors-3.3.5
- make all
- make DESTDIR=/tmp/lm-sensors install
- mksquashfs /tmp/lm-sensors/ /mnt/sda1/tce/optional/lm-sensors.tcz
- tce-load -i lm-sensors
- RUN DETECTION SCRIPT:
- sudo /usr/local/bin/perl /usr/local/sbin/sensors-detect
- BOOT PERSISTENCE:
- echo etc/sysconfig/lm_sensors >> /opt/.filetool.lst
- echo /sbin/modprobe coretemp >> /opt/bootlocal.sh
- REBOOT WITH BACKUP:
- filetool.sh -b
- sudo reboot
Once I get this project complete I will properly package up all the tczs that I have compiled for 5.x x86_64 and submit them for inclusion in the repo. I have actually had to compile quite a few that will hopefully be be helpful to other users (ncursesw, nano, lsof, ntpclient, unclutter, xdotool, imake, GraphicsMagick, etc.) but I need to make sure everything is working correctly first.
fodder
-
Once I get this project complete I will properly package up all the tczs that I have compiled for 5.x x86_64 and submit them for inclusion in the repo. I have actually had to compile quite a few that will hopefully be be helpful to other users (ncursesw, nano, lsof, ntpclient, unclutter, xdotool, imake, GraphicsMagick, etc.) but I need to make sure everything is working correctly first.
All contributions gratefully received :)