Bug 9196 - raspberry pi 3 default build seem broken
Summary: raspberry pi 3 default build seem broken
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2016.05
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-25 23:28 UTC by Mikhail
Modified: 2016-10-15 15:50 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
config file (67.97 KB, application/xml)
2016-08-25 23:28 UTC, Mikhail
Details
latest config file, default RPi3 configuration (71.59 KB, text/plain)
2016-08-27 03:58 UTC, Mikhail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail 2016-08-25 23:28:21 UTC
Created attachment 6626 [details]
config file

Hi,

I was able to compile build root for RPi 3 default configuration and it apparently boots but when I enter login "root" and blank password id does
allow me to login. So far whatever I did I was not able to login, even 
I specified "root" password in the configuration.   My .config file is
attached.

Also I tried to compile systemd for RPi3 but I even did not get login screen
(I had to disable post-build script because it was not finding inittab)

I am willing to troubleshoot, but don't know how :(

thank you

Mikhail
Comment 1 Peter Korsgaard 2016-08-26 14:42:34 UTC
I presume you mean does NOT allow you to login? On what interface are you trying to login on? HDMI/keyboard or serial?

Thanks for the post-build report. I have now fixed it to work correctly when systemd/no-init is used:

https://git.buildroot.net/buildroot/commit/?id=720b9095a6a9fb23c7a2d7d3e4dabbe6b5299b12
Comment 2 Mikhail 2016-08-26 16:01:25 UTC
Yes sorry I could not log with HDMI/keyboard. However I learn that
for RP3 to use serial line blue tooth needs to be disabled; I used
debian stock image and at first could not login via serial, showed
garbage characters along with some valid ones. After I disabled 
BT in config.txt stock image worked on serial line.

The same trick with buildroot image did not work.

Regarding systemd I build it just by removing the script. It boots 
but getty gets time out 1 m 30 sec, no login prompt is shown.

It is similar to issue described here:

http://buildroot-busybox.2317881.n4.nabble.com/systemd-not-working-properly-td82549.html

But on HDMI/keyboard.

I will reproduce it tonight and send a better report.

Thank you!

Mikhail
Comment 3 Mikhail 2016-08-27 03:58:16 UTC
Created attachment 6631 [details]
latest config file, default RPi3 configuration
Comment 4 Mikhail 2016-08-27 03:59:46 UTC
Here is better report (I think)

This is what I did (latest version)

git pull 

make clean

make xconfig raspberrypi3_defconfig

For some reason, it does not show RPi scripts
So I exit (saving) and do it again:

make xconfig

Now RPi scripts in place.

make

OK. write to SD card.

Use RPi3 with display and keyboard attached.

Boots fine.

Welcome to Buildroot

buildroot login:

type: root

Password:

Just press enter.

Shows again:

Password:

press enter

Login timeout after 60 seconds.

No way it let me log in.

I attached latest . config 

I hope it helps

I am going to make changes in config to use systemd and submit
another comment.

Best Regards
Mikhail
Comment 5 Mikhail 2016-08-30 03:34:06 UTC
If buildroot is compiled for systemd, on HDMI console shown

[TIME] Timed out for device dev-console.device
[DEPEND] Dependency failed for Serial Getty on console

There is no login prompt.
Comment 6 Peter Seiderer 2016-09-20 20:47:44 UTC
Tested with buildroot git d4db4277ffbd1fae478ba748c626eddc7c220e67 (including [1]).

With bare raspberrypi3_defconfig login via serial and login via hdmi/usb-keyboard
is possible.

With raspberrypi3_defconfig with change to glibc/systemd serial login works out of the box.

For hdmi/usb-keyboard (tty1) login the following link was necessary (as advised in [2]):

ln -sf /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service

Additional he file /etc/systemd/system/getty@.service.d/nodisallocate.conf to avoid clearing the console.

[1] https://git.buildroot.net/buildroot/commit/?id=1e03cc2290f98fc7434254d2abd9afd504de8360

[2] https://wiki.archlinux.org/index.php/Systemd_FAQ
Comment 7 Floris Bos 2016-09-20 21:44:15 UTC
>With raspberrypi3_defconfig with change to glibc/systemd serial login works out of 
>the box.

That could be thanks to systemd's behavior of auto-magically spawning getty's on serial consoles though.

https://www.freedesktop.org/software/systemd/man/systemd-getty-generator.html

Rather than the symlink buildroot created working correctly.


>For hdmi/usb-keyboard (tty1) login the following link was necessary (as advised in 
>[2]):
>
>ln -sf /usr/lib/systemd/system/getty@.service  >/etc/systemd/system/getty.target.wants/getty@tty1.service

Alternative fix: https://patchwork.ozlabs.org/patch/668134/
Comment 8 Mikhail 2016-10-08 05:27:20 UTC
Hi,

I did not try systemd, but default build for rpi3 now does not have these problems, as well compiled with eudev.  I used development buildroot.

Thank you for fixing,

Best Regards
Mikhail
Comment 9 Thomas Petazzoni 2016-10-15 15:50:02 UTC
Bug reporter says the problem is fixed. Thanks everyone!