3 3
PiotrO

s905w boot process?

Recommended Posts

3 hours ago, balbes150 said:

It's funny. From the beginning you declared your GIT "pure vanilla Armbian" for TV boxes, and after you were informed about errors in it, you hurried to change it and ask a question,"what errors". But did not answer an important (for users) question, how do you propose to run your version of the images on TV boxes ..... :)

 

https://github.com/paolosabatino/armbian-build/commit/3299439630ed68461c791a2f2281684940f08910

I truly don't understand what you mean: that's a merge from master I made yesterday to update the project to latest armbian mainline bits. Keeping the repo aligned with mainline armbian, what's wrong with that?

About the usage instructions, just compile the armbian the normal way (there will be a new mxq-s905-v20 board to choose) and burn the output image onto an sdcard.

Again: to let the tvbox boot from the sdcard, eMMC must be erased.

Share this post


Link to post
Share on other sites
47 minutes ago, jock said:

Again: to let the tvbox boot from the sdcard, eMMC must be erased.

I booted so many times my 3 tv boxes from sdcard and never had to erase eMMC.  I'm still not sure even is it safe.

Even in pdf which you pointed, I can't  find where is written to have to erase flash, there are just few u-boot commands:

5. If there's some old data on the flash, you might wish to erase them all  (recommendation, but just for data)

# store init 3 (u-boot command)

# reset // now the system starts from sd card (u-boot command)

Maybe i have some special tv-boxes, i bought the cheapest one from Ali and GB.

 

Share this post


Link to post
Share on other sites
1 hour ago, zogu said:

I booted so many times my 3 tv boxes from sdcard and never had to erase eMMC.  I'm still not sure even is it safe.

Even in pdf which you pointed, I can't  find where is written to have to erase flash, there are just few u-boot commands:

5. If there's some old data on the flash, you might wish to erase them all  (recommendation, but just for data)

# store init 3 (u-boot command)

# reset // now the system starts from sd card (u-boot command)

Maybe i have some special tv-boxes, i bought the cheapest one from Ali and GB.

Well my box is pretty "standard" (mxq-s905-v20 says the signature on the PCB), and the above procedure works. It's not for the faint of heart, I agree.

Anyway, in your setup the binary amlogic blobs and u-boot are on eMMC and then the kernel is took from the SDCard.

For the full stack (binary amlogic blobs, u-boot, kernel) to boot from the SDCard you have to remove the bootloader from the eMMC. There is another trick which works with Rockchip SoCs: short the CLOCK pin to ground of the eMMC. Not sure if it works on amlogic SoCs too, but I guess they all follow the same pattern.

 

You may say: "why bothering with erasing eMMC and doing more work for the same...". Well, it's like treating the tv box as the same SBC boards out there rather than a "black box": removing as most blobs as possible to really make the hardware yours.

 

Share this post


Link to post
Share on other sites
4 hours ago, jock said:

Again: to let the tvbox boot from the sdcard, eMMC must be erased. 

I'm not a masochist to put on such experiments.  I have everything I need to restore almost any AML TV box, but I'm not going to do such stupid experiments.  B)

All the more I strongly not recommend other to do such experiments without serious training and real need.

 

 

3 hours ago, zogu said:

# store init 3 (u-boot command)

This command completely erases the entire eMMC (including the u-boot loader), turning the TV box into a brick. To start system, you need a guaranteed working version of u-boot for your TV box model or set (firmware+cable+software) to restore from the PC.

The instruction referenced by the user is intended solely for developers who need to be able to test their work. In particular, check the operation of its version of u-boot. Are you a system developer? :)

Share this post


Link to post
Share on other sites

 

24 minutes ago, balbes150 said:

I'm not a masochist to put on such experiments.  I have everything I need to restore almost any AML TV box, but I'm not going to do such stupid experiments.  B)

All the more I strongly not recommend other to do such experiments without serious training and real need. 

Your choice. Doing "experiments" is for people who has the proper skills to do that. As long as you asked, I answered. Never said you or anyone else must do it for any reason.

 

just to be clear, because it looks like I'm bringing people into mysterious and self-destroying practices: perhaps you intend "you have to" as instructions or obligation to follow a suggestion; NOPE. It is intended as "in the case you want to do this, the fullfil your goal the operation to do is ...". So, again, I'm not suggesting anyone to erase their's eMMC, just explaining how the boot thing works (it still looks like the thread title is "s905w boot process?", isn't it?)

Share this post


Link to post
Share on other sites

It does not look so dangerous :D, didn't know what it does.
I don't want to brick my box and never tried soething what i don't know what it does, , but also i have some skills and a lot of hardware (uart, jtag, eeprom and flash programmers), but usually i'm using it when someone else brick his device.
Thank you for explanation and all your help for all our devices. I'm using older version on my tv boxes, but i like to learn and test everything else ;)

I'm not developer, i work as linux sysadmin, i just quote what jock posted not knowing what this command does. 

1 hour ago, balbes150 said:
This command completely erases the entire eMMC (including the u-boot loader), turning the TV box into a brick. To start system, you need a guaranteed working version of u-boot for your TV box model or set (firmware+cable+software) to restore from the PC.
The instruction referenced by the user is intended solely for developers who need to be able to test their work. In particular, check the operation of its version of u-boot. Are you a system developer?

 


Sent from my Redmi Note 4 using Tapatalk
 

 

Share this post


Link to post
Share on other sites

Guys,

I think we need to distiguish booting from sd and _unattended_ booting from sd.

In case of my hw (tx3-mini) I think unattended boot from sd is NOT possible without erasing[modifying] eMMC bootloader.

I think so as IPL by default is passing control to eMMC.

So if we want unattended boot from SD - we MUST:

1\ change eMMC content

2\ modify IPL

As IPL is in ROM (I think) -  only option 1\ is choice.

 

Reasonably written IPL should have fall-back to SD[USB] if SPL from eMMC fails (i.e. for case when flash ageing leading to data rot). In such case IPL should offer recovery by booting from SD and refresh eMMC SPL.

So I agree with initial @jock answer as IMHO his intention was to describe what needs t be done to have tv-box _unattended_ boot from sd

 

 

Share this post


Link to post
Share on other sites
6 hours ago, PiotrO said:

Guys,

I think we need to distiguish booting from sd and _unattended_ booting from sd.

In case of my hw (tx3-mini) I think unattended boot from sd is NOT possible without erasing[modifying] eMMC bootloader.

I think so as IPL by default is passing control to eMMC.

So if we want unattended boot from SD - we MUST:

1\ change eMMC content

2\ modify IPL

As IPL is in ROM (I think) -  only option 1\ is choice.

 

Reasonably written IPL should have fall-back to SD[USB] if SPL from eMMC fails (i.e. for case when flash ageing leading to data rot). In such case IPL should offer recovery by booting from SD and refresh eMMC SPL.

So I agree with initial @jock answer as IMHO his intention was to describe what needs t be done to have tv-box _unattended_ boot from sd

For TV boxes (and not only) everything you need to run different systems from external media has long been developed, tested and used on thousands of devices. And it's called " universal multi-boot." It is used in all versions of Armbian, Libreelec, Archlinux, Volumio etc for TV boxes on Amlogic s905 s912 s805 S812 etc. If you like to "reinvent the wheel" - that's your right. By the way, you can run an external system without any modification of u-boot (for example, if the user does not want to make the  minimum changes to the existing system on his TV box), but it is not convenient, because it will require each time to run a regular Android and perform several steps in it.

Share this post


Link to post
Share on other sites
7 hours ago, PiotrO said:

Guys,

I think we need to distiguish booting from sd and _unattended_ booting from sd.

In case of my hw (tx3-mini) I think unattended boot from sd is NOT possible without erasing[modifying] eMMC bootloader.

I think so as IPL by default is passing control to eMMC.

So if we want unattended boot from SD - we MUST:

1\ change eMMC content

2\ modify IPL

As IPL is in ROM (I think) -  only option 1\ is choice.

 

Reasonably written IPL should have fall-back to SD[USB] if SPL from eMMC fails (i.e. for case when flash ageing leading to data rot). In such case IPL should offer recovery by booting from SD and refresh eMMC SPL.

So I agree with initial @jock answer as IMHO his intention was to describe what needs t be done to have tv-box _unattended_ boot from sd

You exactly got the point! :thumbup:

Share this post


Link to post
Share on other sites

Guys,

Finally I have working (and quite understand) booting on my s905w with my full control on software used/configured.

My system is working enough to start exploring GLES (via ARM mail blobs)  and hw video decode (v4l2 m2m).

Huge thx for Your really helpful support!

 

Just quick Q:

Has anybody have this in kernel log (in every 120sec)?

[  242.654622] INFO: task kworker/2:1:35 blocked for more than 120 seconds.
[  242.655686]       Not tainted 4.19.0 #1
[  242.659570] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  242.667272] kworker/2:1     D    0    35      2 0x00000028
[  242.672714] Workqueue: events_freezable mmc_rescan
[  242.677434] Call trace:
[  242.679908]  __switch_to+0x94/0xd8
[  242.683224]  __schedule+0x1e4/0x620
[  242.686677]  schedule+0x38/0xa0
[  242.689761]  schedule_timeout+0x1f4/0x378
[  242.693761]  wait_for_common+0xb8/0x170
[  242.697537]  wait_for_completion+0x14/0x20
[  242.701635]  mmc_wait_for_req_done+0x28/0x170
[  242.705950]  mmc_wait_for_req+0x80/0xf0
[  242.709705]  mmc_send_tuning+0x120/0x1d8
[  242.713580]  meson_mmc_execute_tuning+0x68/0x228
[  242.718194]  mmc_execute_tuning+0x60/0xa0
[  242.722120]  mmc_init_card+0x8c4/0x19d0
[  242.725922]  mmc_attach_mmc+0xc0/0x180
[  242.729658]  mmc_rescan+0x300/0x3d8
[  242.733075]  process_one_work+0x1e8/0x340
[  242.737035]  worker_thread+0x40/0x460
[  242.740700]  kthread+0x128/0x130
[  242.743854]  ret_from_fork+0x10/0x1c

I don't have this with balbes150 kernel - so there must be something balbes150 add to his kernel and I'm missing....

 

 

Share this post


Link to post
Share on other sites
On 11/17/2018 at 12:04 AM, PiotrO said:

Just quick Q:

Has anybody have this in kernel log (in every 120sec)?

I don't have this with balbes150 kernel - so there must be something balbes150 add to his kernel and I'm missing....

 

 

 

It seems that the eMMC driver has some issues dealing with it. Are you compiling your own kernel or using an already compiled one?

AFAIK the eMMC driver is work in progress and in my latest tests (long ago) on 4.18 it was not working at all (or not present, didn't dig through)

Share this post


Link to post
Share on other sites
33 minutes ago, jock said:

Are you compiling your own kernel or using an already compiled one?

I'm building my own kernel by patching mainline 4.19.0

Probably diff on my kernel vs. balbes150 will give hint - but maybe balbes150 has quick idea here?

 

Share this post


Link to post
Share on other sites

By accident I discover that issue events_freezable mmc_rescan is 4.19 GA regression compared to 4.19-rc4 as I don't have this in 4.19-rc4.

Need to look at kernel sources.

Any pointers to narrow such sources inspection?

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
3 3