View previous topic :: View next topic |
Author |
Message |
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Tue Dec 11, 2018 4:36 pm Post subject: Rockpro64 nfs root, no shell and devtmpfs question [solved] |
|
|
Hi all.
I am having some problems getting a shell prompt. The serial output shows that the rootfs is mounted and that devtmpfs is mounted. But when I pass init=/bin/sh, no prompt comes up. I am using busybox, so my inderstanding is that a busybox shell should come up.
The suspicious stuff I see is:
1. No device nodes appearing in the rootfs /dev directory on the nfs server
2. After the serial messages say it is running /bin/sh, nothing happens, then it appears to print messages saying it is looking for the nfs server again. It eventually finds it, but nothing happens
My console parameter is console=ttyS2,1500000 (strange baud rate) but it works for the early console parameter.
I have verified that nfs works on the server and with this board using the ubuntu distribution that you can obtain from this board's website.
I can get more info tonight, any other debugging suggestions are, as always, appreciated.
Last edited by tenspd1370 on Tue Dec 18, 2018 1:09 am; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Tue Dec 11, 2018 4:50 pm Post subject: |
|
|
tenspd1370,
A couple of things,
Quote: | 1. No device nodes appearing in the rootfs /dev directory on the nfs server | is normal.
/dev is in tmpfs on the target. Its contents will not appear on the server. You should have an empty /dev there.
Well, it may contain null and console, as they were the minimum to boot at one time.
init=/bin/sh will only work if you have /bin/sh symlinked to the busybox binary.
That 1500000 baud rate bothers me. It must be doing something non standard to produce a more normal baud rate that your console understands. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Tue Dec 11, 2018 8:42 pm Post subject: |
|
|
Neddy -
Thanks for confirming the /dev part for me. I didn't think to check where the /bin/sh link was to - I thought because I had busy box installed, that was already done. Turns out it actually points to bash, so I will fix that when I get a chance. I will also look into the baud rate - so far everywhere I have seen it published, it is something along the lines of:
UART is accessible on pin 6 (GND),8 (TX) and 10 (RX) and with unusual speed: 1500000
which is what I am using. Of course I am probably missing something, I am just comparing to my own experience with a reference distro where I am hooked up to these pins and I can get a log in prompt. I do agree though - I kinda went "huh?" when I saw that as well.
I am also going to review the AMD64 handbook as well. I imagine the process is basically the same except that I am cross compiling everything and I will have to make some adjustments for how I do things like add to openrc, etc. I want to make sure there isn't something general that I missed.
One thing I did try was to grab the experimental arm64 stage 3, but when I plopped that into the build root (/usr/aarch64-unknown-linux-gnu), it broke aarch64-unknown-linux-gnu-emerge, so I am guessing that isn't the right thing to do. I did think about trying to somehow leverage catalyst, but from what I can tell, it doesn't work well with cross compilation. So I figured I would try to take step back and just get a busybox prompt for starters.
Thanks for putting up with my naivety with all this. I am trying to put the pieces together by observing how system builds that already work work (Armbian, ayufan, etc), slightly outdated but useful info from the Linux Embedded Primer book, and what I can find on the web. I am fairly proficient on the desktop, but embedded is a whole new ballgame.
Much appreciation.... |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Wed Dec 12, 2018 2:11 am Post subject: |
|
|
So - I don't see anywhere to do anything with the baud rate. I removed the console=ttyS2,1500000 and just left in the early console parameter. I basically see the same thing happening.
Code: |
IP-Config: Got DHCP answer from 10.10.0.1, my address is 10.10.0.2
IP-Config: Complete:
device=eth0, hwaddr=ca:74:d0:12:d1:91, ipaddr=10.10.0.2, mask=255.255.255.0, gw=10.10.0.1
host=10.10.0.2, domain=, nis-domain=(none)
bootserver=0.0.0.0, rootserver=10.10.0.1, rootpath=/usr/aarch64-unknown-linux-gnu
nameserver0=10.10.0.1
ALSA device list:
No soundcards found.
ttyS2 - failed to request DMA
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
Root-NFS: DHCPv4 option 17: /usr/aarch64-unknown-linux-gnu
Root-NFS: nfsroot=/export/sysroot,proto=tcp,vers=3
NFS: nfs mount opts='vers=2,udp,rsize=4096,wsize=4096,proto=tcp,vers=3,nolock,addr=10.10.0.1'
NFS: parsing nfs mount option 'vers=2'
NFS: parsing nfs mount option 'udp'
NFS: parsing nfs mount option 'rsize=4096'
NFS: parsing nfs mount option 'wsize=4096'
NFS: parsing nfs mount option 'proto=tcp'
NFS: parsing nfs mount option 'vers=3'
NFS: parsing nfs mount option 'nolock'
NFS: parsing nfs mount option 'addr=10.10.0.1'
NFS: MNTPATH: '/export/sysroot'
NFS: sending MNT request for 10.10.0.1:/export/sysroot
NFS: received 1 auth flavors
NFS: auth flavor[0]: 1
NFS: MNT request succeeded
NFS: attempting to use auth flavor 1
VFS: Mounted root (nfs filesystem) on device 0:14.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
Run /bin/sh as init process
phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_DCP_CHARGER
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
nfs: server 10.10.0.1 OK
|
I wonder if I need an initramfs to bring up ttyS2 and then switch over to it somehow? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54799 Location: 56N 3W
|
Posted: Wed Dec 12, 2018 6:51 pm Post subject: |
|
|
tenspd1370,
You can use the stage3 in /usr/aarch64-unknown-linux-gnu but you will need to preserve the make.conf from crossdev as you want the cross compile make.conf, not a native one.
You will also need to restore the profile symlink as I recall that its a relative path in the native stage3. Worfh a check anyway.
With a little inginuity you can chroot into /usr/aarch64-unknown-linux-gnu on your build host too :)
Code: | $ ls /usr/aarch64-unknown-linux-gnu/etc/portage/
env make.profile package.mask profile
make.conf package.accept_keywords package.unmask repo.postsync.d
make.conf_cross package.env package.use repos.conf
make.conf_qemu package.license patches savedconfig |
Notice that I have make.conf_cross and make.conf_qemu as options for my make.conf symlink, depending on how I'm using /usr/aarch64-unknown-linux-gnu/etc/portage/
$ wgetpaste make.conf_cross
Your paste can be seen here: https://paste.pound-python.org/show/toaeuho1SuEfA3Djfv2B/
$ wgetpaste make.conf_qemu
Your paste can be seen here: https://paste.pound-python.org/show/QX80fGCjESmK1NaHXeZA/
-- edit --
Code: | ttyS2 - failed to request DMA | may be a hint that all is not well. You won't need an initrd. Just all the required bits built into the kernel.
My target of interest is 64 bit Raspberry Pi. The Build Root is described on the wiki. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Wed Dec 12, 2018 9:36 pm Post subject: |
|
|
Neddy -
chroot - That is a great idea! Just last night I think I accidentally mangled something in my host /etc instead of /usr/aarch64-unknown-linux-gnu/etc - long story short, I grabbed a rescue USB today and need to fix it tonight.
I think you are right - I need to figure out what is going on with ttyS2. My theory I would like to test is that it is still going, the console is messed up. I can ping the board when it is in the state above (at least that is what I recall from last night) and I wonder if I get the base set up and sshd started I could ssh into it to see if it does anything. My understanding of the nfsroot is that if you supply the information, the kernel knows to take <ip>.:/export/sysroot and make it /.
Thanks for the links. At work now, but can't wait to go over them. I'll keep coming back with updates when I get something new.
Much appreciated! |
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Tue Dec 18, 2018 1:08 am Post subject: |
|
|
Neddy,
Sorry it has taken me a few days, but I tried out a patched mainline 4.20-rc6 vs the mainline from kernel.org via git-sources. The current rockpro64 support at kernel.org must still be a little behind. With the patched version (https://github.com/ayufan-rock64/linux-mainline-kernel.git) I can get a busybox shell up and running without any difficulty. I think the next step is to look at the difference between the patched version and kernel.org version. That will tell me what is missing. Or I could just use the patched version (depends on how I feel).
Either way, thanks for your help and the resource links you provided. I really appreciate it. |
|
Back to top |
|
|
|
|
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
|
|