Slackware - ARM This forum is for the discussion of Slackware ARM. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
09-03-2022, 05:23 AM
|
#16
|
Member
Registered: Jul 2012
Location: Cumbria UK
Distribution: Slackware
Posts: 62
Rep:
|
It just builds on my machine ,no errors, (rpi4 aarch64) but I do have installed gcc-arm-none-eabi-10.3-2021.10-aarch64-1_SBo.tgz. This was built from source overnight. It includes binutils, newlib, newlib-nano, gdb, and gcc-size-libstdcxx. Plain vanilla gcc that is in Slackware does not support all arm Cortex-M architectures.
Dunc.
|
|
1 members found this post helpful.
|
09-03-2022, 07:37 AM
|
#17
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,208
|
I'm no expert, but I think from 14.2 Slackware Arm just catered for Arm Cortex 7 & above, they're only doing aarch64 now afaict. You'll end up compiling everything you want to run, which is a major PITA.
|
|
|
09-03-2022, 01:11 PM
|
#18
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
Quote:
Originally Posted by Dunc.
It just builds on my machine ,no errors, (rpi4 aarch64) but I do have installed gcc-arm-none-eabi-10.3-2021.10-aarch64-1_SBo.tgz. This was built from source overnight. It includes binutils, newlib, newlib-nano, gdb, and gcc-size-libstdcxx. Plain vanilla gcc that is in Slackware does not support all arm Cortex-M architectures.
Dunc.
|
i too have the gcc from SBo:
Code:
$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-none-eabi/10.2.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-10.2.0/configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --infodir=/usr/info --mandir=/usr/man --disable-install-libiberty --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-linker-build-id --disable-nls --disable-werror --enable-__cxa_atexit --enable-checking=release --enable-clocale=gnu --enable-cloog-backend=isl --enable-gnu-unique-object --enable-gold --enable-ld=default --enable-lto --enable-plugin --target=arm-none-eabi --with-cpu=cortex-m3 --with-fpu=fpv4-sp-d16 --with-float=softfp --with-mode=thumb --enable-interwork --enable-multilib --with-system-zlib --without-headers --disable-shared --disable-nls --with-as=/usr/bin/arm-none-eabi-as --with-gnu-as --with-gnu-ld --with-ld=/usr/bin/arm-none-eabi-ld --program-prefix=arm-none-eabi- --program-suffix= --build=arm-slackware-linux --enable-languages=c --with-newlib --with-headers=/usr/include/newlib/libc/include
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC)
FWIW
|
|
|
09-05-2022, 04:36 AM
|
#19
|
Member
Registered: Jul 2012
Location: Cumbria UK
Distribution: Slackware
Posts: 62
Rep:
|
The SBo is built with
Code:
--with-cpu=cortex-m3 \
--with-fpu=fpv4-sp-d16 \
--with-float=hard \
This is not the way to do it. rmprofile is the way to go.
Code:
--with-multilib-list=rmprofile
If I check which architectures are supported I get this.
Code:
duncan@rpi-4:~$ arm-none-eabi-gcc --print-multi-lib
.;
arm/v5te/softfp;@marm@march=armv5te+fp@mfloat-abi=softfp
arm/v5te/hard;@marm@march=armv5te+fp@mfloat-abi=hard
thumb/nofp;@mthumb@mfloat-abi=soft
thumb/v7/nofp;@mthumb@march=armv7@mfloat-abi=soft
thumb/v7+fp/softfp;@mthumb@march=armv7+fp@mfloat-abi=softfp
thumb/v7+fp/hard;@mthumb@march=armv7+fp@mfloat-abi=hard
thumb/v7-r+fp.sp/softfp;@mthumb@march=armv7-r+fp.sp@mfloat-abi=softfp
thumb/v7-r+fp.sp/hard;@mthumb@march=armv7-r+fp.sp@mfloat-abi=hard
thumb/v6-m/nofp;@mthumb@march=armv6s-m@mfloat-abi=soft
thumb/v7-m/nofp;@mthumb@march=armv7-m@mfloat-abi=soft
thumb/v7e-m/nofp;@mthumb@march=armv7e-m@mfloat-abi=soft
thumb/v7e-m+fp/softfp;@mthumb@march=armv7e-m+fp@mfloat-abi=softfp
thumb/v7e-m+fp/hard;@mthumb@march=armv7e-m+fp@mfloat-abi=hard
thumb/v7e-m+dp/softfp;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=softfp
thumb/v7e-m+dp/hard;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=hard
thumb/v8-m.base/nofp;@mthumb@march=armv8-m.base@mfloat-abi=soft
thumb/v8-m.main/nofp;@mthumb@march=armv8-m.main@mfloat-abi=soft
thumb/v8-m.main+fp/softfp;@mthumb@march=armv8-m.main+fp@mfloat-abi=softfp
thumb/v8-m.main+fp/hard;@mthumb@march=armv8-m.main+fp@mfloat-abi=hard
thumb/v8-m.main+dp/softfp;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=softfp
thumb/v8-m.main+dp/hard;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=hard
thumb/v8.1-m.main+mve/hard;@mthumb@march=armv8.1-m.main+mve@mfloat-abi=hard
It has both hard and soft float support.
Dunc.
|
|
1 members found this post helpful.
|
09-06-2022, 08:35 AM
|
#20
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
Quote:
Originally Posted by Dunc.
The SBo is built with
Code:
--with-cpu=cortex-m3 \
--with-fpu=fpv4-sp-d16 \
--with-float=hard \
This is not the way to do it. rmprofile is the way to go.
Code:
--with-multilib-list=rmprofile
If I check which architectures are supported I get this.
Code:
duncan@rpi-4:~$ arm-none-eabi-gcc --print-multi-lib
.;
arm/v5te/softfp;@marm@march=armv5te+fp@mfloat-abi=softfp
arm/v5te/hard;@marm@march=armv5te+fp@mfloat-abi=hard
thumb/nofp;@mthumb@mfloat-abi=soft
thumb/v7/nofp;@mthumb@march=armv7@mfloat-abi=soft
thumb/v7+fp/softfp;@mthumb@march=armv7+fp@mfloat-abi=softfp
thumb/v7+fp/hard;@mthumb@march=armv7+fp@mfloat-abi=hard
thumb/v7-r+fp.sp/softfp;@mthumb@march=armv7-r+fp.sp@mfloat-abi=softfp
thumb/v7-r+fp.sp/hard;@mthumb@march=armv7-r+fp.sp@mfloat-abi=hard
thumb/v6-m/nofp;@mthumb@march=armv6s-m@mfloat-abi=soft
thumb/v7-m/nofp;@mthumb@march=armv7-m@mfloat-abi=soft
thumb/v7e-m/nofp;@mthumb@march=armv7e-m@mfloat-abi=soft
thumb/v7e-m+fp/softfp;@mthumb@march=armv7e-m+fp@mfloat-abi=softfp
thumb/v7e-m+fp/hard;@mthumb@march=armv7e-m+fp@mfloat-abi=hard
thumb/v7e-m+dp/softfp;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=softfp
thumb/v7e-m+dp/hard;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=hard
thumb/v8-m.base/nofp;@mthumb@march=armv8-m.base@mfloat-abi=soft
thumb/v8-m.main/nofp;@mthumb@march=armv8-m.main@mfloat-abi=soft
thumb/v8-m.main+fp/softfp;@mthumb@march=armv8-m.main+fp@mfloat-abi=softfp
thumb/v8-m.main+fp/hard;@mthumb@march=armv8-m.main+fp@mfloat-abi=hard
thumb/v8-m.main+dp/softfp;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=softfp
thumb/v8-m.main+dp/hard;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=hard
thumb/v8.1-m.main+mve/hard;@mthumb@march=armv8.1-m.main+mve@mfloat-abi=hard
It has both hard and soft float support.
Dunc.
|
So if i replace that three lines with that one single i get what i need?
I am running a test as we speak
edit:
FWIW current SBo gives:
Code:
# arm-none-eabi-gcc --print-multi-lib
.;
thumb;@mthumb
arm/autofp/v5te/fpu;@marm@mfpu=auto@march=armv5te+fp@mfloat-abi=hard
thumb/autofp/v7/fpu;@mthumb@mfpu=auto@march=armv7+fp@mfloat-abi=hard
that seems to be quite in line with what my results were (hard float binary output)
Last edited by SCerovec; 09-06-2022 at 08:38 AM.
|
|
|
09-07-2022, 03:42 PM
|
#21
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
Many, many thanks to @Dunc.
arm-none-eabi-gcc --print-multi-lib
Code:
.;
arm/v5te/softfp;@marm@march=armv5te+fp@mfloat-abi=softfp
arm/v5te/hard;@marm@march=armv5te+fp@mfloat-abi=hard
thumb/nofp;@mthumb@mfloat-abi=soft
thumb/v7/nofp;@mthumb@march=armv7@mfloat-abi=soft
thumb/v7+fp/softfp;@mthumb@march=armv7+fp@mfloat-abi=softfp
thumb/v7+fp/hard;@mthumb@march=armv7+fp@mfloat-abi=hard
thumb/v7-r+fp.sp/softfp;@mthumb@march=armv7-r+fp.sp@mfloat-abi=softfp
thumb/v7-r+fp.sp/hard;@mthumb@march=armv7-r+fp.sp@mfloat-abi=hard
thumb/v6-m/nofp;@mthumb@march=armv6s-m@mfloat-abi=soft
thumb/v7-m/nofp;@mthumb@march=armv7-m@mfloat-abi=soft
thumb/v7e-m/nofp;@mthumb@march=armv7e-m@mfloat-abi=soft
thumb/v7e-m+fp/softfp;@mthumb@march=armv7e-m+fp@mfloat-abi=softfp
thumb/v7e-m+fp/hard;@mthumb@march=armv7e-m+fp@mfloat-abi=hard
thumb/v7e-m+dp/softfp;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=softfp
thumb/v7e-m+dp/hard;@mthumb@march=armv7e-m+fp.dp@mfloat-abi=hard
thumb/v8-m.base/nofp;@mthumb@march=armv8-m.base@mfloat-abi=soft
thumb/v8-m.main/nofp;@mthumb@march=armv8-m.main@mfloat-abi=soft
thumb/v8-m.main+fp/softfp;@mthumb@march=armv8-m.main+fp@mfloat-abi=softfp
thumb/v8-m.main+fp/hard;@mthumb@march=armv8-m.main+fp@mfloat-abi=hard
thumb/v8-m.main+dp/softfp;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=softfp
thumb/v8-m.main+dp/hard;@mthumb@march=armv8-m.main+fp.dp@mfloat-abi=hard
thumb/v8.1-m.main+mve/hard;@mthumb@march=armv8.1-m.main+mve@mfloat-abi=hard
however now:
Code:
$ make
Creating symbolic link out/board
Building out/autoconf.h
Compiling out/src/sched.o
Compiling out/src/command.o
Compiling out/src/basecmd.o
Compiling out/src/debugcmds.o
Compiling out/src/initial_pins.o
Compiling out/src/gpiocmds.o
Compiling out/src/stepper.o
Compiling out/src/endstop.o
Compiling out/src/trsync.o
Compiling out/src/adccmds.o
Compiling out/src/spicmds.o
Compiling out/src/thermocouple.o
Compiling out/src/i2ccmds.o
Compiling out/src/pwmcmds.o
Compiling out/src/spi_software.o
Compiling out/src/sensor_adxl345.o
Compiling out/src/sensor_angle.o
Compiling out/src/sensor_mpu9250.o
Compiling out/src/lcd_st7920.o
Compiling out/src/lcd_hd44780.o
Compiling out/src/buttons.o
Compiling out/src/tmcuart.o
Compiling out/src/neopixel.o
Compiling out/src/pulse_counter.o
Compiling out/src/stm32/watchdog.o
Compiling out/src/stm32/gpio.o
Compiling out/src/stm32/clockline.o
Compiling out/src/generic/crc16_ccitt.o
Compiling out/src/generic/armcm_boot.o
Compiling out/src/generic/armcm_irq.o
Compiling out/src/generic/armcm_reset.o
Compiling out/src/../lib/stm32f1/system_stm32f1xx.o
Compiling out/src/stm32/stm32f1.o
Compiling out/src/generic/armcm_timer.o
Compiling out/src/stm32/adc.o
Compiling out/src/stm32/i2c.o
Compiling out/src/stm32/spi.o
Compiling out/src/stm32/usbfs.o
Compiling out/src/stm32/chipid.o
Compiling out/src/generic/usb_cdc.o
Compiling out/src/stm32/hard_pwm.o
Building out/compile_time_request.o
Version: v0.10.0-557-gf7e29b27
Preprocessing out/src/generic/armcm_link.ld
Linking out/klipper.elf
/usr/bin/arm-none-eabi-ld: cannot find -lg_nano
/usr/bin/arm-none-eabi-ld: cannot find -lc_nano
collect2: error: ld returned 1 exit status
make: *** [Makefile:72: out/klipper.elf] Error 1
We are getting there!
Anyone, what is g_nano?
|
|
|
09-08-2022, 06:14 AM
|
#22
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,208
|
Quote:
Originally Posted by SCerovec
Anyone, what is g_nano?
|
Does this help? https://nanopi.io
|
|
|
09-08-2022, 06:51 AM
|
#23
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
Quote:
Originally Posted by business_kid
|
While i am quite fond of FreindlyElec (as a mater of fact I am a happy user of their Nano PC T4) this does not seem to help .
This nano has something to do with software i think.
|
|
|
09-08-2022, 07:17 AM
|
#24
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
after installing mlocate to my BBB i checked this:
root@beaglebone:/home/debian# locate g_nano
Code:
/usr/lib/arm-none-eabi/newlib/libg_nano.a
/usr/lib/arm-none-eabi/newlib/hard/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v6-m/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7-ar/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7-ar/fpv3/hard/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7-ar/fpv3/hard/be/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7-ar/fpv3/softfp/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7-m/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7e-m/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7e-m/fpv4-sp/hard/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7e-m/fpv4-sp/softfp/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7e-m/fpv5/hard/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v7e-m/fpv5/softfp/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v8-m.base/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v8-m.main/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v8-m.main/fpv5/hard/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v8-m.main/fpv5/softfp/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v8-m.main/fpv5-sp/hard/libg_nano.a
/usr/lib/arm-none-eabi/newlib/thumb/v8-m.main/fpv5-sp/softfp/libg_nano.a
so my newlib isn't to spec either?
|
|
|
09-08-2022, 07:57 AM
|
#25
|
Member
Registered: Jul 2012
Location: Cumbria UK
Distribution: Slackware
Posts: 62
Rep:
|
nano refers to the version of newlib. The arm toolchain builds newlib twice. It packages one as newlib and the other as nano.
Code:
$SRCDIR/$NEWLIB_NANO/configure \
$NEWLIB_CONFIG_OPTS \
--target=$TARGET \
--prefix=$BUILDDIR_NATIVE/target-libs \
--disable-newlib-supplied-syscalls \
--enable-newlib-reent-check-verify \
--enable-newlib-reent-small \
--enable-newlib-retargetable-locking \
--disable-newlib-fvwrite-in-streamio \
--disable-newlib-fseek-optimization \
--disable-newlib-wide-orient \
--enable-newlib-nano-malloc \
--disable-newlib-unbuf-stream-opt \
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
--disable-nls
That is the bit in their script that builds the newlib-nano. In my nano.specs file I have -lc_nano and -lg_nano listed. I have been looking at the best way to get you the libraries needed. I think it might be to go down the pre-compiled binary route (I hate the idea of this and I don't really know why). I would extract the archive into a directory in /opt. You would need to add the bin directory to the PATH and the lib directory to ld.so.conf.
Dunc.
|
|
|
09-09-2022, 05:31 AM
|
#26
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
Quote:
Originally Posted by Dunc.
nano refers to the version of newlib. The arm toolchain builds newlib twice. It packages one as newlib and the other as nano.
Code:
$SRCDIR/$NEWLIB_NANO/configure \
$NEWLIB_CONFIG_OPTS \
--target=$TARGET \
--prefix=$BUILDDIR_NATIVE/target-libs \
--disable-newlib-supplied-syscalls \
--enable-newlib-reent-check-verify \
--enable-newlib-reent-small \
--enable-newlib-retargetable-locking \
--disable-newlib-fvwrite-in-streamio \
--disable-newlib-fseek-optimization \
--disable-newlib-wide-orient \
--enable-newlib-nano-malloc \
--disable-newlib-unbuf-stream-opt \
--enable-lite-exit \
--enable-newlib-global-atexit \
--enable-newlib-nano-formatted-io \
--disable-nls
That is the bit in their script that builds the newlib-nano. In my nano.specs file I have -lc_nano and -lg_nano listed. I have been looking at the best way to get you the libraries needed. I think it might be to go down the pre-compiled binary route (I hate the idea of this and I don't really know why). I would extract the archive into a directory in /opt. You would need to add the bin directory to the PATH and the lib directory to ld.so.conf.
Dunc.
|
On the same page @Dunc.
I would rather find the needed options for the Slackbuild than taint the system.
Thanks for the insight, tho, will report back as i go about it
|
|
|
09-09-2022, 12:18 PM
|
#27
|
Member
Registered: Jul 2012
Location: Cumbria UK
Distribution: Slackware
Posts: 62
Rep:
|
The added options in the arm build are
Code:
--enable-newlib-nano-formatted-io \
--enable-newlib-global-atexit \
--enable-lite-exit \
--enable-newlib-nano-malloc \
--disable-newlib-unbuf-stream-opt \
--enable-newlib-reent-small \
--disable-newlib-fvwrite-in-streamio \
--disable-newlib-fseek-optimization \
--disable-newlib-wide-orient \
The options that are common are
Code:
--enable-newlib-reent-check-verify \
--enable-newlib-retargetable-locking \
--disable-newlib-supplied-syscalls \
--disable-nls \
--target=arm-none-eabi \
--build=aarch64-linux-gnu
I see that the build option is wrong. Surely it should be --build=aarch64-slackware-linux
The options that are ommitted are
Code:
--enable-newlib-io-long-long \
--enable-newlib-io-c99-formats \
--enable-newlib-register-fini \
I hope I have this right.
Dunc.
|
|
1 members found this post helpful.
|
09-10-2022, 02:29 AM
|
#28
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
So far the gcc rebuild yielded the watchdog.o to get compiled.
Next the newlib rebuild didn't manage to get me past g_nano or c_nano error messages.
That nano is something that came along with libc growing over years and small systems coming out with ever tighter options and space at disposal:
Many safeguards and options, namely floating point usage in simple message text formatting and the like is dropped, stripping the library to a bare functional minimum - a nano libc.
And it being part of GNU ecosystem - ergo g_nano...
Now i go on trying to get newlib's Slackbuild spew that nano out for me B-]
|
|
|
09-10-2022, 08:00 AM
|
#29
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,208
|
My advice is not to bother about it unless the space runs out. I did some work with uClibc and you end up having to patch everything. Even then you can have the system on squashfs if you have to.
|
|
|
09-10-2022, 02:37 PM
|
#30
|
Senior Member
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,495
Original Poster
|
https://newlib.sourceware.narkive.co...-and-libg-nano
Is this correct, it merely copies the darn things over and renames them?
I'm at loss of words...
|
|
|
All times are GMT -5. The time now is 12:12 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|