user03 Posted 8 hours ago Posted 8 hours ago Hello. I have easily managed to get armbian up and running of a usb stick, in fact everything worked perfect (hdmi, wifi, gbit ethernet, etc.). The tv box is h96-air-gbit (as the dtb is named), amlogic s905x3 soc, 32gb mmc, 4gb RAM, gigabit ethernet, 2xusb 2.0, 1xusb 3.0, sd card, hdmi, av port (reset button inside), spdif. The thing is, I wanted to benefit from the 32gb internal mmc storage, since I was running armbian from a 8gb usb stick (had a lot of those hanging around, and didn't want to buy a bigger one). I did notice the image I used had not armbian-install script, nor nand-sata-install. I did a manual install (snapshot copy) of my current system with the help of Claude.ai 1. step - create an setup another partition on the emmc (currently there were 2x 4M partitions - the bootloader I presume) sudo fdisk /dev/mmcblk1 sudo mkfs.ext4 -L ARMBIAN_ROOT /dev/mmcblk1p1 Note: Doing this seems enough reasonable to me (well, to my limited knowledge), no overwriting should have happened 2. step - snapshot copy the OS sudo mkdir -p /mnt/emmc sudo mount /dev/mmcblk1p1 /mnt/emmc sudo rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /mnt/emmc/ Note: This also seems alright, and the commands exited with no errors 3. step - update the extlinux.conf, the cmdline to point to the right UUID - the one from the emmc sudo blkid /dev/mmcblk1p1 sudo nano /mnt/emmc/boot/extlinux/extlinux.conf 4. step - just confirm everything is set, and shutdown, disconnect power and reconnect cat /mnt/emmc/boot/extlinux/extlinux.conf sync sudo umount /mnt/emmc Note: Everything seemed fine and correct. So after the whole process, I shut it down, removed the usb and booted. It didn't come online after a while, so I rebooted with hdmi connected (I did face some issues before, like unusally slow boot times in headless mode). It just never turned on. The logo was gone, so I figured something went quite wrong. Currently, the situation is the following: I reopened the board to connect uart for diagnostics. So The board without external storage (usb, sd card) doesn't boot, it does a certain sequence, but fails and just hangs (no reboot loop). If I have an external usb, the one which worked before (correct setup), it reboots in loop - it does try to boot from the usb, but fails. Chatgpt suggests that I probably overwrote some portions of the bootloader or firmware files on which armbian relied (some or most of the env vars are probably gone). Claude has a similar suggestion (FDT_BAD_MAGIC, get partition table from dts faild - the bootloader is messed up). I did try booting from usb and from sd - forcing multi boot (reset button), but that's definitely not the issue. The bootloader seems to be working up to a certain point - but booting from usb or sd produce the same error - last few lines of the log, right before the reboot (and it reboots indefinitely in loop): Device: SDIO Port B Manufacturer ID: fe OEM: 3456 Name: ASTCTran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 7.3 GiB mmc clock: 40000000 Bus Width: 4-bit Device: SDIO Port B Manufacturer ID: fe OEM: 3456 Name: ASTCTran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 7.3 GiB mmc clock: 40000000 Bus Width: 4-bit reading aml_autoscript 800 bytes read in 11 ms (70.3 KiB/s) ## Executing script at 01080000 ## Error: "bootfromsd" not defined get partition info failed !! reboot use default mode: normal bl31 reboot reason: 0xd bl31 reboot reason: 0x1 system cmd 1. Since, the aml_autoscript should definitely be working, the bootloader is the most probable issue. So, what Claude suggests is to flash s905x3 compatible u-boot. I managed to get the board in usb burn mode by mask rom (toothpick reset method didn't work). Currently I have the board plugged to pc (usb male to male) and uart connected (improvised RP2040 zero uart bridge). Please provide me with instructions and what to do. I soft bricked the board by following plausible instructions from ai, I don't want to hard brick it (I really liked it:) Also, I keep the board connected, since I don't know if I could reintroduce mask rom mode if turned off. Here is the complete log of one of the infinite reboots from the loop: SM1:BL:511f6b:81ca2f;FEAT:A0F83180:20282000;POC:F;RCY:0; EMMC:0; READ:0;0.0;CHK:0; bl2_stage_init 0x01 bl2_stage_init 0x81 hw id: 0x0001 - pwm id 0x00 bl2_stage_init 0xc0 bl2_stage_init 0x02 L0:00000000 L1:00000703 L2:00008067 L3:15000020 S1:00000000 B2:20282000 B1:a0f83180 TE: 146487 BL2 Built : 15:21:48, Aug 28 2019. g12a g1bf2b53 - luan.yuan@droid15-sz Board ID = 1 Set cpu clk to 24M Set clk81 to 24M Use GP1_pll as DSU clk. DSU clk: 1200 Mhz CPU clk: 1200 MHz Set clk81 to 166.6M fw parse done Load ddrfw from eMMC, src: 0x00060200, des: 0xf ffd0000, size: 0x0000c000, part: 0 Load ddrfw from eMMC, src: 0x00038200, des: 0xfffd0000, size: 0x00004000, part: 0 PIE I prepare done fastboot data load 00000000 emmc switch 1 ok ddr saved addr:00016000 Load ddr parameter from eMMC, src: 0x02c00000, des: 0xfffd0000, size: 0x00001000, part: 0 00000000 emmc switch 0 ok fastboot data verify verify result: 265 Cfg max: 5, cur: 1. Board id: 255. Force loop cfg DDR4 probe ddr clk to 912MHz Load ddrfw from eMMC, src: 0x00 014200, des: 0xfffd0000, size: 0x0000c000, part: 0 dmc_version 0001 Check phy result INFO : End of initialization INFO : End of read enable training INFO : End of fi ne write leveling INFO : ERROR : Training has failed! 1D training failed Cfg max: 5, cur: 2. Board id: 255. Force loop cfg DDR3 probe ddr clk to 792MHz Load ddrfw from eMMC, src: 0x0002c2 00, des: 0xfffd0000, size: 0x0000c000, part: 0 dmc_version 0001 Check phy result INFO : End of initialization INFO : End of read enable training INFO : End of fine wr ite leveling INFO : End of read dq deskew training INFO : End of MPR read delay center optimization INFO : End of Write leveling coarse delay INFO : End of write delay center optimization INFO : End of read delay center optimization INFO : End of max read latency training INFO : Td BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000c8000, part: 0 BL33 CHK: 0xfffffff1 ADDR 01 7a1970 Load FIP HDR from eMMC, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 1 00000000 emmc switch 1 ok Load BL3X from eMMC, src: 0x00078200, des: 0x01768000, size: 0x000c8000, part: 1 bl2z: ptr: 05129330, size: 00001e40 0.0;M3 C HK:0;cm4_sp_mode 0 MVN_1=0x00000000 MVN_2=0x00000000 [Image: g12a_v1.1.3390-6ac5299 2019-09-26 14:09:46 luan.yuan@droid15-sz] OPS=0x10 ring efuse init 2b 0c 10 00 01 07 0e 00 00 0f 32 34 50 4d 50 50 [0.933 001 Inits done] secure task start! high task start! low task start! run into bl31 NOTICE: BL31: v1.3(release):4fc40b1 NOTICE: B L31: Built : 15:57:33, May 22 2019 NOTICE: BL31: G12A normal boot! NOTICE: BL31: BL33 decompress pass ERROR: Error initializing runtime service opteed_fast U-Boot 2015.01 (Jun 1 9 2020 - 20:04:27) DRAM: 3.8 GiBspi_post_bind(spifc): req_seq = 0 register usb cfg[0][1] = 00000000d7f3ec90 NAND: get_sys_clk_rate_mtd() 290, clock setting 200! NAND device id: 0 ff ff ff ff ff No NAND device found!!! nand init failed: -6 get_sys_clk_rate_mtd() 290, clock setting 200! NAND device id: 0 ff ff ff ff ff No NAND device found! !! nand init failed: -6 MMC: aml_privemmc/sd response timeout, cmd8, status=0x1ff2800 emmc/sd response timeout, cmd55, status=0x1ff2800 co-phase 0x3, tx-dly 0, clock 400000 co-phase 0x3, tx-dly 0, clock 40000000 aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x162000 [mmc_startup] mmc refix success init_part() 282: PART_TYPE_DOS [mmc_init] mmc init success Amlogic multi-dtb tool Cannot find legal dtb! start dts,buffer=00000000d3e53620,dt_addr=00000000d3e53620 check_valid_dts: FDT_ERR_BADMAGIC get_partition_from_dts() 91: ret -9 get_partition_from_dts() 94: ret -9 get_ptbl_from_dtb()-272: get partition table from dts faild mmc_device_init()-1254: get partition table from dtb failed get_ptbl_rsv()-494: magic faild MPT, mmc_device_init()-1281: dtb&rsv are not exisIn: serial Out: s_verify_dtb_checksum()-3477: calc 0, store 0 update_dtb_info()-3585: cpy 1 is not val id _verify_dtb_checksum()-3477: calc 0, store 0 update_dtb_info()-3585: cpy 0 is not valid dtb_read()-3694: total valid _verify_dtb_checksum()-3477: calc 0, store 0 update_dtb _info()-3585: cpy 1 is not valid _verify_dtb_checksum()-3477: calc 0, store 0 update_dtb_info()-3585: cpy 0 is not valid dtb_read()-3694: total valid 0 emmc - EMMC sub system Usa ge: emmc dtb_read addr size emmc dtb_write addr size emmc erase dtb emmc erase key emmc fastboot_read addr size emmc fastboot_write addr size vpu: vpu_power_on vpu:[K M]Error:f[keymanage_dts_get_key_device]L100:/unify not parsed yet! [KM]Error:f[_get_km_ops_by_name]L248:key eth_exphy_para not know device 4 [KM]Error:f[key_unify_read]L312:key[eth_ exphy_para] no cfg in dts dwmac.f f3f0000 Waiting for PHY auto negotiation to complete. . . . done The Bes t Window is index 44 [KM]Error:f[keymanage_dts_get_key_device]L100:/unify not parsed yet! [KM]Error:f[_get_km_ops_by_name]L248:key eth_exphy_para not know device 4 [KM]E rror:f[key_unify_write]L279:key[eth_exphy_para] no cfg in dts libfdt fdt_check_header(): FDT_ERR_BADMAGIC No FDT memory address configured. Please configure the FDT address via "fdt addr <a ddress>" command. Aborting! dwmac.ff3f0000[KM]Error:f[keymanage_ta: erase the area which is uboot or data store erase partition <partition_name>: erase the area whi ch partition in u-boot store erase dtb store erase key store disprotect key store rom_protect on/off store scrub off|partition size scrub the area from offset and size store dtb i read/read/write addr <size> read/write dtb, size is optional store key read/write ad= 0 info->crc32 = 0 Magic is incorrect. boot-info is invalid. Resetting. save boo t-info info->magic = info->version_major = 1 info->version_minor = 0 info->slots[0].priority = 15 info->slots[0].tries_remaining = 7 info->slots[0].successful_boot = 0 info->slots[1].priority = 14 info->slots[1].tries_remaining = 7 info->slots[1].successful_boot = 0 info->crcion in u-boot store erase dtb store erase key store disprotect key st ore rom_protect on/off store scrub off|partition size scrub the area from offset and size store dtb iread/read/write addr <size> read /write dtb, size is optional store key read/write addr <size> read/write key, size is optional store ddr_parameter read/write addr <size> read/write ddr parameter[KM]Error:f[keymanage_dedid preferred_mode is <NULL>[0] hdr mode is 0 dv mode is ver:0 len: 0 hdr10+ mode is 0 [OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters [OSD]set initrd_high: 0x3d800000 [OSD]fb_addr for logo: 0x3d800000 [OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters [OSD]fb_addr for logo: 0x3d800000 [OSD]VPP_OFIFO_SIZE:0xfff01fff [CANVAS]canvas init [CANVAS]addr=0x3d800000 width=3840, height=2160 Cannot find dev. amot store erase dtb store erase key store disprotect key store rom_protect on/off store scrub off|partition size scrub the area from offset and size store dtb iread/read/write addr <size> read/write dtb, size is optional store key read/write addr <size> read/write key, size is optional store ddr_parameter read/write addr <size> read/write ddr parameter, size is o[KM]Error:f[keymanage_dnel error SARADC channel(2) is 0x3ff. saradc - saradc sub-system Usage: saradc saradc open <channel> - open a SARADC channel saradc close - close the SARADC saradc getval - get the value in current channel saradc test - test the SARADC by channel-7 saradc get_in_range <min> <max> - return 0 if current value in the range of current channel Command: bcb uboot-command Start ron_name>: erase the area which partition in u-boot store erase dtb store erase key store disprotect key store rom_protect on/off store scrub off|partition size scrub the area from offset and size store dtb iread/read/write addr <size> read/write dtb, size is optional store key read/write addr <size> read/write key, size is optional store ddr_parameter read/writeuboot-command Hit Enter or space or Ctrl+C key to stop autoboot -- : 0 Unknown command 'ddr_auto_fast_boot_check' - try 'help' pll tsensor avg: 0x1e95, u_efuse: 0x807a temp1: 25 ddr tsensor avg: 0x1eaf, u_efuse: 0x8076 temp2: 26 device cool done CONFIG_SYSTEM_AS_ROOT: systemroot system_mode: 1 Start read misc partition datas! Cannot find dev. amlmmc cmd <NULL> failed store - STORE sub-system Usage: store init flag store read name addr off|partition size read 'size' bytes starting at offset 'off' to/from memory address 'addr', skipping bad blocks. store write name addr off|partitiote addr <size> read/write key, size is optional store ddr_parameter read/write addr <size> read/write ddr parameter, size is optional store mbr addr update mbr/partition table by dtb [burnup]Err:store_read_ops,L84:cmd failed, ret=1, [store read misc 0xd3e4d090 0x0 0x820] failed to store read misc. info->magic = info->version_majosful_boot = 0 info->crc32 = -1075449479 Cannot find dev. amlmmc cmd <NULL> failed store - STORE sub-system Usage: store init flag store read name addr off|partition size read 'size' bytes starting at offset 'off' to/from memory address 'addr', skipping bad blocks. store write name addr off|partition size write 'size' bytes starting at offset 'off' to/frarameter read/write addr <size> read/write ddr parameter, size is optional store mbr addr update mbr/partition table by dtb [burnup]Err:store_write_ops,L148:cmd [store write misc 0xd3e4d090 0x0 0x820] failed active slot = 0 CONFIG_AVB2: null active_slot: normal Cannot find dev. amlmmc cmd <NULL> failed store - STORE sub-system Usage: store init flag store r on/off store scrub off|partition size scrub the area from offset and size store dtb iread/read/write addr <size> read/write dtb, size is optional store key read/write addr <size> read/write key, size is optional store ddr_parameter read/write addr <size> read/write ddr parameter, size is optional store mbr addr update mbr/partition table by dtb [burnup]Err:stornoSof sof timeout, reset usb phy tuning card in co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 400000 co-phase 0x2, tx-dly 0, clock 40000000 aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x162000 [mmc_startup] mmc refix success init_part() 282: PART_TYPE_DOS [mmc_init] mmc init success Device: SDIO Port B Manufacturer ID: fe OEM: 3456 Name: ASTCTran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 7.3 GiB mmc clock: 40000000 Bus Width: 4-bit Device: SDIO Port B Manufacturer ID: fe OEM: 3456 Name: ASTCTran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 7.3 GiB mmc clock: 40000000 Bus Width: 4-bit reading aml_autoscript 800 bytes read in 11 ms (70.3 KiB/s) ## Executing script at 01080000 ## Error: "bootfromsd" not defined get partition info failed !! reboot use default mode: normal bl31 reboot reason: 0xd bl31 reboot reason: 0x1 system cmd 1. 0 Quote
SteeMan Posted 4 hours ago Posted 4 hours ago You should have followed the install instructions on the download page: https://www.armbian.com/amlogic-s9xx-tv-box Given where you are now, you need to find an original android image, flash that to return the board to a clean state, and then follow those instructions. The amlogic s9xx TV box builds use the android bootloader to bootstrap the boot process which at this point you have overwritten part of. 0 Quote
user03 Posted 3 hours ago Author Posted 3 hours ago Hi, thank you for the quick reply. I did read the install instructions, but the thing is there was no install script. I downloaded the minimal iot image I think. I did try updating armbian-config but there was no options for install. And since I didn't find many tutorials on how-to-install, I used claude - sonnet 4.5 (I kinda trust it more than gpt 5, but it still hallucinates sometimes). I admit I don't really like relying on ai tools, but I really find them quite useful (and sometimes quite wrong). Anyway, I don't know if the image didn't include install script or maybe I accidentally removed it with apt autoremove (shouldn't be the case, since I only removed xfce and related components with apt autoremove). And I couldn't find it with apt search. I have now downloaded an image from https://github.com/ophub/amlogic-s9xxx-armbian/releases. It has quite a bigger footprint: ~750MB compressed, compared to ~300MB compressed I downloaded from this site (labeled minimal iot). I also have acquired a h96 air p2 firmware from the official h96 site. Will report how it works. I still would like to try to flash armbian to mmc after I hopefully get it booting from the usb. Do you know why I didn't have an install script in my image? I mean how does it work, can I maybe just download it from somewhere (for my exact box) or why isn't it added in apt? I will try to flash this other image downloaded from github to the usb and see if there is the install script. 0 Quote
SteeMan Posted 1 hour ago Posted 1 hour ago 1 hour ago, user03 said: I did read the install instructions I don't believe you did. As the install instructions linked to from the download page don't mention any of the things you tried (like armbian-config, armbian-install, nand-sata-install, etc). These are the instructions for the amlogic s9xx tv box builds (again these are linked from the download page): https://forum.armbian.com/topic/33676-installation-instructions-for-tv-boxes-with-amlogic-cpus These instructions tell you to run /root/install-aml.sh which is not what you said you did. Now a further note is that ophub is a fork of Armbian. They do not contribute to Armbian development, do not participate in these forums and use the Armbian name without permission. So if you choose to use their software, you will need to discuss their software on their forums as we can't help you at all with ophub software. 0 Quote
user03 Posted 58 minutes ago Author Posted 58 minutes ago Ok. I don't mean to disrespect, but I did read the install instructions. It's just I couldn't find the /root/install-aml.sh script, I checked multiple times, reflashed it etc (even checked /boot ). Don't know if it makes any difference, I flashed my usb using dd, not balena. I did notice it makes two partitions (armbi_boot and armbi_root), but it worked anyway. If it does make a big difference, apologies for my ignorance. About ophub, I didn't really know - glad you pointed it out - that it's a fork that doesn't contribute and that uses the name without permission. Currently, I'm struggling trying to get the board in usb burn mode. I just don't know which pins to short, and don't want to short the wrong ones (even though I did play around). The mmc is ball-grid-array, so really hard to figure it out. I looked up the datasheet for the chip but I can't really figure it out. So I shorted something that looked shortable (I'm sorry, but I really didn't know what to short). It did allow me to enter usb burn mode once, but it stayed in usb burn for hours (I didn't want to unplug, since I knew I probably won't be able to get it there again). So I tried flashing the stock rom (official h96 website), but it timed out, then the board became unresponsive. I tried a couple of times, but nothing. Now I unplugged it, and can't get it back in usb-burn. It does have some reactions to shorting the same pins, looking at uart logs, but I just can't get it to enter that state anymore. Any help is greatly appreciated. Tools I have used: I'm running linux, so I can't use the standard usb burn amlogic tool. I clone the repo https://github.com/khadas/utils 0 Quote
SteeMan Posted 27 minutes ago Posted 27 minutes ago I just downloaded both images available on the download page (minimal and xfce desktop) and both images had the install-aml.sh script in the /root directory. As far as your current state, I only know of the windows amlogic tool as being the only available way to restore an android image. I know nothing about the Khadas tools you are trying to use, whether they will work on non-khadas boards, or if they can be used for what you are trying to do. 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.