I tried this (and others). It is a rock-pi-s Hardware v13.
With a different image (some armbian automated build), I get a serial console with “screen -L /dev/ttyUSB0 1500000”. But that one flashes no LEDs, eth stays dark, and complains about a missing devicetree file.
This one has no serial console whatsoever, tried with “screen -L /dev/ttyUSB0 1500000”, “screen -L /dev/ttyUSB0 115200” and “screen -L /dev/ttyUSB0 115200,cs8”. However, it once left a few lines in the dhcp server log, telling me hostname, MAC and IP address. It also flashes a blue LED and eth’s LEDs are on. After this, it just disappeared, no ping, no ssh.
I tried booting it more often, also tried to configure things in the microSD card, again a blue LED flashes and eth’s LEDs are on, but no more DHCP lines, and never any serial console.
Logs have nothing useful, there is only ever 1 boot trace even after booting many times, with 1970 date. Maybe it never booted this SD card at all.
if test “${console}” = “display” || test “${console}” = “both”; then setenv consoleargs “console=ttyS2,115200n8”; fi
if test “${console}” = “serial” || test “${console}” = “both”; then setenv consoleargs “${consoleargs} console=tty1”; fi
if display then use ttyS2
if serial then use tty1
Shouldn’t it be the other way?
So now I have one running with kernel 4.4 as a web proxy for ipv6, and one I’m testing with kernel 5.10. This crashes after a few days, and then never comes back up. Note, even with a serial console, there is nothing after this line: “RTL8201F Fast Ethernet stmmac-0:00: attached PHY driver [RTL8201F Fast Ethernet]” Basically, I must take out the SD card and fsck it. My Gentoo boxes do this automatically on unclean reboot, maybe it’s unsafe in theory.
I can only guess that something is running, but only on ttyS1, not ttyS2, and it has to do with fsck.
So I changed /etc/rc.d/rc.S and looked at the part “/sbin/fsck $FORCEFSCK -C -a /”. After this, if RETVAL -ge 4, it proceeds to sulogin. So, for next time, I commented out the PS1 line and the sulogin line, and added
/sbin/fsck -C -y /
It is ext4. (Maybe f2fs would work, but I never tried booting from it.) Now I hope it will work like Gentoo next time, try to auto-fix the filesystem and reboot.
I found that changing the kernel for next boot is tricky. First, installing the 4.4 package unpacks into /boot/dtb and overwrites /boot/dtb-5.X.X, if such a kernel is active. The newer kernel packages install into their own directories.
After installing 4.4, one must fix the mess in /boot and then reinstall the previous 5.X kernel (if desired).
To activate a kernel, these symlinks must be set: uInitrd (make sure it is there), dtb, Image (Note!), vmlinux (possibly optional), config (optional) and System.map (optional)
I use this script /boot/set_kernel.sh (too lazy to deal with config and System.map).
Note, the 3 kernels were installed with pkgtool. However, yes, usually I prefer to compile/install kernels myself. That’s the traditional Gentoo way, that’s how I can make some hardware work, and that would work around problems with armbian/raspbian (not pkgtool) removing the currently running kernel’s modules.