Jump to content

Namexx

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello everyone! I will teach you how to install WiringOP on Armbian. It's not the most practical method, but it works. First, we download the repository from the original website. $ apt-get update $ apt-get install -y git $ git clone https://github.com/orangepi-xunlong/wiringOP.git Then, we proceed to look for the name of our board that is associated with Armbian. $ cat /etc/armbian-release | grep "BOARD=" | awk -F'=' '{print $2}' The previous command will give us the name of the board, which is the following: root@armbian:~# cat /etc/armbian-release | grep "BOARD=" | awk -F'=' '{print $2}' orangepi-r1plus-lts Now, we proceed to go to the WiringOP folder downloaded from Git, and we will modify the "build" file by adding the name of the board in 2 sections. $ sudo nano wiringOP/build Inside the "build" file, we will look for the following variable: boards=("orangepir1" "orangepizero" "orangepizero-lts" "orangepipc" "orangepipch5" "orangepipcplus" "orangepiplus2e" "orangepione" "orangepioneh5" "orangepilite" "orangepiplus" "orangepizeroplus2h3" "orangepizeroplus" "orangepipc2" "orangepiprime" "orangepizeroplus2h5" "orangepiwin" "orangepiwinplus" "orangepi3" "orangepi3-lts" "orangepilite2" "orangepioneplus" "orangepi4" "orangepi4-lts" "orangepirk3399" "orangepi800" "orangepizero2" "orangepizero2-lts" "orangepizero2-b" "orangepizero3" "orangepir1plus-lts" "orangepir1plus"} At the end of this variable, we add the board ID that we obtained before. It will look like this after adding the board ID: boards=("orangepir1" "orangepizero" "orangepizero-lts" "orangepipc" "orangepipch5" "orangepipcplus" "orangepiplus2e" "orangepione" "orangepioneh5" "orangepilite" "orangepiplus" "orangepizeroplus2h3" "orangepizeroplus" "orangepipc2" "orangepiprime" "orangepizeroplus2h5" "orangepiwin" "orangepiwinplus" "orangepi3" "orangepi3-lts" "orangepilite2" "orangepioneplus" "orangepi4" "orangepi4-lts" "orangepirk3399" "orangepi800" "orangepizero2" "orangepizero2-lts" "orangepizero2-b" "orangepizero3" "orangepir1plus-lts" "orangepir1plus" "orangepi-r1plus-lts") #<- Here, the board ID was added. Now, further down in the "Build" file, we will look for the following: if [[ -f /etc/orangepi-release ]]; then source /etc/orangepi-release elif [[ -f /etc/armbian-release ]]; then source /etc/armbian-release [[ $BOARD == orangepi-r1 ]] && BOARD=orangepir1 [[ $BOARD == orangepi-rk3399 ]] && BOARD=orangepirk3399 [[ $BOARD == orangepizeroplus2-h3 ]] && BOARD=orangepizeroplus2h3 [[ $BOARD == orangepizeroplus2-h5 ]] && BOARD=orangepizeroplus2h5 #----->Here new board<--------------- else In the brand section of the code above, we will place the following code. Replace [board_id_goes_here] with the actual board ID that we obtained at the beginning of the tutorial. [[board_id_goes_here]] && BOARD=orangepir1plus-rk3328 After making the modifications, it will look like this: if [[ -f /etc/orangepi-release ]]; then source /etc/orangepi-release elif [[ -f /etc/armbian-release ]]; then source /etc/armbian-release [[ $BOARD == orangepi-r1 ]] && BOARD=orangepir1 [[ $BOARD == orangepi-rk3399 ]] && BOARD=orangepirk3399 [[ $BOARD == orangepizeroplus2-h3 ]] && BOARD=orangepizeroplus2h3 [[ $BOARD == orangepizeroplus2-h5 ]] && BOARD=orangepizeroplus2h5 [[ $BOARD == orangepi-r1plus-lts ]] && BOARD=orangepir1plus-rk3328 else The last parameter can be modified with a different board, in case of using other versions of OrangePi. You just need to look for the corresponding one in the same "build" file, and replace only the board ID. Now we can close the file and proceed to apply ./build clean and ./build. However, the current version of OrangePi r1+LTS officially has a problem that we will also fix next. $ sudo nano wiringOP/wiringPi/OrangePi.h Inside the file, some #define statements need to be added to resolve the conflicts they are causing. Hopefully, Xunlong will fix this issue in the future. For now, we will apply a patch as I haven't been able to find where to obtain these GPIO_BASE. Inside the file "Orangepi.h," we will look for the following //csy 2019.1.8 /*********** OrangePi R1PLUS *************/ #if CONFIG_ORANGEPI_R1PLUS #define GPIO2_BASE 0xff230000 #define GPIO3_BASE 0xff240000 #define GPIO_NUM (0x40) #define GPIO_SWPORTA_DR_OFFSET 0x00 #define GPIO_SWPORTA_DDR_OFFSET 0x04 #define GPIO_EXT_PORTA_OFFSET 0x50 #define GRF_BASE 0xff100000 #define GRF_GPIO2A_IOMUX_OFFSET 0x20 #define GRF_GPIO2BL_IOMUX_OFFSET 0x24 #define GRF_GPIO2BH_IOMUX_OFFSET 0x28 #define GRF_GPIO2CL_IOMUX_OFFSET 0x2c #define GRF_GPIO2CH_IOMUX_OFFSET 0x30 #define GRF_GPIO2D_IOMUX_OFFSET 0x34 #define GRF_GPIO3AL_IOMUX_OFFSET 0x38 #define GRF_GPIO3AH_IOMUX_OFFSET 0x3c #define GRF_GPIO3BL_IOMUX_OFFSET 0x40 #define GRF_GPIO3BH_IOMUX_OFFSET 0x44 #define GRF_GPIO3C_IOMUX_OFFSET 0x48 #define GRF_GPIO3D_IOMUX_OFFSET 0x4c We will modify this to make it look like the following: #endif /* CONFIG_ORANGEPI_RK3399 */ //csy 2019.1.8 /*********** OrangePi R1PLUS *************/ #if CONFIG_ORANGEPI_R1PLUS #define GPIO2_BASE 0xff230000 #define GPIO3_BASE 0xff240000 #define GPIO_NUM (0x40) #define GPIOL_BASE (0x0) #New lines added. #define GPIO_BASE_MAP (0x0) #New lines added. #define GPIO_SWPORTA_DR_OFFSET 0x00 #define GPIO_SWPORTA_DDR_OFFSET 0x04 #define GPIO_EXT_PORTA_OFFSET 0x50 #define GRF_BASE 0xff100000 #define GRF_GPIO2A_IOMUX_OFFSET 0x20 #define GRF_GPIO2BL_IOMUX_OFFSET 0x24 #define GRF_GPIO2BH_IOMUX_OFFSET 0x28 #define GRF_GPIO2CL_IOMUX_OFFSET 0x2c #define GRF_GPIO2CH_IOMUX_OFFSET 0x30 #define GRF_GPIO2D_IOMUX_OFFSET 0x34 #define GRF_GPIO3AL_IOMUX_OFFSET 0x38 #define GRF_GPIO3AH_IOMUX_OFFSET 0x3c #define GRF_GPIO3BL_IOMUX_OFFSET 0x40 #define GRF_GPIO3BH_IOMUX_OFFSET 0x44 #define GRF_GPIO3C_IOMUX_OFFSET 0x48 #define GRF_GPIO3D_IOMUX_OFFSET 0x4c #define CRU_BASE 0xff440000 #define CRU_CLKGATE_CON16_OFFSET 0x0240 //bit 7 8 9 10 9877 We save the changes and apply build clean and build. The result is: root@armbian:~/wiringOP# gpio readall +------+-----+----------+------+---+ R1 Plus +---+---+--+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | | | 5V | | | 1 || 2 | | | GND | | | | 89 | 0 | SDA.0 | ALT2 | 1 | 3 || 4 | 1 | ALT2 | SCK.0 | 1 | 88 | | 100 | 2 | TXD.1 | ALT5 | 1 | 5 || 6 | 1 | ALT5 | RXD.1 | 3 | 102 | | | | | | | 7 || 8 | | | | | | | | | | | | 9 || 10 | 1 | ALT3 | GPIO3_C0 | 4 | 112 | | 103 | 5 | CTS.1 | ALT5 | 1 | 11 || 12 | 1 | ALT5 | RTS.1 | 6 | 101 | | 66 | 7 | GPIO2_A2 | IN | 1 | 13 || 14 | | | | | | +------+-----+----------+------+---+----++----+---+------+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+------+---+ R1 Plus +---+---+--+----------+-----+------+ root@armbian:~/wiringOP#
  2. Could you share the script you used? I have encountered this issue in several versions.
  3. Hello, I would like to know how they reduce the size of the images and then, when the microSD cards are inserted into a card, they expand to fill the entire space. In other words, the same thing that Armbian images do when we use them for the first time: they are small, and then they occupy all the storage space.
  4. Hello guys, you know that armbian has a problem that sometimes when the system boots, the ethernet interfaces fail. The led turns on indicating that it detected the interface but it is totally blocked. It does not work, no method of restarting the interface. The only solution is to restart the computer...
  5. Hi guys, I need to be able to see the pins on my board. In the official distribution of Orange Pi, I was able to install the Xunlong WiringOP script. I know I can use /sys/class/gpio/ to define the pins and use them, but that's not what I want. I would like to be able to use something like the "gpio readall" command.
  6. Hi guys, when I installed Armbian on my system, it gave me a different MAC address than the one physically assigned to my hardware. How can I restore the original MAC address of the hardware without having to manually set it?
  7. Hi guys, sorry for the delay. I was testing armbian with the changes you indicated and if the i2c and serial modules worked. But armbian is still too early for this board. During the test that I was carrying out, my SD card got corrupted... Something that has not happened to me with the official OS of OrangePi. I hope that soon you can implement the changes you mentioned to make the system more reliable.
  8. Sorry I don’t saw that files. i will going add the file and tell you thanks for u help
  9. image of the directory -> /boot/dtb-5.15.80-rockchip64/rockchip/overlaycd
  10. Hi, i do quick update. Now i reinstall armbian ubuntu version. On list of armbian config, the setting config I2c and uart are not there. I share Image. also i share a picture that the mac address is not the real address of my board (i dont know if armbian change mac address for security)
  11. Hello, I waited more than a minute on several occasions and I never managed to start. I showed an IP when scanning my network.The Ip shown was the one that corresponded to my R1, but the MAC didn't... Maybe it's a mistake, I don't know. But in my case, that's how it happened. Another thing I discovered is that armbian does not recognize UART1 and I2C 0 ports. From the board, so I was forced to switch to the official version of Ubuntu provided by OrangePi.
  12. Hi guys, today bought new interface ttl to usb. I managed to get armbian working using the serial connection. The connection via SSH for the first configuration does not work. After config, SSH working The lights of the lan0 interface always stay ON... Which suggests that the interface fails. Without the interface I would have never been able to boot armbian.
  13. I have another question to see if you can help me. I use node-red to drive these boards since I connect them to various types of plc. There is something that I am still not clear about, how do I handle the Serial 1 and I2C 0 input? Will the modules with which the raspberry are handled work?
  14. During these days I will buy a usb to ttl module. Version printed of my board is 1.6V i shared images of my board 1.jfif 2.jfif 3.jfif 4.jfif
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines