View previous topic :: View next topic |
Author |
Message |
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Sat Apr 30, 2016 8:17 pm Post subject: |
|
|
NeddySeagoon,
by the gcc that installs in /opt you mean the one provided by you in your BINHOST, or you mean something completely different? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sat Apr 30, 2016 8:29 pm Post subject: |
|
|
vanjo9800,
Something different, it was from schorsch_76 but was based on NoName1337s script.
A binhost allows you to emerge the packages it contains. You don't get to choose the USE flags. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Sun May 01, 2016 1:46 pm Post subject: |
|
|
Ok, the cross GCC seems to work fine in compiling other packages and in compiling the native GCC, but I face another problem:
Code: |
{standard input}: Assembler messages:
{standard input}:25834: Warning: end of file not at end of a line; newline inserted
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
xg++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
Makefile:1076: recipe for target 'c-family/c-common.o' failed
make[3]: *** [c-family/c-common.o] Error 4
make[3]: *** Waiting for unfinished jobs....
|
I suspect the problem is caused by the little amount of RAM because immediatley after the error messages was displayed, the ram used was 670MB of the 840 I have available.
So what would you advice me, to create a swap partition on the SD card (with a speed of 10Mb/s, or to use an external USB drive as a swap machine).
Thank you in advance!!! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sun May 01, 2016 2:34 pm Post subject: |
|
|
vanjo9800,
I have swap on an external USB drive. Code: | # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/mmcblk0p1 /boot vfat noauto,noatime 1 2
/dev/sda1 / ext4 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/sda3 /var/tmp/portage ext4 noatime 0 0
/dev/sda4 /usr/portage ext4 noatime 0 0
/dev/sda5 /var/cache/distfiles ext4 noatime 0 0
/dev/sda6 /home ext4 noatime 0 0 |
This fs is to make it easy to share things without sharing more than I need to.
Which SDcard driver are you using?
Do you have DMA on?
Early Pi 64 bit kernels had DMA disabled as the address mapping was missing from the *dts file.
That's all DMA was disabled. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Sun May 01, 2016 7:33 pm Post subject: |
|
|
I do not know currently for the SDcard driver and whether I have DMA enabled. I will check after the compilation of GCC ends.
So I configured a USB drive as a swap partition and the Raspberry started swapping on it. The build goes like the normal. However, when compiling /var/tmp/portage/sys-devel/gcc-5.3.0/work/gcc-5.3.0/gcc/alias.c the RAM overflows and it starts using the swap. However, I think that there may be a problem because it stays on compiling alias.c for around an hour and more. I compile with:
and without
Did you have any similar issues? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sun May 01, 2016 8:06 pm Post subject: |
|
|
vanjo9800,
I only had one core when I built gcc. Code: | Pi3 64bit ~ # genlop -t gcc
* sys-devel/gcc
Fri Apr 1 10:49:04 2016 >>> sys-devel/gcc-5.3.0
merge time: 8 hours, 8 minutes and 35 seconds. |
There may have been DMA by 1 April. That's root on USB HDD, not on SDcard.
For big packages, I have had to use -j1 to keep within 2G swap.
Reducing the parallel makes is faster that running into swap.
Swap is slow anyway. On USB2 on the Pi its slower still.
1G RAM is just about enough for -j2 most of the time.
--pipe asks to pass intermediate file in RAM if possible. If the RAM is not available, they will be written to disk. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Mon May 02, 2016 4:05 pm Post subject: |
|
|
NeddySeagoon,
I managed to compile GCC in around 15 hours with only -j1. It compiled successfully and now I am building some more packages. For the SD card drivers, I still do not I will check soon and tell you. However, the performance of the SD card is awful, so I think something is not right.
Now I want to ask about something different, have you managed to use the built-in Wifi and Bluetooth on the board? And if yes, how?
Thank you in advance!!! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Mon May 02, 2016 6:12 pm Post subject: |
|
|
vanjo9800,
I've not tried the bluetooth but I'm fairly sure its off as its attached to one of the UARTs.
As my config.txt is fairly minimal and devices are off unless explicitly enabled, both the WiFi and Bluetooth are off.
I don't have any use for bluetooth and the wifi is just a curiosity since it will soak up CPU and RAM to perform the crypto.
The WiFi is a SDIO chip, so seeing Code: | Pi3 64bit ~ # modprobe brcmfmac
[195782.227476] usbcore: registered new interface driver brcmfmac | is not overy useful.
That's the right driver, it also needs firmware and another text file but thats the easy bit.
To actually turn on the Wifi and/or the Bluetooth, you need the right device tree overlay(s) mentioned in config.txt and possibly some other parameters too.
Read /boot/overlays/README on the Pi to get started.
Keep in mind that everything there is for a 32 bit set up. It might be "mostly harmless" in a 64 bit world ... but it may let the magic smoke out too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Mon May 02, 2016 6:16 pm Post subject: |
|
|
Ok I will read that, thank you for the information!
Another question, does it worth to set up distcc on the Raspberry Pi 3 because the board is powerful enough to compile most of the packages in a reasonable amount of time? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Mon May 02, 2016 6:43 pm Post subject: |
|
|
vanjo9800,
Its worth it when it works. I've been using pump mode with distcc but I keep seeing warnings about failing to distribute.
I have a hunch that distcc is getting swapped out, so distributing times out.
Swapped out does no mean to the swap partition. The kernel has several swap mechanims.
a) swap partition/file. This is only used for dynamically allocated RAM, as it has no fixed location on HDD.
b) 'dirty' buffers can be flushed to disk and the buffer RAM released.
c) code/data read from disk can be released and reloaded later.
The kernel does all of these things. Not having swap space denies it option a). It does not mean that the kernel is not swapping.
c) means that Linux can run (slowly) programs that are too big to fit in RAM, as RAM occupied by code that's not required right now can be freed to load other code that is, then the first code can be reloaded when its required.
I've not looked at fixing distcc yet. It has crossed my mind to install the Pi3 64 bit code to /usr/aarch64-unknown-linux-gnu/ so that cross compililtg can do better. That could be another can of worms though, since lots of things don't cross compile. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Sun May 08, 2016 2:47 pm Post subject: |
|
|
Hello NeddySeagoon,
The Gentoo is working pretty fine. Sadly, I cannot manage to find open-source drivers for the Wi-Fi, but that is not a problem because I do not need it currently. After testing the SD card on the Pi 3, on my laptop with hdparm, it gave performance around 33Mb/s.
However, when I test it on the Pi, I receive the following:
Code: |
Pi3_64-bit ~ # dmesg | grep DMA
[ 0.000000] DMA zone: 3776 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 241664 pages, LIFO batch:31
[ 0.117931] DMA: preallocated 256 KiB pool for atomic allocations
Pi3_64-bit ~ # hdparm -t /dev/mmcblk0p2
/dev/mmcblk0p2:
Timing buffered disk reads: 100 MB in 3.03 seconds = 32.96 MB/sec
BLKFLSBUF failed: Operation not permitted
Pi3_64-bit ~ # hdparm -d /dev/mmcblk0p2
/dev/mmcblk0p2:
HDIO_GET_DMA failed: Operation not permitted
|
I read that the last errors are caused because DMA is not enabled in the kernel, so how can I enable it, and is there any problem with the DMA?
Thank you in advance!!! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sun May 08, 2016 4:05 pm Post subject: |
|
|
vanjo9800,
Which kernel are you using?
With 33Mb/sec read speed, it sounds like DMA is on.
The WiFI driver has been in the mainline kernel for a while and should just work.
Its one of the sdio drivers
The Pi has several sdio ports, the question is, where is the wifi. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sun May 08, 2016 4:25 pm Post subject: |
|
|
vanjo9800,
I had forgotten all about hdpram. Its intended for IDE HDD. Sone of the things it can do are not valid on SDCards.
Code: | Pi3 64bit ~ # hdparm -tT /dev/mmcblk0
/dev/mmcblk0:
Timing cached reads: 1090 MB in 2.00 seconds = 544.26 MB/sec
Timing buffered disk reads: 12 MB in 3.44 seconds = 3.49 MB/sec
Pi3 64bit ~ # dd if=/dev/mmcblk0 of=/dev/null bs=1000000
^C109+0 records in
108+0 records out
108000000 bytes (108 MB, 103 MiB) copied, 19.2945 s, 5.6 MB/s |
There are two different SD card drivers, one is supposed to be better than the other.
On USB attached rotating rust
Code: | Pi3 64bit ~ # hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1136 MB in 2.00 seconds = 568.07 MB/sec
Timing buffered disk reads: 100 MB in 3.03 seconds = 33.00 MB/sec
Pi3 64bit ~ # dd if=/dev/sda of=/dev/null bs=1000000
^C446+0 records in
445+0 records out
445000000 bytes (445 MB, 424 MiB) copied, 12.994 s, 34.2 MB/s |
That 34Mb/sec is pretty good as its limited by the USB2 440Mbit/sec. I'm also using the LAN, which is on the same USB2 port. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Sun May 08, 2016 4:52 pm Post subject: |
|
|
For the WiFI, I checked the brcmfmac driver and I have both SDIO and USB support enabled, but still nothing happens when I modprobe it. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sun May 08, 2016 5:35 pm Post subject: |
|
|
vanjo9800,
Same here.
My guess is that the sdio its attached to is off, that's the default state for Pi I/O as some things share.
We need the right entry in config.txt before the kernel can see the WiFi. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Sun May 08, 2016 8:39 pm Post subject: |
|
|
So after reading some documentations of Broadcom drivers, I found out that in order an SDIO driver to work special firmware from broadcom and a NVRAM are needed to be placed in the directory with modules. However, they say that the kernel itself should say which NVRAM is needed, but the kernel says nothing.
Also, I am not sure what is the Wireless and BLE chip in the Raspberry, I found it on Adafruit as BCM43143, while on other places as BCM43438. There is a big difference between both because I saw more documentation for the former, while for the latter there wasn't any.
I hope this can be somehow helpful to you, if you didn't know it previously. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Sun May 08, 2016 9:33 pm Post subject: |
|
|
vanjo9800,
The WiFi chip is on the bottom of the Pi. Turn it over and hold it with the SDCard at the top.
The WiFi is the silver chip to the left of the SDCard. The part number is on it but you may nee a magnifying glass or even a microscope to read it.
The kernel won't see the wifi until the SDIO its attached to is enabled. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Wed May 11, 2016 12:10 pm Post subject: |
|
|
Ok, I will leave the WiFi up to now. Can you tell me when there is progress with the WiFi.
Now, I experience two small software problems with the Pi. First, whenI try to install raspberrypi-userland and the first patch fails. What could be a possible reason for this.
The second problems is when I try to install systemd, it gives a dbus error about version 1.6.8. I read that it can be caused by selinux masking systemd, but I do not use a selinux profile. What could be a possible reason for this.
Thank you in advance!!!
[EDIT]
Some logs
About Systemd and Dbus:
Code: |
emerge: there are no ebuilds to satisfy ">=sys-apps/dbus-1.6.8-r1:0[systemd]".
(dependency required by "sys-apps/systemd-229::gentoo" [ebuild])
(dependency required by "systemd" [argument])
|
About RaspberryPi-Userland:
Code: |
* Applying raspberrypi-userland-9999-gentoo.patch ...
* Failed Patch: raspberrypi-userland-9999-gentoo.patch !
* ( /usr/portage/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/raspberrypi-userland-9999-gentoo.patch.out
* ERROR: media-libs/raspberrypi-userland-9999::gentoo failed (prepare phase):
* Failed Patch: raspberrypi-userland-9999-gentoo.patch!
*
* Call stack:
* ebuild.sh, line 133: Called src_prepare
* environment, line 3345: Called epatch '/usr/portage/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch'
* environment, line 1493: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
*
* If you need support, post the output of `emerge --info '=media-libs/raspberrypi-userland-9999::gentoo'`,
* the complete build log and the output of `emerge -pqv '=media-libs/raspberrypi-userland-9999::gentoo'`.
* The complete build log is located at '/var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/environment'.
* Working directory: '/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999'
* S: '/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999'
>>> Failed to emerge media-libs/raspberrypi-userland-9999, Log file:
>>> '/var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/build.log'
* Messages for package media-libs/raspberrypi-userland-9999:
* Failed Patch: raspberrypi-userland-9999-gentoo.patch !
* ( /usr/portage/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/raspberrypi-userland-9999-gentoo.patch.out
* ERROR: media-libs/raspberrypi-userland-9999::gentoo failed (prepare phase):
* Failed Patch: raspberrypi-userland-9999-gentoo.patch!
*
* Call stack:
* ebuild.sh, line 133: Called src_prepare
* environment, line 3345: Called epatch '/usr/portage/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch'
* environment, line 1493: Called die
* The specific snippet of code:
* die "Failed Patch: ${patchname}!";
*
* If you need support, post the output of `emerge --info '=media-libs/raspberrypi-userland-9999::gentoo'`,
* the complete build log and the output of `emerge -pqv '=media-libs/raspberrypi-userland-9999::gentoo'`.
* The complete build log is located at '/var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/environment'.
* Working directory: '/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999'
* S: '/var/tmp/portage/media-libs/raspberrypi-userland-9999/work/raspberrypi-userland-9999'
|
If you want more logs, feel free to ask. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Wed May 11, 2016 5:46 pm Post subject: |
|
|
vanjo9800,
Code: | emerge: there are no ebuilds to satisfy ">=sys-apps/dbus-1.6.8-r1:0[systemd]".
(dependency required by "sys-apps/systemd-229::gentoo" [ebuild])
(dependency required by "systemd" [argument]) |
It would be good to see the emerge command. Mhat this says in that you need sys-apps/dbus-1.6.8-r1 or later, built with the systemd USE flag and
a) you don't already have it
b) the emerge command you gave isn't going to provide it.
Try again with --newuse.
I won't be using systemd so you will breaking new ground there.
For raspberrypi-userland the patch did not apply
Code: | * Applying raspberrypi-userland-9999-gentoo.patch ...
* Failed Patch: raspberrypi-userland-9999-gentoo.patch !
* ( /usr/portage/media-libs/raspberrypi-userland/files/raspberrypi-userland-9999-gentoo.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/media-libs/raspberrypi-userland-9999/temp/raspberrypi-userland-9999-gentoo.patch.out |
Its unlikely you can use raspberrypi-userland, as its a 32 bit binary blob. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Mon May 16, 2016 2:31 pm Post subject: |
|
|
Hello NeddySeagoon,
I managed to install systemd. The problem was that it was disabled as a use flag because gnome does not have support for arm64. Systemd also did not have support for arm64 previously, but now it has.
It installed without a problem, but now I need to put
Code: |
init=/usr/lib/systemd/systemd
|
as a kernel command line.
I use Electron752's stubbed u-boot and his boot.scr.uimage. You can find them in his github. Can you tell me what is the easiest way to add the code to the kernel command line?
Thank you in advance!!! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Mon May 16, 2016 5:19 pm Post subject: |
|
|
vanjo9800,
Stop u-boot from booting, so you get to the u-boot> prompt.
Enter the command to see the kernel command line you have already.
Use the command Code: | setenv bootargs '... ....' | To change the kernel command line.
You need the single quotes.
Do to check your change.
Use saveenv ? to make the change permanent, then boot (that's a command) to see if it works.
Homework. There is a shortcut to save typing out the kernel command line again.
What is it? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Mon May 16, 2016 5:32 pm Post subject: |
|
|
Thank you for the fast response NeddySeagoon,
The shortcut is the u-boot.env file. I have used it in the beginning with the normal u-boot.
However, with the Electron752's stubbed u-boot the only configurational file for u-boot is boot.scr.uimg. Also typing what you said gave an error:
Code: |
printevn bootargs
## Error: "bootargs" not defined
|
Why is this happening? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Mon May 16, 2016 6:32 pm Post subject: |
|
|
vanjo9800,
Thats odd. When you use u-boot, bootargs is the kernel command line.
It could be blank but then I don't think it would boot.
What does show?
The environment is saved in uboot.env
Code: | Hit any key to stop autoboot: 0
U-Boot> printenv bootargs
bootargs=dwc_otg.lpm_enable=0 console=tty root=/dev/sda1 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cma=256M@512M
U-Boot>
|
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
vanjo9800 Tux's lil' helper
Joined: 16 Mar 2015 Posts: 76
|
Posted: Tue May 17, 2016 2:24 pm Post subject: |
|
|
So printenv prints information about the boot configuration, but my screen is too small in order to see the bootargs which are at the top.
And I do not have a file named uboot.env in my boot partition. The only files associated with uboot there are uboot-stubbed.bin and boot.scr.uimg. When I display the boot.scr.uimg as a text file, I see some binary parts, however there I also see the current kernel command line. However, if I change the text in this file, uboot gives an error while booting... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54673 Location: 56N 3W
|
Posted: Tue May 17, 2016 8:26 pm Post subject: |
|
|
vanjo9800,
uboot drives the serial console as well as the HDMI video output.
My uboot example was actually copy/pasted from minicom on a PC.
uboot looks after some or all of its files with a CRC, so its not possible to edit them without using uboot.
You get a uboot.env by executing saveenv.
You set bootargs with setenv bootargs _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|