ls819011 Posted November 15, 2022 Posted November 15, 2022 (edited) I have Orange Pi Plus 2 running Ubuntu Bionic with Armbian Linux 4.19.62-sunxi and I would like to upgrade it to recent Armbian build based on Ubuntu Linux Server and move OS to SSD connected to one of USB ports. I tried to use Armbian_22.08.2_Orangepiplus_jammy_current_5.15.69.img.xz but it does not connect to both HDMI and network. I tried unofficial command line interface images from product page and weekly released unsupported community builds. Behavior of all these builds is the same - no output to HDMI, no network connection. Finaly I found that recent image for Orange Pi Plus / Plus 2 which boots is Armbian_22.08.1_Orangepiplus_jammy_current_5.15.63.img.xz. I was able to boot from this image and transfer OS to SSD but running "apt update" and "apt upgrade" breaks something in operating system even if Kernel is "frozen" using armbian-config utility. After upgrade OS does not recognize usb-to-serial adapter CH341 connected to one of USB ports. Amout of loaded Kernel modules essentially decrease: orangepiplus:~:# lsmod Module Size Used by pwrseq_simple 16384 1 sy8106a_regulator 16384 0 gpio_keys 20480 0 uas 24576 1 realtek 24576 1 orangepiplus:~:# Attempt to load module using modprobe fails: orangepiplus:~:# modprobe usbserial vendor=1a86 product=7523 modprobe: FATAL: Module usbserial not found in directory /lib/modules/5.15.63-sunxi orangepiplus:~:# It looks like kernel modules were upgraded by running "apt update" and "apt upgrade" although Kernel was "frozen" using armbian-config utility. There is no 5.15.63-sunxi folder in /lib/modules: orangepiplus:~:# ls -la /lib/modules/ total 12 drwxr-xr-x 3 root root 4096 Nov 14 21:04 . drwxr-xr-x 76 root root 4096 Nov 14 20:31 .. drwxr-xr-x 3 root root 4096 Nov 14 20:31 5.15.74-sunxi orangepiplus:~:# Adding sym link to upgraded modules does not help. Load module fails due to exec format error: orangepiplus:~:# ln -s /lib/modules/5.15.74-sunxi /lib/modules/5.15.63-sunxi orangepiplus:~:# ls -la /lib/modules/ total 12 drwxr-xr-x 3 root root 4096 Nov 14 20:45 . drwxr-xr-x 76 root root 4096 Nov 14 20:31 .. lrwxrwxrwx 1 root root 26 Nov 14 20:45 5.15.63-sunxi -> /lib/modules/5.15.74-sunxi drwxr-xr-x 3 root root 4096 Nov 14 20:31 5.15.74-sunxi orangepiplus:~:# orangepiplus:~:# modprobe usbserial vendor=1a86 product=7523 modprobe: ERROR: could not insert 'usbserial': Exec format error orangepiplus:~:# All modules in /lib/modules before and after running "apt update" and "apt upgrade" are compressed and have extension ".xz". It looks like upgraded Kernel has no ability to load compressed modules. I understand that Orange Pi Plus / Plus 2 is not supported anymore but is it possible to check if Kernels newer then 5.15.63 were compiled with "CONFIG_MODULE_COMPRESS=y" and "CONFIG_MODULE_COMPRESS_XZ=y"? Thanks, Sergey Edited November 15, 2022 by ls819011 0 Quote
ls819011 Posted November 18, 2022 Author Posted November 18, 2022 (edited) It was a good idea to connect to serial interface of the Orabnge Pi board to see what is going on during boot. Here is output of last image for Orange Pi Plus / Plus 2 which successfuly boot - Armbian_22.08.1_Orangepiplus_jammy_current_5.15.63: =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2022.11.18 11:19:02 =~=~=~=~=~=~=~=~=~=~=~= U-Boot SPL 2021.10-armbian (Aug 30 2022 - 06:51:06 +0000) DRAM: 2048 MiB Trying to boot from MMC1 U-Boot 2021.10-armbian (Aug 30 2022 - 06:51:06 +0000) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi Plus / Plus 2 DRAM: 2 GiB MMC: mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1 Loading Environment from FAT... Unable to use mmc 0:1... In: serial@1c28000 Out: serial@1c28000 Err: serial@1c28000 Net: phy interface7 eth0: ethernet@1c30000 starting USB... Bus usb@1c1b000: USB EHCI 1.00 Bus usb@1c1d000: USB EHCI 1.00 scanning bus usb@1c1b000 for devices... 4 USB Device(s) found scanning bus usb@1c1d000 for devices... Device NOT ready Request Sense returned 02 3A 00 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3964 bytes read in 3 ms (1.3 MiB/s) ## Executing script at 43100000 U-boot loaded from SD Boot script loaded from mmc 153 bytes read in 3 ms (49.8 KiB/s) 12601176 bytes read in 531 ms (22.6 MiB/s) 8382896 bytes read in 355 ms (22.5 MiB/s) Found mainline kernel configuration 33404 bytes read in 15 ms (2.1 MiB/s) 4185 bytes read in 17 ms (240.2 KiB/s) Applying kernel provided DT fixup script (sun8i-h3-fixup.scr) ## Executing script at 45000000 Kernel image @ 0x42000000 [ 0x000000 - 0x7fe9b0 ] ## Loading init Ramdisk from Legacy Image at 43400000 ... Image Name: uInitrd Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 12601112 Bytes = 12 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 43000000 Booting using the fdt blob at 0x43000000 Loading Ramdisk to 493fb000, end 49fff718 ... OK Loading Device Tree to 4938a000, end 493fafff ... OK Starting kernel ... [ 13.170022] lima 1c40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19 [ 13.533010] mtd device must be supplied (device name is empty) [ 14.739493] debugfs: File 'Capture' in directory 'dapm' already present! [ 14.902024] mtd device must be supplied (device name is empty) orangepiplus login: root (automatic login) Waiting for system to finish booting ... Welcome to ARMBIAN! Documentation: https://docs.armbian.com | Community: https://forum.armbian.com Create root password: All command line interface images newer then 22.08.1 which I tried does not boot. Behavior looks similar for all of them: board does not connect HDMI and Ethernet, LED on the board lights green and blinks once per 4-5 seconds. Output to serial interface is also similar. The difference is only in image build time in couple of lines in the beginning of output loops. The following images were tested: Armbian_22.08.2_Orangepiplus_jammy_current_5.15.69.img.xz Armbian_22.08.2_Orangepiplus_bullseye_current_5.15.69.img.xz Armbian_22.08.2_Orangepiplus_sid_edge_5.19.10.img.xz Armbian_22.11.0-trunk_Orangepiplus_kinetic_edge_6.0.7.img.xz Armbian_22.11.0-trunk_Orangepiplus_sid_edge_6.0.7.img.xz Armbian_22.11.0_Orangepiplus_bullseye_current_5.15.79.img.xz Armbian_22.11.0_Orangepiplus_jammy_current_5.15.79.img.xz Here is output of last image in the list above: =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2022.11.18 11:52:33 =~=~=~=~=~=~=~=~=~=~=~= U-Boot SPL 2022.07-armbian (Nov 16 2022 - 23:27:28 +0000) DRAM: 2048 MiB Trying to boot from MMC1 U-Boot 2022.07-armbian (Nov 16 2022 - 23:27:28 +0000) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi Plus / Plus 2 DRAM: 2 GiB Core: 65 devices, 18 uclasses, devicetree: separate WDT: Not starting watchdog@1c20ca0 MMC: mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1 Loading Environment from FAT... Unable to use mmc 0:1... In: serial@1c28000 Out: serial@1c28000 Err: serial@1c28000 Net: phy interface9 eth0: ethernet@1c30000 starting USB... Bus usb@1c1b000: USB EHCI 1.00 Bus usb@1c1d000: USB EHCI 1.00 scanning bus usb@1c1b000 for devices... 4 USB Device(s) found scanning bus usb@1c1d000 for devices... Device NOT ready Request Sense returned 02 3A 00 prefetch abort pc : [<fffefffa>] lr : [<bffaa4b3>] reloc pc : [<8a067ffa>] lr : [<4a0224b3>] sp : b8a99728 ip : bbf95008 fp : bffdec47 r10: fffeffff r9 : bbf67ec0 r8 : b8a99780 r7 : 00000000 r6 : 00000001 r5 : e59ff014 r4 : 00000000 r3 : b8a99780 r2 : 00000001 r1 : 00000000 r0 : e59ff014 Flags: nzcv IRQs off FIQs off Mode SVC_32 (T) Code: 0000 0000 0000 0000 (0000) 0000 Resetting CPU ... resetting ... Attached is archive of boot logs of images mentioned above. Images later 22.08.1 which does not boot have the same but different to 22.08.1 version of U-Boot. So, the question now is: is there everything Ok with U-Boot in Orange Pi Plus / Plus 2 images later then 22.08.1? 20221118-orangepiplus-boot-logs.zip Edited November 18, 2022 by ls819011 0 Quote
ls819011 Posted December 5, 2022 Author Posted December 5, 2022 I was able to boot my Orange Pi Plus 2 using Armbian 22.11.1 Jammy but only after replacing boot loader with boot loader from working image 22.08.1. Here is a procedure of replacing boot loader: 1) Get root privilegies, make directory for doing a job and change working directory: sudo -i mkdir <whatever_you_want> cd <whatever_you_want> 2) Download recent working image, unpack it, save boot loader and remove image: wget https://archive.armbian.com/orangepiplus/archive/Armbian_22.08.1_Orangepiplus_jammy_current_5.15.63.img.xz unxz -d Armbian_22.08.1_Orangepiplus_jammy_current_5.15.63.img.xz dd if=Armbian_22.08.1_Orangepiplus_jammy_current_5.15.63.img of=armbian_bootloader.bin bs=512 count=8192 rm Armbian_22.08.1_Orangepiplus_jammy_current_5.15.63.img 3) Download recent non-working image, unpack it, associate image with loop device: wget https://dl.armbian.com/orangepiplus/archive/Armbian_22.11.1_Orangepiplus_jammy_current_5.15.80.img.xz unxz -d Armbian_22.11.1_Orangepiplus_jammy_current_5.15.80.img.xz losetup -P -f Armbian_22.11.1_Orangepiplus_jammy_current_5.15.80.img 4) You can run losetup command without parameters to see loop device which image is associated with. 5) Backup image partition table, replace boot loader, restore partition table, remove loop device, compress image (replace "loop#" with actual device name): sfdisk --dump /dev/loop# >partition_table_backup.txt dd if=armbian_bootloader.bin of=/dev/loop# bs=512 count=8192 sfdisk /dev/loop# <partition_table_backup.txt losetup -d /dev/loop# unxz -z Armbian_22.11.1_Orangepiplus_jammy_current_5.15.80.img 1 Quote
Igor Posted December 9, 2022 Posted December 9, 2022 On 12/5/2022 at 4:44 PM, ls819011 said: I was able to boot my Orange Pi Plus 2 using Armbian 22.11.1 Jammy but only after replacing boot loader with boot loader from working image 22.08.1. Solution is to set to previous boot loader in a board config, similar to those. 0 Quote
Choryu Park Posted February 3, 2023 Posted February 3, 2023 I have Orange Pi Plus 2, I tested with Orange Pi Plus 2E image, And sort of functions works. Wifi and WAN works, HDMI works... but USB did not work properly. It's critical problem... I think can be port a '2E patch' for Plus 2, but I'm not professional about Armbian and Linux... 0 Quote
Choryu Park Posted February 3, 2023 Posted February 3, 2023 (edited) Anyway, You need to apt-hold bootloader package for blocking automatic bootloader upgrade. If you can boot Orange Pi Plus / 2 successfully, type this on you shell; sudo apt-mark hold linux-u-boot-orangepiplus-current TIP) You can upgrade to latest armbian from 22.08.1 image directly. Install 22.08.1 Image, type `sudo apt-mark hold linux-u-boot-orangepiplus-current`, and type `sudo apt update && sudo apt upgrade -y`. Edited February 3, 2023 by Choryu Park 0 Quote
yo8aiv Posted June 5, 2023 Posted June 5, 2023 Hello, has anyone an image that works ? .. can anyone provide a link.? interested only on uart's usbs and sd-card. I actually managed using tutorial provided above by ls819011 to make a bootable image .. usig latest Armbian 23.8 Bookworm Kernel 6.2.y, and Armbian_23.5.1_Orangepiplus2e_bookworm_current_6.1.30_minimal.img to extract boot loader .. but functionality is affected ..usb aren't detected and also uart's arent working. Thanks. in advance, Regards. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.