│ Symbol: SERIAL_8250_NR_UARTS [=2] │
│ Type : integer │
│ Prompt: Maximum number of 8250/16550 serial ports │
│ Location: │
│ -> Device Drivers │
│ -> Character devices │
│ -> Serial drivers │
│ (6) -> 8250/16550 and compatible serial support (SERIAL_8250 [=y]) │
│ Defined at drivers/tty/serial/8250/Kconfig:169 │
│ Depends on: TTY [=y] && HAS_IOMEM [=y] && SERIAL_8250 [=y] │
good to know its configurable…
-CONFIG_SERIAL_8250_NR_UARTS=2
-CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
Linux bpi-r2 4.14.8-00022-gb3e6160-dirty #47 SMP Thu Dec 21 15:53:13 CET 2017 armv7l
[15:56] root@bpi-r2:~# find /sys -name '*serial*'
[15:56] root@bpi-r2:~# dmesg | grep tty
[ 0.000000] Kernel command line: board=bpi-r2 console=earlyprintk fbcon=map:0 console=ttyS0,115200 root=/dev/mmcbl0
[ 0.231181] console [ttyS0] disabled
[ 0.251356] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 195, base_baud = 1625000) is a ST16650V2
[ 0.919335] console [ttyS0] enabled
[ 0.943721] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 196, base_baud = 1625000) is a ST16650V2
[ 0.973765] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 197, base_baud = 1625000) is a ST16650V2
[ 4.306955] systemd[1]: Expecting device dev-ttyS0.device...
Is there a way to get serial working from the box (in compiled image)? I understand everyone here is a linux engineer but how people without this kind of background can get it working?
You can use debian/ubuntu-images and installing one my compiled kernels (4.4 or 4.14). I have activated the uart-nodes.
The configuration of the serial-port itself depends on your device. Basicly you can use raw-mode with 8n1 and desired speed (documentation of your device)
Thanks a lot for your response.
Can you please share a url to your kernel? Do you have debian emmc image with your compiled kernel by any chance?
I really appreciate your feedback, thanks a lot again.
You’ll find that link also on startpage of my wiki. The archive-file contains folders boot and root,which contents have to be copied to the partitions bpi-root/bpi-boot of sd-card.
Currently i have no emmc-image,i’m building currently a clean debian on my emmc. Install on emmc is a bit more tricky because of the partition-change and burning preloader to boot-device
Thanks for your help. I have tried to replace boot and root (lib folder) files but received kernel panic on boot. I will try more but wanted to confirm: Files in lib folder should be replaced or merged?
I think I’ve made it working (I will try tomorrow with real UART to USB converter when I receive my level shifter). Thanks a lot. Do you think Its possible to write everything from SD to EMMC? Or it will work only from SD?
I will try to do like this and share my results. Thanks
copy kernel (p1) and modules (p2, if you not want to copy full rootfs from SD card)
mkdir -p /mnt/emmc/boot/bananapi/bpi-r2/linux
cp /boot/bananapi/bpi-r2/linux/uImage /mnt/emmc/boot/bananapi/bpi-r2/linux
mkdir -p /mnt/emmc/root/lib/modules/
cp -r /lib/modules/$(uname -r) /mnt/emmc/root/lib/modules/
uboot auf die richtige Partition konfigurieren
sed 's/mmcblk0/mmcblk1/' /boot/bananapi/bpi-r2/linux/uEnv.txt > /mnt/emmc/boot/bananapi/bpi-r2/linux/uEnv.txt
I have manually copied uImage and kernel to eemc on my already preinstalled debian9 and its working fine. Now its booting from emmc using your kernel. Thank a lot Frank, you are the best
Do you happen to know if I can move rootfs to SATA hdd using your kernel? I read somewhere that it should be custom kernel so sata will be available on boot.
you can only copy rootfs to hdd/ssd (boot-partition must be on emmc/SD)
you just need to change uenv.txt (on sd/emmc) to point to you hdd/ssd-partition (root=/dev/sdax) and change /etc/fstab in your rootfs so that the right / is mounted
but now it’s leaving the topic…please make a new topic if you have more questions