Jump to content

kil

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Rodrigo Campos I could added my post now! I can also confirm, that CONFIG_SPL_IMAGE_TYPE_SUNXI_TOC0=y is in the config file replaces the menuconfig changes I wrote previously. Nice you have console messages now!!! FYI: I had cases, that booting stopped at "Starting kernel ..." when I had bad dtb file in the boot partition! I mean the only difference between a working and nonworking case was the "/boot/dtb/allwinner/sun50i-h616-t95h.dtb" file.
  2. Armbian is also working on T95H box! HW is partly recognized, but now I am able to log in through network! What I did was following a standard uboot build process plus turning on the security I did practically two extra steps: 1) Uboot security build process required a private key, which was searched under file name "root_key.pem" from the u-boot build folder (maybe root prefix is coming from the fact that I built the image under root user?). The key file was created with openssl command, if I can recall correctly in this way: openssl genrsa -out root_key.pem 2) At uboot build step "make menuconfig" I changed one option inside "ARM architecture" from "SPL Image Type (eGON (normal))" to "SPL Image Type (TOC0 (secure))"! After this uboot build generated "u-boot-sunxi-with-spl.bin" file contains the security requirements. I made my final SD Card by patching an existing linux distribution with the above u-boot, and suitable DTB file into the boot folder. I am playing lately with the T95H hardware close OrangePi Zero 2 image (same SoC: H616, and same power control: AXP305), namely Armbian_24.5.1_Orangepizero2_noble_current_6.6.31.img. I wrote a new SD Card with that image first. Then I patched it with the compiled uboot (/dev/sdb is the SD card device on my linux PC): dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8 Then I mounted the sd image partition and added my DTB file into the boot folder (I mounted the SD partition to /s/b1 folder), and for safety reasons I also overwrote the orangepi specific DTB file (sun50i-h616-orangepi-zero2.dtb) with mine, in case if that were referred. At this phase I used my u-boot built dtb file still. mount /dev/sdb1 /s/b1 cp sun50i-h616-t95h.dtb /s/b1/boot/dtb/allwinner/ chmod +x /s/b1/boot/dtb/allwinner/sun50i-h616-t95h.dtb cp /s/b1/boot/dtb/allwinner/sun50i-h616-t95h.dtb /s/b1/boot/dtb/allwinner/sun50i-h616-orangepi-zero2.dtb umount /dev/sdb1 I inserted that SD card into T95H, and after powering up the board the Armbian image was booted ( without pressing the uboot button behind the AV hole). I could log in using the console: U-Boot SPL 2024.04 (Jun 24 2024 - 07:12:54 +0000) DRAM: 4096 MiB Trying to boot from MMC1 NOTICE: BL31: v2.11.0(debug):v2.11.0-156-gef5181975 NOTICE: BL31: Built : 14:39:25, Jun 19 2024 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a09c550, model: T95H INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP305 on RSB INFO: PMIC: aldo1 voltage: 3.300V INFO: PMIC: aldo2 voltage: 3.300V INFO: PMIC: aldo3 voltage: 3.300V INFO: PMIC: bldo1 voltage: 1.800V INFO: PMIC: dcdcd voltage: 1.500V 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. U-Boot 2024.04 (Jun 24 2024 - 07:12:54 +0000) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: T95H DRAM: 2 GiB Core: 49 devices, 18 uclasses, devicetree: separate WDT: Not starting watchdog@30090a0 MMC: mmc@4020000: 0 Loading Environment from FAT... Unable to use mmc 0:1... In: serial@5000000 Out: serial@5000000 Err: serial@5000000 Net: No ethernet found. starting USB... Bus usb@5200000: USB EHCI 1.00 Bus usb@5200400: USB OHCI 1.0 scanning bus usb@5200000 for devices... 1 USB Device(s) found scanning bus usb@5200400 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3259 bytes read in 3 ms (1 MiB/s) ## Executing script at 4fc00000 U-boot loaded from SD Boot script loaded from mmc 178 bytes read in 3 ms (57.6 KiB/s) 20384 bytes read in 7 ms (2.8 MiB/s) Working FDT set to 4fa00000 Failed to load '/boot/dtb/allwinner/overlay/-fixup.scr' 17977207 bytes read in 744 ms (23 MiB/s) 23445512 bytes read in 969 ms (23.1 MiB/s) Moving Image from 0x40080000 to 0x40200000, end=418f0000 ## Loading init Ramdisk from Legacy Image at 4ff00000 ... Image Name: uInitrd Image Type: AArch64 Linux RAMDisk Image (gzip compressed) Data Size: 17977143 Bytes = 17.1 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 4fa00000 Booting using the fdt blob at 0x4fa00000 Working FDT set to 4fa00000 Loading Ramdisk to 48edb000, end 49ffff37 ... OK Loading Device Tree to 0000000048e6d000, end 0000000048edafff ... OK Working FDT set to 48e6d000 Starting kernel ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems done. Begin: Will now check root file system ... fsck from util-linux 2.39.3 [/usr/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1 armbi_root: clean, 43241/927360 files, 504145/3906560 blocks done. done. Begin: Running /scripts/local-bottom ... done. Begin: Running /scripts/init-bottom ... done. Welcome to Armbian 24.5.1 noble! -.mount [ OK ] Created slice system-modprobe.slice - Slice /system/modprobe. .... [ OK ] Finished systemd-user-sessions.service - Permit User Sessions. systemd-user-sessions.service Starting plymouth-quit-wait.servic…d until boot process finishes up... Starting plymouth-quit.service - Terminate Plymouth Boot Screen... Armbian 24.5.1 Noble ttyS0 orangepizero2 login: root Password: root@orangepizero2:~# Later knowing that my board embedded network cards are not working (neither wifi nor wired ethernet), I added an RTL8188EU USB Wifi module, and could configure it for accessing my home network. SSH is configured too, and now I can log in to the box through network (e.g. with putty from my windows PC): Using username "root". Authenticating with public key "imported-openssh-key" ___ ____ _ _____ ____ / _ \| _ \(_) |__ /___ _ __ ___|___ \ | | | | |_) | | / // _ \ '__/ _ \ __) | | |_| | __/| | / /| __/ | | (_) / __/ \___/|_| |_| /____\___|_| \___/_____| Welcome to Armbian 24.5.1 Noble with Linux 6.6.31-current-sunxi64 System load: 38% Up time: 0 min Memory usage: 6% of 1.88G IP: 192.168.8.23 Usage of /: 4% of 57G RX today: 1.0 MiB [ 4 security updates available, 4 updates total: apt upgrade ] Last check: 2024-07-10 07:58 [ General system configuration (beta): armbian-config ] Last login: Wed Jul 10 06:31:40 2024 from 192.168.8.6 root@t95h:~# ps: this message is posted later, earlier posts did not work
  3. @Nick A Thank you! It was in the way, you wrote! Changing cd-gpios from "5 6" to "8 16" solved the MMC booting issue! U-Boot 2024.04 (Jun 20 2024 - 07:34:25 +0000) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: T95H DRAM: 2 GiB Core: 48 devices, 18 uclasses, devicetree: separate WDT: Not starting watchdog@30090a0 MMC: mmc@4020000: 0 Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... In: serial@5000000 Out: serial@5000000 Err: serial@5000000 Net: No ethernet found. starting USB... Bus usb@5200000: USB EHCI 1.00 Bus usb@5200400: USB OHCI 1.0 scanning bus usb@5200000 for devices... 1 USB Device(s) found scanning bus usb@5200400 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found /extlinux/extlinux.conf Retrieving file: /extlinux/extlinux.conf Next step is to have the total 4 GiB RAM and working network! I wish I understood better the DTS/DTB world!
  4. @Nick A And even more... noticing, that USB tree is detected, I added an extra USB stick with MiniArch image, changing root partition from /dev/mmcblk0p2 to /dev/sda2, and MiniArch has been booted: U-Boot 2024.04 (Jun 19 2024 - 15:16:15 +0000) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: T95H DRAM: 2 GiB Core: 48 devices, 18 uclasses, devicetree: separate WDT: Not starting watchdog@30090a0 MMC: mmc@4020000: 0 Loading Environment from FAT... MMC: no card present ** Bad device specification mmc 0 ** In: serial@5000000 Out: serial@5000000 Err: serial@5000000 Net: No ethernet found. starting USB... Bus usb@5200000: USB EHCI 1.00 Bus usb@5200400: USB OHCI 1.0 scanning bus usb@5200000 for devices... 2 USB Device(s) found scanning bus usb@5200400 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Hit any key to stop autoboot: 0 MMC: no card present Device 0: Vendor: Mass Rev: 1.00 Prod: Storage Device Type: Removable Hard Disk Capacity: 1886.0 MB = 1.8 GB (3862528 x 512) ... is now current device Scanning usb 0:1... Found /extlinux/extlinux.conf Retrieving file: /extlinux/extlinux.conf 1: MiniMyth2 Retrieving file: /Image append: root=/dev/sda2 rw rootwait earlycon console=ttyS0,115200n8 loglevel=6 consoleblank=0 fsck.mode=auto fsck.repair=yes Retrieving file: /dtbs/allwinner/sun50i-h616-t95h.dtb Moving Image from 0x40080000 to 0x40200000, end=42430000 ## Flattened Device Tree blob at 4fa00000 Booting using the fdt blob at 0x4fa00000 Working FDT set to 4fa00000 Loading Device Tree to 0000000049ff8000, end 0000000049fffd1f ... OK Working FDT set to 49ff8000 Starting kernel ... [ 0.000000] Linux version 6.9.3 (piotro@minimyth2-aarch64) (aarch64-minimyth-linux-gnu-gcc (GCC) 14.1.0, GNU ld (GNU Binutils) 2.40) #1 SMP PREEMPT Sat Jun 1 18:06:41 CEST 2024 [ 0.000000] Kernel command line: root=/dev/sda2 rw rootwait earlycon console=ttyS0,115200n8 loglevel=6 consoleblank=0 fsck.mode=auto fsck.repair=yes [ 0.001796] cacheinfo: Unable to detect cache hierarchy for CPU 0 [ 0.034222] audit: type=2000 audit(0.026:1): state=initialized audit_enabled=0 res=1 [ 0.058004] SCSI subsystem initialized ... [ OK ] Finished Permit User Sessions. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttyS0. [ OK ] Reached target Login Prompts. [ OK ] Started User Login Management. [ OK ] Started D-Bus System Message Bus. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Arch Linux 6.9.3 (ttyS0) alarm login: I think I need to find/make a good dtb, and MMC boot will also work... So linux can work on T95H!!!
  5. @Nick A Oh, with a fresh rebuild of u-boot image, SPL can start the next u-boot part, but there are other errors (MMC is not seen, and 2G RAM exists instead of 4G). U-Boot 2024.04 (Jun 19 2024 - 15:16:15 +0000) Allwinner Technology CPU: Allwinner H616 (SUN50I) Model: T95H DRAM: 2 GiB Core: 48 devices, 18 uclasses, devicetree: separate WDT: Not starting watchdog@30090a0 MMC: mmc@4020000: 0 Loading Environment from FAT... MMC: no card present ** Bad device specification mmc 0 ** In: serial@5000000 Out: serial@5000000 Err: serial@5000000 Net: No ethernet found. starting USB... Bus usb@5200000: USB EHCI 1.00 Bus usb@5200400: USB OHCI 1.0 scanning bus usb@5200000 for devices... 1 USB Device(s) found scanning bus usb@5200400 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 MMC: no card present Device 0: unknown device No ethernet found. missing environment variable: pxeuuid Retrieving file: pxelinux.cfg/00000000 No ethernet found. Retrieving file: pxelinux.cfg/0000000 No ethernet found. Retrieving file: pxelinux.cfg/000000 No ethernet found. Retrieving file: pxelinux.cfg/00000 No ethernet found. Retrieving file: pxelinux.cfg/0000 No ethernet found. Retrieving file: pxelinux.cfg/000 No ethernet found. Retrieving file: pxelinux.cfg/00 No ethernet found. Retrieving file: pxelinux.cfg/0 No ethernet found. Retrieving file: pxelinux.cfg/default-arm-sunxi-sunxi No ethernet found. Retrieving file: pxelinux.cfg/default-arm-sunxi No ethernet found. Retrieving file: pxelinux.cfg/default-arm No ethernet found. Retrieving file: pxelinux.cfg/default No ethernet found. Config file not found No ethernet found. No ethernet found. =>
  6. @Nick A You were right. Finally I needed to change u-boot ARM option to "SPL Image Type (TOC0 (secure))" from "eGON", and to generate a pem key for the u-boot image build process. I also added a T95H specific DTB for powering up the DRAM and I try to play with u-boot patched orange pi zero2 sd card. At least I have the first signs of sd-card boot process on serial console already! U-Boot SPL 2024.04 (Jun 19 2024 - 10:00:07 +0000) DRAM: 4096 MiB Trying to boot from MMC1 NOTICE: BL31: v2.11.0(debug):v2.11.0-156-gef5181975 NOTICE: BL31: Built : 09:54:52, Jun 19 2024 NOTICE: BL31: Detected Allwinner H616 SoC (1823) NOTICE: BL31: Found U-Boot DTB at 0x4a09c6c8, model: T95H INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP305 on RSB INFO: PMIC: aldo1 voltage: 3.300V INFO: PMIC: aldo2 voltage: 3.300V INFO: PMIC: aldo3 voltage: 3.300V INFO: PMIC: bldo1 voltage: 1.800V INFO: PMIC: dcdcd voltage: 1.500V 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. This "Changed devicetree" is the last message, and further booting is not showing up. Is this last message is coming already after the 64bit execution switch? Or is it still some DTB or other issue?
  7. @Nick A Yes, I used 115200, and validated with android boot process, that the console is working. I can also confirm, I tried different images (including miniarch), none of them gave any console output. I also studied the boot process and the the power distribution. My deduction is that at booting phase the SD card correctly gets the 3.3V power, and few of the AXP305 DCDC converters are initialized in a way, that H616 is able to start its booting proces, just pressing the "UBOOT" button finally ends in FEL mode. E.g. command "lsusb" gives back, if the tv box is connected to the host PC to the correct USB port (thus powered only from the same USB): Bus 001 Device 005: ID 1f3a:efe8 Allwinner Technology sunxi SoC OTG connector in FEL/flashing mode Downloading sunxi-tools (either compiling it starting from "git clone https://github.com/linux-sunxi/sunxi-tools" or installing it with "sudo apt install sunxi-tools"), that is able to work with it, like command "sunxi-fel ver" echoes back message: AWUSBFEX soc=00001823(H616) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000 Building the tool from source gives the benefit, that it provides some other SPL test images too, like "uart0-helloworld-sdboot.sunxi" (attached). And command "sunxi-fel spl uart0-helloworld-sdboot.sunxi" adds the following message on the console (!): Hello from Allwinner H616! Returning back to FEL. This uart test image shows correctly the "eGON" footprint in the header, and it is assumed, it can be put to the SPL position to an SD card, and booting from SD should also give then the above "Hello" message to the console output, but that does not happen in my case. I have learned that in case of H616 SoC, the SD card should contain the SPL code at 8K offset (this is valid also for the armbian or miniarch images), so I prepared my SD with the following two commands : dd if=/dev/zero of=/dev/sdb bs=1024 count=1024 dd if=uart0-helloworld-sdboot.sunxi of=/dev/sdb bs=1024 seek=8 First command is optional, it only clears the beginning of SD card, including the partition table, second is doing the actual SPL patching to the SD, which was /dev/sdb in my case). I tried to put the "Hello" SPL test program to an existing distribution, but that did not help either. After all I have a suspicion, that SD Card boot process may be disabled in T95H, and the "U-Boot" button is usable to put the device into FEL mode... Could someone test - who has uart console output and surely working SD booting, that putting the "uart0-helloworld-sdboot.sunxi" to SD gives "Hello" message on the console output? Theoretically the sample application works with many types of Allwinner SoCs (including [A10/A20/H3]/H6/H616/H618 etc, you can see it from the sample image, but of course, the attached one is compiled to 64bit ARM architecture only, thus 32bit version needs to be recompiled from source.) This would justify my suspicion... Or did I do something in a wrong way? uart0-helloworld-sdboot.sunxi
  8. @Nick A, Despite of your long instructions, several tries, spending hours with studying related topics, practically I could not reach any success. The most annoying thing is that when trying to boot the device from sdcard (using the uboot button), nothing happens, not even a single character appears on the console output. How the boot process supposed to work? My understanding, that the beginning part of the sdcard image contains an uboot, which is able to work with a partly initialized (powered up) hardware (starting to use SoC internal RAM), and would make minimal further hardware initialization, and load modules from the boot partition, like kernel, root-fs, device tree. Is it a valid assumption, that uboot should echoe the start of boot process already? (At least when the stock firmware starts, I see uboot messages.) Is it possible, that the uboot on the sdcard is not compatible with my hardware? Or simply the external boot is restricted by the software of the T95H android box? I also downloaded firmware for the box (found e.g. T95H-H616-X22.img), and checked, what file structure it shows: it is "PhoenixSuite image file", different format than an armbian (or other os) image...
  9. @Nick A Probably I am one step further. I tried to use the adb command to fetch device tree info. Unfortunately my partition scheme is different than the one in your earlier post. I see boot like partitions (/dev/block/mmcblk0boot0 and /dev/block/mmcblk0boot1), but reading those with root user gives back fully zeroed partition files... The closest file I could find is in "/sys/firmware" folder: adb -s 192.168.8.21:5555 shell "ls -al /sys/firmware" total 0 drwxr-xr-x 3 root root 0 1970-01-01 01:00 . dr-xr-xr-x 12 root root 0 1970-01-01 01:00 .. drwxr-xr-x 3 root root 0 1970-01-01 01:00 devicetree -r-------- 1 root root 129984 2024-05-16 11:50 fdt dtc compiler refused to decompile it due to some format issue, but fdtdump utility could convert it to a flat text format (tools are taken from https://github.com/dgibson/dtc ) . Files are attached. Is this the correct device tree file on my device? t95h_x24_fdt.zip
  10. @Nick A Thank you for your hints how to continue. Yes, T95H has AXP305, however I was hoping it can be compatible with the one used in Transpeed image. Stock FW handles it as axp20x driver. [ 0.553424] axp20x-i2c 5-0036: AXP20x variant AXP806 found [ 0.572031] axp806-aldo2: Bringing 700000uV into 3300000-3300000uV [ 0.575807] axp806-aldo3: Bringing 700000uV into 3300000-3300000uV [ 0.576720] random: fast init done [ 0.593025] axp20x-i2c 5-0036: AXP20X driver loaded DTS is new area for me, I tried to check it, but up to now I was unsuccessful the one, used in the stock firmware. At the same time I have also doubts, if that were fully correct, as e.g. DRAMs get 1.5V (based on the boot log), while in my case the ram IC-s are "Micron D9PQL", which seems to be DDR3L, rather than DDR3...
  11. @Nick A: Yes, I found a suitable plastic tool to press the uboot button through the audio jack during powering up. The symptom is, when the button is pressed (and released after power up), serial output remains absolutely silent (so the uboot button pressing is sensed!), when uboot button is not pressed, the standard boot process is visible... I enclose an earlier saved stock firmware boot log, if you can get any hints out of that... I also checked on the linux machine, that the SD card contains the Armbian image, which can be mounted, files are browsable... t95h_x24_stock_firmware_boot.txt
  12. Thank you guys for putting the effort to port Armbian to H616/H618 android boxes. I have a 4GB/64GB T95H (exactly the same PCB: https://linux-sunxi.org/File:T95H_PCB_Top.jpg, https://linux-sunxi.org/File:T95H_PCB_Bottom.jpg, just with stock firmware T95H-H616-X24). By default the serial console did not work. After adding a shortcut to tx-path, and 1K resistor to the rx-path (between two pads of SOT-23), the boot process of stock fw became available, and communication with the FW became possible at 115200 baud rate. Downloading the latest available PRxxxx_20240415_db21e5f7d_Armbian-unofficial_24.5.0-trunk_Transpeed-8k618-t_bookworm_edge_6.7.12.tar.xz and putting the extracted img to SD card, powering up the box with pressed uboot button does not give any console output (neither on 115200 nor on 1500000 baud rate). Did I make something wrong? Or is this box is not supported by the tested firmware at any level?
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines