-
Posts
11 -
Joined
-
Last visited
-
But, now that I have a running linux on it, is there another way to flash the android image? I mean, I had to open the box, connect uart to see what's going on and short random resistors on the board to get it in usb burn mode and flash the android image - which didn't work as I mentioned before. I was receiving timeout errors, and after that the board became unresponsive (./update identify 7 - timeout). After a bit of research I found out it could be the usb 3.0 port on the device that I used (since I tried switching to usb 2.0, but I got it in mask rom mode only through usb 3.0 port the last time, and after that too, never on usb 2.0). Anyway, the point is - now that I'm booting from usb, I disconnected uart and closed the board back in it's case. It was a mess, and I'd rather not open it up just to install android to it. I mean, can I do it from a running linux? Or can I just run install-aml? At the end of the road, I could just use it as is - it will boot to usb, regardless of the garbage in the emmc. I know I mentioned I wanted to take advantage of the 32gb emmc, but now I'm just happy it's even alive.
-
I didn't know g12 and sm1 were compatible enough for flashing - since I realized how easy it is to mess up by using the wrong soc type I grew very meticulous about everything - I just didn't want to brick my box. (after I soft bricked it already:) About the next step: how to run recovery? Could you please explain in more detail, or just point me in the right direction where to look? I mean, I'm really quite new to all of this, SoC linux installs etc, so I don't really understand a big portion of it. P.S. wifi and eth are also working
-
Thank you @c0rnelius for guidelines regarding the tools. I was able to successfully get the device in mask rom mode after dozens of unsuccessful attempts, it's been like hell. Anyway, once I managed to get it in mask rom mode, I checked the tools you mentioned - the thing is https://github.com/natinusala/linux-amlogic-toolkit uses https://github.com/Stane1983/aml-linux-usb-burn under the hood, it's more specialized for unpacking, modifying and repacking android images. Then the other tools available such as https://github.com/mluis/aml-flash-tool and https://github.com/PowderLinux/Amlogic-Flash-Tools-Backup don't seem to support my box. I looked at the flash scripts and the --soc options and saw this --soc=<m8|axg|gxl|txlx|g12a> My board is s905x3, which is sm1. This repo https://github.com/PowderLinux/Amlogic-Flash-Tools-Backup even lists s905x3 as supported, but when I opened the flash tool, the script had this soc value check if [[ "$soc" != "m8" ]] && [[ "$soc" != "gxl" ]] && [[ "$soc" != "axg" ]] && [[ "$soc" != "txlx" ]] && [[ "$soc" != "g12a" ]]; then echo "Soc type is invalid, should be either m8,gxl,axg,txlx,g12a" exit 1 fi I mean, seriously - the README explicitly states s905x3 boards are supported, and if you put --soc=sm1 the flash script will probably fail (I didn't dare run that). @SteeManRegarding the install.sh script which I couldn't find - I mentioned I used dd instead of balena-etcher. I tried to install balena-etcher, just to see if the usb would be different, but then I remembered why I didn't do it with balena in the first place - package conflicts (node vs node-lts) on arch, I'd have to uninstall node, and switch to lts version... It was just too much of a hassle, so I didn't install it. With dd, the usb is partitioned in armb_boot and armbi_root, and instead of a /boot folder, I had a partition. The armbi_root partition contains the linux filesystem, /etc, /boot, /lib etc. But I did find a /root directory in the armbi_root partition. And of course, it contains the install-aml.sh script. I thought since /boot was a partition in my case, /root was the armbi_root partition, and the /root dir is hidden and inaccessible to normal users. So, my apologies, I should have been more thorough, and look better and ask instead of asking AI carelessly - should have known it wasn't safe to just follow AI's instructions for installing to emmc, it's too specific and delicate, and AIs are usually too general. I guess it's a very good lesson, one that cost me hours of work and nerves. Thank you again for your patience and all the help you provided. And then I searched with AI, to see if any at all linux tools are available for my board - no results. ChatGPT told me there was an option to flash parts of the android image - without touching the bootloader. So I ended up using https://github.com/Stane1983/aml-linux-usb-burn, to unpack the android image and to flash something. ChatGPT showed me which files and in what order to flash them (going from lowest risk possible supposedly). I managed to flash the dtb successfully but that was it - after that I couldn't flash boot, and the board probably lost contact # dtb flash - successful [user03@arch unpack]$ ./../update partition _aml_dtb _aml_dtb.PARTITION normal file size is 0x10306 AmlUsbTplCmd = download store _aml_dtb normal 0x10306 rettemp = 1 buffer = download store _aml_dtb normal 0x10306 AmlUsbReadStatus retusb = 1 Downloading.... [update]Cost time 0Sec [update]Transfer size 0x10306B(0MB) AmlUsbBulkCmd[download get_status] [update]mwrite success # 1. attempt boot flash - fail [user03@arch unpack]$ ./../update partition boot boot.PARTITION normal file size is 0x98d800 AmlUsbTplCmd = download store boot normal 0x98d800 rettemp = 1 buffer = download store boot normal 0x98d800 AmlUsbReadStatus retusb = 1 Downloading.... [AmlLibUsb]:IOCTL_WRITE_MEDIA_Handler,value=1,index=ffff,len=32,ret=-110 error_msg=Connection timed out Write media command 112 failed AmlWriteMedia failed [update]Cost time 5Sec [update]Transfer size 0x70000B(0MB) ERR:write data to media failed # 2. attempt boot flash - fail [user03@arch unpack]$ ./../update partition boot boot.PARTITION normal file size is 0x98d800 AmlUsbTplCmd = download store boot normal 0x98d800 IOCTL_TPL_CMD_Handler ret=-110,tpl_cmd=download store boot normal 0x98d800 error_msg=Connection timed out rettemp = 0 buffer = download store boot normal 0x98d800 # 3. attempt boot flash - fail [user03@arch unpack]$ ./../update partition boot boot.PARTITION normal file size is 0x98d800 AmlUsbTplCmd = download store boot normal 0x98d800 rettemp = 1 buffer = download store boot normal 0x98d800 AmlUsbReadStatus retusb = 1 [update]ERR(L298):cmdret=[] # test if board available - fail [user03@arch tools]$ ./update identify 7 AmlUsbIdentifyHost IOCTL_IDENTIFY_HOST_Handler ret=-110 error_msg=Connection timed out ERR: get info from device failed So I unplugged it, and tried to boot it, just to see what's the status... amazing, I was shocked when I saw the line ## Booting Android Image at 0x01080000 ... It worked! I mean, of course it didn't boot any android, since I didn't really manage to flash it, but it managed to get to that point. So, I reflashed my usb stick (fresh armbian trixie) and enabled multi-boot with toothpick, and well, it does boot now to amrbian from usb - hdmi working, usbs working, ethernet and wifi not tested, but probably working (ethernet). So, I guess, as long as I have the usb inserted, it should successfully boot:) I call it a day Also, should I even try to run the install-aml.sh script now? I really wanted to use the 32gb emmc, instead of the 8gb usb. If it's not a good idea, then I'll just add another one in the other usb port (which I don't use anyway) and setup fstab rule to load it automatically to be used as additional storage.
-
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
-
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.
-
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.
-
Booting armbian manually from u-boot shell over UART
user03 replied to user03's topic in Amlogic CPU Boxes
So far I only have working ethernet, which is good enough probably. So, hdmi, wifi, audio, gpu are not working. Is there anything I can do to fix any of these? Install some firmware, edit the dtb or something? -
Booting armbian manually from u-boot shell over UART
user03 replied to user03's topic in Amlogic CPU Boxes
Well, chatgpt told me it could generate a modified version of the dtb specifically for my device, provided the vendor dtb and some command outputs (mostly to figure out which chips are used - wifi,ble,hdmi etc). Well it did generate a dts, which I compiled in the linux kernel (pulled from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git). Well, I booted using the generated&compiled dtb, but HDMI is not working, eth is also not working, don't know what else. I also tried meson-gxl-s905l3b-m302a.dtb, which I got from https://github.com/xcray/amlogic-s905l3a-armbian. Eth is working with this dtb (it also probably worked with the p212, but at that time, I didn't have a cable to check). I actually don't know what else to check if working:) Is there a unified check tool for quick testing hardware support? Also, is there anything I can do about the hdmi or wifi? I am ready to write my own dts using the vendor provided one if necessary. HDMI is more of a priority, but I would like to tinker around with this thing just to see how far I can go. I would be very glad if you pointed me in the right direction in order to do this. Or if it's really impossible then fine. I thought provided the vendor.dtb I could get some of the hardware working, if this is not the case, then fine, I'm happy with eth. Anyway, I'll now try to setup ssh, cause it's about time I cleanup the setup and the micropython uart bridge:) -
Booting armbian manually from u-boot shell over UART
user03 replied to user03's topic in Amlogic CPU Boxes
Update. I fixed the issue with chatgpt now. It told me according to the logs, my board has wrong hardware, and it told me to disable the gpu with adding a file to /etc/modprobe.d/ with blacklist lima. It worked. I booted to armbian, but to my surprise it immediately showed me a message saying this image is for tesing purposes only, and not stable. I downloaded it from the official site, it was labeled as minimal console pc, for small servers or sth like that. Also, hdmi not working (I don't want to only be able to ssh to it, but if that's what it is than fine:), and during setup it was giving me wrong time, timezones, completely wrong. Don't know what should be next step, try a different dtb, or different armbian image? -
Booting armbian manually from u-boot shell over UART
user03 replied to user03's topic in Amlogic CPU Boxes
Ok. I read the posts you showed me. First off, I thought this was a pretty straightforward process - installing armbian to these chinese tv boxes; so thank you for the hard truth - expect nothing to work:( Anyway, as I mentioned before, my main issue was that there is no reset button on this thing, so I had no idea how to get anything to boot, which commands, which script to run. So, thank you again for pointing me to the file. I entered the u-boot shell from uart, loaded the aml_autocript to 0x20000000 fatload usb 0:1 0x20000000 aml_autoscript and run it with autosrc 0x20000000 (the equivalent of source command I believe). It changed the bootloader, as the other post suggested, and now it boots to usb if present (haven't tried if it falls back to android, but I don't care about that anymore). I'm really glad it boots to linux, but the thing is it always ends in kernel panic before it even boots completely. I tried turning it off and on, but I always got a different kernel panic. Here are some of the logs (I posted only the kernel panic lines, and a few before - to keep the post short, but I can add some of the complete logs if necessary). Notice: after entering the kernel panic the device just hangs - no reset or action whatsoever. So I just disconnected power, and turned it on again. Another notice: the logs may actually be incomplete, because I already faced issues with uart not printing the whole text, but only the first 40-50 lines or so (example: output of the command help in the u-boot shell showed only half of them, and the last line shown looked half-printed). Dunno why this happens, maybe the RP2040 zero (which I'm using as the uart bridge adapter, running micropython script) is causing it, or something else. boot1: [ 11.642441] systemd[1]: Found device dev-disk-by\x2duuid-3563\x2d67BF.device - ProductCode armbi_boot. [ 11.657680] systemd[1]: Starting systemd-fsck@dev-disk-by\x2duuid-3563\x2d67BF.service - File System Check on /dev/disk/by-uuid/3563-67BF... [ 11.673727] systemd[1]: Starting systemd-networkd-persistent-stor[ 11.689172] [drm] Initialized simpledrm 1.0.0 for 7fe5b000.framebuffer[ 11.717710] Console: switching to colour frame buffer device 90x36 [ 11.731744] simple-framebuffer 7fe5b000.framebuffer: [drm] fb0: simpledrmdrmfb frame buffer device [ 11.835286] mc: Linux media interface: v0.10 [ 11.837173] Registered IR keymap rc-empty [ 11.852968] rc rc0: meson-ir as /devices/platform/soc/c8100000.bus/c8100580.ir/rc/rc0 [ 11.855991] rc rc0: lirc_dev: driver meson-ir registered at minor = 0, raw IR receiver, no transmitter [ 11.883334] input: meson-ir as /devices/platform/soc/c8100000.bus/c8100580.ir/rc/rc0/input0 [ 11.897040] rc rc0: sw decoder init [ 11.897461] meson-ir c8100580.ir: receiver initialized [ 11.923213] systemd[1]: Finished systemd-networkd-persistent-storage.service - Enable Persistent Storage in systemd-networkd. [ 11.959135] videodev: Linux video capture interface: v2.00 [ 12.038565] systemd[1]: Reached target usb-gadget.target - Hardware activated USB gadget. [ 12.122827] SError Interrupt on CPU3, code 0x00000000bf000002 -- SError [ 12.122857] CPU: 3 UID: 0 PID: 1158 Comm: (udev-worker) Tainted: G M 6.18.2-current-meson64 #1 PREEMPT [ 12.122869] Tainted: [M]=MACHINE_CHECK [ 12.122872] Hardware name: Amlogic Meson GXL (S905X) P212 Development Board (DT) [ 12.122878] pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 12.122885] pc : el00 [ 12.122973] x11: 0000000000000006 x10: ffff8000812e5a60 x9 : 1fffe000007108c1 [ 12.122983] x8 : 0000000000000001 x7 : ffff000003884600 x6 : ffff000003884608 [ 12.122993] x5 : ffff8000829eb6b0 x4 : 0000000000000025 x3 : 0000000000000021 [ 12.123002] x2 : 000000000000003b x1 : 0000000000000000 x0 : 0000000000000000 [ 12.123014] Kernel panic - not syncing: Asynchronou do_serror+0x3c/0x78 [ 12.123105] el1h_64_error_handler+0x34/0x50 [ 12.123114] el1h_64_error+0x6c/0x70 [ 12.123123] el1_abort+0x34/0x68 (P) [ 12.123130] el1h_64_sync_handler+0x50/0x104 [ 12.123138] el1h_64_sync+0x6c/0x70 [ 12.123145] lima_mmu_init+0x44/0x124 [lima] (P) [ 12.123186] lima_device_init+0x1ac/0x664 [lima] [ 12.123206] lima_pdev_probe+0xa4/do_init_module+0x58/0x23c [ 12.123364] load_module+0x1e78/0x1ed4 [ 12.123374] init_module_from_file+0x88/0xcc [ 12.123383] __arm64_sys_finit_module+0x1ec/0x300 [ 12.123393] invoke_syscall+0x48/0x10c [ 12.123408] el0_svc_common.constprop.0+0xc8/0xe8 [ 12.123418] do_el0_svc+0x20/0x2c [ 12.123428] el0_svc+0x34/0xf0 [ 12.123437] el0t_64_sync_handler+0xa0 boot2: [ 12.471539] Kernel panic - not syncing: Asynchel1h_64_error_handler+0x34/0x50 [ 12.471648] el1h_64_error+0x6c/0x70 [ 12.471656] el1_abort+0x34/0x68 (P) [ 12.471664] el1h_64_sync_handler+0x50/0x104 [ 12.471672] el1h_64_sync+0x6c/0x70 [ 12.471679] lima_mmu_init+0x44/0x124 [lima] (P) [ 12.471723] lima_device_init+0x1ac/0x664 [lima] [ 12.471744] lima_pdev_probe+0xa4/0x1bc [lima] [ 12.471764] platform1915] load_module+0x1e78/0x1ed4 [ 12.471924] init_module_from_file+0x88/0xcc [ 12.471934] __arm64_sys_finit_module+0x1ec/0x300 [ 12.471944] invoke_syscall+0x48/0x10c [ 12.471956] el0_svc_common.constprop.0+0xc8/0xe8 [ 12.471967] do_el0_svc+0x20/0x2c [ 12.471977] el0_svc+0x34/0xf0 [ 12.471988] el0t_64_sync_handler+0xa0/0xe4 [ 12.471996] el0t_64_sync+Traceback (most recent call last): boot3: [ 12.420984] Kernel panic - nx80 [ 12.421075] do_serror+0x3c/0x78 [ 12.421082] el1h_64_error_handler+0x34/0x50 [ 12.421091] el1h_64_error+0x6c/0x70 [ 12.421099] el1_abort+0x34/0x68 (P) [ 12.421107] el1h_64_sync_handler+0x50/0x104 [ 12.421115] el1h_64_sync+0x6c/0x70 [ 12.421121] lima_mmu_init+0x44/0x124 [lima] (P) [ 12.421165] lima_device_init+0x1ac/0x664 [lima] [ 12.421185] 0x200 [ 12.421335] do_init_module+0x58/0x23c [ 12.421348] load_module+0x1e78/0x1ed4 [ 12.421357] init_module_from_file+0x88/0xcc [ 12.421367] __arm64_sys_finit_module+0x1ec/0x300 [ 12.421376] invoke_syscall+0x48/0x10c [ 12.421388] el0_svc_common.constprop.0+0xc8/0xe8 [ 12.421399] do_el0_svc+0x20/0x2c [ 12.421409] el0_svc+0x34/0xf0 [ 12.421419] el0 boot4: [ 12.874949] SError Interrupt on CPU2, code 0x00000000bf000002 -- SError [ 12.874984] CPU: 2 UID: 0 PID: 1165 Comm: (udev-worker) Tainted: G M C 6.18.2-current-meson64 #1 PREEMPT [ 12.874999] Tainted: [M]=MACHINE_CHECK, [C]=CRAP [ 12.875003] Hardware name: 12.875086] x17: 0000000000000000 x16: ffff00000495fc00 x15: ffff000002098ea3 [ 12.875095] x14: 0000000000000001 x13: ffff000002098ea0 x12: ffff00000b244200 [ 12.875105] x11: 0000000000000006 x10: ffff8000812e5a60 x9 : 1fffe0000092e981 [ 12.875114] x8 : 0000000000000001 x7 : ffff000004974c00 x6 : ffff000004974c08 [ 12.875123] x5 : ffff800082a1b6b0 x4 : 0000000000000025 4 [ 12.875207] vpanic+0x320/0x364 [ 12.875215] nmi_panic+0x0/0x68 [ 12.875221] add_taint+0x0/0xbc [ 12.875227] arm64_serror_panic+0x70/0x80 [ 12.875235] do_serror+0x3c/0x78 [ 12.875242] el1h_64_error_handler+0x34/0x50 [ 12.875251] el1h_64_error+0x6c/0x70 [ 12.875260] el1_abort+0x34/0x68 (P) [ 12.875268] el1h_64_sync_handler+0x50/0x104 [ 12.875212.875453] __platform_driver_register+0x24/0x30 [ 12.875462] lima_platform_driver_init+0x20/0x1000 [lima] [ 12.875486] do_one_initcall+0x70/0x200 [ 12.875495] do_init_module+0x58/0x23c [ 12.875508] load_module+0x1e78/0x1ed4 [ 12.875516] init_module_from_file+0x88/0xcc [ 12.875526] __arm64_sys_finit_module+0x1ec/0x300 [ 12.875535] invoke_syscall+0x48/0x1 -
Hello, I'm new to embedded linux installation, so please bear with me. So I purchased an android tv box labeled h96max S905L3 from TEMU. Specifications (if the label is trustworthy): RAM: 2GB, ROM:16GB, running android 14.0. On the pcb it says: s905_zx02_v01. It features an ethernet port, 2 USB, HDMI, AV port (looks like a headphone jack) and no hidden reset button or sd card slot. I was trying to install any kind of linux to it using a bootable usb, I just need a simple shell capable of running an http server. I have tried using the remote control to trigger boot to linux, but nothing works. I have then opened the thing, and connected uart to a RP2040 and wrote a simple script as a uart bridge. I now have access to u-boot shell, interupted setup. So far I used chatgpt to guide me, but couldn't get it to boot properly. It told me how to boot manually the image from the usb, but it failed every time. It told me to set these env vars, and over time it showed me different addresses. It said the issues were related to overlapping of the addresses, or using address range that was reserved. It also said the dtb which I used, the meson-gxl-s905x-p212.dtb won't work, since the device always threw an error bad_magic, even though I checked fdt header, and the magic was correct. setenv kernel_addr_r 0x20000000 setenv ramdisk_addr_r 0x24000000 setenv fdt_addr_r 0x21000000 I would then load the files fatload usb 0:1 ${kernel_addr_r} linux-android.img fatload usb 0:1 ${ramdisk_addr_r} uInitrd fatload usb 0:1 ${fdt_addr_r} vendor-expanded.dtb Notice: I used different images, firstly the Image file, and the meson-gxl-s905x-p212.dtb. After failed boots, chatgpt told me to expand, i.e. add padding to the dtb (first with the meson...dtb, and after that with the vendor.dtb). It didn't work, so it told me to generate an android like image using mkbootimg \ --kernel Image \ --dtb vendor-expanded.dtb \ --cmdline "console=ttyAML0,115200 console=ttyS0,115200 root=/dev/sda1 rootwait rootdelay=10 rw" \ --base 0x0 \ --pagesize 2048 \ --kernel_offset 0x1080000 \ --dtb_offset 0x1000000 \ -o linux-android.img and boot using the extracted vendor.dtb (pulled from android) and using bootm ${kernel_addr_r} instead of booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} The bootargs I used are setenv bootargs "root=/dev/sda1 rootfstype=ext4 rw rootwait console=ttyAML0,115200n8 console=tty0" Please, any help would be appreciated as I already spent over 6 hours with this little cheap bastard that wouldn't boot anything but that chinese android. I will post output of anything, just let me know if something is needed. I'm sorry for the messiness of this post, but I tried a lot of things that chatgpt told me, explained the errors, and supplied commands for the u-boot shell.
