Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"x96 mini" S905W TV box how to boot from SD card?

Featured Replies

I have "x96 mini" TV box with seemingly broken eMMC chip (unable to write firmware by USB). S905W SoC. First I've tested if it can boot from SD-card, made with Amlogic Windows utility "Burn Card Maker". The answer is: yes (see the logs below).
 

Spoiler

GXL:BL1:9ac50e:bb16dc;FEAT:ADFC318C:0;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 197450

BL2 Built : 20:32:17, Sep  8 2017.
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1070 mv
Board ID = 2
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0 16bit @ 792MHz
Rank0: 2048MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from SD, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from SD, src: 0x00050200, des: 0x01000000, size: 0x00065e00
NOTICE:  BL3-1: v1.0(release):a625749
NOTICE:  BL3-1: Built : 11:25:15, Aug 25 2017
[BL31]: GXL CPU setup!
NOTICE:  BL31: BL33 decompress pass
mpu_config_enable:ok
[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]
OPS=0xa4
b4 6d 77 fb b7 65 f0 73 5a c7 83 46 [0.547161 Inits done]
secure task start!
high task start!
low task start!
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01-g2d1a155-dirty (Oct 08 2017 - 12:02:50)

DRAM:  2 GiB
Relocation Offset is: 76eb3000
register usb cfg[0][1] = 0000000077f5a960
[CANVAS]canvas init
boot_device_flag : 1
Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1



Second, I've followed the manual. I've copied the file 'u-boot-s905x-s912' to 'u-boot.ext'. I also edited the file 'extlinux.conf', pointing it to 'meson-gxl-s905w-p281.dtb'. The result is in the logs.
 

Spoiler

GXL:BL1:9ac50e:bb16dc;FEAT:ADFC318C:0;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;LOOP:1;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;LOOP:2;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;LOOP:3;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;LOOP:4;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;LOOP:5;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;LOOP:6;EMMC:800;NAND:81;SD:0;READ:0;CHK:A7;USB:8;


The question is: how to boot the device from the SD card? Should I use somehow the original's firmware u-boot (as it works with the the factory firmware)? The SD card was made with 'Balena etcher'. Armbian image was build from gitub repo ("Armbian-unofficial_24.11.1_Aml-s9xx-box_bookworm_current_6.6.62_minimal.img").

Edited by Alex Trezvy

  • Alex Trezvy changed the title to "x96 mini" S905W TV box how to boot from SD card?
  • Author
50 minutes ago, SteeMan said:

Those builds use the original boxes uboot on emmc to boot from.

Sounds weird:
1. We have a couple of "u-boot" files in Armbian img. Including the one that must be copied into "u-boot.ext".
2. There is manual that explains how to make a bootable SD-card with original firmware manually. It should be possible to run Armbian's "u-boot.ext" from SD-card, like it is possible to run original u-boot extracted from an image. Why not?

Edited by Alex Trezvy

Reviving this because I had exactly this situation — S905W box, eMMC completely
dead — and it **is** possible to boot from SD with no working eMMC.


Firstly i had to get the UART all setup to communicate with the board just to find out it was stuck on a boot loop because the emmc was dead.. i was going to replace this later

 

Ideally you need serial communication to get this board working. this will allow you to talk to the hardware otherwise you are just guessing!

 

I have one running Armbian 26.08 (kernel 6.12.103-ophub) right now, booting entirely from the card with nothing attached to the PC.

 

SteeMan is right that the stock aml-s9xx-tvbox builds chainload from the
factory u-boot in eMMC.

 

The fix is to put a real Amlogic bootloader in the card's raw sectors so the mask ROM boots the card directly.

**The part that isn't obvious** is why the sensible-looking attempts fail.

 

It isn't the boot method — it's the DDR parameters. Every board's memory training blob (`acs.bin`) lives in its own bootloader, and on a TV box that means inside
the eMMC. When the eMMC dies, the correct parameters die with it. Borrow a bootloader from another board and BL2 says:

    DDR3 chl: Rank0+1 @ 912MHz - FAIL
    DDR3 chl: Rank0   @ 912MHz - FAIL
    DDR3 chl: Rank0 16bit @ 912MHz - PASS.

 

It falls back to half width, passes a quick self-test, then corrupts memory
under real load. You get a boot that reaches systemd and then panics with
oopses at random addresses. I chased that for hours; it is not a clock speed
issue (768 MHz/CL11 corrupts exactly like 912 MHz/CL13).

 

**What worked:** a u-boot built for the Tanix TX3 Mini, which is also a p281
S905W board, in the matching RAM size:

    https://github.com/arnarg/tx3-mini-uboot-build   release v2019.01
      u-boot-v2019.01-tx3-mini-1g.bin    (1 GB boards)
      u-boot-v2019.01-tx3-mini-2g.bin    (2 GB boards)

Already in raw-sector format, so:

    dd if=u-boot-v2019.01-tx3-mini-1g.bin of=/dev/sdX conv=fsync bs=1 count=444
    dd if=u-boot-v2019.01-tx3-mini-1g.bin of=/dev/sdX conv=fsync bs=512 skip=1 seek=1

One more thing to watch: ophub's `boot.scr` only scans `mmc 1`, and with a dead
eMMC your SD may come up as `mmc 0`, so it looks straight past the card. Write
your own `/extlinux/extlinux.conf` on the boot partition (the image ships only
an `extlinux.conf.bak`), pointing at `/zImage`, `/uInitrd` and
`meson-gxl-s905w-p281.dtb`, with the APPEND line copied from `uEnv.txt`.

Also keep `video=HDMI-A-1:1920x1080@60e` on the kernel command line — without a
forced mode u-boot can hang at console init when no display is detected.

Full write-up with the failure modes of every bootloader I tried, and the
serial logs: 

 

 

Credit to @arnarg for building and publishing those bootloaders — that repo is
the thing that made it work.

774295028_1686893812377761_5472240614551815584_n.jpg

u-boot-tx3-mini-1g.bin README.md scripts.zip

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.