Jump to content

ARMBIAN for Amlogic S905 and S905X (ver 5.44 =<)


balbes150

Recommended Posts

 

This information will be very useful for everyone.

 

Yes I know, but I will insert the Tip with the startup-script, then it will work easier for all.

 

I will only show the UART part.

Link to comment
Share on other sites

 

 

I use computer translation. Sorry, I may not understand Your question. You asked about KODI. What he had in mind ? KODI works on Android. Is there a version of Openelec that you can run on MXQ PRO. Please specify what "docker", give the link.

 

 

Docker is this https://www.docker.com. Armbian runs docker on the clearfog. http://forum.armbian.com/index.php/topic/490-docker-on-armbian/ .

About the kodi, i am asking if kodi can run as an application on the armbian linux not android or openelec.

Link to comment
Share on other sites

 

This information will be very useful for everyone.

 

I have good news, it's working with a auto-script script, so I will finish the last environment lines for autoboot with a Armbian SD card and will post all needed information.

 

FYI: You have to change the resolution in Android and this will set the environment, which will used from Armbian auto-script.

Link to comment
Share on other sites

@balbes150

 

thanks for the attention. i guessed that it can run docker and kodi cos all those applications have been supported at the odroids. in-fact @lgor confirmed that it is supposed to run http://forum.armbian.com/index.php/topic/490-docker-on-armbian/  but i wish you could test it on your mxq pro machine, cos i don't have it yet.

 

secondly kodi has been confirmed to be working with hardware acceleration , 4k and cec on the s905 c2 . http://forum.odroid.com/viewtopic.php?f=136&t=19433 . i don't know if you could confirm that on the mxq pro tv box. 

 

thirdly , it will be fine to checkout this odrobian jessie, a c2 derivative.. http://forum.odroid.com/viewtopic.php?t=18771

Link to comment
Share on other sites

Is it possible to reclaim all that reserved memory, like it's done in Odroid's boot.ini? (for headless operation I'd prefer to get close to 2GB)

​

@balbes150 I've modified the s905_autoscript.txt and produced a new s905_autoscript but it seems setenv m "sxga" is not supported (black screen). ​Which modes are supported and how do I add a new one? 

​

​

​

​

​

​

​

Link to comment
Share on other sites

1. Remove not needed packages. Remove unnecessary files. Disabled in fstab to mount SWAP. Repartition (del SWAP). For example using gparted. This can be done without a PC. To boot Linux from a USB TV box and change the partitions on the SD card or Vice versa.

2. TV box has an HDMI output. You can only use the HDMI settings.

Link to comment
Share on other sites

I meant memory, not storage. Right now just `1823856` bytes is avaliable. Look at these lines in boot.ini:

​

if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi

if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi

The first line probably doesn't apply here, but the second might, freeing the reserved framebuffer memory.

​

​Re: HDMI - how does Odroid manage to display all those other modes?

​

​

Link to comment
Share on other sites

Hi,

here is a short howto to boot Armbian on Mini M8S from SD Card.

You have to change the u-boot environment to check the SD-Card and then start a autoscript script.

To boot the Armbian image you have to change some files from Armbian, change all mmcblk0 to mmcblk1 in file /etc/fstab /etc/init.d/firstrun /etc/init.d/resize2fs

You need the file boot-s905.txt and have to convert it to autoscript, the Mini M8S u-boot can't work with Armbians u-boot boot.ini.

setenv cec "cecf"
setenv mesontimer "0"
setenv nographics "0"
setenv condev "console=ttyS0,115200n8 console=tty0 consoleblank=0"
setenv verbosity "255"
setenv bootargs "root=/dev/mmcblk1p2 rootwait rootflags=data=writeback rw ${condev} no_console_suspend hdmimode=${hdmimode} m_bpp=${display_bpp} fsck.repair=yes loglevel=${verbosity} net.ifnames=0"
setenv initrd_loadaddr "0x13000000"
fatload mmc 0:1 ${initrd_loadaddr} uInitrd
fatload mmc 0:1 ${loadaddr} zImage
fatload mmc 0:1 ${dtb_mem_addr} dtb/meson8_Mini-M8S.dtb
fdt addr ${dtb_mem_addr}
if test "${mesontimer}" = "1"; then fdt rm /timer; fi
if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi
booti ${loadaddr} ${initrd_loadaddr} ${dtb_mem_addr}

Convert it with u-boot tools to autoscript.

mkimage -A arm -O linux -T script -C none -d boot-s905.txt s905_autoscript

Copy it to SD-Card to the boot partition, and also copy the file "meson8_Mini-M8S.dtb" the Boot partition in folder "dtb".

Now open the case and connect the UART connector.

post-962-0-87826300-1467144775_thumb.jpg
post-962-0-43147500-1467144783_thumb.jpg

Read this Howto for more informations.
http://www.cnx-software.com/2015/12/06/how-to-run-headless-linux-on-amlogic-s905-devices-such-as-mini-mx-or-k1-plus/#

setenv preboot "run factory_reset_poweroff_protect;run upgrade_check;run bootmode_check;run init_display;run storeargs;run upgrade_key;run user_start;run switch_bootmode;"
setenv user_start "if mmcinfo; then run linux_start_mmc;fi;"
setenv linux_start_mmc "if fatload mmc 0 ${loadaddr} s905_autoscript; then echo ===[LINUX START from mmc]===;autoscr ${loadaddr};fi;"
saveenv

After reboot the Mini M8S should boot from SD-Card.

 

Please check the lines and be careful, an error can brake the possibility to interrupt the boot sequence.

 

UPDATE 2016/09/08:

after apt-get distupgrade, the uboot package was updated and this was rewriting the uboot data from emmc, but the Mini m8s is not working with the uboot from Hardkernels Ordroid uboot.

I got this after boot:

***** Warning!! ************************************************** ***
* This board have not been autorized or product keys are not valid. *
* Please contact with Hardkernel or your distributor *
************************************************** *******************

 

After shorten the emmc at boottime, I was able to recover the stockimage via OTG USB and amlogic's windows tool, thanks to balbes150, I found a info on freaktab.

 

So after first armbian boot from SD, you have to remove the uboot package with "apt-get remove linux-u-boot-odroidc2".

boot-s905.txt

s905_autoscript.gz

meson8_Mini-M8S.dtb.gz

post-962-0-87826300-1467144775_thumb.jpg

post-962-0-43147500-1467144783_thumb.jpg

Link to comment
Share on other sites

Thx, @tpc010, nice write-up! Two questions; firstly how much memory is saved by setting nographics to 1? And secondly, are you saying that an M8S Mini that can already boot Ubuntu (via multiboot) won't boot @balbes150's Armbian image? (or were you simply starting from scratch with a vanilla image?)

Link to comment
Share on other sites

Thx, @tpc010, nice write-up! Two questions; firstly how much memory is saved by setting nographics to 1? And secondly, are you saying that an M8S Mini that can already boot Ubuntu (via multiboot) won't boot @balbes150's Armbian image? (or were you simply starting from scratch with a vanilla image?)

Youre welcome, with screenoutput it needs around 330MB Memory after boot and without screen around 150MB after boot, you have to rebuild the autoscript file, don't change it directly in the compiled file. I don't know about Ubuntu on this system, but I think you can test it, now you have all informations to do it.

Link to comment
Share on other sites

We're not talking about how much memory is used (not related to running X) but how much is available to the system (look at the first column in the free command's output). The following line, which is missing from @balbes150 script, should free some more:

if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi

OK, booted Armbian on M8S Mini without a problem using the multiboot method. The 2 GB memory limit is still there (probably the same kernel configuration) but unlike Ubuntu, frequency scaling works. I wonder where the difference is coming from?

Link to comment
Share on other sites

We're not talking about how much memory is used (not related to running X) but how much is available to the system (look at the first column in the free command's output). The following line, which is missing from @balbes150 script, should free some more:

if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi

OK, booted Armbian on M8S Mini without a problem using the multiboot method. The 2 GB memory limit is still there (probably the same kernel configuration) but unlike Ubuntu, frequency scaling works. I wonder where the difference is coming from?

 

Ok sorry, it was to late :-)

 

nographics 1

user@odroidc2:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          1976        174       1801          6          9         78
-/+ buffers/cache:         86       1889
Swap:          127          0        127

nographics 0

user@odroidc2:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          1782        317       1464          6         14         97
-/+ buffers/cache:        206       1576
Swap:          127          0        127
Link to comment
Share on other sites

Dare I recommend to make corrections. This will allow the script autostart to interrupt the boot u-boot. Without this, if there is script, the console UART must not be interrupted. The script to start before stop loading. it adds the ability to boot from USB drives.

setenv bootcmd "run start_autoscript;run storeboot;"
setenv start_autoscript "if usb start ; then run start_usb_autoscript;fi;if mmcinfo; then run start_mmc_autoscript;fi;"
setenv start_mmc_autoscript "if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi"
setenv start_usb_autoscript "if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi"
Link to comment
Share on other sites

@balbes150 Where do I need to put the  `fdt rm /reserved-memory; fdt rm /aocec;` line in your version of the script (Ubuntu, Armbian) to unconditionally free memory on every boot?

Link to comment
Share on other sites

Thanks! Here's the script I use to boot Armbian (it's your v2, I believe):

setenv m "720p60hz"
setenv cec "cecf"
setenv m_bpp "24"
setenv mesontimer "0"
setenv nographics "1"
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
setenv condev "console=ttyS0,115200n8 console=tty0 consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootwait rootflags=data=writeback rw ${condev} no_console_suspend hdmimode=${m} m_bpp=${m_bpp} fsck.repair=yes net.ifnames=0"
setenv boot_start booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
if fatload mmc 0:1 ${dtb_loadaddr} /dtb/${s905_dtb}.dtb; then setenv dtb_img "1"; else if fatload mmc 0:1 ${dtb_loadaddr} dtb.img; then setenv dtb_img "1"; else setenv dtb_img "0";fi;fi;
if fatload mmc 0:1 ${initrd_loadaddr} uInitrd; then if fatload mmc 0:1 ${loadaddr} zImage; then if test "${dtb_img}" = "1"; then run boot_start;fi;fi;fi;
if fatload usb 0:1 ${dtb_loadaddr} /dtb/${s905_dtb}.dtb; then setenv dtb_img "1"; else if fatload usb 0:1 ${dtb_loadaddr} dtb.img; then setenv dtb_img "1"; else setenv dtb_img "0";fi;fi;
if fatload usb 0:1 ${initrd_loadaddr} uInitrd; then if fatload usb 0:1 ${loadaddr} zImage; then if test "${dtb_img}" = "1"; then run boot_start;fi;fi;fi;
Link to comment
Share on other sites

Based on the fact that these scripts binarie files. They cannot be edited. To change the parameter you want to edit a text file and build the binary. I recommend making two scripts, for console, for desktop.

setenv m "720p60hz"
setenv cec "cecf"
setenv m_bpp "24"
setenv mesontimer "0"
setenv nographics "1"
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
setenv condev "console=ttyS0,115200n8 console=tty0 consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootwait rootflags=data=writeback rw ${condev} no_console_suspend hdmimode=${m} m_bpp=${m_bpp} fsck.repair=yes net.ifnames=0"
setenv boot_start fdt_start fdt addr ${dtb_loadaddr}; if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi; booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
if fatload mmc 0:1 ${dtb_loadaddr} /dtb/${s905_dtb}.dtb; then setenv dtb_img "1"; else if fatload mmc 0:1 ${dtb_loadaddr} dtb.img; then setenv dtb_img "1"; else setenv dtb_img "0";fi;fi;
if fatload mmc 0:1 ${initrd_loadaddr} uInitrd; then if fatload mmc 0:1 ${loadaddr} zImage; then if test "${dtb_img}" = "1"; then run boot_start;fi;fi;fi;
if fatload usb 0:1 ${dtb_loadaddr} /dtb/${s905_dtb}.dtb; then setenv dtb_img "1"; else if fatload usb 0:1 ${dtb_loadaddr} dtb.img; then setenv dtb_img "1"; else setenv dtb_img "0";fi;fi;
if fatload usb 0:1 ${initrd_loadaddr} uInitrd; then if fatload usb 0:1 ${loadaddr} zImage; then if test "${dtb_img}" = "1"; then run boot_start;fi;fi;fi;


Link to comment
Share on other sites

I'd already experimented with editing the txt script and mkimage, trying to change resolution to sxga but without the modified uBoot it didn't work. This does, however, thanks @balbes150!

Link to comment
Share on other sites

Hello! Can I host Linux Armbian on the internal eMMC flash? It is also much faster CF cards.

 
Yes, this is possible. But not yet ready automatic installation procedure, all you need to perform manually.
Link to comment
Share on other sites

Alpha version profile armbian for vegas95. This is not difficult, please check the build process of the image vegas95\debian\wheezy. Primary start kernel from external media passes. The rest is still in not working condition. Pay attention to the image itself NOT working, it is only the Assembly test profile.

 


Link to comment
Share on other sites

As it turned out, the images of workers. :rolleyes: 

The download does not occur due to a failure in the procedure of the extension section. The procedure prescribed force /dev/mmcblk0. And when you start from SD card, this device indicates the internal memory (eMMC). Where you already have the partitions from Android. If you disable the extension root partition in the script, it works (without automatic extensions section).

Link to comment
Share on other sites

Updated image, using the automatically load dtb file from the internal memory. After writing it to the media, you need to replace the script s905_autoscript the one to be on the website next to the image. To use the new script s905_autoscript, with the same images, you need to replace script and remove from the first partition (FAT) file of the dtb.img.

 

Armbian_5.17_Vegas95_Debian_jessie_3.14.73_desktop_20160729.img.xz

 

https://yadi.sk/d/pHxaRAs-tZiei

 

 
This option can be used on any models. Copy the dtb file in the manual as previously required. But keep in mind that sometimes the dtb file from internal memory not operating properly (system not loaded). In these cases, you need to copy the first section finished the dtb file.img as you did previously.
Link to comment
Share on other sites

@balbes150

i've flashed your Armbian_5.17_Vegas95_Debian_jessie_3.14.73_desktop_20160729.img.xz, and i'm testing it on a nexbox A95X (s905).

 

i'm "auto booting" your s905_autoscript by renaming to to aml_autoscript and running recovery mode with "toothpick", so it boots directly and i don't have to modify my stock android uboot env which i'm not sure how to restore after i touch it. 

 

So your armbian booted fine, i also have some hdmi problems (broken image) and need to unplug it after boot to fix it..

 

I have a couple of questions, why are there so many dtb directories on that images (dtb/, dtb-3.14.73-vegas95/ dtb-3.14.73-vegas95.old/), is there a dynamic loading of dtb files from the boot partition ?

 

I see your script use the dtb auto loading from memory if there's no dtb.img file, but that dtb.img should be on the root of the boot partition not in a directory right ?

 

Anyways, i'm wondering what's going on because that armbian image has some problems on my a95x :

 

- not important but cpufreq doesn't seem to work.

i can change scaling governors but it won't change frequencies at least according to armbianmonitor (which doesn't seem to read temperatures well either, so maybe the frequency reading is also wrong)..

 

- then more important, one of the two usb ports won't work on armbian (nothing is detected, nothing in the logs when i plug a dongle), it works fine in android. The second port works fine.

root@vegas95:~# lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@vegas95:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M

That's why i'm wondering about a wrong dtb file loading.

I've also tried to place my dtb.img file on the boot partition but the usb problem stays the same.

 

I haven't tested anything else, i think wifi is not working but that's okay, and i'll care about multimedia stuff later.

 

Finally i would be very interested in getting a non desktop ubuntu (possibly xenial) armbian image, if you have something like that.

 

At some point i'll test armbian C2 xenial image with a modified boot method, but the C2 has some specifics that i don't really want to mix in my tests..

 

thx

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