This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Talk:Raspberry Pi

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
Note
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (~~~~). When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}} so it will show up in the list of open discussions.


CFLAGS

Talk status
This discussion is done.

Nothing about the /etc/make.conf CFLAGS... same as the stage3???

Note: With stage3-armv6j_hardfp-20120603.tar.bz2 and this cli for QEMU: /usr/bin/qemu-system-arm -kernel zImage -M versatilepb -cpu arm1176 -hda debian6-19-04-2012.img -m 256 -append "root=/dev/sda2 loglevel=7 debug" -serial stdio -hdb gentoo-raspberry-pi.img -hdc swap.img I have a big illegal instruction, official debian provided work.

— The preceding unsigned comment was added by Alpha one x86 (talkcontribs) 11 June 2012

I added some processor specific CFLAGS --Chithanh 02:46, 23 June 2012 (UTC)

Links

Talk status
This discussion is done.

Possibly add some links to the embedded handbook and external resources? — yngwin 14:34, 3 July 2012 (UTC)

added some Chithanh 14:04, 20 July 2012 (UTC)

sdformat script

Talk status
This discussion is done.

A simple script to prepare the card

FILE sdformat
#!/bin/bash

device=/dev/sdd
cardsize=`blockdev --getsize64 $device`
sectorsize=512
sectors=63
heads=255
bootsize=52
swapsize=30
cylinders=$(( $cardsize / $heads / $sectors / $sectorsize ))
bootstart=0
rootstart=$(( $bootstart + $bootsize ))
rootsize=$(( $cylinders - $bootstart - $bootsize - $swapsize ))
swapstart=$(( $rootstart + $rootsize ))
parameters="-C $cylinders -S $sectors -H $heads"

sfdisk --force $parameters $device << EOF
$bootstart,$bootsize,0xc,*
$rootstart,$rootsize,0x83
$swapstart,$swapsize,0x82
0,0,0x0
EOF

sleep 5
mkfs.vfat $device"1"
mkfs.ext4 $device"2"
mkswap $device"3"

— The preceding unsigned comment was added by Ccaron (talkcontribs) 2 August 2012

crossdev / march / cflags

Talk status
This discussion is done.

The correct crossdev toolchain should be armv6zk-hardfloat-linux-gnueabi :

So the CFLAGS should contains "-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" (no -march switch as it would conflict with -mcpu)

As i'm waiting for receiving my raspberry pi, i cannot test this for now... Can someone confirm? Would it work with distcc? — The preceding unsigned comment was added by Zeludo (talkcontribs) 26 September 2012

In my testing, -mcpu=arm1176jzf-s produced code that ran slower on the Raspberry Pi than -march=armv6j --Chithanh 09:56, 3 October 2012 (UTC)
User:Baldy replaced -march=armv6j with the (IMO worse) -mcpu=arm1176jzf-s without discussion (among with using legacy make.conf location again etc.). I will revert the edits until this discussion is done --Chithanh 12:25, 7 October 2012 (UTC)
Sorry for jumping in and changing it, I will test both on my RPi and confirm which one is quicker. --Baldy 14:15, 7 October 2012 (UTC)
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=54&t=17983 discussed the CFLAGS and found none that were generally faster. I'll mark this discussion as done, but it can be revisited with newer gcc. — The preceding unsigned comment was added by Chithanh (talkcontribs) 26 October 2012

Overloading the wiki article with trivial things

Talk status
This discussion is still ongoing.

Originally, I had intended for the article to be a guide to bring Gentoo to the Raspberry Pi for users who already know how to install Gentoo. I think the quality of this article has gone downhill, with (well-meaning) people adding information that doesn't really help those familiar with installing Gentoo. By now, it is difficult to find the important information among all the trivial parts.

I therefore propose to reduce the article again to highlighting the differences between installing Gentoo on a normal PC and on the Raspberry Pi. Or alternatively, we can turn this article into a hub with links to a quick install guide and a detailed one, and separate articles for troubleshooting and tips&tricks. -- Chithanh 12:25, 7 October 2012 (UTC)

  • I had assumed this was meant to be a quick start guide similar to http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml. From my experience this guide at the moment is not enough even for someone with Gentoo experience to install on a RPi. For example the -F 16 option to format /boot and being able to use the default kernel.img from github make the process a lot easier. Should I go ahead and create a separate quick start page with more detail? --Baldy 14:27, 7 October 2012 (UTC)
  • Have gone ahead and created a Raspberry Pi Quick Install Guide -> http://wiki.gentoo.org/wiki/Raspberry_Pi_Quick_Install_Guide can we link it to this page? --Baldy 14:54, 8 October 2012 (UTC)
    • There are a lot of common steps in all install guides. We could probably make templates for a lot of the phases, partitioning, stage/portage-tree install, crossdev stuff. Indeed, only the specific for a particular computer needs to be described. --Wimmuskee 19:27, 27 November 2012 (UTC)

swclock

Talk status
This discussion is done.

The article mentions swclock, but it isn't in the tree. The only place I could find a reference to it was in the AUR. Could we at least provide a link to the download, if not some usage instructions? --AdmiralNemo 06:00, 15 December 2012 (UTC)

It's part of openrc. See:
user $equery files openrc | grep swclock
--Astaecker 06:48, 15 December 2012 (UTC)

Install script

Talk status
This discussion is done.

I made an install script for a gentoo variant(funtoo), currently it doesn't boot. Wondering if any1 here might know why, and/or if some1 here might want to fork it to work with gentoo.

Please comment if you like this.

https://github.com/GlassGhost/funtoo-pi/blob/master/funtoo-pi.sh --GlassGhost (talk) 19:13, 19 October 2013 (UTC)

sdformat steps

Talk status
This discussion is done.

The article lacks manual steps to define and format partitions. Simple instructions for RPi 2 are found in https://plus.google.com/+WolfgangApolinarski/posts/dNTqe6sVW87 To format the created partitions (it suppose your sdcard is in /dev/sdx, where x is b,c,d,e..):

FILE sdformat
mkfs.vfat -F 16 /dev/sdx1
mkfs.ext4  -O ^has_journal -L PiBoot /dev/sdx3
mkswap /dev/sdx2

— The preceding unsigned comment was added by El Salmon (talkcontribs) 2 March 2015

NOOBS image broken

Talk status
This discussion is still ongoing.

The page's stage-4 section currently refers to a NOOBS image that's supposed to be updated periodically. I tried installing from it and ran into these issues that call its usability into question:

  • it doesn't remount / read/write on boot
  • it doesn't start the network interface on boot
  • gcc is sufficiently broken that it won't compile "hello, world"...it complains that <sys/cdefs.h> is missing

Next step might be to try the quick-start linked below, unless someone has ideas to unbreak this image.

Salfter (talk) 04:24, 29 July 2015 (UTC)

broken link

Talk status
This discussion is done.

On https://wiki.gentoo.org/wiki/Raspberry_Pi there is a link named Gentoo Embedded Handbook, pointing to https://www.gentoo.org/proj/en/base/embedded/handbook/ which ends in a 404 error. — The preceding unsigned comment was added by Kapiteined (talkcontribs) 5 February 2016

The Embedded Handbook has been migrated and the link is now fixed. Marking discussion as closed. Also, please be sure to sign your comments. --Maffblaster (talk) 21:06, 12 April 2016 (UTC)

genkernel --menuconfig

Talk status
This discussion is done.

What if one want or must to change kernel by using menuconfig with genkernel command? Then which command should be to run? --Best, Pál (talk) 18:17, 13 March 2016 (UTC)

OK, I realise that that in genkernel-rpi2.conf one can add the option: MENUCONFIG="yes".
I did so.
But, I get an error message when start:
genkernel-rpi.sh
/usr/bin/genkernel: line 43: /defaults/software.sh: No such file or directory
Could not read /defaults/software.sh
How can I solve this problem?
--Best, Pál (talk) 19:39, 13 March 2016 (UTC)
What i did as a workaround.
mkdir /defaults/
cp /usr/share/genkernel/defaults/software.sh /defaults
(Next is the genkernel command I used.)
genkernel --kernel-config=/usr/src/linux-4.4.9999-raspberrypi/myconfig --kernname=gentoo-4.4.15-raspberrypi-g4eda74f-diryCary --menuconfig all
— The preceding unsigned comment was added by Topspot (talkcontribs) 26 July 2016
Hi, please remember to sign your comments to discussion pages. Thanks! --Maffblaster (talk) 06:59, 29 December 2016 (UTC)

Manual compilation

Talk status
This discussion is done.

Should be mentioned where, in which directory to run these commands:

  1. ARCH=arm make bcm2709_defconfig
  2. etc.

--Best, Pál (talk) 18:24, 13 March 2016 (UTC)

  1. cd /usr/src/linux-4.4.9999-raspberrypi

else it complains about not being able to find the rules to make the bcm2709_defconfig target.

--KLarsen (talk) 11:58, 28 October 2016 (UTC)

I have a question. Its a bit unclear to me where to run the manual compilation. On my ordinary amd64 gentoo or does it has to be done in the above mentioned chroot-quemu method or is it needed to be done on an existing arm system?

--Pauledd (talk) 17:45, 8 August 2017 (UTC)

Passing arguments to kernel make

Talk status
This discussion is done.

Now for the second time, someone changed the order of kernel make arguments The correct one is:

root #make ARCH=arm CROSS_COMPILE=armv6j-hardfloat-linux-gnueabi-

Please stop changing this to:

root #ARCH=arm CROSS_COMPILE=armv6j-hardfloat-linux-gnueabi- make

— The preceding unsigned comment was added by Chithanh (talkcontribs) 28 July 2016

Yes, passing environment variables must be ran before the make command, otherwise the command will see them as arguments. Please remember to sign your comments to discussion pages. Happy holidays and kind regards, --Maffblaster (talk) 06:50, 29 December 2016 (UTC)

New Raspberry Pi 3 64 Bit Guide

The Rasberry Pi 64 bit install guide could do with a link from this page and the intro explaining how hard 64 bit is could be removed. There is even a 64 bit upstream kernel, which is neither advertised nor supported.

The mainline kernel isn't ready yet but its close. Maybe 4.11 ? NeddySeagoon (talk) 19:25, 7 February 2017 (UTC)

A link to Raspberry Pi 64 bit install has been added. But the whole article should be reviewed for further occurrences of "64 bit". --Charles17 (talk) 07:34, 8 February 2017 (UTC)
I've removed most of the 64 bit references.
--NeddySeagoon (talk) 10:38, 20 March 2017 (UTC)