LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   SlackwareARM on RaspberryPI and soft/hard float (https://www.linuxquestions.org/questions/slackware-arm-108/slackwarearm-on-raspberrypi-and-soft-hard-float-4175495652/)

andrixnet 02-20-2014 09:31 AM

SlackwareARM on RaspberryPI and soft/hard float
 
AFAIK SlackwareARM packages are compiled (for wide compatibility reasons) as soft-float on the ARM platform.

Not all SoC have hard-float and SlackwareARM aims at supporting as many as possible. Which is very good.

My question is: on the RaspberryPI whose CPU include hardware floating point support, what would be necessary to be recompiled in the Slackware distro so that end user applications (that would benefit from using hard-float and be compiled with hard-float) would need to work properly ?

Off the top of my head I'm thinking: glibc, some system utils, some libraries that would be used by such applications..

AFAIK the kernel (using FatDog's guide) is the binary official one from The Raspberry Foundation, which is hard-float compiled.

Examples: image processing (imagemagic, jpeg, etc), video processing (ffmpeg, etc), mysql (if using FLOAT columns), ... (the list is open)

I assume things like "ls" won't really need the upgrade.

drmozes 02-20-2014 11:14 AM

Quote:

Originally Posted by andrixnet (Post 5121653)
AFAIK SlackwareARM packages are compiled (for wide compatibility reasons) as soft-float on the ARM platform.

Not all SoC have hard-float and SlackwareARM aims at supporting as many as possible. Which is very good.

My question is: on the RaspberryPI whose CPU include hardware floating point support, what would be necessary to be recompiled in the Slackware distro so that end user applications (that would benefit from using hard-float and be compiled with hard-float) would need to work properly ?

Off the top of my head I'm thinking: glibc, some system utils, some libraries that would be used by such applications..

AFAIK the kernel (using FatDog's guide) is the binary official one from The Raspberry Foundation, which is hard-float compiled.

The kernels are compiled to support the architectures selected (e.g. ARMv7 Tegra, armv6 Broadcom). When selecting the support you will either choose which features to support, or they will be baked into the CPU type anyway.
So yes, if the CPU contains hardware floating point support, your kernel will be hard float.

However, the kernel <-> userland syscall ABI is divorced from the userland ABI which is why you can run the soft float userland on a hard float kernel.


Quote:

Originally Posted by andrixnet (Post 5121653)

Examples: image processing (imagemagic, jpeg, etc), video processing (ffmpeg, etc), mysql (if using FLOAT columns), ... (the list is open)


I assume things like "ls" won't really need the upgrade.

Someone recompiled the most significant packages and documented here:

http://mindplusplus.wordpress.com/20...-raspberry-pi/

Wiser Slacker 05-04-2014 12:35 AM

i think i have heard of - the kernel never ever use any floating point ...

gus3 06-23-2014 04:06 PM

drmozes, that someone was me. :) I rebuild Glibc using "-mfloat-abi=softfp" every time Slackware ARM gets a new version. If nothing else, it relieves some of the memory pressure on my first-edition RPi.

frushiyama 09-29-2014 09:13 PM

Quote:

Originally Posted by gus3 (Post 5192800)
drmozes, that someone was me. :) I rebuild Glibc using "-mfloat-abi=softfp" every time Slackware ARM gets a new version. If nothing else, it relieves some of the memory pressure on my first-edition RPi.

I am doing your guide right now gus3, but i need t add three more lines to grab kernel-headers sources:
Code:

mkdir -p slackware{64,arm}-current/source/d/kernel-headers/
rsync -aP rsync://ftp.slackware.com/slackware/slackware64-current/source/d/kernel-headers/ slackware64-current/source/d/kernel-headers/
rsync -aP rsync://ftp.slackware.org.uk/slackwarearm/slackwarearm-current/source/d/kernel-headers/ slackwarearm-current/source/d/kernel-headers/

I will update here when the builds ends.

drmozes 09-30-2014 01:38 AM

Quote:

Originally Posted by frushiyama (Post 5246642)
I am doing your guide right now gus3, but i need t add three more lines to grab kernel-headers sources:
Code:

mkdir -p slackware{64,arm}-current/source/d/kernel-headers/
rsync -aP rsync://ftp.slackware.com/slackware/slackware64-current/source/d/kernel-headers/ slackware64-current/source/d/kernel-headers/
rsync -aP rsync://ftp.slackware.org.uk/slackwarearm/slackwarearm-current/source/d/kernel-headers/ slackwarearm-current/source/d/kernel-headers/

I will update here when the builds ends.

You don't need anything from the Slackware64 tree because the slack-desc is in the ARM tree. It's a rarity, but it's there. Probably because originally the description used to be ARM specific.

frushiyama 09-30-2014 06:31 PM

Build fails:
Code:

Creating Slackware package:  /root/tgzstash/l/glibc-2.19-arm-3.txz

/sbin/makepkg: line 308: /root/tgzstash/l/glibc-2.19-arm-3.txz: No such file or directory
./
install/
install/doinst.sh
install/slack-desc
ERROR:  xz returned error code 1 -- makepkg failed.

Slackware package /root/tgzstash/l/glibc-2.19-arm-3.txz created.

Full log here: https://drive.google.com/file/d/0Bzl...it?usp=sharing

drmozes 10-01-2014 03:44 AM

Quote:

Originally Posted by frushiyama (Post 5247180)
Build fails:
Code:

Creating Slackware package:  /root/tgzstash/l/glibc-2.19-arm-3.txz

/sbin/makepkg: line 308: /root/tgzstash/l/glibc-2.19-arm-3.txz: No such file or directory
./
install/
install/doinst.sh
install/slack-desc
ERROR:  xz returned error code 1 -- makepkg failed.

Slackware package /root/tgzstash/l/glibc-2.19-arm-3.txz created.

Full log here: https://drive.google.com/file/d/0Bzl...it?usp=sharing

Did you make the target directory?

mkdir -p /root/tgzstash/l

frushiyama 10-01-2014 11:08 AM

Quote:

Originally Posted by drmozes (Post 5247356)
Did you make the target directory?

mkdir -p /root/tgzstash/l

Yes it was missing the l and d folders too. The packages were built fine and the installation and reboot occurred without problems.
It need more tests but i will do later.

gus3 10-01-2014 11:51 AM

I will look into this. My instructions may be incomplete regarding the tgzstash/ directory.

frushiyama 10-02-2014 04:28 PM

I had an ABI version error when tried to startx:
Code:

francis@rpi:~$ startx
xauth:  file /home/francis/.serverauth.676 does not exist


X.Org X Server 1.15.2
Release Date: 2014-06-27
X Protocol Version 11, Revision 0
Build Operating System: Slackware 14.2 Slackware Linux Project
Current Operating System: Linux rpi 3.12.29+ #714 PREEMPT Wed Oct 1 23:11:38 BST 2014 armv6l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1814 bcm2708_fb.fbheight=974 bcm2708.boardrev=0xe bcm2708.serial=0xb93539c5 smsc95xx.macaddr=B8:27:EB:35:39:C5 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=tty1 nofont root=/dev/sda1 rootfstype=ext4 rootwait ro
Build Date: 03 September 2014  06:25:25PM
 
Current version of pixman: 0.30.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Oct  2 18:25:38 2014
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC                                                                                                                                                       
Initializing built-in extension XINERAMA                                                                                                                                                       
Initializing built-in extension XFIXES                                                                                                                                                         
Initializing built-in extension RENDER                                                                                                                                                         
Initializing built-in extension RANDR                                                                                                                                                         
Initializing built-in extension COMPOSITE                                                                                                                                                     
Initializing built-in extension DAMAGE                                                                                                                                                         
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension Present
Initializing built-in extension DRI3
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension GLX
(EE) module ABI major version (14) doesn't match the server's version (15)
(EE) module ABI major version (14) doesn't match the server's version (15)
(EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
        at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

I supose that i have to recompile all X series to make it work right?

gus3 10-02-2014 05:21 PM

Thanks to frushiyama for the package build bug report, and drmozes for recognizing the culprit. Yes, the a/ and l/ directories must be present under tgzstash/. I have fixed the build instructions.

frushiyama, I will look into the X problem.

gus3 10-03-2014 01:18 PM

Problem confirmed. To make matters worse, reverting to glibc from -current didn't fix. However, I suspect an issue with the X server packages, as I've seen this before. Again, I'll look into it.

(And apologies for the long delay. I don't have Internet access at home.)

drmozes 10-04-2014 08:23 AM

Quote:

Originally Posted by frushiyama (Post 5248189)
I had an ABI version error when tried to startx:[code]francis@rpi:~$ startx
xauth: file /home/francis/.serverauth.676 does not exist


I supose that i have to recompile all X series to make it work right?

Today's updates in -current should address that, assuming that you're using the same modules as I've recompiled.
If the problem continues, look in the Xorg log to see which modules are being loaded and reply here.

frushiyama 10-05-2014 05:37 PM

Quote:

Originally Posted by gus3 (Post 5248579)
Problem confirmed. To make matters worse, reverting to glibc from -current didn't fix. However, I suspect an issue with the X server packages, as I've seen this before. Again, I'll look into it.

(And apologies for the long delay. I don't have Internet access at home.)

gus3 please consider review on some typos on your guide:
Code:

echo &quot;CFLAGS = -O2 -mfloat-abi=softfp -march=native -mtune=native&quot; &gt; /root/configparms
should be
Code:

echo "CFLAGS = -O2 -mfloat-abi=softfp -march=native -mtune=native" > /root/configparms
Building now with Sat Oct 4 updates


All times are GMT -5. The time now is 10:28 AM.