ctag Posted December 1, 2023 Posted December 1, 2023 (edited) Hi, I'm trying to compile Armbian with TOC0 support for my opi-zero2, but am having difficulty getting the configuration setting to take effect. Opening the compiled disk image in a hex editor shows me what I believe is evidence the current u-boot does not have the toc0 flag set: I started by creating a patch file in userpatches: userpatches/u-boot/v2023.10/board_orangepizero2/orangepizero2_toc0.patch diff --git a/configs/orangepi_zero2_defconfig b/configs/orangepi_zero2_defconfig index f13735e91c..31f3c475e4 100644 --- a/configs/orangepi_zero2_defconfig +++ b/configs/orangepi_zero2_defconfig @@ -23,3 +23,4 @@ CONFIG_SPI=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_MUSB_GADGET=y +CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y But this did not appear to have an effect on the built image. Next I tried copying the red power LED patch over to userpatches and modifying it: $ cp patch/u-boot/u-boot-sunxi/board_orangepizero2/orangepizero2_light_red_led_on.patch userpatches/u-boot/u-boot-sunxi/board_orangepizero2/orangepizero2_light_red_led_on.patch $ cat userpatches/u-boot/u-boot-sunxi/board_orangepizero2/orangepizero2_light_red_led_on.patch ... diff --git a/configs/orangepi_zero2_defconfig b/configs/orangepi_zero2_defconfig index f13735e91c7..c88cd095205 100644 --- a/configs/orangepi_zero2_defconfig +++ b/configs/orangepi_zero2_defconfig @@ -23,3 +23,4 @@ CONFIG_SPI=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_MUSB_GADGET=y +CONFIG_PWRLED="PC12" +CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y -- 2.34.1 But this also hasn't had any effect. I would appreciate any pointers as to what I'm misunderstanding about the build system! Edited December 1, 2023 by ctag 0 Quote
Roman555 Posted December 1, 2023 Posted December 1, 2023 (edited) When you run compile.sh you can observe in a table "summary of kernel patches" which patches are going to apply. User patches are in the bottom of the table. Maybe you've chosen a wrong directory to put your custom patch... Also you can set userpatch folder manually. See in https://docs.armbian.com/Developer-Guide_Build-Options/ USERPATCHES_PATH option Edited December 1, 2023 by Roman555 0 Quote
Gunjan Gupta Posted December 1, 2023 Posted December 1, 2023 @ctag Unless you have tried to override the BOOTPATCHDIR environment variable, your second patch path i.e. userpatches/u-boot/u-boot-sunxi/board_orangepizero2/orangepizero2_light_red_led_on.patch is correct. If you had passed BOOTPATCHDIR=v2023.10 on the commandline, first path would have worked as well, but it would have ignored all the patches that are currently applied by Armbian as we are using BOOTPATCHDIR as u-boot-sunxi. I tried both of your patches in my checkout, and both of them failed to apply. See the output here - https://paste.armbian.com/uwapayuqiw.bash. In the shared output you would see its considering the file that I added based on your second patch and failing to apply the same. 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.