Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bootable 64-bit RPi3 Gentoo image (OpenRC/Xfce/VC4) UPDATED
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 18, 19, 20  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Mon Sep 04, 2017 2:14 pm    Post subject: Reply with quote

If you haven't done so already, do try commenting out the "dtoverlay=vc4-fkms-v3d" line in /boot/config.txt. Otherwise nothing will show until the vc4 kernel module is loaded, and that requires a correct root mount (of your USB device) etc.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2017 3:35 pm    Post subject: Reply with quote

Having poked about with a multimeter and a 'scope, the 3.3v regulation on the Pi is pretty good.
Its less than 100mv pk-pk ripple but it does need the headroom for the 5v to 3.3v regulator.

As long as the red LED stays lit you should be good.

The 5v PSU I have shows ripple of 400mv pk-pk and 300mv droop when the Pi is working hard.
Other than the Pi itself, the 5v only powers a wireless USB connected Logitech MK300 mouse and keyboard receiver.

Users with a USB memory stick can draw 500mA for that alone.
_________________
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
dr_wulsen
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2013
Posts: 146
Location: Austria

PostPosted: Mon Sep 04, 2017 4:12 pm    Post subject: Reply with quote

@zucca: have you appended something like root=/dev/sda rootwait to your cmdline.txt?

@roylongbottom: higher than 85 is not possjble on the Pi3, even if you set the temp limit in config.txt higher, it's hardcoded to 85. at that point, it will throttle the cpu to 600MHz, regardless of governor and settings.

For stresstests, compiling etc. I have some piece of origami that is a paper tunnel taped to the pi case with an 80mm fan on top :)
_________________
There's no stupid questions, only stupid answers.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Mon Sep 04, 2017 5:57 pm    Post subject: Reply with quote

Sakaki wrote:
If you haven't done so already, do try commenting out the "dtoverlay=vc4-fkms-v3d" line in /boot/config.txt. Otherwise nothing will show until the vc4 kernel module is loaded, and that requires a correct root mount (of your USB device) etc.
It only makes the "rainbow" picture to stay on screen.

shellcmd: grep -vE '^\s*(#|$)' config.txt :
disable_overscan=1
dtparam=audio=on
gpu_mem=16
arm_control=0x200

Contents of cmdline.txt:
dwc_otg.lpm_enable=0 root=LABEL=PI_ROOT rootfstype=ext4 elevator=deadline rootwait


Shoud I comment out the gpu_mem -line too?

Oh and with this setup and power supply+cable I don't see any warnings of undervoltage or overcurrent draw.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2017 6:04 pm    Post subject: Reply with quote

Zucca,

Show us
Code:
ls -l /boot
for your Pi.
Post all of /boot/config.txt too.

You can only use
Code:
root=LABEL=PI_ROOT
if you have an initrd, since the kernel does not understand ]root=LABEL.
PARTUUID or device name will work.
_________________
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
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Mon Sep 04, 2017 6:16 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Zucca,

Show us
Code:
ls -l /boot
for your Pi.
shellcmd: ls -lF /mnt/temp/ :
total 24544
-rwxr-xr-x 1 root root        0 Jul 15 14:34 autoexpand_root_none*
-rwxr-xr-x 1 root root    23897 Aug  2 15:44 bcm2710-rpi-3-b.dtb*
-rwxr-xr-x 1 root root    16178 Aug  2 15:44 bcm2837-rpi-3-b.dtb*
-rwxr-xr-x 1 root root    50268 Aug  2 13:54 bootcode.bin*
-rwxr-xr-x 1 root root       83 Sep  4 16:33 cmdline.txt*
-rwxr-xr-x 1 root root     2989 Sep  4 20:44 config.txt*
-rwxr-xr-x 1 root root    18693 Aug  2 15:44 COPYING.linux*
-rwxr-xr-x 1 root root     2581 Aug  2 13:54 fixup_cd.dat*
-rwxr-xr-x 1 root root     6660 Aug  2 13:54 fixup.dat*
-rwxr-xr-x 1 root root     9802 Aug  2 13:54 fixup_db.dat*
-rwxr-xr-x 1 root root     9798 Aug  2 13:54 fixup_x.dat*
-rwxr-xr-x 1 root root 12509696 Aug  2 15:44 kernel8.img*
-rwxr-xr-x 1 root root     1494 Aug  2 13:54 LICENCE.broadcom*
drwxr-xr-x 2 root root    12288 Aug  2 15:38 overlays/
-rwxr-xr-x 1 root root   657828 Aug  2 13:54 start_cd.elf*
-rwxr-xr-x 1 root root  4990532 Aug  2 13:54 start_db.elf*
-rwxr-xr-x 1 root root  2852356 Aug  2 13:54 start.elf*
-rwxr-xr-x 1 root root  3935908 Aug  2 13:54 start_x.elf*


NeddySeagoon wrote:
Post all of /boot/config.txt too.
Here.


NeddySeagoon wrote:
You can only use
Code:
root=LABEL=PI_ROOT
if you have an initrd, since the kernel does not understand ]root=LABEL.
PARTUUID or device name will work.
Ah I see... There's no initrd in kernel. I'll replace LABEL with PARTUUID.

EDIT: Still showing the colorsquare thingy.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2017 6:35 pm    Post subject: Reply with quote

Zucca,

Code:
Aug  2 13:54 bootcode.bin*
that bootcode.bin is probably new enough to know about the kernel8.img name an all that goes with it.
My bootcode.bin is Aug 12.

For a bootcode.bin that understands kernel8.img, it will set the Pi into 64 bit mode then load an execute that kernel.
Older bootcode.bin knows nothing of kernel8.img and will look for kernel7.img then kernel.img, then give up.
The kernel name (if its not one of the defaults), needs to be given in config.txt

You have both
Code:
-rwxr-xr-x 1 root root    23897 Aug  2 15:44 bcm2710-rpi-3-b.dtb*
-rwxr-xr-x 1 root root    16178 Aug  2 15:44 bcm2837-rpi-3-b.dtb*
Where did you get them?
bcm2837-rpi-3-b.dtb is used by the mainline kernel

bcm2710-rpi-3-b.dtb is used by the foundation kernel. Big but ...
You need the 64 bit version of bcm2710-rpi-3-b.dtb for the 64 bit foundation kernel.

They are different. Here's the 4.9.y sizes.
-rwxr-xr-x 1 root root 17867 Aug 12 15:14 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 17624 Aug 12 15:07 bcm2710-rpi-3-b.dtb_32_2
but have the same file name.
_________________
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
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Mon Sep 04, 2017 6:39 pm    Post subject: Reply with quote

Neddy,

All files are straight from Sakaki's image (via github).

Should I add something like kernel=kernel8.img to config.txt?
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Mon Sep 04, 2017 6:54 pm    Post subject: Reply with quote

It should be fine as is. You can add
Code:
arm_control=0x200

to /boot/config.txt to force 64-bit mode if you like.
The most likely issue is the root isn't being located - try something simple like root=/dev/sda1 (or whatever) in /boot/cmdline.txt to begin with.
The next most likely thing is that the modules don't match the kernel. But, if you have copied the /lib/modules from the image too, that is unlikely.
When you used the vanilla image (all on microSD card), that worked OK?
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Sep 04, 2017 7:03 pm    Post subject: Reply with quote

Zucca,

Sakakis image works. :)

I don't think its mounting root.

Did you make a new partition table on the SD card where /boot is?
bootcode.bin checks for the bootable flag and the partition type of boot in the partition table.

There is a minor gotcha with mkfs.vfat too. You must tell it you want FAT32 or it guesses the FAT type from the volume size and may not do what you want.
It matters to the Pi.
_________________
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
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 5:46 am    Post subject: Reply with quote

Hi folks.

The "vanilla" image works.
The partition has bootable flag set. And I have forced the boot partition to be FAT32 specifically. That should be ok, since the bootloader creates the rainbowsquare and it's being loaded from the FAT partittion?

EDIT: I looked at the SDcard that has the "vanilla" image and there the FAT32 boot partition does NOT have bootable flag set. I tried with that flag unset on the SDcard that I'm trying to get boot, but no any visible effect.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 05, 2017 9:33 am    Post subject: Reply with quote

Zucca,

Rebuild the kernel with Simple Framebuffer added. This is the one I use.
You will get a console provided the kernel loads.

You don't care about installing the kernel modules until root mounts but console messages might be useful.
_________________
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
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Tue Sep 05, 2017 10:32 am    Post subject: Reply with quote

Zucca,

you mentioned you were able to boot the vanilla image successfully, on a spare microSD card.

One quick diagnostic therefore would be to boot this (vanilla) image again, insert your root USB stick, ensure that you can mount it and read the contents OK, then edit the (vanilla) image's /boot/cmdline.txt (setting root=/dev/sda1 rootdelay=5 or similar), optionally edit /boot/config.txt, and then reboot (with your USB root stick still inserted).

This should eliminate any issues about the other microSD card's integrity, correct formatting of the boot partition etc.

If that fails then compile your own kernel, per Neddy's suggestion, and try that.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 11:19 am    Post subject: Reply with quote

Mates,

Some success.
The Pi actually booted using the "vanilla" SDcard with modified cmdline.txt.
However X isn't started automatically and I'm left with getty login. It says the hostname is "none" (unset).

My guess why the other card didn't work is becuase Pi is very picky about the formatting of the card. I tried to mimic every part of the "vanilla" image's partition... dos partition table, FAT32 etc... Only real difference was the size. I had set it to 2gig (spare space for alternative kernels and initrds).

Anyway. At this point I just need to be able to set the password to demouser and rest I can do via ssh.

EDIT: Oh and what comes to the power delivery problems, they seem to be gone. I believe I found a reason, an external one, for it. I had a Li-ion/NiMH battery charger in the same outlet group. One evening I removed the charged batteries from it and at that point I could hear coil whining from it. After I unplugged the battery charger all the problems powering the Pi vanished. Keeping my fingers crossed now... If that was really the case, I'll open that charger and see how (badly) the switching circuit is made. Luckily I have another charger that is better in every way so I can throw that bad charger to trash. It wasn't any cheapo eBay charger but a Nitecore charger bought from local store.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Tue Sep 05, 2017 12:26 pm    Post subject: Reply with quote

Zucca,
good news ^-^
Obviously now all is basically running you can check /var/log/rc.log, /var/log/messages etc to see if everything else is coming up OK.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 1:50 pm    Post subject: Reply with quote

Sakaki wrote:
...you can check /var/log/rc.log, /var/log/messages etc to see if everything else is coming up OK.
... unfortunately it seems that syslogger isn't running:
shellcmd: ls -lF var/log/ :
total 32
-rw------- 1 root    utmp       0 Aug  2 18:57 btmp
drwxr-xr-x 2 root    root    4096 Jul 10 21:00 chrony/
drwxr-xr-x 2 root    root    4096 Aug  2 18:57 ConsoleKit/
drwxr-xr-x 2 root    root    4096 Jul 10 21:00 cups/
drwxr-xr-x 2 root    root    4096 Jan 30  2017 iptraf-ng/
drwx--x--x 2 root    root    4096 Jul 15 14:38 lightdm/
drwxrwsr-x 3 portage portage 4096 Jan 28  2017 portage/
drwxrwxr-x 2 root    portage 4096 Jan 30  2017 porthole/
drwxrwx--- 2 root    portage 4096 Jul 10 21:00 sandbox/
-rw-rw-r-- 1 root    utmp       0 Aug  2 18:57 wtmp


Any hack to be able to set password for demouser? Obviously I cannot just chroot in, since that's an 64-bit arm environment with unconpatible binaries for my desktop.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Tue Sep 05, 2017 2:04 pm    Post subject: Reply with quote

Zucca,
Looks like your system is not bringing up OpenRC properly. Are you sure /etc/fstab is correct on the USB (ie has specified / on /dev/sda1 or whatever)? Also are you sure you preserved all symbolic links, ownership, permissions etc. when copying the root files from the image?
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 2:28 pm    Post subject: Reply with quote

Sakaki wrote:
Zucca,
Looks like your system is not bringing up OpenRC properly. Are you sure /etc/fstab is correct on the USB (ie has specified / on /dev/sda1 or whatever)? Also are you sure you preserved all symbolic links, ownership, permissions etc. when copying the root files from the image?

I have
Code:
LABEL=PI_ROOT           /               ext4    defaults,noatime  0       1
on my fstab. It is working ok, since it ran fsck for it at boot.
I've been going trough the filesystem and all the link (so far) are in place and permissions look ok.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 409

PostPosted: Tue Sep 05, 2017 2:37 pm    Post subject: Reply with quote

Any OpenRC errors showing on the console at boot?
Ps you can just copy /etc/passwd and /etc/shadow from the root partition on the vanilla image onto the USB stick, to clone the passwords.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 3:10 pm    Post subject: Reply with quote

Sakaki wrote:
Any OpenRC errors showing on the console at boot?
There are one or few, but my eyes aren't equipped with such sensitive rod cells so that I could see what's being printed to the screen before getty clears all the text. :P
Sakaki wrote:
Ps you can just copy /etc/passwd and /etc/shadow from the root partition on the vanilla image onto the USB stick, to clone the passwords.
Thanks! This will get me started.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 4:17 pm    Post subject: Reply with quote

PEBCAK.

I had still LABEL=PI_BOOT on my fstab while I was using the "vanilla" SD to boot. For some reason OpenRC doesn't start any services if mounting /boot fails.

I'll try to sort out the booting problem later, but at least now I have a Pi that boots and mounts its root from usb stick.

Thanks Sakaki, Neddy and dr_wulsen!!!
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 05, 2017 7:48 pm    Post subject: Reply with quote

Zucca,

Openrc went through a period of requiring the nofail option in /etc/fstab if failing to mount a filesystem didn't matter.
Failing to mount a filesystem without that option caused booting to fail.

This made a lot of people with remote system that failed to boot, very unhappy. The logic was changed in some later version of openrc to be backwards compatible with the old expected behaviour.

I don't know if you have an affected openrc version or not.
_________________
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
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Tue Sep 05, 2017 7:54 pm    Post subject: Reply with quote

Neddy, I see. I guess I then add nofail options to fstab...

Another thing. How can I cache BINHOST "Packages" file locally? It would be neat if it only got downloaded when --sync:ing.
Every time I run any emerge command it downloads some megabytes of data from https://isshoni.org/pi64/Packages.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!


Last edited by Zucca on Wed Sep 06, 2017 8:14 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Sep 05, 2017 9:01 pm    Post subject: Reply with quote

Zucca,

I don't think that would be useful. The content of the BINHOST can change at any time.
Not just when you sync.

If you know you don't want to use the BINHOST, put
Code:
 BINHOST=""
on the command line.
_________________
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
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3759
Location: Rasi, Finland

PostPosted: Wed Sep 06, 2017 8:10 am    Post subject: Reply with quote

Ok. Thanks. I think I'll create an alias for binhost merging.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Goto page Previous  1, 2, 3 ... 5, 6, 7 ... 18, 19, 20  Next
Page 6 of 20

 
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