Jump to content

Armbian for Amlogic S9xxx kernel 5.x


balbes150

Recommended Posts

Armbian & Khadas are rewarding contributors

On 8/12/2018 at 7:19 PM, balbes150 said:

Install Armbian to eMMC.

1. Be sure to activate multi-boot using the new image. If multiboot previously activated is required to repeat activation using files in a new image.

2. Run Armbian from external media, run "ddbr" and create full backup eMMC.

3. Execute script “/boot/create-mbr-linux.sh”

4. and install Armbian on eMMC execute script “/root/install.sh”.

 

Please note, this is a test installation, which was tested only on a few models. Possible errors (Armbian will not boot) when you are working on unverified models which used non-standard distribution of partitions in the eMMC. Therefore, be sure to back up the "ddbr" utility before running the scripts.

Thank you very much @balbes150 for maintaining such a cool project.

 

Last time I used Armbian, It was enough for me to run the create-mbr script + install.sh script. I want armbian to run from emmc and I don't care about android or multiboot.

 

So I have k two questions:

 

-1 What is multiboot, is it compulsory ?

-2  @balbes150 From the image v 5.71 that I have, it looks like /boot/create-mbr-linux does not exist anymore, can you please update this post, it looks misleading to me (I previously ricked my box because I missed this step)

Link to comment
Share on other sites

1. Universal multi-loading is a prerequisite.

2. The installation process is simplified, now it is enough to run one installation script, it contains all the steps (which were previously in two scripts).

 

 

I left until the previous version of the steps, perhaps someone will use the first versions of the images.

Link to comment
Share on other sites

I just launched the update with aml_autoscript. Does it even make sense that gparted id reporting this structure ?

 

 

I will try to launch the install.sh script (install 2018 complained about Not found new u-boot so I guess I have to use the other one)

 

Thank you very much balbes for your help

20190116_183805.jpg

Link to comment
Share on other sites

On 12/30/2018 at 2:59 PM, hojnikb said:

Does eMMC booting work on latest versions ? I tried Armbian_5.67_Aml-s9xxx_Ubuntu_bionic_default_4.19.7_desktop_20181228 on my Sunvell T95X and while sd boot works flawlessly, when installing to nand using  /root/install.sh script it finished installing successfully, but after i reboot the device, it does not boot (stuck at amlogic logo). Am i doing something wrong here ?

 

Prior to installing armbian i reflashed the device with stock firmware and activated multiboot using aml_autoscript zip.

 

@hojnikb I have exactly the same problem with 5.71, did you mnaged to find a solution ? I was initially using install.sh script flawlessly, then I had to use the create-mbr script and install script. Now I have to install the aml_script and then the install .sh script  and I do not even manage to understand why it doesn't work.

 

I now fear each version change like it is pure evil because everytime it takes me 1 or 2 full days to understand how the new setup procedure works, and of course, there is a high chance that I brick my box everytime.

Link to comment
Share on other sites

On 12/31/2018 at 12:13 AM, Turgus said:

Did you try to install it via the armbian-config tool? ..I always used that and got no problems to install..

 

I tried installing using armbian-config tool, and of course it does not work any better. Ii is extremely hard for me to understand why I managed to make my box to run perfectly in 2017 with a 3.14 kernel, installing armbian to emmc without a single problem, running with wifi and everything. But now in 2018 with all the supposedly bugfixes, I did not managed to get everything to work but the SD boot, without wifi, and that required me some more work, like using the aml_autoscript.

 

Some people talk about the aml_update, that was apparently mandatory at some point, but is not delivered anymore in the prebuilt images, might this explain my problems ?

Link to comment
Share on other sites

@balbes150 So I used the  Update app from android with the aml_script.zip from the 5.71 image.

After the automatic reboot, I tried to install to emmc with /root/install.sh

Now box is stuck on logo (H96 pro+) when I boot without SD card

 

If I put the SD card back, then I boot again with linux

I tried from there to run the install directly from the armbian-config, and at the reboot nothing changed, I still have the same behaviour

 

In addition to that, the 5.71 image (and meson-gxm-q200 dtb) does not look like it is delivered with any kind of wifi module. The wifi_dummy module that was previously delivered is not available anymore.

 

after a while [...]

 

I decided to try to move /boot/s912-uboot.img to /boot/uboot.img

and then run /root/install-2018/sh

 

Removed the SD card and rebooted

 

Now the H96pro+ logo is not showing anymore, which indicates that I most likely bricked my box again (it is far from being the first time that an attempt of installing armbian to emmc result in bricking my box...) at least, something happen, I see the kernel loading and issuing some warnings, it looks like it cannot detect usb stuff, and then after a few other line passes, the screen becomes black. And after a few more minutes, a session login screens appears, but of course, my usb keyboard does not work, so I cannot do anything.

 

Of course, now I cannot boot the SD card anymore.

 

Is there a proper installation guide somewhere that I was too dumb to find, or does everybody randomly wanders around options depending on which internet posth and scripts they find, bricking boxes here and there in the process (no aml_script, aml_script, aml_script + aml_updatescript, emmc_autoscript, etc...) and then installation procedure (dtb choice, uInit file, or dtb.ing, etx directory, ...create-mbr.sh, install.sh, install-2018.sh).

Link to comment
Share on other sites

Ok looks like I bricked my box forever with that method of installation (install-2018.sh with s912-uboot copied as uboot.img).

 

The firmware flash procedure does not even work anymore now. I now need to shortcut some pins from the emmc to start the flash process, and after that amlogic usb burning tools stops at 7%. It might be that pluging in the power source causes the system to boot, interrupting the interaction with emmc, but I am not sure. Any idea how to fix this, by forcing erasing of the emmc (even physically if possible).

 

I still have another S912 box, but keeping up to date with armbian is clearly too painful and risky, no installation guide whatsoever, just random bits of info here and there, generally without explanation of what happens under the hood, or link to opensource code, and high chance of bricking your box.

Link to comment
Share on other sites

@gnthibault

 

I think this is kernel related. Since you had the box booting in older 3.14 kernel, i'm gonna assume the new 4.x kernel does not have the appropriate mmc/nand driver to boot from internal.

 

Personally, i've given up on armbian for this box and went with lakka instead. Since i'm only using this box for retro gaming, it's fine and nand install works flawlessly. I just wish lakka past version 2.0 would actually work properly.

Link to comment
Share on other sites

@gnthibault

Before flashing to internal you could have taken backup from internal eMMC (using ddbr) to restore when anything goes wrong or should you change your mind and decide to revert back.

The install-2018 script is text file and easy to understand. So certainly open source and also self documented.

Nevertheless, I always run it step by step manually (did so twice on different s912 kvim2) as to double check for myself what is being done.

Basically it partitions eMMC and copies SD to eMMC. Then it adjust few text files to refer to eMMC in stead of SD.

Are your 2 S912 boxes equal model? Then maybe you can backup eMMC from one and restore it to other? Just a thought...

 

Link to comment
Share on other sites

14 hours ago, gnthibault said:

Is there a proper installation guide somewhere that I was too dumb to find, or does everybody randomly wanders around options depending on which internet posth and scripts they find, bricking boxes here and there in the process (no aml_script, aml_script, aml_script + aml_updatescript, emmc_autoscript, etc...) and then installation procedure (dtb choice, uInit file, or dtb.ing, etx directory, ...create-mbr.sh, install.sh, install-2018.sh). 

Why are you in a hurry and do not wait for an answer, as you had to do after the first run of the installation script from version 5.71 ? You already have a version with kernel 3.14 installed, and the transition to the new kernel should be done differently. Now you will have to perform many other steps to restore the TV box.

Link to comment
Share on other sites

Hi, thank you both for your answer

 

@balbes150: I apologize for the tone of my previous text, it was not nice given the fact that most people here, and you first, are doing a great work, and provide it freely to the rest of the world. Instead of complaining I should look at how I can support the project, and write the documentation myself (actually I did it at some point, and it is still available on github, but not in a nice format and it is has not been updated since).

I do not care much about doing errors requiring me to reflash my box, if at least I learn something in the process, and I always come back to the thread where I ask questions to report my findings. What bothers me however, is to completely brick a box, (I fear that it is what I did), and do not learn anything in the process (I still have no clue about what is the difference between install and install-2018 like who generated the uboot image, where does it comes from, and why my emmc partitionning was so weird after the aml_autoscript).

 

@Nofan Tasi: thank you for your help

I did not saved the original eMMC because I do know (at leat I though I knew) how to flash a valid firmware, and I have a spare box that is exactly similar.

Regarding the eMMC, I tried to check the aml_autoscript, I saw that there was some binary content inside, and it was not clear, what the Update&Backup app was doing. After running the Update&Backup procedure on android, and rebooting on armbian, I tried to understand why the emmc was partitioned that way, which for me was not making any sense (check my previous thread, and now I still have no clue about what happened and why the partitionning of emmc is so weird).

Regarding the bricked S912 box, I will check, but from what I see, the current state of the box does not allow me to flash the emmc with a new firmware (with amlogic usb burning tool, that consistently fails a 7%)

 

Link to comment
Share on other sites

2 hours ago, gnthibault said:

with amlogic usb burning tool, that consistently fails a 7%

Did you try all possible USB Ports with and without Power supply for the box? It took for me also some time to find out which usb port on which laptop is usable for flashing with the usb burning tool. Even on two identical Thinkpads I need to use one of the usb 3.0 ports on the first laptop, but the other burns boxes only on the usb 2 port. Until I found the right ports burning also stopped at 7%, but at the "good" port it works mostly at first attempt. Once(after a power failure whilst flashing) I had to shorten a Pin on eMMC to get the box running again, but I'd try the different combinations of ports first because this bricked device was not recognized from burning tool at all.  What about writing desired image onto sd card with amlogic boot card maker(or how it is called)and try to boot that?

Link to comment
Share on other sites

1. The structure that gparted shows is correct. The installation script is specially written so that it is as safe as possible to put the system in the eMMC. It keeps all the important data structure of the standard firmware in eMMC (u-boot env recovery boot etc). This allows you to use regular tools to restore native Android firmware in any TV box at any time.

2. When you renamed the file " s912-u-boot.img", you took the risk (I warned about this earlier in this topic) of replacing the regular u-boot-2015 with a new version of u-boot-2018. New version assembled and tested only on Khadas VIM2 (it I told). So when you replaced your u-boot-2015 with a new one, you got a problem. The new u-boot-2018 cannot work with standard firmware tools. It is not known whether the new u-boot is compatible specifically with your TV box model or not.

3. You may now have to perform special steps to restore the health of your TV box.

4. All new versions are specially launched from external media to check if everything works on your hardware correctly. Only then is the installation done on the eMMC. For example, in core 4.x there is no support for many Wi-Fi on some models does not work USB, etc.

5. If USB does not work, to restore the ability to control the system , you have to use either SSH through the network or UART. At that moent when you installed the new version into eMMC, but it is not working USB, have you had the opportunity small means to restore the system to its previous level, but again you hurried and did not wait for advice on how to do it.

6. I do not understand what the current state of the system in eMMC is. What happens if  turn on the TV box, which messages appear on the screen ?

 

Link to comment
Share on other sites

15 hours ago, Turgus said:

Did you try all possible USB Ports with and without Power supply for the box? It took for me also some time to find out which usb port on which laptop is usable for flashing with the usb burning tool. Even on two identical Thinkpads I need to use one of the usb 3.0 ports on the first laptop, but the other burns boxes only on the usb 2 port. Until I found the right ports burning also stopped at 7%, but at the "good" port it works mostly at first attempt. Once(after a power failure whilst flashing) I had to shorten a Pin on eMMC to get the box running again, but I'd try the different combinations of ports first because this bricked device was not recognized from burning tool at all.  What about writing desired image onto sd card with amlogic boot card maker(or how it is called)and try to boot that?

 

Thank you for your feedback. The thing is that, I have been able to flash another box (same model) in the exact same conditions. From what I can see, the problem is mostly that the box tries to boot disregarding what I am doing on the side (trying to flash it essentially), and apparently the boot process prevents the flashing process to happen. Hence I am stuck with  a box that boots with a useless image (not the right dtb for the file, so basically it is just showing off the login screen, and I cannot interact with it), and that I cannot flash either, this is very frustrating.

 

Balbes150, thank you for your explanations, what also remains unclear for me, is that, although I installed the aml_autoscript+install-2018.sh, I don't understand how this was related to multiboot, because right now, I have no way to boot on the SD card (only the broken linux image from emmc).

 

Regarding the impossible flash, my guess is that (by launching install-2018.sh) I erased whatever subsytem, launched from emmc was allowing the firmware flash from usb .

 

Lets say that this box is now completely useless (and will most likely endup to the trash), It still remain unclear for me how I should install armbian on the second box.

Link to comment
Share on other sites

43 minutes ago, gnthibault said:

Lets say that this box is now completely useless (and will most likely endup to the trash), It still remain unclear for me how I should install armbian on the second box. 

If Armbian starts and even shows you the login window-Your TV box is easy to restore. Write the image to the Sd card. Specify in "/extlinux/extlinux.conf" which dtb to use. I recommend starting with the file for Khadas VIM2. Uncomment the line with its instructions and delete (or comment out) the line from Khades VIM1. The result of the launch of write here. And do not rush to do something without advice.

Link to comment
Share on other sites

I tried to install the image to my other box:

-Changed path to the right dtb in uEnv

-Updated from armbian with am;_autoscript

-Reboot , changed he path to the right dtb in extlinux

-Launched install.sh script

 

Reboot... and box is now stuck on the H96pro+ logo (nothing happen until I put the SD back in). Which is exactly what happened with my previous box, but this time, I won't try the install-2018.sh

Link to comment
Share on other sites

1 hour ago, gnthibault said:

I tried to install the image to my other box:

-Changed path to the right dtb in uEnv

-Updated from armbian with am;_autoscript

-Reboot , changed he path to the right dtb in extlinux

-Launched install.sh script

 

Reboot... and box is now stuck on the H96pro+ logo (nothing happen until I put the SD back in). Which is exactly what happened with my previous box, but this time, I won't try the install-2018.sh

Tell me, do you create problems on purpose ? I wrote you what you need to do on TV box, where you have already created a problem. And only after you find the right solution for the spoiled TV box, you can start experimenting with others.

 

What DTB did you use on the second TV box ?

 

Show the full contents of the "uEnv.ini " and " extlinux.config" after you have edited them.

Link to comment
Share on other sites

4 hours ago, balbes150 said:

Tell me, do you create problems on purpose ? I wrote you what you need to do on TV box, where you have already created a problem. And only after you find the right solution for the spoiled TV box, you can start experimenting with others.

 

What DTB did you use on the second TV box ?

 

Show the full contents of the "uEnv.ini " and " extlinux.config" after you have edited them.

 

Ahaha I try not to ^^ 

More seriously, I did everything in my power to recover the first box, but apparently there is nothing I can do to get it back on track (it does not boot ftom sd, impossible to flash, and boot from emmc result in a useless distro that does not take anything from usb port). I will try to do a last check on monday, and dump my config files here. Thank you very much for your support. 

 

Good point though, the frustration led me to invest in a rock64pro, and I will most likely use armbian on this one as well.

Link to comment
Share on other sites

24 minutes ago, gnthibault said:

 

Ahaha I try not to ^^ 

More seriously, I did everything in my power to recover the first box, but apparently there is nothing I can do to get it back on track (it does not boot ftom sd, impossible to flash, and boot from emmc result in a useless distro that does not take anything from usb port). I will try to do a last check on monday, and dump my config files here. Thank you very much for your support. 

 

Good point though, the frustration led me to invest in a rock64pro, and I will most likely use armbian on this one as well.

 

I think gnthibault I've mentioned this before in forums but is it possible confusion may be occurring between duplicate partition labels?
In fstab, you have LABEL=ROOTFS /  and in uEnv.ini etc bootargs=root=LABEL=ROOTFS
What I'm saying is the internal emmc flash and sdcard may have the same ROOTFS label.

Perhaps take the sdcard and relabel the ROOT partition with tune2fs or get UUID= value from blkid (and changing boot files in /boot/ and /etc/fstab ?

Link to comment
Share on other sites

On 1/16/2019 at 3:54 PM, blakadder said:

Is there any guide about updating from .deb files? Do i install all .deb files?

Did you get a reply on this?

 

I am curious about updating armbian s912.

 

I do not understand the difference between

sudo apt-get update / upgrade

 

and

 

doing a .deb upgrade.

Link to comment
Share on other sites

..I guess @blakadder thought, that the deb files hosted with the images(which needs to be installed manually if needed) are some kind of Updatefiles to  update in a similar way like the update on Libreelec!?..
To update  the installed packages to newer versions

sudo apt-get update
sudo apt-get upgrade

(or via Synaptic if installed) is the only way to do this properly.
To update the whole Version (e.g. from 5.67 --> 5.71) you need to install the new image onto card to test and (if you want to) install it onto eMMC AFTER HAVING A WORKING SYSTEM ON CARD. If you backup your home directory before, it is much easier to get back your desired settings/files. Also a backup of the complete old system via ddbr is sometimes useful, if you install the new image to eMMC without testing enough or install fails somehow..

 

Link to comment
Share on other sites

9 hours ago, gnthibault said:

More seriously, I did everything in my power to recover the first box, but apparently there is nothing I can do to get it back on track (it does not boot ftom sd, impossible to flash, and boot from emmc result in a useless distro that does not take anything from usb port). I will try to do a last check on monday, and dump my config files here. Thank you very much for your support. 

Have you implemented these guidelines ?

 

9 hours ago, dbsharpe said:

What I'm saying is the internal emmc flash and sdcard may have the same ROOTFS label.

Perhaps take the sdcard and relabel the ROOT partition with tune2fs or get UUID= value from blkid (and changing boot files in /boot/ and /etc/fstab ? 

There can be no identical label. The installation script specifically changes the eMMC label and uses its eMMC value in the settings. Using UUID is a bad solution that is often used by those who do not want to properly design the installation system.

 

Link to comment
Share on other sites

18 hours ago, balbes150 said:

The new version 5.71 20190118.
Updated kernel to 4.20.2.

New kernel, thanks :-)

Working nicely on my BM8 Pro - s912 2gb ram & T95Z Plus - s912 3gb ram.

Desktop fluid, firefox streaming video ok

Link to comment
Share on other sites

8 hours ago, amirul said:

New kernel, thanks :-)

Working nicely on my BM8 Pro - s912 2gb ram & T95Z Plus - s912 3gb ram.

Desktop fluid, firefox streaming video ok

does also -including Desktop- work on my T95K-Pro

as before ethernet only via USB-Dongle or  WiFi wlan0 via the nvram_ap6330.txt-copy-"trick":

Spoiler

To fix, use

copy nvram_ap6330.txt to /lib/firmware/brcm/nvram_ap6330.txt

 

mv /lib/firmware/brcm/brcmfmac4330-sdio.txt /lib/firmware/brcm/brcmfmac4330-sdio.txt.old
ln -s  /lib/firmware/brcm/nvram_ap6330.txt  /lib/firmware/brcm/brcmfmac4330-sdio.txt

 

reboot

 

nmcli device wifi connect Guidos_WiFi password CPE1704TKS

 

nmtui to configure wlan0

 

nvram_ap6330.txt

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines