Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on Raspberry Pi 3
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
safeness
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 105
Location: Eastside, WA

PostPosted: Sat Mar 26, 2016 1:40 am    Post subject: Reply with quote

I ran into this error on sys-apps/db while using -march=armv8-a+crc in my cflags:

Code:
{standard input}: Assembler messages:
{standard input}:134: Error: swp{b} use is obsoleted for ARMv8 and later
{standard input}:405: Error: swp{b} use is obsoleted for ARMv8 and later


Does anyone know of a workaround?
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Sat Mar 26, 2016 10:03 am    Post subject: Kernel emulation of SWPB Reply with quote

There's a kernel config option, it's enabled on my machine.
Code:
Symbol: SWP_EMULATE [=y]
  │ Type  : boolean
  │ Prompt: Emulate SWP/SWPB instructions
  │   Location:
  │ (1) -> System Type
  │   Defined at arch/arm/mm/Kconfig:687
  │   Depends on: CPU_V7 [=y]
  │   Selects: HAVE_PROC_CPU [=y]

That's the option in the .config, as I can't see it in my menuconfig GUI:
Code:
CONFIG_SWP_EMULATE=y
However, that ain't working, my sys-apps/db did also not compile.

safeness wrote:
I ran into this error on sys-apps/db while using -march=armv8-a+crc in my cflags:

Code:
{standard input}: Assembler messages:
{standard input}:134: Error: swp{b} use is obsoleted for ARMv8 and later
{standard input}:405: Error: swp{b} use is obsoleted for ARMv8 and later


Does anyone know of a workaround?

_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sat Mar 26, 2016 10:17 am    Post subject: Reply with quote

dr_wulsen,

That kernel emulation option generates code to deal with the illegal instruction exceptions programs built with SWP/SWPB instructs may generate when running on a CPU that is missing SWP/SWPB. Rather like the kernel software floating point option for 386/486SX CPUs that had no hardware floating point.
This is slow and horrible as there will be a user space to kernel space context switch when the illegal instruction exception is raised. The kernel will emulate the instruction, then there will be a kernel space to user space context switch back to the program to the instruction following the illegal instruction. Execution in userspace continues as if nothing had happened.
Consider the effect of this when a SWP is used in a loop ...

The problem here is
Code:
{standard input}:134: Error: swp{b} use is obsoleted for ARMv8 and later
that gcc is generating these instructions and passing them to the assembler, which then objects.

There may be a gcc/assembler option (CFLAG) to allow these instructions to be compiled. If so, and this works, you will need that kernel option if SWP/SWPB is not implemented in the Pi 3 CPU.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Sat Mar 26, 2016 4:01 pm    Post subject: Reply with quote

safeness wrote:
I ran into this error on sys-apps/db while using -march=armv8-a+crc in my cflags:

Code:
{standard input}: Assembler messages:
{standard input}:134: Error: swp{b} use is obsoleted for ARMv8 and later
{standard input}:405: Error: swp{b} use is obsoleted for ARMv8 and later


Does anyone know of a workaround?


Do you mean sys-libs/db? My workaround:

Code:
echo 'CFLAGS="-O2 -pipe -march=armv7-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize -funsafe-math-optimizations -fomit-frame-pointer"' >> /etc/portage/env/sys-libs/db
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Sat Mar 26, 2016 4:31 pm    Post subject: Reply with quote

I had Kodi running on my Raspberry Pi 3 with Gentoo last night. However, I had accidentally installed the alpha 17. Now I am working on installing 16. It would be nice if we had an A.R.M. ebuild that would find all the graphics libraries in the right places, instead of needing to build from source manually. I'd be glad to help. Since Raspberry Pis are so popular, maybe we should have a portage profile and USE flags for them, and then we can work on ebuilds for the more popular packages.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Mar 26, 2016 5:06 pm    Post subject: Reply with quote

keet wrote:
It would be nice if we had an A.R.M. ebuild that would find all the graphics libraries in the right places, instead of needing to build from source manually. I'd be glad to help.

#gentoo-arm on IRC: chat.freenode.net or .org would love the help, I'm sure.
Quote:
Since Raspberry Pis are so popular, maybe we should have a portage profile and USE flags for them, and then we can work on ebuilds for the more popular packages.

Sounds good to me; you should autojoin #gentoo-embedded as well.

Not a separate arch, mind: just the profile sounds good. Check what overlays people are already working in.
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Sat Mar 26, 2016 5:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:
dr_wulsen,

That kernel emulation option generates code to deal with the illegal instruction exceptions programs built with SWP/SWPB instructs may generate when running on a CPU that is missing SWP/SWPB. Rather like the kernel software floating point option for 386/486SX CPUs that had no hardware floating point.
This is slow and horrible as there will be a user space to kernel space context switch when the illegal instruction exception is raised. The kernel will emulate the instruction, then there will be a kernel space to user space context switch back to the program to the instruction following the illegal instruction. Execution in userspace continues as if nothing had happened.
Consider the effect of this when a SWP is used in a loop ...

The problem here is
Code:
{standard input}:134: Error: swp{b} use is obsoleted for ARMv8 and later
that gcc is generating these instructions and passing them to the assembler, which then objects.

There may be a gcc/assembler option (CFLAG) to allow these instructions to be compiled. If so, and this works, you will need that kernel option if SWP/SWPB is not implemented in the Pi 3 CPU.

NeddySeagoon,
thank you very much for your enlightening information and shedding light into the dark. Now I know it's not the way to go for performance - obviously the best would be to file a bug and have the devs change their code away from the SWP/SWP instructions.
Thank you!
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
safeness
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 105
Location: Eastside, WA

PostPosted: Sat Mar 26, 2016 8:48 pm    Post subject: Reply with quote

@dr_wulsen

I was going to manually change the CFLAGS in make.conf but the way you posted is much cleaner. I didn't know about using /etc/portage/env for changes like this.

Thanks!
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Sat Mar 26, 2016 10:22 pm    Post subject: Reply with quote

I posted a thread on the Kodi forums about not being able to play video using Kodi. I have also been trying to build the most recent media-libs/raspberrypi-userland-9999, but it keeps failing at 100%:

Code:
[100%] Building C object host_applications/linux/apps/dtoverlay/CMakeFiles/dtoverlay.dir/dtoverlay_main.c.o
cd /var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999_build/host_applications/linux/apps/dtoverlay && /usr/bin/armv7a-hardfloat-linux-gnueabi-gcc  -DEGL_SERVER_DISPMANX -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -DOMX_SKIP64BIT -DTV_SUPPORTED_MODE_NO_DEPRECATED -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__VIDEOCORE4__   -DNDEBUG -O2 -pipe -march=armv7-a -mtune=cortex-a53  -Wno-multichar -Wall -Wno-unused-but-set-variable -fPIC -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/build/inc -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_applications/framework -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999 -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/vcos/pthreads -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/vmcs_host/linux -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/vmcs_host -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/vmcs_host/khronos -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/khronos/include -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999_build -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/vchiq_arm -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_support/include -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/interface/mmal -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/opensrc/helpers/libfdt -I/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/helpers/dtoverlay    -Wall -Werror -o CMakeFiles/dtoverlay.dir/dtoverlay_main.c.o -c /var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/dtoverlay_main.c
/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/dtoverlay_main.c: In function ‘overlay_applied’:
/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/dtoverlay_main.c:636:2: error: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Werror=unused-result]
  fread(status, sizeof(status), 1, fp);
  ^
/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/dtoverlay_main.c: In function ‘dtoverlay_remove’:
/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999/host_applications/linux/apps/dtoverlay/dtoverlay_main.c:356:5: error: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Werror=unused-result]
     chdir(work_dir);
     ^
cc1: all warnings being treated as errors
host_applications/linux/apps/dtoverlay/CMakeFiles/dtoverlay.dir/build.make:62: recipe for target 'host_applications/linux/apps/dtoverlay/CMakeFiles/dtoverlay.dir/dtoverlay_main.c.o' failed
make[2]: *** [host_applications/linux/apps/dtoverlay/CMakeFiles/dtoverlay.dir/dtoverlay_main.c.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999_build'
CMakeFiles/Makefile2:4554: recipe for target 'host_applications/linux/apps/dtoverlay/CMakeFiles/dtoverlay.dir/all' failed
make[1]: *** [host_applications/linux/apps/dtoverlay/CMakeFiles/dtoverlay.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999_build'
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sat Mar 26, 2016 11:09 pm    Post subject: Reply with quote

keet,

Code:
cc1: all warnings being treated as errors
That's a developer only setting.
You want the build to fail or errors but not on warnings.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Sun Mar 27, 2016 12:04 am    Post subject: Reply with quote

NeddySeagoon wrote:
keet,

Code:
cc1: all warnings being treated as errors
That's a developer only setting.
You want the build to fail or errors but not on warnings.


Thanks! Using Gentoo on my Raspberry Pi has been an exercise in using /etc/portage/env like never before. :)
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Sun Mar 27, 2016 2:19 pm    Post subject: Reply with quote

Right now i try to compile the xorg driver for the raspberry pi 3, but i get compile errors.

at x11-drivers/xf86-video-omapfb-0.1.1.1_p1::gentoo
Code:
 -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -c /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-overlay-pool.c  -fPIC -DPIC -o .libs/omapfb-overlay-pool.o
libtool: compile:  armv7a-hardfloat-linux-gnueabi-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src -I.. -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -c /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-xv-blizzard.c  -fPIC -DPIC -o .libs/omapfb-xv-blizzard.o
In file included from /usr/include/string.h:634:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from /usr/include/xorg/xf86.h:44,
                 from /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-xv-generic.c:28:
/usr/include/xorg/os.h:558:1: error: expected identifier or ‘(’ before ‘__extension__’
 strndup(const char *str, size_t n);
 ^
In file included from /usr/include/string.h:634:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from /usr/include/xorg/xf86.h:44,
                 from /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-xv-blizzard.c:33:
/usr/include/xorg/os.h:558:1: error: expected identifier or ‘(’ before ‘__extension__’
 strndup(const char *str, size_t n);
 ^

In the file /usr/include/xorg/os.h:558

Code:
#ifndef HAVE_STRNDUP
extern _X_EXPORT char *
strndup(const char *str, size_t n); // <<== 558
#endif


But this seams very reasonable.... I already updated xorg-drivers + server to 1.18.
I tried with gcc 5.3.0 and gcc 4.9.3. I dont cross compile ....

As far as i know i need the kernel module bcm2708_fb and the omap xorg driver. But i am not sure about the omap ...

Any hints would be appreciated ...
What could I do?
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://github.com/schorsch1976/portage
git clone https://github.com/schorsch1976/portage
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Sun Mar 27, 2016 6:02 pm    Post subject: Reply with quote

schorsch_76 wrote:
Right now i try to compile the xorg driver for the raspberry pi 3, but i get compile errors.

at x11-drivers/xf86-video-omapfb-0.1.1.1_p1::gentoo
Code:
 -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -c /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-overlay-pool.c  -fPIC -DPIC -o .libs/omapfb-overlay-pool.o
libtool: compile:  armv7a-hardfloat-linux-gnueabi-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src -I.. -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -c /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-xv-blizzard.c  -fPIC -DPIC -o .libs/omapfb-xv-blizzard.o
In file included from /usr/include/string.h:634:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from /usr/include/xorg/xf86.h:44,
                 from /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-xv-generic.c:28:
/usr/include/xorg/os.h:558:1: error: expected identifier or ‘(’ before ‘__extension__’
 strndup(const char *str, size_t n);
 ^
In file included from /usr/include/string.h:634:0,
                 from /usr/include/xorg/os.h:53,
                 from /usr/include/xorg/misc.h:115,
                 from /usr/include/xorg/xf86str.h:37,
                 from /usr/include/xorg/xf86.h:44,
                 from /var/tmp/portage/x11-drivers/xf86-video-omapfb-0.1.1.1_p1/work/xf86-video-omapfb-0.1.1.1/src/omapfb-xv-blizzard.c:33:
/usr/include/xorg/os.h:558:1: error: expected identifier or ‘(’ before ‘__extension__’
 strndup(const char *str, size_t n);
 ^

In the file /usr/include/xorg/os.h:558

Code:
#ifndef HAVE_STRNDUP
extern _X_EXPORT char *
strndup(const char *str, size_t n); // <<== 558
#endif


But this seams very reasonable.... I already updated xorg-drivers + server to 1.18.
I tried with gcc 5.3.0 and gcc 4.9.3. I dont cross compile ....

As far as i know i need the kernel module bcm2708_fb and the omap xorg driver. But i am not sure about the omap ...

Any hints would be appreciated ...
What could I do?


Hi schorsch_76,
The RPi is using broadcoms videocore4 (VC4). OMAP is a hardware line from Texas Instruments and not installed on the RPi. Don't have more on hand, but if anyone here has suggestions for Xorg and mesa useflags to have or avoid in order to get the best performance on the RPi, I'd appreciate that, too.
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Sun Mar 27, 2016 9:53 pm    Post subject: Reply with quote

safeness wrote:
@dr_wulsen

I was going to manually change the CFLAGS in make.conf but the way you posted is much cleaner. I didn't know about using /etc/portage/env for changes like this.

Thanks!


@safeness: thanks for your appreciation! I think the way of changing the CFLAGS per package was posted by keet.
I'm using a slightly different approach to the per-package flags on my system.

Code:
mkdir /etc/portage/env
echo 'CFLAGS="${CFLAGS} -march=armv7a"' > /etc/portage/env/armv7.conf
echo 'CXXFLAGS="${CXXFLAGS} -march=armv7a"' > /etc/portage/env/armv7.conf
echo 'sys-libs/db armv7a.conf' >> /etc/portage/package.env


This results in one file with the CFLAGS for armv7, and one file with a list of packages and the corresponding config file (CFLAGS) to use. You can have multiple configuration files and put any package to the list, having it point to its parameters..
On the above, you may think 'hey, there's still the armv8-a+crc stated, if I set the CFLAGS variable to itself again.' But the appended -march=armv7a takes priority over the first -march.
As GCC will always use the last of -march (or any other option stated twice), I can have the armv7 CFLAGS set to the ones that I have in make.conf, but append the armv7.
So my armv7 flags will always be the same as my usual CFLAGS, only with armv7. Should I need to change the armv7 CFLAGS (append something) which I don't want in make.conf, I can do it here in one file instead of one file per package.
_________________
There's no stupid questions, only stupid answers.


Last edited by dr_wulsen on Mon Mar 28, 2016 4:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
das_morph
n00b
n00b


Joined: 28 May 2007
Posts: 3

PostPosted: Mon Mar 28, 2016 12:37 am    Post subject: Re: Getting it up on the RPi3 - WiFi Reply with quote

dr_wulsen wrote:

If anyone is interested in my custom .config for the raspberrypi-sources-4.4 to have a starting point for their own kernel, let me know - I will then post them here.


I'd be interested, since I can't seem to get the wifi to work on my pi. Might be missing some kernel modules or something. Which sources are you using for the 4.4 kernel? I tried the raspberrypi-sources package, but neither using crossdev nor native compiling with distcc resulted in a working kernel. The github sources work for me.
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Mon Mar 28, 2016 6:58 am    Post subject: Re: Getting it up on the RPi3 - WiFi Reply with quote

das_morph wrote:
dr_wulsen wrote:

If anyone is interested in my custom .config for the raspberrypi-sources-4.4 to have a starting point for their own kernel, let me know - I will then post them here.


I'd be interested, since I can't seem to get the wifi to work on my pi. Might be missing some kernel modules or something. Which sources are you using for the 4.4 kernel? I tried the raspberrypi-sources package, but neither using crossdev nor native compiling with distcc resulted in a working kernel. The github sources work for me.


Hi das_morph,
I'm using the raspberrypi-sources-4.4.9999 in the portage tree, which actually downloads the github sources.
One thing I've stumbled across was that the simple zImage wouldn't work for me, if just renamed to kernel7.img, but had to use the include mkknlimg.
That's my kernel compile script:
Code:
#!/bin/bash
ARCH=arm CROSS_COMPILE="/usr/bin/armv7a-hardfloat-linux-gnueabi-" make -j5 zImage modules dtbs
mkdir /tmp/rpi3
mkdir /tmp/rpi3/overlays
./scripts/mkknlimg arch/arm/boot/zImage /tmp/rpi3/kernel7.img
cp ./arch/arm/boot/dts/*.dtb /tmp/rpi3
cp ./arch/arm/boot/dts/overlays/*.dtb* /tmp/rpi3/overlays
cp ./arch/arm/boot/dts/overlays/README /tmp/rpi3/overlays
cp .config /tmp/rpi3/kernelconfig


I have sent the config to you via PN.
Of course, you will need the two files named in my earlier post.
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Mon Mar 28, 2016 11:07 pm    Post subject: Reply with quote

I am having quite a lot of trouble with Kodi. I am using the patch from the bug here. Even with -j1 and -ccache -distcc -distcc-pump, it keeps failing with errors like the one below. I can compile Kodi manually, but it doesnt work per this post on the Kodi forums.

If I disable the USE flag for the component that returns the error, I get messages and failures like this for a different one.

Code:
In file included from /var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11GLES.h:25:0,
                 from /var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/WindowingFactory.h:33,
                 from GUIDialogKeyboardGeneric.cpp:40:
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:76:3: error: 'Display' does not name a type
   Display*  GetDisplay() { return m_dpy; }
   ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:97:3: error: 'Window' does not name a type
   Window       m_glWindow, m_mainWindow;
   ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:107:3: error: 'Display' does not name a type
   Display*     m_dpy;
   ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:108:3: error: 'Cursor' does not name a type
   Cursor       m_invisibleCursor;
   ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:109:3: error: 'Pixmap' does not name a type
   Pixmap       m_icon;
   ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:125:25: error: 'XVisualInfo' has not been declared
   bool IsSuitableVisual(XVisualInfo *vInfo);
                         ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:126:28: error: 'Display' has not been declared
   static int XErrorHandler(Display* dpy, XErrorEvent* error);
                            ^
/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/windowing/X11/WinSystemX11.h:126:42: error: 'XErrorEvent' has not been declared
   static int XErrorHandler(Display* dpy, XErrorEvent* error);
                                          ^
distcc[2035] ERROR: compile GUIDialogKeyboardGeneric.cpp on localhost failed
../../Makefile.include:97: recipe for target 'GUIDialogKeyboardGeneric.o' failed
make[1]: *** [GUIDialogKeyboardGeneric.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-tv/kodi-16.0/work/xbmc-16.0-Jarvis/xbmc/dialogs'
Makefile:420: recipe for target 'xbmc/dialogs/dialogs.a' failed
make: *** [xbmc/dialogs/dialogs.a] Error 2
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Tue Mar 29, 2016 10:59 pm    Post subject: Reply with quote

I installed kodi with LDFLAGS="-Wl,-O1", but it still did not play movies. However, after compiling and installing raspberrypi-userland with LDFLAGS="-Wl,-O1", I can play movies now. It looks like the --as-needed LDFLAG was causing problems in this situation.
Back to top
View user's profile Send private message
das_morph
n00b
n00b


Joined: 28 May 2007
Posts: 3

PostPosted: Mon Apr 04, 2016 4:54 pm    Post subject: Re: Getting it up on the RPi3 - WiFi Reply with quote

dr_wulsen wrote:
das_morph wrote:
dr_wulsen wrote:

If anyone is interested in my custom .config for the raspberrypi-sources-4.4 to have a starting point for their own kernel, let me know - I will then post them here.


I'd be interested, since I can't seem to get the wifi to work on my pi. Might be missing some kernel modules or something. Which sources are you using for the 4.4 kernel? I tried the raspberrypi-sources package, but neither using crossdev nor native compiling with distcc resulted in a working kernel. The github sources work for me.


Hi das_morph,
I'm using the raspberrypi-sources-4.4.9999 in the portage tree, which actually downloads the github sources.
One thing I've stumbled across was that the simple zImage wouldn't work for me, if just renamed to kernel7.img, but had to use the include mkknlimg.
That's my kernel compile script:
Code:
#!/bin/bash
ARCH=arm CROSS_COMPILE="/usr/bin/armv7a-hardfloat-linux-gnueabi-" make -j5 zImage modules dtbs
mkdir /tmp/rpi3
mkdir /tmp/rpi3/overlays
./scripts/mkknlimg arch/arm/boot/zImage /tmp/rpi3/kernel7.img
cp ./arch/arm/boot/dts/*.dtb /tmp/rpi3
cp ./arch/arm/boot/dts/overlays/*.dtb* /tmp/rpi3/overlays
cp ./arch/arm/boot/dts/overlays/README /tmp/rpi3/overlays
cp .config /tmp/rpi3/kernelconfig


I have sent the config to you via PN.
Of course, you will need the two files named in my earlier post.


Thanks, using the mkknlimg finally resulted in a working kernel. Your config was also very helpful. However, wifi didn't work until now, and I finally figured out why:
I did what you suggested in your earlier post and copied the two files you linked into /lib/firmware/brcm, but dmesg still showed errors related to the broadcom chip. And I kind of have to blame you for that, cause you linked the wrong .bin file :wink:

The correct file required is this one: https://github.com/RPi-Distro/firmware-nonfree/blob/master/brcm80211/brcm/brcmfmac43430-sdio.bin. Copied into the firmware folder, I finally have wlan0 available and ready for configuration.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2284
Location: Adendorf, Germany

PostPosted: Tue Apr 05, 2016 12:00 pm    Post subject: Re: Crossdev for RPi Reply with quote

dr_wulsen wrote:
Their suggestion was to do a
Code:
CFLAGS="-O2 -pipe" crossdev -t armv........foo"
It would be nice to know what the tuple for crossdev actually has to be for the RPI3.

Is it an updated tuple from the RPI2 crossdev, like "armv8a-hardfloat-linux-gnueabi"?

Reading "crossdev -t help" makes me wonder whether it isn't better something like "aarch64-armv8a-linux-gnueabi"?

What did you people here have used?
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
schorsch_76
Guru
Guru


Joined: 19 Jun 2012
Posts: 450

PostPosted: Tue Apr 05, 2016 12:06 pm    Post subject: Reply with quote

If you want to stay 32 bit treat the chain like a raspberry pi 2. If youwant to compile for 64 bit, use "aarch64-unknown-linux-gnu" This was recommended on the gcc bugzilla and verified by Neddy in the Raspi3 64 Bit thread.
https://forums.gentoo.org/viewtopic-t-1041352-highlight-.html
_________________
// valid again: I forgot about the git access. Now 1.2GB big. Start: 2015-06-25
git daily portage tree
Web: https://github.com/schorsch1976/portage
git clone https://github.com/schorsch1976/portage
Back to top
View user's profile Send private message
safeness
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jul 2004
Posts: 105
Location: Eastside, WA

PostPosted: Tue Apr 05, 2016 2:04 pm    Post subject: Reply with quote

Has anyone got retropie working on gentoo? I installed the prerequisites but then I get this crap:

Quote:
Unsupported OS (no /etc/debian_version)


I guess we could just use the debian_version from something else but that seems problematic. Any thoughts?
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Tue Apr 05, 2016 10:57 pm    Post subject: Reply with quote

safeness wrote:
Has anyone got retropie working on gentoo?


I have emulationstation and retroarch working on my Raspberry Pi 3, mostly using the abendbrot overlay.
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 568

PostPosted: Wed Apr 06, 2016 3:48 pm    Post subject: Reply with quote

However, when I try to build games-emulation/picodrive-libretro-9999-r1, it fails:

Code:
armv7a-hardfloat-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard -fomit-frame-pointer -DFAMEC_NO_GOTOS -DNO_ZLIB -fPIC -Wall -ggdb -falign-functions=2 -I. -DINLINE=inline -O2 -DNDEBUG -ffunction-sections -D_SVP_DRC -DEMU_C68K -D_USE_DRZ80 -DDRC_SH2 -Wall -ggdb -DCONFIG_FILE="\"../cyclone_config.h\""   -c -o Disa/Disa.o Disa/Disa.c
armv7a-hardfloat-linux-gnueabi-g++ -o cyclone_gen Main.o Ea.o OpAny.o OpArith.o OpBranch.o OpLogic.o OpMove.o Disa/Disa.o -Wl,-O1 -Wl,--as-needed -shared -fPIC -Wl,--gc-sections -Wl,-Map=picodrive_libretro.so.map
./cyclone_gen
 * Unable to trace static ELF: ./cyclone_gen: ./cyclone_gen
Makefile:15: recipe for target 'Cyclone.s' failed
make[1]: *** [Cyclone.s] Segmentation fault
make[1]: Leaving directory '/var/tmp/portage/games-emulation/picodrive-libretro-9999-r1/work/picodrive-libretro-9999/cpu/cyclone'
platform/common/common.mak:185: recipe for target 'cpu/cyclone/Cyclone.s' failed
make: *** [cpu/cyclone/Cyclone.s] Error 2


Edit: I am using genplus-libretro instead.
Back to top
View user's profile Send private message
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Sat Apr 09, 2016 12:19 pm    Post subject: Re: Crossdev for RPi Reply with quote

Yamakuzure wrote:
dr_wulsen wrote:
Their suggestion was to do a
Code:
CFLAGS="-O2 -pipe" crossdev -t armv........foo"
It would be nice to know what the tuple for crossdev actually has to be for the RPI3.

Is it an updated tuple from the RPI2 crossdev, like "armv8a-hardfloat-linux-gnueabi"?

Reading "crossdev -t help" makes me wonder whether it isn't better something like "aarch64-armv8a-linux-gnueabi"?

What did you people here have used?


I've tried an armv8-hardfloat-linux-gnueabi. don't do it, the /proc/cpuinfo gives (falsely) an armv7.
all python packages would look for a armv7 gcc and fail to build....
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum