Installation from serial console
#1
Hello to the community,

I'm trying to install u-boot on a microSD card from a serial connection using a USB to TTL adapter CH340 (exactly this one).

First I built u-boot from my Debian laptop using the board-specific official documentation, then I flash it on the microSD with the appropriate `dd` command : `
Code:
dd if=u-boot-rockchip.bin of=/dev/mmcblk0 seek=64 && sync
`

Then :
1. I set the microSD and plugged the dupont as recommended: GND on pin6, RX on pin8, and with without the TX on pin10.
2. Plugged the CH340, launched :
Code:
picocom /dev/ttyUSB0 -b 1500000
`
3. Power on

And... Nothing appeared.

I tried different combinaisons of dupont pluging, different built for u-boot but I didn't get any output.

What did I miss ?
  Reply
#2
from my experience - use flashing software like balenaetcher instead of dd

ezik
  Reply
#3
Why dd wouldn't work as expected ? I flashed all the usb/SD card with this tool for the last 15 years. Tongue
  Reply
#4
Maybe you built u-boot-rockchip.bin wrong, maybe try some image from
armbian or dietpi to see if your serial setup is correct
Uboot is not that important, all it has to do is get the kenel and dtb loaded in the right place
and set them going
So, for any working uboot, you can copy the 1st 16M and apply to any other SD card,
modify 1st sector/ mbr as needed (obviously for same SBC)
all uboot does is check and initialize mem, DASD and comms, then load OS
  Reply
#5
It's the first time I try to install u-boot and access the Rock with the serial console.
I successfully burn many images and installed OS with HDMI+keyboard.
But this time, I don't want to use the video port to install an OS.

I can't get why I have no output from the serial, I tried an other adapter but both are correctly detected and set by my Debian laptop.
I also try with an other SBC with no success.
Also I did try to access the Debian installer from the serial I doesn't work neither. But still I do have output from the HDMI.
  Reply
#6
Try putty, you can conveniently save settings and quickly load them again
  Reply
#7
What board are you trying to install to?
The Woodpecker serial adapter normally works well, but with the Quartz64 Model B it doesn't work (on revision 1.4).

The Debian Installer does work on certain boards it supports, but you need to use (and concatenate) the matching SDcard image. And during installation you need to make sure the first 16MB aren't used, or it won't be able to boot into the installed system. But the d-i does work over serial.
  Reply
#8
Months later I finally found out were the problems come from, and it was a mix of hardware and software.

The first thing is that my beloved SanDisk Extreme Pro A2 has failed on me, I finally did a check with the f3 software that confirmed the hardware failure. I replaced with an other one, did the usual :
Code:
dd if=whatever.img of=/dev/mmcblk0

I plug the serial adapter to my computer, and... random character appears on my terminal.

So the second thing was to learn how Debian handle serial tty. It appears that the USB adapter are ruled by the file /lib/systemd/system/serial-getty@.service that configure and open tty port.

I supposed that the terminal set by this file was not the good for the rockpro. And indeed, I replaced the line :

Code:
ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I $TERM

By

Code:
ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 %I linux

And save the file to /etc/systemd/system/serial-getty@.service .

I did the mandatory systemd daemon-reload and then systemctl enable --now serial-getty@ttyUSB0.service

I plugged back the USB adapter and it works !
I finally installed u-boot from a serial console to my rockpro.
Thanks for the suggestions
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Article] Star64 JH7110 + NuttX RTOS: RISC-V PLIC Interrupts and Serial I/O lupyuen 0 974 08-01-2023, 06:48 PM
Last Post: lupyuen
  Serial Connection via SOcket CAT dustfinger 0 2,091 05-21-2020, 09:16 AM
Last Post: dustfinger

Forum Jump:


Users browsing this thread: 2 Guest(s)