Jump to content

U-boot defective after emmc install s905x3


Recommended Posts

Posted

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.

 

 

Posted

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.

Posted

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.

Posted
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.

 

 

Posted

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

WhatsApp Image 2026-01-24 at 10.29.45.jpeg

Posted

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. 

Posted

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.

Posted

@user03

 

For sm1 devices use --soc=g12a

 

Another option which is something I recently had to do with my BPI-CM4 "if I recall correctly, I've also done so on a tvbox i b0rked" is use pyamlboot.

sudo pip3 install pyamlboot

 

Short the board and run; sudo boot-g12.py u-boot.bin # if you have a functional u-boot binary

This won't actually flash anything, "atleast it didn't in my case?" it will just force the unit to load that boot binary.

 

From there you should be able to hit the SPACEBAR and check ur options using `print` and `help`.

Should see options like usbboot, usb_update, etc.

 

Not saying you should use one of these, but... You may be able to find one online or inside the Android img for ur unit.

https://github.com/pyavitz/debian-image-builder/tree/feature/files/boot/uboot/ac2xx

 

Anyway. At least you got it booting from USB. Next step would be running a recovery on it.

 

Posted

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

Posted

sm1 and g12 share the same common dtsi file.

 

Use that aml flash tool along with --soc=g12a and flash the android img. That should bring you back to where you were. That would be a full recovery.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines