Kmani Posted February 17 Posted February 17 Hi @fdd, Is your board also V1.1? Which Armbian image worked for you? The V1.1 board includes an AXP305 power management chip. However, when booting the original Android ROM and monitoring via the UART terminal, it is detected as AXP806. Yes, it uses LPDDR3 RAM. By modifying the X96Q LPDDR3 device defconfig, replacing axp313a with axp806, I was able to successfully complete the U-Boot process. However, it gets stuck at the "Starting Kernel..." message with no HDMI output. I suspect that the kernel device tree (DTS) needs modification. Could someone guide me on how to extract the DTS from a working Android box? Thanks! 0 Quote
Nick A Posted February 17 Posted February 17 (edited) This already has AXP806. You just need to modify the deconfig with the settings that worked for you. u-boot: https://github.com/warpme/minimyth2/blob/master/script/bootloaders/u-boot-h616/files/151-add-x96-q-ddr3-defconfig.patch kernel: https://github.com/warpme/minimyth2/blob/master/script/kernel/linux-6.12/files/0647-arm64-dts-allwinner-h313-add-x96q-TVbox.patch Also, edit /boot/armbianEnv.txt and set verbosity to 7 to get full boot logs. Your directory layout might be different. You can browse the folders. Find the correct path. sudo adb shell su cd /dev/block/ Edited February 17 by Nick A 0 Quote
Kmani Posted February 18 Posted February 18 Thanks @Nick A I have already extracted the DTB file from Android and converted it to DTS, which I have attached as "X96q_v1.1.dts". Since the box uses LPDDR3 Micron memory, I applied the attached 'u-boot-sunxi64-1.patch' to start the U-Boot process. Without this patch, I encountered an "unsupported DRAM type" error. For the kernel patch, I have tested multiple configurations. Currently, I am using the 'kernel-sunxi64-edge.patch' (attached). I placed the patch files under the userpatches directory as follows: userpatches/kernel/archive/sunxi-6.12/kernel-sunxi64-edge.patch userpatches/u-boot/u-boot-sunxi/u-boot-sunxi64-1.patch Then, I built the image using the following command: ./compile.sh build BOARD=x96q BRANCH=edge BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=bookworm KERNEL_GIT=shallow After burning the generated image to an SD card using dd, I attempted to boot. However, there is no HDMI output at any time of the boot & no network. attached 'Boot-message.txt', Could you please guide me on what additional modifications are needed in the kernel DTS file to get HDMI working? Thanks for your support! Boot-message.txt kernel-sunxi64-edge.patch u-boot-sunxi64-1.patch x96q_v1.1.dts 0 Quote
Nick A Posted February 18 Posted February 18 (edited) Kernel 6.12 does not have hdmi patches. You have to go back to 6.6 or 6.7. I would use the dts I posted above. This dts has the proper settings for your pmic axp305/806. Changing axp313a to axp806 without changing the rest of the settings can be dangerous. There are no dram settings in the dts. Everything ram related is done in the uboot defconfig. So use this defconfig from the patches posted above and add your lpddr3 settings. Change everything with CONFIG_SUNXI_DRAM_* the rest can stay the same. (remove the plus infront of each CONFIG. This was taken from a patch) +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_DEFAULT_DEVICE_TREE="allwinner/sun50i-h313-x96q-ddr3" +CONFIG_SPL=y +CONFIG_SUNXI_DRAM_H616_DDR3_1333=y +CONFIG_DRAM_CLK=600 +CONFIG_DRAM_ODT_EN=y +CONFIG_DRAM_SUN50I_H616_UNKNOWN_FEATURE=y +CONFIG_DRAM_SUN50I_H616_BIT_DELAY_COMPENSATION=y +CONFIG_DRAM_SUN50I_H616_READ_CALIBRATION=y +CONFIG_DRAM_SUN50I_H616_DX_ODT=0x03030303 +CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e +CONFIG_DRAM_SUN50I_H616_CA_DRI=0x00001c16 +CONFIG_DRAM_SUN50I_H616_ODT_EN=0x1 +CONFIG_DRAM_SUN50I_H616_TPR0=0xc0000007 +CONFIG_DRAM_SUN50I_H616_TPR2=0x00000100 +CONFIG_DRAM_SUN50I_H616_TPR10=0x002f6606 +CONFIG_DRAM_SUN50I_H616_TPR11=0xffffdddd +CONFIG_DRAM_SUN50I_H616_TPR12=0xfedf7657 +CONFIG_MACH_SUN50I_H616=y +CONFIG_R_I2C_ENABLE=y +CONFIG_SPL_I2C=y +CONFIG_SPL_I2C_SUPPORT=y +CONFIG_SPL_SYS_I2C_LEGACY=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_SYS_I2C_SLAVE=0x7f +CONFIG_SYS_I2C_SPEED=100000 +CONFIG_PHY_REALTEK=y +CONFIG_SUN8I_EMAC=y +CONFIG_I2C3_ENABLE=y +CONFIG_SUNXI_RVBAR_ALTERNATIVE=0x81000040 +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_MUSB_GADGET=y +CONFIG_SUPPORT_EMMC_BOOT=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x40 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 Edited February 18 by Nick A 0 Quote
Kmani Posted February 23 Posted February 23 Hi @Nick A, thanks for the help. Now with the following defconfig file (DRAM adjusted for lpddr3) and X96-mate board configuration (which has axp305 in the dts file), I could able to boot the tvbox except Ethernet. HDMI works. CONFIG_ARM=y CONFIG_ARCH_SUNXI=y CONFIG_DEFAULT_DEVICE_TREE="sun50i-h616-x96-mate" CONFIG_SPL=y CONFIG_SUNXI_DRAM_H616_LPDDR3=y CONFIG_DRAM_CLK=600 CONFIG_DRAM_SUN50I_H616_DX_ODT=0x06060606 CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0d0d0d0d CONFIG_DRAM_SUN50I_H616_CA_DRI=0x00000d0d CONFIG_DRAM_SUN50I_H616_ODT_EN=0x00000001 CONFIG_DRAM_SUN50I_H616_TPR0=0x0 CONFIG_DRAM_SUN50I_H616_TPR2=0x00000000 CONFIG_DRAM_SUN50I_H616_TPR10=0x002f3359 CONFIG_DRAM_SUN50I_H616_TPR11=0xaa889967 CONFIG_DRAM_SUN50I_H616_TPR12=0xeeee8979 CONFIG_MACH_SUN50I_H616=y CONFIG_R_I2C_ENABLE=y CONFIG_SPL_I2C=y CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_MVTWSI=y CONFIG_SYS_I2C_SLAVE=0x7f CONFIG_SYS_I2C_SPEED=100000 CONFIG_SYS_MONITOR_LEN=786432 CONFIG_PHY_REALTEK=y CONFIG_SUN8I_EMAC=y CONFIG_I2C3_ENABLE=y CONFIG_AXP305_POWER=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_MUSB_GADGET=y Boot log attached. From the boot log I could see that eth0 device is renamed to end0 [ 6.596467] gmac-power0: NULL [ 6.644611] gmac-power1: NULL [ 6.692072] gmac-power2: NULL [ 7.578960] sunxi-gmac 5030000.ethernet end0: renamed from eth0 How to get the ethernet to work? Thanks for your time! URAT-Boot-message-5.txt 0 Quote
Xortes Posted February 26 Posted February 26 @Kmani I just read your messages now. I stopped trying images since my last post. I'm happy you were able to make it work some way. My intentions to use this box would only work with Ethernet: I was thinking in using it for Pi-hole, and I think without ethernet it would just make my internet really slow. 0 Quote
Kmani Posted February 26 Posted February 26 Hi @Xortes, Yes, I managed to build an Armbian image using the LPDDR3 defconfig mentioned earlier, along with the U-Boot and kernel patches suggested by @Nick A, based on the minimyth2 patch. Unfortunately, HDMI is still not working, even with the current 6.6.72 kernel. However, since I plan to use this TV box for running AdGuard Home, HDMI output isn’t essential for my use case. On a positive note, I’ve successfully got both wired and wireless networks working. I’m currently using the box as an AdGuard Home server and a Tailscale subnet router. If you’re interested, I’d be happy to share the image. 0 Quote
fdd Posted February 27 Posted February 27 (edited) @Kmani no armbian image worked for me, it only worked MiniArch lpddr3 posted in this thread. I tried armbian image from https://github.com/sicXnull/armbian-build/tree/X96Q-TVBOX-LPDDR3 with no luck, nothing happened, box started with internal nand ignoring the armbian flashed in microsd, I dont know if I did something wrong, but MiniArch lpddr3 image worked, without ethernet but with hdmi working, I plugged a USB ethernet and it worked fine. I didnt touch a byte of internal nand, if you want some file from factory firmware tell me and I'll try to extract it. I opened the box and the board version seems to be 1.3. The box was bought in a bundle deal of aliexpress (buying three things together). Btw I recommend a DC 5.5*2.1 to USB cable adaptor, these boxes work perfectly powered by a USB cable (usb power banks and so on). Edited February 27 by fdd 0 Quote
Kmani Posted February 27 Posted February 27 Hi @fdd, Your board is V1.3, which is different from mine. For the V1.3 board, there are already Armbian images available on this forum. You can check this post for more details: Hope it works for you! 0 Quote
Cesar93600 Posted February 28 Posted February 28 Hello everyone, I have an ATV Q1 V3.0 box running Android TV 10. Some people have put img with secure boot, but all the links are expired. Can someone provide a link for an img with secure boot please ? Thanks. 0 Quote
Nick A Posted March 1 Posted March 1 (edited) Here’s the patch you need to compile a secure boot image Edited March 1 by Nick A 0 Quote
Cesar93600 Posted March 2 Posted March 2 Hello @Nick A thanks, i compiled with the patch. But I have to apply the modification "https://github.com/armbian/build/issues/7048" #chroot_sdcard debsums --silent Otherwise I get the errors: [💥] Error context msg [ Check MD5 sum of installed packages failed ] [💥] Cleaning up [ please wait for cleanups to finish ] The SD card does not boot, the blue LED does not light up, after 7-8 seconds i have a consumption of 0.021A less than 1 second and 0. Without the SD card BOOT well on Android TV. I tried 2 different SD cards, with BelenaEtcher and Rufus. Can @rafman or @eibrog share their img please. 0 Quote
Nick A Posted March 2 Posted March 2 (edited) You should install a USB to TTL Serial adaptor to your UART. Your UART is clearly marked RX TX and GND on your board. I use gtkterm. "sudo gtkterm -p /dev/ttyUSB0 -s 115200". You'll see u-boot and kernel boot messages. This way you're not in the dark guessing why these images don't boot. After you post your boot logs I can help you figure out why it doesn't boot. Edited March 2 by Nick A 0 Quote
Cesar93600 Posted March 2 Posted March 2 (edited) @Nick A U-Boot SPL 2024.01-armbian-2024.01-S866c-P7ea0-Ha9af-V6d37-Bda0a-R448a (Mar 02 2025 - 00:01:40 +0100) DRAM base address is defined as 0x40000000 DRAM has 15 b/raw, 10 b/col, 4 B/width, 2 #rank and 8 #bank DRAM top address must be less than 0x80000000 DRAM top address must be less than 0x60000000 DRAM: 1536 MiB Trying to boot from MMC1 NOTICE: BL31: v2.10.2(debug):armbian NOTICE: BL31: Built : 23:44:48, Mar 1 2025 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a0ae700, model: hechuang,x96-q LPDDR3 v1.3 INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP305 on RSB ERROR: RSB: set run-time address: 0x10003 INFO: Could not init RSB: -65539 INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied INFO: PSCI: Suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9 INFO: Changed devicetree. ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2024.01-armbian-2024.01-S866c-P7ea0-Ha9af-V6d37-Bda0a-R448a (Mar 02 2025 - 00:01:40 +0100) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: hechuang,x96-q LPDDR3 v1.3 DRAM: 2 GiB (effective 0 Bytes) Edited March 2 by Cesar93600 0 Quote
Cesar93600 Posted March 2 Posted March 2 @Nick A When boot Android without SD [286]HELLO! SBOOT is starting! [289]sboot commit : 749c1f9a [292]set pll start [295]periph0 has been enabled [298]set pll end [300]unknow PMU [301]unknow PMU [304]tPMU: 0x9c [305]PMU: AXP1530 [307]dram return write ok [310]board init ok [312]try to probe rtc region [314]DRAM BOOT DRIVE INFO: V0.651 [318]the chip id is 0x5c00 [320]chip id check OK [324]DRAM_VCC set to 1200 mv [327]DRAM CLK =648 MHZ [329]DRAM Type =7 (3:DDR3,4:DDR4,7:LPDDR3,8:LPDDR4) [337]Actual DRAM SIZE =1536 M [340]DRAM SIZE =1536 MBytes, para1 = 30fa, para2 = 6001000, dram_tpr13 = 26061 [349]DRAM simple test OK. [351]rtc standby flag is 0x0, super standby flag is 0x0 [357][mmc]: mmc driver ver 2021-10-12 [361][mmc]: b mmc 2 bias 4 [369][mmc]: Wrong media type 0x0, but host sdc2, try mmc first [375][mmc]: ***Try MMC card 2*** [400][mmc]: RMCA OK! [402][mmc]: wrong freq 2 at spd md 2 [406][mmc]: MMC 5.0 [408][mmc]: HSSDR52/SDR25 8 bit [411][mmc]: 50000000 Hz [414][mmc]: 7456 MB [416][mmc]: ***SD/MMC 2 init OK!!!*** [506]read toc1 from emmc 32800 sector [510]OLD version: 0.0 [512]NEW version: 0.0 [588]load rotpk hash [651]load monitor-key hash [654]load monitor hash [859]load boot-key hash [862]load boot hash [928]load vbmeta-key hash [930]load vbmeta hash [998]load recovery-key hash [1001]load recovery hash [1004]monitor entry=0x48000000 [1007]uboot entry=0x4a000000 [1010]optee entry=0x48600000 [1013]tunning data addr:0x4a0003e8 [1019]run out of boot0 NOTICE: BL3-1: v1.0(debug):05d6c57 NOTICE: BL3-1: Built : 13:35:35, 2021-10-28 NOTICE: BL3-1 commit: 8 NOTICE: cpuidle init version V1.0 NOTICE: secure os exist MESSAGE: [0x0] TEE-CORE: OP-TEE version: 81ab7a47 #1 2020年 05月 06日 星期三 02:40:04 UTC arm NOTICE: BL3-1: Preparing for EL3 exit to normal world NOTICE: BL3-1: Next image address = 0x4a000000 NOTICE: BL3-1: Next image spsr = 0x1d3 U-Boot 2018.05-g23fdfbb-dirty (Oct 08 2024 - 14:18:27 +0800) Allwinner Technology [01.115]CPU: Allwinner Family [01.118]Model: sun50iw9 I2C: ready [01.122]DRAM: 1.5 GiB [01.125]Relocation Offset is: 55ebf000 [01.167]secure enable bit: 1 [01.170]pmu_axp152_probe pmic_bus_read fail [01.174]PMU: AXP1530 [01.179]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=400Mhz [01.187]drv_disp_init [01.217]__clk_enable: clk is null. [01.223]drv_disp_init finish [01.226]gic: sec monitor mode [01.256]flash init start [01.258]workmode = 0,storage type = 2 [01.261]MMC: 2 [01.263][mmc]: mmc driver ver uboot2018:2021-07-19 14:09:00 [01.269][mmc]: get sdc_type fail and use default host:tm4. [01.280][mmc]: get sdc2 sdc_dis_host_caps 0x1c0. [01.284][mmc]: SUNXI SDMMC Controller Version:0x40502 [01.309][mmc]: Best spd md: 1-HSSDR52/SDR25, freq: 2-50000000, Bus width: 8 [01.315]sunxi flash init ok [01.319]Loading Environment from SUNXI_FLASH... OK secure storage read hdcpkey fail [01.333]secure storage read hdcpkey fail with:-1 01.340]secure storage read widevine fail with:-1 [01.345]usb burn from boot delay time 0 weak:otg_phy_config [01.358]usb prepare ok [02.162]overtime [02.166]do_burn_from_boot usb : no usb exist FAT: Misaligned buffer address (9be7b6d8) 32 bytes read in 4 ms (7.8 KiB/s) tcon_de_attach:de=0,tcon=2[02.304]boot_gui_init:finish [02.307]bmp_name=bootlogo.bmp 2764856 bytes read in 60 ms (43.9 MiB/s) [02.388][mmc]: delete mmc-hs400-1_8v from dtb [02.392][mmc]: delete mmc-hs200-1_8v from dtb [02.396][mmc]: delete mmc-ddr-1_8v from dtb [02.400][mmc]: get max-frequency ok 50000000 Hz [02.408]update dts ** Unrecognized filesystem type ** [02.418]load file(ULI/factory/rootwait init.txt) error. ** Unrecognized filesystem type ** [02.432]load file(ULI/factory/snum.txt) error. [02.436]name in map mac ** Unrecognized filesystem type ** [02.448]load file(ULI/factory/wifi_mac.txt) error. ** Unrecognized filesystem type ** [02.461]load file(ULI/factory/bt_mac.txt) error. ** Unrecognized filesystem type ** [02.475]load file(ULI/factory/selinux.txt) error. ** Unrecognized filesystem type ** [02.489]load file(ULI/factory/specialstr.txt) error. [02.501]update part info [02.523]update bootcmd [02.525]No ethernet found. Hit any key to stop autoboot: 0 [03.043]not supported key [03.045]actual n size:1000, e:10001 valid CACHE: Misaligned operation at range [44ffffe0, 462a5800] [03.221]Starting kernel ... [03.223][mmc]: mmc exit start [03.242][mmc]: mmc 2 exit ok [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.9.170 (cmj@a-X11DPi-N-T) (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05) ) #1 SMP PREEMPT Tue Oct 8 14:19:52 CST 2024 [ 0.000000] Boot CPU: AArch64 Processor [410fd034] [ 0.000000] bootconsole [earlycon0] enabled [ 0.027910] BOOTEVENT: 27.893457: ON [ 0.262939] sunxi_i2c_probe()2209 - [i2c3] warning: failed to get regulator id [ 0.264028] sunxi_i2c_probe()2209 - [i2c5] warning: failed to get regulator id [ 0.265360] axp2101-regulator axp2101-regulator.0: Setting DCDC frequency for unsupported AXP variant [ 0.265445] axp2101-regulator axp2101-regulator.0: Error setting dcdc frequency: -22 [ 0.300863] [ac200] get ave_regulator_name failed! [ 0.301454] [ac200] pwm enable [ 0.395525] failed to get standby led pin assign [ 0.395577] f�[ 0.402603] uart uart1: get regulator failed [ 0.435522] [NAND][NE] Not found valid nand node on dts [ 0.444120] sunxi-wlan soc@03000000:wlan: get gpio chip_en failed [ 0.451100] sunxi-wlan soc@03000000:wlan: get gpio power_en failed [ 0.585049] hci: request ohci1-controller gpio:232 [ 0.777501] axp2101_pek: axp2101-pek can not register without irq [ 0.788132] sunxi_ir_startup: get ir protocol failed [ 0.796693] VE: get debugfs_mpp_root is NULL, please check mpp [ 0.796693] [ 0.804950] VE: sunxi ve debug register driver failed! [ 0.804950] [ 0.822760] mmc:failed to get gpios [ 0.904232] mmc:failed to get gpios [ 0.943193] FD655: Fd655 Driver init. [ 0.947785] FD655: fd655_driver_probe [ 0.952035] FD655: fd655_driver_probe [ 0.956716] FD655: register_fd655_driver: Successed to add fd655 module [ 0.957064] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !! [ 0.970680] FD655: ====================Command opne in probe============= [ 0.979843] FD655: ====================Display boot in probe============= [ 0.987695] gpio user platform_driver_register sucess [ 0.996873] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RTO !! [ 1.007359] sunxi-mmc sdc1: smc 2 p1 err, cmd 8, RTO !! [ 1.013525] failed get gpio-spdif gpio from dts,spdif_gpio:-2 [ 1.023466] [audio-codec]dachpf_cfg configurations missing or invalid. [ 1.030901] lineout_vol:26, linein_gain:3, fmin_gain:3, digital_vol:0, adcdrc_cfg:0, adchpf_cfg:0, dacdrc_cfg:0, dachpf_cfg:0, ramp_func_used:1, pa_msleep_time:160, pa_ctl_level:0, gpio-spk:0 [ 1.055105] sndhdmi sndhdmi: ASoC: CPU DAI (null) not registered [ 1.061916] sndhdmi sndhdmi: snd_soc_register_card() failed: -517 [ 1.075611] sunxi-ahub-cpudai 5097000.cpudai3-controller: ahub cpudai id invalid [ 1.110982] ERROR: pinctrl_get for HDMI2.0 DDC fail [ 1.122002] tv_probe()1435 - of_property_read_string tv_power failed! [ 1.204673] cpu cpu1: opp_list_debug_create_link: Failed to create link [ 1.212222] cpu cpu1: _add_opp_dev: Failed to register opp debugfs (-12) [ 1.219828] cpu cpu2: opp_list_debug_create_link: Failed to create link [ 1.227283] cpu cpu2: _add_opp_dev: Failed to register opp debugfs (-12) [ 1.234875] cpu cpu3: opp_list_debug_create_link: Failed to create link [ 1.242339] cpu cpu3: _add_opp_dev: Failed to register opp debugfs (-12) [ 1.835468] selinux: avc: denied { set } for scontext=u:r:vendor_init:s0 tcontext=u:object_r:default_prop:s0 tclass=property_service permissive=1 [ 1.835468] [ 1.853641] selinux: avc: denied { set } for scontext=u:r:vendor_init:s0 tcontext=u:object_r:dalvik_prop:s0 tclass=property_service permissive=1 [ 1.853641] [ 2.712388] FAT-fs (mmcblk0p15): bogus number of reserved sectors console:/ $ [ 4.782896] apexd: Failed to walk /product/apex : Can't open /product/apex for reading : No such file or directory Gatekeeper_TA_CreateEntryPoint [ 6.847852] selinux: avc: denied { set } for property=sys.s[ 26.016698] SSV6XXX_SDIO mmc2:0001:1: vendor = 0x3030 device = 0x3030 [ 26.039197] SSV6XXX_SDIO mmc2:0001:1: dataIOPort 0x10000 regIOPort 0x10020 [ 26.052393] sunxi-mmc sdc1: smc 2 p1 err, cmd 52, RE RCE !! [ 26.094556] SSV6XXX_SDIO mmc2:0001:1: dataIOPort 0x10000 regIOPort 0x10020 [ 26.133735] SSV6XXX HCI TX Task started. [ 26.214299] Enable HCI TX aggregation [ 27.657092] SSV WLAN driver SSV6006C: Set new macaddr [ 27.665106] SSV WLAN driver SSV6006C: VIF 34:17:36:33:73:fc of type 2 is added. [ 29.193481] audit: rate limit exceeded 0 Quote
Nick A Posted March 2 Posted March 2 Your android has a AXP1530 PMIC also known as AXP313a. You are trying to boot an image with AXP305 PMIC. https://linux-sunxi.org/AXP_PMICs See if this image boots. This has a AXP1530 PMIC and secure boot. https://github.com/NickAlilovic/build/releases/download/v20240726/Armbian-20240726-unofficial_24.8.0-trunk_Transpeed-8k618-t_bookworm_edge_6.7.12_xfce_desktop_SECURE_BOOT.img.tar.xz 0 Quote
Cesar93600 Posted March 2 Posted March 2 @Nick A U-Boot SPL 2024.01-armbian-2024.01-S866c-Pd8a4-Ha9af-V80bb-Bda0a-R448a (Jul 27 2024 - 16:54:35 -0400) DRAM:This DRAM setup is currently not supported. resetting ... 0 Quote
Nick A Posted March 3 Posted March 3 I'll make an image with your dram settings. What I find odd is your android boot log says you have DRAM: 1.5 GiB. 0 Quote
Nick A Posted March 3 Posted March 3 (edited) @Cesar93600 Here's my custom Armbian build based on 6.12 kernel and warpme patches. This is my source code. https://github.com/NickAlilovic/build/archive/refs/tags/20250130.tar.gz I renamed the image to Q1. It was transpeed after the compile was complete. https://github.com/NickAlilovic/build/releases/download/20250130/Armbian-unofficial_25.02.0-trunk_Q1_bookworm_edge_6.12.11_xfce_desktop.img.xz This is the secure boot patch I used. diff --git a/root_key.pem b/root_key.pem new file mode 100644 index 0000000000..cfffdbf247 --- /dev/null +++ b/root_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC4N+7DvqP4cmLP +1u9L8dQ1fVtzXxwzt6Qrn0JEMyHtQm2ZSwxOrAjyPKt9UTfEz3G5K7v7wBLzxS+n +KQWtrcwiFfAPrFK5wyEQU/z/ltfUBg4NCagvgngb38AGwdgAPZ9+Wl3cueB6XxpJ +etVlLUQtiaqGb92CyUDqZsbrNaBOOcxUxNEkAtxOHzriDC9PKRi780ntXWjp+R5Z +loDQ0SyxjnhGBPNAhEAkEHXCLhTg82JHm4tNEVi/esXfMwQRm6x/eb/p55zd/ULU +RXdxxS0j7/DPhRpync6mYJzLl7bDRrNA9DnyyC2kgWWkJ9F/QNMl3HqHTgClehTZ +MfO1tCM5AgMBAAECggEAAn6CJsCRUSFWHq6wF8OYupeBK/U6/ojDRmRP59TlyYsB +oi28fIwH/ev1ASne1L+txZ8k85qYp/uUVGjaynrng8roN8OpiZKGo14qMArf6x9S +eb2hjPfmX++vAT6jcOpkrOmDAFnf+IGDbytWPGTTxGoD5upf2PjYHnqPZQyrHY// +yAIpYtS9zjRx44iVN8olwwXXTDVe7yigAkrYvu0f4AUUv4azv68eYWXUXDN1YaWE +gtwjSOCnhuwHTJTyz6Vi40ju32zxq7rTbe09NV7LcU6CmJBy8GDv2KsNfwk+OwsI +gvz31jZ1jwyLZEGAxL/ibA0ldSAsjG3Akgw8jqG1cQKBgQDunDFVljn2uWVoBwip +QJveKIGNgVnJ6YF630JGMP4X20rkh7/9lyBJQUixlc6Z3qUcCfyKi8EJkPMLs1u+ +QSmmKnsInqp8ZkCPG0g4FZNgHkC+fIfmgO+gVNxyh+MXZNsvVVH6NtpRIfLSXeCl +aTWv4d8rIU5Tl9hDY2UhGQ7CaQKBgQDFpPEeS5hdIaqnZaJ50/V/gzrkENAFWZuP +zYqhS4RcD6dogAByjQvvNByIn5avrPz6N75qsZl5VY0TtaYe6hHehDOwKHM7CFZe +FSjSTdgi7b5jL11///9W5Eztn7L1ckZo93j2ZYLl9+PuXGAY4SRcYYOQjBBmOwmj +Qpryy2+gUQKBgCY4uuZc1BgjhoztY4PJJ66kimwiZkGjt+v4y2L3AhzMMej9ndF/ +XdqeLIjV2Gxpb8VYDC4dSOTBZU1gg7esNIG7mE2/LMwUjQ7fbegd/KeO8QwSYqqX +yMrEDTQDdGsQ6tNgNWuBUeNhLsZn505X1hPAeMEt6qAVWL0itNZibyzRAoGBALD6 +8wKa1LPImuTM6MHI4FOvckOZHn078UXC2zl1wu8hAVpdDImG7cHj2w0oQqnK8Lkq +w3MM145D4lFc3oVeOmQT46kBf7XD0Hrs3aH8HOeiFlMArewZk07+njhGQdzx2ETU +HVgeLCm7YTonM9HzgTjMBSChm2m/wfCUiuWQ78MRAoGAWAElZCjb8Dxp9z8KJ0JX +Z3d2yueOgxf3J6X+7XMW7Yv9uFOvYNI/BNT3Ii3P+u6SJpKXuQgBoDT/2FP/f8m6 +U1dMu7PHcBi3MA1IvGi6NSC+cVcIy0yYi2vYsW6lkOsDwr+HrDQWte3HjiXcIy+g +f9CFoVb4L1ILI/SBaZSV8LQ= +-----END PRIVATE KEY----- -- 2.34.1 My modified defconfig with your dram settings plus CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y for secure boot. diff --git a/configs/transpeed-8k618-t_defconfig b/configs/transpeed-8k618-t_defconfig new file mode 100644 index 0000000000..020d3974af --- /dev/null +++ b/configs/transpeed-8k618-t_defconfig @@ -0,0 +1,27 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_DEFAULT_DEVICE_TREE="sun50i-h618-transpeed-8k618-t" +CONFIG_SPL=y +CONFIG_SUNXI_DRAM_H616_LPDDR3=y +CONFIG_DRAM_CLK=600 +CONFIG_DRAM_SUN50I_H616_DX_ODT=0x06060606 +CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0d0d0d0d +CONFIG_DRAM_SUN50I_H616_CA_DRI=0x00000d0d +CONFIG_DRAM_SUN50I_H616_ODT_EN=0x00000001 +CONFIG_DRAM_SUN50I_H616_TPR0=0x0 +CONFIG_DRAM_SUN50I_H616_TPR2=0x00000000 +CONFIG_DRAM_SUN50I_H616_TPR10=0x002f3359 +CONFIG_DRAM_SUN50I_H616_TPR11=0xaa889967 +CONFIG_DRAM_SUN50I_H616_TPR12=0xeeee8979 +CONFIG_MACH_SUN50I_H616=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_R_I2C_ENABLE=y +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL_I2C=y +CONFIG_SPL_SYS_I2C_LEGACY=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_SYS_I2C_SLAVE=0x7f +CONFIG_SYS_I2C_SPEED=400000 +CONFIG_SUPPORT_EMMC_BOOT=y +CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y +CONFIG_AXP313_POWER=y +CONFIG_AXP_DCDC3_VOLT=1360 +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y Edited March 3 by Nick A 0 Quote
Cesar93600 Posted March 3 Posted March 3 @Nick A U-Boot SPL 2024.01-armbian-2024.01-S866c-Pf4aa-H8869-V3382-Bb703-R448a (Mar 03 2025 - 00:27:16 +0000) DRAM base address is defined as 0x40000000 DRAM has 15 b/raw, 10 b/col, 4 B/width, 2 #rank and 8 #bank DRAM top address must be less than 0x80000000 DRAM top address must be less than 0x60000000 DRAM: 1536 MiB Trying to boot from MMC1 NOTICE: BL31: v2.10.2(debug):armbian NOTICE: BL31: Built : 00:14:31, Mar 3 2025 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a094198, model: Transpeed 8K618-T INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP305 on RSB ERROR: RSB: set run-time address: 0x10003 INFO: Could not init RSB: -65539 INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied INFO: PSCI: Suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9 INFO: Changed devicetree. ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2024.01-armbian-2024.01-S866c-Pf4aa-H8869-V3382-Bb703-R448a (Mar 03 2025 - 00:27:16 +0000) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: Transpeed 8K618-T DRAM: 2 GiB (effective 0 Bytes) 0 Quote
Nick A Posted March 3 Posted March 3 (edited) I'm pretty sure the problem is your dram detection. H313/H616?H618 has problems with dram size detection on some boards . Jernej released new patches that might fix your boot issues. https://github.com/jernejsk/u-boot/commits/a523/ https://github.com/warpme/minimyth2/commit/962ac7da6cb84d0e41826c5555cb101b70a53a8d I tried these patches on my board and it didn't work. U-Boot SPL 2025.01 (Feb 06 2025 - 15:11:12 +0100) DRAM: I also tried the latest Miniarch vontar image and it doesn't work either. Same output as above. Vontar images use to work on my box before. MiniArch-20240715-6.12.12-board-h618.vontar_h618-SD-Image.img.xz Update: There was an issue with these patches. https://oftc.irclog.whitequark.org/linux-sunxi/2025-03-03#34058621; https://github.com/warpme/minimyth2/issues/66 I tested this new fix and my transpeed tv box now boots. https://gist.github.com/warpme/0b225bfda42c7c1802b74f507c6a8bb4 @Cesar93600 I posted an updated image. https://github.com/NickAlilovic/build/releases/download/20250130/Armbian-unofficial_25.02.0-trunk_Q1_bookworm_edge_6.12.11_xfce_desktop.img.xz Edited March 4 by Nick A 0 Quote
Blackenz Posted March 4 Posted March 4 Hi all! @Nick A i have the same x96 version as @Lancoly. I am trying to follow your instructions on building my image from Armbian official repo, though i am struggling to find some of the folders mentioned on your previous posts. From my understanding it seems that i have to apply the secure boot patch on the official sources, though i can't seem to find the folder "configs" in the armbian build root. This is the root folder of the git tree: I have found the "arm64-sun50i-h313-add-x96q-lpddr3-defconfig.patch" inside "patch/u-boot/u-boot-sunxi/board_x96q". Should i add the "CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y" here? How do i apply this patch? It seems that the structure of the build root has changed. Thanks for your help and effort on bringing Armbian to this great cheap Tv Box. 0 Quote
Nick A Posted March 5 Posted March 5 (edited) I think this patch will apply cleanly if you put it in the "patch/u-boot/u-boot-sunxi/board_x96q" folder. No need to add "CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y" the patch already does this for you. The "configs" folder is located in the u-boot source directory. You can find it in the armbian build "cache/sources" folder. You won't see the cache folder until you start a build. The armbian build scripts will use git to clone the u-boot sources into "cache/sources" folder. This is why the armbian build system has a patch directory. It uses these patches to overwrite source files located in your cache folder. If you wanted to create your own patch you would go into the cache and edit the sources then use git commands to create the patch. I would normally stop the build with "Ctrl c" after u-boot is downloaded and all the armbian u-boot patches are applied. Then create my u-boot patch. Patch ordering is important. You want your patch to be last. Your patch title will start with numbers or it will be in alphabetical order. The Armbian "kernel/archive/sunxi-6.x" patch directory is a little different. It uses "series.conf" and "series.armbian" to control the patch order. Plus you can ignore patches using "-" in front of the patch listed inside the two series files. Why do you need secure boot? I don't think Lancoly had secure boot issues. You should only use this secure boot patch if you don't see anything coming from your uart debug messages. If you tried the miniarch latest release v20250206 and it doesn't boot. It might be due to the dram issues I posted above. You will still see debug messages so it's important to have a USB to TTL Serial adaptor attached to your UART. Edited March 5 by Nick A 0 Quote
Cesar93600 Posted March 5 Posted March 5 Hello @Nick A U-Boot SPL 2025DRAM:testing 32-bit widtDRAM:Store cfg DRAM:1st writing pattern DRAM:detecting column address bits detected 10 columns DRAM:restore cfg DRAM:reconfigure for all active rows DRAM:store cfg DRAM:2nd writing pattern DRAM:detecting row address bits detected 15 rows DRAM:restoring cfg DRAM:end of auto detect dram size MBUS port 0 cfg0 0100000d cfg1 00640080 MBUS port 1 cfg0 06000009 cfg1 01000578 MBUS port 2 cfg0 0200000d cfg1 00600100 MBUS port 3 cfg0 01000009 cfg1 00500064 MBUS port 4 cfg0 20000209 cfg1 1388157c MBUS port 5 cfg0 00640209 cfg1 00200040 MBUS port 6 cfg0 00640209 cfg1 00200040 MBUS port 8 cfg0 01000009 cfg1 00400080 MBUS port 11 cfg0 01000009 cfg1 00640080 MBUS port 14 cfg0 04000009 cfg1 00400100 MBUS port 16 cfg0 2000060d cfg1 09600af0 MBUS port 21 cfg0 0800060d cfg1 02000300 MBUS port 22 cfg0 01000009 cfg1 00640080 MBUS port 25 cfg0 0064000f cfg1 00200040 MBUS port 26 cfg0 20000209 cfg1 1388157c MBUS port 37 cfg0 01000009 cfg1 00400080 MBUS port 38 cfg0 00640209 cfg1 00200040 MBUS port 39 cfg0 20000209 cfg1 1388157c MBUS port 40 cfg0 00640209 cfg1 00200040 2048 MiB Trying to boot from MMC1 NOTICE: BL31: v2.10.2(debug):armbian OTICE: BL31: Built : 17:39:39, Mar 4 2025 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a092eb0, model: Q1 H616 INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP305 on RSB ERROR: RSB: set run-time address: 0x10003 INFO: Could not init RSB: -65539 INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for erratum 855873 was applied INFO: BL31: cortex_a53: CPU workaround for erratum 1530924 was applied INFO: PSCI: Suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9 INFO: Changed devicetree. ns16550_serial serial@5000000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 0 Quote
Blackenz Posted March 5 Posted March 5 Hi @Nick A! I think your solution has worked because, when compiling, i saw that the build scripts "saw" the patch on the "patch/u-boot/u-boot-sunxi/board_x96q" folder. The box seems to be booting now because i see the blue led coming up, though, i have no image on HDMI . I am running Kernel 6.6.44. Isn't HDMI supposed to be working? I'll try and see if UART is working. Once again, thank you for your hard work. 0 Quote
Xortes Posted March 5 Posted March 5 @Kmani Quote Hi @Xortes, Yes, I managed to build an Armbian image using the LPDDR3 defconfig mentioned earlier, along with the U-Boot and kernel patches suggested by @Nick A, based on the minimyth2 patch. Unfortunately, HDMI is still not working, even with the current 6.6.72 kernel. However, since I plan to use this TV box for running AdGuard Home, HDMI output isn’t essential for my use case. On a positive note, I’ve successfully got both wired and wireless networks working. I’m currently using the box as an AdGuard Home server and a Tailscale subnet router. If you’re interested, I’d be happy to share the image. I'm interested in the image! Thanks in advance! 0 Quote
Blackenz Posted March 5 Posted March 5 Ok, so i had some time to do more tests... Well, in first place i kinda feel a bit stupid regarding the HDMI issue... Actually it was the cable that was not correctly connected... After diagnosing that issue, i tried to boot the image that i created again, but it seems that the board skips the boot from the sdcard and boots directly to the Android system which is still installed on the EMMC. I then tried @rafman image (Armbian-unofficial_24.11.0-trunk_X96q-v5-1_bookworm_current_6.6.44_mate_desktop.img.xz), and the board boots correctly (with no UART console messages. Is it supposed, or might i have a problem in my UART?) For all the tests i did i used USBImager, so i am excluding problems with the card flashing method. Is anyone else creating the images from Armbian main branch? Thanks 0 Quote
Nick A Posted March 5 Posted March 5 (edited) Do you see UART messages booting Android? If not then maybe it’s a problem with the UART connections. Are your RX and TX connections swapped? Use BelenaEtcher to write your images. Edited March 5 by Nick A 0 Quote
Blackenz Posted March 5 Posted March 5 (edited) Also tried Balena Etcher, and the result is the same... The box does not boot the sdcard. So, to help trying to diagnose my issues, these were the steps i have done: Copied your patch to "patch/u-boot/u-boot-sunxi/board_x96q", then ran: ./compile.sh Selected: "Do not change the kernel configuration" Then entered: CSC and chose "x96q" target. Used the current kernel. Chose bookworm > Image with console interface (server) > Minimal image with console interface. After the compilation is done, i flashed the the sdcard with USBImager and also with Balena Etcher. The result was the same. Tv box skips sdcard boot and boots to Android. Regarding the UART, i had to solder the pins so I don't exclude a bad soldering job... I will recheck the connections. Thanks Edited March 5 by Blackenz 0 Quote
Nick A Posted March 5 Posted March 5 Did press & hold the reset button (in the AV port) before you apply power? Try using another SDcard. 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.