Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rockpi4/dev/common-interface-with-kernel-5.10"

< Rockpi4‎ | dev
(Created page with "{{rockpi4_header}} {{Languages|rockpi4/dev/common-interface-with-kernel-5.10}} ROCK Pi 4 > Development > Rockpi4/dev/common-interface-w...")
 
 
(2 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
Install package rockpi4-dtbo
 
Install package rockpi4-dtbo
  
  sudo apt-get install -y rockpi4-dtbo
+
$ sudo apt-get install -y rockpi4-dtbo
  
Modify file /boot/hw_intfc.conf. Add "#" to line "intfc:dtoverlay=console-on-ttyS2" and "intfc:dtoverlay=console-on-ttyS2"
+
Modify file /boot/hw_intfc.conf. Add "#" to line "intfc:dtoverlay=console-on-ttyS2" and "intfc:dtoverlay=console-on-ttyS4".
  
  #intfc:dtoverlay=console-on-ttyS2
+
#intfc:dtoverlay=console-on-ttyS2
  #intfc:dtoverlay=console-on-ttyS4
+
#intfc:dtoverlay=console-on-ttyS4
  
 
==== UART ====
 
==== UART ====
Line 24: Line 24:
 
Modify file /boot/hw_intfc.conf. Set "on" to enable the optional hardware interfaces while set "off" to disable.
 
Modify file /boot/hw_intfc.conf. Set "on" to enable the optional hardware interfaces while set "off" to disable.
  
  intfc:uart2=on
+
intfc:uart2=on
  intfc:uart4=on
+
intfc:uart4=on
  
And add "#" to line "intfc:dtoverlay=console-on-ttyS2"
+
And add "#" to line "intfc:dtoverlay=console-on-ttyS2" and "intfc:dtoverlay=console-on-ttyS4".
  
  #intfc:dtoverlay=console-on-ttyS2
+
#intfc:dtoverlay=console-on-ttyS2
  #intfc:dtoverlay=console-on-ttyS4
+
#intfc:dtoverlay=console-on-ttyS4
  
 
but now, the uart2 can still be used as a debug port with system log. If you don't want to output kernel messages, you can disable it as follow.
 
but now, the uart2 can still be used as a debug port with system log. If you don't want to output kernel messages, you can disable it as follow.
  
 
Modify file /boot/extlinux/extlinux.conf.  
 
Modify file /boot/extlinux/extlinux.conf.  
  append earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89 console=ttyS2,1500000n8
+
append earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89 console=ttyS2,1500000n8
 
Delete strings '''console=ttyFIQ0,1500000n8''' and '''console=ttyS2,1500000n8''' in this line.
 
Delete strings '''console=ttyFIQ0,1500000n8''' and '''console=ttyS2,1500000n8''' in this line.
  append earlyprintk rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89
+
append earlyprintk rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89
 +
 
 +
Please note that when ROCK Pi 4 uart2 is connected with your devices like Raspberry Pi CAN/RS485 hat sending some data to uart2 on ROCK Pi 4. Please do the following step.
 +
 
 +
Check the file /boot/extlinux/extlinux.conf. And delete the following line.
 +
 
 +
menu title select kernel

Latest revision as of 03:13, 7 June 2022

    ROCK Pi 4 >  Development >  Common interface with Kernel 5.10

Description

If you want to use i2c, spi, uart, pwm, etc, with Kernel 5.10 in ROCK Pi 4. You'd better follow these steps.

Install essential package

Install package rockpi4-dtbo

$ sudo apt-get install -y rockpi4-dtbo

Modify file /boot/hw_intfc.conf. Add "#" to line "intfc:dtoverlay=console-on-ttyS2" and "intfc:dtoverlay=console-on-ttyS4".

#intfc:dtoverlay=console-on-ttyS2
#intfc:dtoverlay=console-on-ttyS4

UART

Modify file /boot/hw_intfc.conf. Set "on" to enable the optional hardware interfaces while set "off" to disable.

intfc:uart2=on
intfc:uart4=on

And add "#" to line "intfc:dtoverlay=console-on-ttyS2" and "intfc:dtoverlay=console-on-ttyS4".

#intfc:dtoverlay=console-on-ttyS2
#intfc:dtoverlay=console-on-ttyS4

but now, the uart2 can still be used as a debug port with system log. If you don't want to output kernel messages, you can disable it as follow.

Modify file /boot/extlinux/extlinux.conf.

append earlyprintk console=ttyFIQ0,1500000n8 rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89 console=ttyS2,1500000n8

Delete strings console=ttyFIQ0,1500000n8 and console=ttyS2,1500000n8 in this line.

append earlyprintk rw init=/sbin/init rootfstype=ext4 rootwait  root=UUID=8650cdca-49b0-4431-9667-5c639f6bab89

Please note that when ROCK Pi 4 uart2 is connected with your devices like Raspberry Pi CAN/RS485 hat sending some data to uart2 on ROCK Pi 4. Please do the following step.

Check the file /boot/extlinux/extlinux.conf. And delete the following line.

menu title select kernel