LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices

Reply
 
Search this Thread
Old 02-20-2014, 10:31 AM   #1
andrixnet
Member
 
Registered: Oct 2012
Posts: 35

Rep: Reputation: Disabled
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.
 
Old 02-20-2014, 12:14 PM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 178

Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by andrixnet View Post
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 View Post

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/

Last edited by drmozes; 02-20-2014 at 12:17 PM.
 
Old 05-04-2014, 01:35 AM   #3
Wiser Slacker
LQ Newbie
 
Registered: May 2014
Location: germany
Distribution: slackware x86_64 , arm
Posts: 4

Rep: Reputation: Disabled
i think i have heard of - the kernel never ever use any floating point ...
 
Old 06-23-2014, 05:06 PM   #4
gus3
LQ Newbie
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 16

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 09-29-2014, 10:13 PM   #5
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil
Distribution: Slackware64 14.1, Slackware ARM
Posts: 80

Rep: Reputation: 3
Quote:
Originally Posted by gus3 View Post
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.
 
Old 09-30-2014, 02:38 AM   #6
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 178

Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by frushiyama View Post
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.
 
Old 09-30-2014, 07:31 PM   #7
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil
Distribution: Slackware64 14.1, Slackware ARM
Posts: 80

Rep: Reputation: 3
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
 
Old 10-01-2014, 04:44 AM   #8
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 178

Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by frushiyama View Post
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
 
Old 10-01-2014, 12:08 PM   #9
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil
Distribution: Slackware64 14.1, Slackware ARM
Posts: 80

Rep: Reputation: 3
Quote:
Originally Posted by drmozes View Post
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.

Last edited by frushiyama; 10-01-2014 at 12:21 PM.
 
Old 10-01-2014, 12:51 PM   #10
gus3
LQ Newbie
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 16

Rep: Reputation: Disabled
I will look into this. My instructions may be incomplete regarding the tgzstash/ directory.
 
Old 10-02-2014, 05:28 PM   #11
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil
Distribution: Slackware64 14.1, Slackware ARM
Posts: 80

Rep: Reputation: 3
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?
 
Old 10-02-2014, 06:21 PM   #12
gus3
LQ Newbie
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 16

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 10-03-2014, 02:18 PM   #13
gus3
LQ Newbie
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 16

Rep: Reputation: Disabled
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.)
 
Old 10-04-2014, 09:23 AM   #14
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 178

Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by frushiyama View Post
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.
 
1 members found this post helpful.
Old 10-05-2014, 06:37 PM   #15
frushiyama
Member
 
Registered: Oct 2010
Location: Brazil
Distribution: Slackware64 14.1, Slackware ARM
Posts: 80

Rep: Reputation: 3
Quote:
Originally Posted by gus3 View Post
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
 
  


Reply

Tags
float, raspberry pi


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] gcc 4.6.3 'invalid operands to binary % ( have 'float' and 'float' ) error curious95 Programming 6 02-22-2013 09:51 AM
Is this how links (soft/hard) work? RHLinuxGUY Linux - General 1 10-14-2006 11:06 PM
count digits of a float || convert float to string nadroj Programming 6 07-11-2005 05:52 PM
Soft vs. Hard Links jrdioko Linux - Newbie 2 06-13-2004 03:41 PM
Hard/Soft Links nodger Linux - General 1 05-15-2004 11:36 AM


All times are GMT -5. The time now is 01:55 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration