Malbonulo Posted November 30 Posted November 30 (edited) I've been running Armbian on an Odroid HC1 board for some time now. We've just had a kernel upgrade and it now boots as an XU4 according to the motd. This used to be changeable with armbian-config (I did this regularly on kernel updates). But, with the new armbian-config I can't find a way to do this any more. *edit A bit more info Running SY017 in armbian-config gives an empty list, and I get this error: ls: cannot access '/boot/dtb/overlay/*.dtbo': No such file or directory In fact /boot/dtb/overlay/ does not exist Edited November 30 by Malbonulo More info 0 Quote
Igor Posted November 30 Posted November 30 1 hour ago, Malbonulo said: But, with the new armbian-config I can't find a way to do this any more. Its not a problem of armbian-config but we messed up while packing device tree overlay. We have to fix this and sent out service update. But that will take few weeks. In the mean time copy dtbo files into subfolder: root@odroidxu4:~# mkdir -p /boot/dtb/overlay root@odroidxu4:~# mv /boot/dtb/*.dtbo /boot/dtb/overlay/ Then it will work. 0 Quote
Malbonulo Posted November 30 Author Posted November 30 Thanks. I followed your instructions, and selected every overlay in the list, then rebooted. The motd is still saying it's an XU4 board. /_\ _ _ _ __ | |__(_)__ _ _ _ / _ \| '_| ' \| '_ \ / _` | ' \ /_/ \_\_| |_|_|_|_.__/_\__,_|_||_| v24.11.1 for Odroid XU4 running Armbian Linux 6.6.60-current-odroidxu4 I also have /boot/armbianEnv.txt: line 2: hktft35: command not found when saving these options in armbian-config. # cat /boot/armbianEnv.txt board_name=hc1 fdt_overlays=ads7846 hktft32 hktft35 hktft-cs-ogst i2c0 i2c1 onewire spi0 sx865x-i2c1 uart0 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u # ls /boot/dtb/overlay/ ads7846.dtbo hktft35.dtbo i2c0.dtbo onewire.dtbo sx865x-i2c1.dtbo hktft32.dtbo hktft-cs-ogst.dtbo i2c1.dtbo spi0.dtbo uart0.dtbo 0 Quote
Igor Posted November 30 Posted November 30 4 hours ago, Malbonulo said: The motd is still saying it's an XU4 board. Aha, you mean you miss this: This adds: board_name=hc1 to /boot/armbianEnv.txt and then correct DT is loaded. But also if not, it won't be big difference. You are safe to use defaults. Overlays for this kernel: As I can see, we don't have support for overlay handling at all. Not in old, not in this one. You need to edit /boot/boot.ini and add / replace it in this line: setenv overlays "i2c0 i2c1 hktft-cs-ogst" Also there is a problem here: ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo In current circumstances, you need to have ext4load mmc 0:1 0x60000000 /boot/dtb/${overlay}.dtbo Edit: since this is the only board that is using boot.ini, we won't be adjusting armbian-config, but I have updated instructions on the download page: https://www.armbian.com/odroid-xu4/ prevent confusion and disable menu as its not supported by the tool https://github.com/armbian/configng/pull/285 0 Quote
Malbonulo Posted November 30 Author Posted November 30 Thank-you. > Aha, you mean you miss this: Yes! Why was it removed? > You need to edit /boot/boot.ini and add / replace it in this line: > setenv overlays "i2c0 i2c1 hktft-cs-ogst That line was already in the file > Also there is a problem here: > ext4load mmc 0:1 0x60000000 /boot/dtb/overlays/${overlay}.dtbo Ok, but to change the filepath to /boot/dtb/${overlay}.dtbo, I would need to put the .dtbo files back into /boot/dtb/, right? 0 Quote
Igor Posted November 30 Posted November 30 26 minutes ago, Malbonulo said: Yes! Why was it removed? It was not removed. We developed this tool from scratch and this feature was not added. It's an old board, it doesn't justify adding. We have so small resources and this won't ever passed the triage. Even its just one hour of work. I wrote instructions what to do and if you are close with BASH coding and you want to have this, you are welcome to add this https://docs.armbian.com/User-Guide_Armbian-Software/#adding-example The very moment the code is merged, tool gets this feature inside. 26 minutes ago, Malbonulo said: That line was already in the file Yes, this is the list of overlays that are loaded by default. You change that if you want something else. 26 minutes ago, Malbonulo said: Ok, but to change the filepath to /boot/dtb/${overlay}.dtbo, I would need to put the .dtbo files back into /boot/dtb/, right? Yes. I noticed this folder was changed recently, but I don't know at this point if this is something we broke or Hardkernel. The case is that you need to point to where .dtbo files are. They are in /boot/dtb or in /boot/dtb/overlay and at some other boards, they might be under /boot/dtb/SOCVENDOR/overlay ... 0 Quote
Malbonulo Posted November 30 Author Posted November 30 (edited) Quote if you are close with BASH coding and you want to have this, you are welcome to add It's been a while since I coded in bash but I'll take a look. I see the necessary line in the motd is taken from /etc/armbian-image-release and then these values are over-written from /etc/armbian-release The variable in question is BOARD_NAME. I guess it would be a simple matter to rewrite BOARD_NAME=..., I just wouldn't know if this had a knock-on effect down the line somewhere. Having said all this, this is all just cosmetic, the important change will be to /boot/armbianEnv.txt where the line board_name= needs to change, this is what sets the correct dtb in boot.ini. But it strikes me that even if I send a pull request, that will take someone's time, and if you can't support an hour, maybe the pull request is not worth it? Edited November 30 by Malbonulo Forget to add pull request 0 Quote
Igor Posted November 30 Posted November 30 1 hour ago, Malbonulo said: simple matter to rewrite BOARD_NAME= No, that is not simple because in the build framework we only know board odroidxu4. We don't keep all their sub-variants under their different config. We have maintenance nightmare without that 1 hour ago, Malbonulo said: But it strikes me that even if I send a pull request, that will take someone's time, and if you can't support an hour, maybe the pull request is not worth it? Many pull requests, ideas and tips that are said on this forum or sent to the code are never integrated as they don't reach completion. This is how this line of work is. Don't worry about. Take this as a fun project and try anyway. If not today, next week, next month. 0 Quote
belegdol Posted December 1 Posted December 1 I do not have either of the lines in my boot.ini: ODROIDXU-UBOOT-CONFIG # DO NOT EDIT THIS FILE # # Please edit /boot/armbianEnv.txt to set supported parameters # # U-Boot defaults setenv initrd_high "0xffffffff" setenv fdt_high "0xffffffff" # default settings, will be overwritten from armbianEnv.txt setenv macaddr "00:1e:06:61:7a:55" setenv rootdev "UUID=d0da7bbe-e3af-4588-8715-aa5c4478eb88" setenv rootfstype "btrfs" setenv console "both" setenv verbosity "1" # To update boot loader on your eMMC use the nand-sata-install tool # run copy_uboot_sd2emmc if ext4load mmc 0:1 0x44000000 /boot/armbianEnv.txt || fatload mmc 0:1 0x44000000 armbianEnv.txt || ext4load mmc 0:1 0x44000000 armbianEnv.txt; then env import -t 0x44000000 ${filesize}; fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttySAC2,115200n8"; fi setenv bootrootfs "${consoleargs} consoleblank=0 loglevel=${verbosity} panic=10 root=${rootdev} rootfstype=${rootfstype} rootwait rw" # --- Screen Configuration for HDMI --- # # --------------------------------------- # Uncomment only ONE line! Leave all commented for automatic selection. # Uncomment only the setenv line! # --------------------------------------- # ODROID-VU forced resolution # setenv videoconfig "video=HDMI-A-1:1280x800@60" # ----------------------------------------------- # ODROID-VU forced EDID # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x800.bin" # ----------------------------------------------- # 1920x1200 60hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1200_60hz.bin" # ----------------------------------------------- # 1920x1200 30hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1200_30hz.bin" # ----------------------------------------------- # 1920x1080 (1080P) with monitor provided EDID information. (1080p-edid) # setenv videoconfig "video=HDMI-A-1:1920x1080@60" # ----------------------------------------------- # 1920x1080 (1080P) without monitor data using generic information (1080p-noedid) # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080.bin" # ----------------------------------------------- # 1920x1080 50hz (1080P) with monitor provided EDID information. (1080p 50hz-edid) # setenv videoconfig "video=HDMI-A-1:1920x1080@50" # ----------------------------------------------- # 1920x1080 50hz (1080P) without monitor data using generic information (1080p 50hz-noedid) # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x1080_50hz.bin" # ----------------------------------------------- # 1920x800 60hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1920x800.bin" # ----------------------------------------------- # 1792x1344 60hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1792x1344.bin" # ----------------------------------------------- # 1680x1050 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1680x1050.bin" # ----------------------------------------------- # 1600x1200 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1600x1200.bin" # ----------------------------------------------- # 1600x900 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1600x900.bin" # ----------------------------------------------- # 1400x1050 60hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1400x1050.bin" # ----------------------------------------------- # 1440x900 with monitor provided EDID information. # setenv videoconfig "video=HDMI-A-1:1440x900@60" # ----------------------------------------------- # 1440x900 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1440x900.bin" # ----------------------------------------------- # 1366x768 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1366x768.bin" # ----------------------------------------------- # 1360x768 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1360x768.bin" # ----------------------------------------------- # 1280x1024 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x1024.bin" # ----------------------------------------------- # 1280x768 60hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x768.bin" # ----------------------------------------------- # 1280x720 (720P) with monitor provided EDID information. (720p-edid) # setenv videoconfig "video=HDMI-A-1:1280x720@60" # ----------------------------------------------- # 1280x720 (720P) without monitor data using generic information (720p-noedid) # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1280x720.bin" # ----------------------------------------------- # 1152x864 75hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1152x864_75hz.bin" # ----------------------------------------------- # 1024x768 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x768.bin" # ----------------------------------------------- # 1024x600 without monitor data using generic information (ODROID VU7+) # setenv videoconfig "drm_kms_helper.edid_firmware=edid/1024x600.bin" # ----------------------------------------------- # 800x600 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x600.bin" # ----------------------------------------------- # 848x480 60hz without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/848x480.bin" # ----------------------------------------------- # 800x480 without monitor data using generic information (ODROID 7") # setenv videoconfig "drm_kms_helper.edid_firmware=edid/800x480.bin" # ----------------------------------------------- # 720x576 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x576.bin" # ----------------------------------------------- # 720x480 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/720x480.bin" # ----------------------------------------------- # 640x480 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/640x480.bin" # ----------------------------------------------- # 480x800 without monitor data using generic information # setenv videoconfig "drm_kms_helper.edid_firmware=edid/480x800.bin" # --- HDMI / DVI Mode Selection --- # ------------------------------------------ # - HDMI Mode setenv vout "hdmi" # - DVI Mode (disables sound over HDMI as per DVI compat) # setenv vout "dvi" # --- HDMI CEC Configuration --- # ------------------------------------------ setenv cecenable "false" # false or true # set to true to enable HDMI CEC # CPU Governor Selection # Available governos: conservative, userspace, powersave, ondemand, performance, schedutil setenv governor "performance" # DRAM Frequency # Sets the LPDDR3 memory frequency # Supported values: 933 825 728 633 (MHZ) setenv ddr_freq 825 #------------------------------------------------------------------------------ # # HDMI Hot Plug detection # #------------------------------------------------------------------------------ # # Forces the HDMI subsystem to ignore the check if the cable is connected or # not. # false : disable the detection and force it as connected. # true : let cable, board and monitor decide the connection status. # # default: true # #------------------------------------------------------------------------------ setenv HPD "true" #------------------------------------------------------------------------------ # # TMDS data amplitude control. # #------------------------------------------------------------------------------ # # 1LSB corresponds to 20 mVdiff amplitude level. # tx_amp_lvl : 0 = 760 mVdiff(Min), 31 = 1380 mVdiff(Max) # # Hardkernel default hdmi_tx_amp_lvl = 31(1380 mVdiff); #------------------------------------------------------------------------------ setenv hdmi_tx_amp_lvl "31" #------------------------------------------------------------------------------ # # TMDS data amplitude fine control for each channel. # #------------------------------------------------------------------------------ # # 1LSB corresponds to 20 mVdiff amplitude level. # tx_lvl : 0 = 0 mVdiff(Min), 3 = 60 mVdiff(Max) # # Hardkernel default # hdmi_tx_lvl_ch0 = 3, hdmi_tx_lvl_ch1 = 3, hdmi_tx_lvl_ch2 = 3, #------------------------------------------------------------------------------ setenv hdmi_tx_lvl_ch0 "3" setenv hdmi_tx_lvl_ch1 "3" setenv hdmi_tx_lvl_ch2 "3" #------------------------------------------------------------------------------ # # TMDS data pre-emphasis level control. # #------------------------------------------------------------------------------ # # 1LSB corresponds to -0.45dB emphasis level except for 1 # tx_emp_lvl : 0 = 0 db(Min), 1 = -0.25 db, 2 = 0.7 db, 15 = -7.45 db(Max) # # Hardkernel default hdmi_tx_emp_lvl = 6 (-2.50 db); #------------------------------------------------------------------------------ setenv hdmi_tx_emp_lvl "6" #------------------------------------------------------------------------------ # # TMDS clock amplitude control. # #------------------------------------------------------------------------------ # # 1LSB corresponds to 20 mVdiff amplitude level. # clk_amp_lvl : 0 = 790 mVdiff(Min), 31 = 1410 mVdiff(Max) # # Hardkernel default hdmi_clk_amp_lvl = 31 (1410 mVdiff) #------------------------------------------------------------------------------ setenv hdmi_clk_amp_lvl "31" #------------------------------------------------------------------------------ # # TMDS data source termination resistor control. # #------------------------------------------------------------------------------ # # tx_res : # 0 = Source Termination OFF(Min), 1 = 200 ohm, 2 = 300 ohm, 3 = 120 ohm(Max) # # Hardkernrel default hdmi_tx_res = 0 (Source Termination OFF) #------------------------------------------------------------------------------ setenv hdmi_tx_res "0" #------------------------------------------------------------------------------ setenv hdmi_phy_control "hdmi_tx_amp_lvl=${hdmi_tx_amp_lvl} hdmi_tx_lvl_ch0=${hdmi_tx_lvl_ch0} hdmi_tx_lvl_ch1=${hdmi_tx_lvl_ch1} hdmi_tx_lvl_ch2=${hdmi_tx_lvl_ch2} hdmi_tx_emp_lvl=${hdmi_tx_emp_lvl} hdmi_clk_amp_lvl=${hdmi_clk_amp_lvl} hdmi_tx_res=${hdmi_tx_res} HPD=${HPD} vout=${vout}" # Load kernel, initrd and dtb in that sequence ext4load mmc 0:1 0x40008000 /boot/zImage || fatload mmc 0:1 0x40008000 zImage || ext4load mmc 0:1 0x40008000 zImage ext4load mmc 0:1 0x42000000 /boot/uInitrd || fatload mmc 0:1 0x42000000 uInitrd || ext4load mmc 0:1 0x42000000 uInitrd # this is for mainline only if test "${board_name}" = "xu4"; then setenv fdtfile "exynos5422-odroidxu4.dtb"; fi if test "${board_name}" = "xu3"; then setenv fdtfile "exynos5422-odroidxu3.dtb"; fi if test "${board_name}" = "xu3l"; then setenv fdtfile "exynos5422-odroidxu3-lite.dtb"; fi if test "${board_name}" = "hc1"; then setenv fdtfile "exynos5422-odroidhc1.dtb"; fi # legacy shares a single DT for all boards if ext4load mmc 0:1 0x00000000 "/boot/.next" || fatload mmc 0:1 0x00000000 ".next" || ext4load mmc 0:1 0x00000000 ".next"; then echo "Found mainline kernel configuration"; else setenv fdtfile "exynos5422-odroidxu3.dtb"; fi ext4load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || fatload mmc 0:1 0x44000000 dtb/${fdtfile} || ext4load mmc 0:1 0x44000000 dtb/${fdtfile} # set FDT address fdt addr 0x44000000 if test "${cecenable}" = "false"; then fdt rm /cec@101B0000; fi # final boot args setenv bootargs "${bootrootfs} ${videoconfig} smsc95xx.macaddr=${macaddr} governor=${governor} ${hdmi_phy_control} usb-storage.quirks=${usbstoragequirks} ${extraargs}" # set DDR frequency dmc ${ddr_freq} bootz 0x40008000 0x42000000 0x44000000 0 Quote
Malbonulo Posted December 1 Author Posted December 1 (edited) Quote I do not have either of the lines in my boot.ini: Although they're in my file (I have used armbian for a long time so it might be legacy code) they do not run because they are in a test that returns false. I think you have the important part which is # this is for mainline only if test "${board_name}" = "xu4"; then setenv fdtfile "exynos5422-odroidxu4.dtb"; fi if test "${board_name}" = "xu3"; then setenv fdtfile "exynos5422-odroidxu3.dtb"; fi if test "${board_name}" = "xu3l"; then setenv fdtfile "exynos5422-odroidxu3-lite.dtb"; fi if test "${board_name}" = "hc1"; then setenv fdtfile "exynos5422-odroidhc1.dtb"; fi # legacy shares a single DT for all boards if ext4load mmc 0:1 0x00000000 "/boot/.next" || fatload mmc 0:1 0x00000000 ".next" || ext4load mmc 0:1 0x00000000 ".next"; then echo "Found mainline kernel configuration"; else setenv fdtfile "exynos5422-odroidxu3.dtb"; fi ext4load mmc 0:1 0x44000000 /boot/dtb/${fdtfile} || fatload mmc 0:1 0x44000000 dtb/${fdtfile} || ext4load mmc 0:1 0x44000000 dtb/${fdtfile} Although I'm no expert. Edited December 1 by Malbonulo remove cruft 0 Quote
Malbonulo Posted December 2 Author Posted December 2 I just created a pull request for this. Apologies if I got the request wrong, it's been a long time since I created a PR on anything. 1 Quote
Igor Posted December 3 Posted December 3 18 hours ago, Malbonulo said: Apologies if I got the request wrong, it's been a long time since I created a PR on anything. Thank you! I did a quick look. In theory it should be operational, but we would like a clean code and common coding style ... to ease future maintenance. I hope you are O.K. that I give you instructions what to change? For me this represent more work than I just take it from you and change, but it is better if code author do those changes and you adjust PR to what is expected. 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.