Jump to content

jpegqs

Members
  • Posts

    27
  • Joined

  • Last visited

Reputation Activity

  1. Like
    jpegqs reacted to HydraCL in Why armbian-install can brick the TV-box?   
    Sorry for the inconvenience, I posted it in the other thread but it seems it's dead. My bad.
     
    Greetings. I have an X88 Mini 13, which has 2 USB ports and an SD slot and is 100% unbrickable because it has both easily reachable UART pins and (less) easily reachable eMMC clock and ground testpoints at the bottom of the board. I want it to be a Retroarch machine and play PS1-era games or older on a CRT monitor. I decided to go cowboy mode and flash it to eMMC anyways to try and see what is wrong in the boot process.
     
    I had already flashed the Armbian-built U-Boot to eMMC and successfully booted both the stock Android 13 ROM and the generated Armbian image before. However this approach is slow and takes up a valuable USB port which only lets me use either a mouse or a keyboard at once. I have no SD card nor the want to buy a new one so despite the warnings I decided to try my luck and flash it to the eMMC, knowing that I can always access MaskROM and UART easily. I want to help you guys make it possible to flash Armbian to the eMMC and banish the spyware China ROM to oblivion forever, so you can somewhat count on me if you want to try stuff.
     
    Observations:
    1. The boot process seems to go into a loop with U-Boot SPL not knowing what to do with the eMMC partition table. It might be invalid. It either ignores the USB ports or crashes the bootloader telling me to RESET the board due to some invalid FAT stuff. We need to investigate further.
    2. In MaskROM mode, rkflashtool doesn't seem to detect the eMMC's data (this behavior seems to be universal even if the board boots something)
    3. In MaskROM mode, writing to partitions fails with an error about not having mtdtools available.
    4. Writing to the eMMC from rkflashtool in MaskROM calculating the sector sizes by hand works fine. I've erased and then restored U-Boot and the DDR loader this way successfully.
     
    Here is the UART output from my FT232H:
    Taken from FTDI FT232H, over picocom, Ubuntu 22.04, 1.5M baud. Fresh boot, no USB devices attached. DDR V1.06 1ab0bfbe2d huan.he 23/06/05-10:37:12 LP4/4x derate disable, other dram:1x trefi ddrconfig:15 DDR3, 324MHz BW=32 Col=11 Bk=8 CS0 Row=16 CS=1 Die BW=16 Size=4096MB tdqss: cs0 dqs0: 241ps, dqs1: 96ps, dqs2: 361ps, dqs3: 434ps, change to: 324MHz clk skew:0x7d change to: 528MHz clk skew:0x7d change to: 780MHz clk skew:0x7d change to: 1056MHz(final freq) clk skew:0x7d PHY drv:clk:41,ca:41,DQ:41,odt:145 vrefinner:50%, vrefout:50% dram drv:34,odt:120 cs 0: the read training result: DQS0:0x41, DQS1:0x40, DQS2:0x3c, DQS3:0x36, min : 0x7 0xe 0xd 0xd 0xc 0x0 0x1 0x8 , 0xe 0xf 0x9 0x9 0x3 0x5 0x3 0x5 , 0x7 0x8 0x5 0x8 0x5 0x5 0x1 0x1 , 0x2 0x5 0x7 0x1 0xb 0x6 0x7 0x4 , mid :0x21 0x29 0x28 0x27 0x27 0x1c 0x1c 0x22 ,0x29 0x2a 0x24 0x22 0x1f 0x1f 0x1e 0x1e , 0x1f 0x23 0x20 0x23 0x21 0x1d 0x1c 0x1d ,0x1a 0x22 0x24 0x1b 0x26 0x1f 0x23 0x1e , max :0x3c 0x45 0x43 0x42 0x43 0x38 0x37 0x3d ,0x44 0x46 0x40 0x3c 0x3b 0x3a 0x39 0x38 , 0x37 0x3f 0x3b 0x3e 0x3e 0x35 0x38 0x3a ,0x33 0x3f 0x42 0x35 0x42 0x38 0x3f 0x39 , range:0x35 0x37 0x36 0x35 0x37 0x38 0x36 0x35 ,0x36 0x37 0x37 0x33 0x38 0x35 0x36 0x33 , 0x30 0x37 0x36 0x36 0x39 0x30 0x37 0x39 ,0x31 0x3a 0x3b 0x34 0x37 0x32 0x38 0x35 , the write training result: DQS0:0x9d, DQS1:0x89, DQS2:0xad, DQS3:0xb7, min :0x7f 0x8d 0x8c 0x89 0x8b 0x7b 0x7a 0x83 0x81 ,0x72 0x73 0x70 0x6f 0x68 0x65 0x67 0x68 0x70 , 0x90 0x99 0x97 0x90 0x98 0x8d 0x8c 0x94 0x95 ,0x9c 0xa5 0xa7 0x9c 0xa7 0x9f 0xa9 0x9f 0xa2 , mid :0x96 0xa4 0xa2 0x9f 0xa1 0x91 0x8e 0x98 0x9b ,0x8b 0x8d 0x88 0x86 0x81 0x7e 0x7e 0x7d 0x8a , 0xa4 0xb0 0xac 0xa8 0xaf 0xa1 0xa4 0xad 0xb0 ,0xb4 0xbd 0xc0 0xb5 0xc1 0xb6 0xbf 0xb7 0xbc , max :0xad 0xbb 0xb8 0xb6 0xb8 0xa7 0xa3 0xad 0xb6 ,0xa5 0xa7 0xa0 0x9d 0x9b 0x97 0x96 0x92 0xa5 , 0xb8 0xc8 0xc2 0xc0 0xc6 0xb6 0xbd 0xc7 0xcb ,0xcc 0xd6 0xda 0xce 0xdc 0xce 0xd6 0xcf 0xd7 , range:0x2e 0x2e 0x2c 0x2d 0x2d 0x2c 0x29 0x2a 0x35 ,0x33 0x34 0x30 0x2e 0x33 0x32 0x2f 0x2a 0x35 , 0x28 0x2f 0x2b 0x30 0x2e 0x29 0x31 0x33 0x36 ,0x30 0x31 0x33 0x32 0x35 0x2f 0x2d 0x30 0x35 , out U-Boot SPL board init U-Boot SPL 2017.09-armbian (Jan 13 2024 - 20:49:05) unknown raw ID 0 0 0 unrecognized JEDEC id bytes: 00, 00, 00 Trying to boot from MMC2 Card did not respond to voltage select! mmc_init: -95, time 12 spl: mmc init failed with error: -95 Trying to boot from MMC1 spl: partition error Trying fit image at 0x4000 sector ## Verified-boot: 0 ## Checking atf-1 0x00080000 ... sha256Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 (cc61149bc7...) + OK ## Checking uboot 0x00200000 ... sha256Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 (ee97a7743b...) + OK ## Checking fdt 0x00308d30 ... sha256Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 (2867f75977...) + OK ## Checking atf-2 0xfe48d000 ... sha256Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 (63ede63c1e...) + OK ## Checking atf-3 0xfe490000 ... sha256Failed to get clk index 0, ret=-19 Failed to get clk index 0, ret=-19 (922a3e8dc5...) + OK Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00080000) Total: 72.877/114.698 ms  
    Addendum: If it loops enough times, it always ends up crashing. Most of the time it looks like this:
    Jumping to U-Boot(0x00200000) via ARM Trusted Firmware(0x00080000) Total: 72.635/114.473 ms INFO: Preloader serial: 0 NOTICE: BL31: v2.3():v2.3-623-g7bfd76051:cl NOTICE: BL31: Built : 05:11:46, Jul 21 2023 INFO: rk_otp_init finish! INFO: ARM GICv2 driver initialized INFO: nonboot_cpus_off: clst_st=0xc0e, core_st=0xe1e0 boot_cpu=0 INFO: dfs DDR fsp_param[0].freq_mhz= 1056MHz INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz INFO: dfs DDR fsp_param[3].freq_mhz= 780MHz INFO: idle_st=0x0, pd_st=0x0 INFO: Using opteed sec cpu_context! INFO: boot cpu mask: 1 INFO: rk_otp_init finish! INFO: RK3528 SoC (0x101) INFO: BL31: Initializing runtime services WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK ERROR: Error initializing runtime service opteed_fast INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x200000 INFO: SPSR = 0x3c9 Error: Invalid FAT entry: 0x002a7758 ### ERROR ### Please RESET the board ###  
    I haven't been able to rebuild U-Boot but at first glance it seems it can't detect a valid partition table. It might also be unable to mount EXT4 volumes but it doesn't seem to be the case since I can boot from USB when the original firmware and the custom U-Boot is installed. I keep running out of SSD space and it's bothersome to expand my Ubuntu partition so I'll try it sometime later. Maybe I'll try manually installing the Armbian rootfs, kernel and initrd to the eMMC reusing the manufacturer's partition table.
  2. Like
    jpegqs got a reaction from Valentin C in Ambian TV box rk3528   
    I published my patches on GitHub. This is still half-baked, so I won't create a pull request to Armbian for now.
  3. Like
    jpegqs got a reaction from Valentin C in Ambian TV box rk3528   
    I was able to run Armbian on DQ08.
    You need to use .dtb from Android (you can find it in boot partition). And use the Armbian build for hinlink-h28k:
     
    ./compile.sh build BOARD=hinlink-h28k BRANCH=legacy BUILD_DESKTOP=yes BUILD_MINIMAL=no DESKTOP_ENVIRONMENT=mate DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base EXPERT=yes KERNEL_GIT=shallow RELEASE=jammy  
    Somehow it works. But you need more changes in the config to make it work better.
    After changes in device tree and linux-rk35xx-legacy.config: I have Lima (GPU driver for Mali-450) working, HDMI working, TV-out working, TV-audio working. But I can't get HDMI-audio to work (there is a driver, but still no sound).
  4. Like
    jpegqs got a reaction from blust0ne in Ambian TV box rk3528   
    I was able to run Armbian on DQ08.
    You need to use .dtb from Android (you can find it in boot partition). And use the Armbian build for hinlink-h28k:
     
    ./compile.sh build BOARD=hinlink-h28k BRANCH=legacy BUILD_DESKTOP=yes BUILD_MINIMAL=no DESKTOP_ENVIRONMENT=mate DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base EXPERT=yes KERNEL_GIT=shallow RELEASE=jammy  
    Somehow it works. But you need more changes in the config to make it work better.
    After changes in device tree and linux-rk35xx-legacy.config: I have Lima (GPU driver for Mali-450) working, HDMI working, TV-out working, TV-audio working. But I can't get HDMI-audio to work (there is a driver, but still no sound).
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines