Jump to content

Recommended Posts

Posted

it is kid of annoying. Short comment on where to look from someone who knows how the resolution in armbian is determined would help so i can fix it myself. :-)

Posted

it is kid of annoying. Short comment on where to look from someone who knows how the resolution in armbian is determined would help so i can fix it myself. :-)

boot resolution in  s905_autoscript change txt file, then build binary... in my case this problem disappears after login...

Posted

@balbes150

 

Results from GT1:

 

1) ethernet has stopped working on your latest image;]

2) WiFi is working on GT1 by default;

3) install.sh eMMC script is working, I'm able to boot from eMMC;

 

Only got a error on DTB, look:

 

gt1_boot.jpg

Posted

boot resolution in  s905_autoscript change txt file, then build binary... in my case this problem disappears after login...

How does one build binary s905_autoscript from s905_autoscript txt file ?

such as: I would like to change hardcoded mac address.

thanks!

Posted

How does one build binary s905_autoscript from s905_autoscript txt file ?

such as: I would like to change hardcoded mac address.

thanks!

mkimage -A arm -O linux -T script -C none -d s905_autoscript.txt "path_for_new_file"

Posted

What version image are You using ? You need to use the latest version 20161227.

 

Hi !

I had several resolution problem like the guys before (mixed ligns and columns).

But there is the oupout from mine (GT1 with SN starting by A912), my device is not reconize when I plug it into the usb port (don't know why) so I'm not very sure I want to write on my internal memory :

root@amlogic-s905x:~# fw_printenv
EnableSelinux=disabled
aml_dt=gxm_q201_2g
baudrate=115200
bootcmd=run start_autoscript;run storeboot;
bootdelay=1
bootfromnand=0
bootfromrecovery=0
cmdline_keys=if keyman init 0x1234; then if keyman read usid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if keyman read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;if keyman read deviceid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.deviceid=${deviceid};fi;fi;
cvbs_drv=0
cvbsmode=576cvbs
display_bpp=24
display_color_bg=0
display_color_fg=0xffff
display_color_index=24
display_height=1080
display_layer=osd1
display_width=1920
dtb_mem_addr=0x1000000
ethaddr=00:15:18:01:81:31
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi;
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
firstboot=0
gatewayip=10.18.9.1
hdmimode=1080p60hz
hostname=arm_gxbb
init_display=osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000
ipaddr=10.18.9.97
jtag=apao
loadaddr=1080000
netmask=255.255.255.0
outputmode=1080p60hz
preboot=run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;run upgrade_key;forceupdate;run switch_bootmode;
recovery_from_flash=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi
recovery_from_sdcard=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_offset=0
recovery_part=recovery
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
serverip=10.18.9.113
start_autoscript=if usb start ; then run start_usb_autoscript;fi;if mmcinfo; then run start_mmc_autoscript;fi;
start_mmc_autoscript=if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi
start_usb_autoscript=if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi
storeargs=setenv bootargs ${initargs} androidboot.selinux=${EnableSelinux} logo=${display_layer},loaded,${fb_addr},${outputmode} maxcpus=${maxcpus} vout=${outputmode},enable hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} cvbsdrv=${cvbs_drv} androidboot.firstboot=${firstboot} jtag=${jtag}; setenv bootargs ${bootargs} androidboot.hardware=amlogic;run cmdline_keys;
storeboot=if imgread kernel boot ${loadaddr}; then bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;else if test ${reboot_mode} = cold_boot; then run try_auto_burn; fi;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else fi;
upgrade_key=saradc open 0; if saradc get_in_range 0x0 0x50; then echo detect upgrade key; run update;fi;
upgrade_step=2
usb_burning=update 1000
wipe_cache=successful
wipe_data=successful

Posted

Hi to all! My first post here...
First of all i am running Armbian_5.24_Amlogic-s905x_Debian_jessie_3.14.29_20161223.img on MiniM8S 2G MEM / 8G EMMC

I'm impressed with the performance of the box, and a big THANK YOU to balbes150 for his work.

I had to put dtb.img from LibreELEC image to my (Armbian_5.24...20161223.img) SD CARD in order to be able to boot it on my system ( otherwise only archlinux it was able to boot without dtb.img ).
I put MATE XORG on top of that and everything is OK except two things:

1) Video performance of mpv is a no-go ( No hardware accel ? )

2) My HDMI resolution is on 1280x720 only.

I'm quite new to this armbian distro, and there any many things i don't know (some how and why things i believe :) )

I can confirm that running pacman -Syu in archlinux ( ArchLinux_4Gb_20161201.img.gz ) bricked my MiniM8S ( a thing that was expected after all ) and i had to do the pin sorting method + USB Burning Tool in Windows to bring it back to life.

I'm not asking questions here (mainly), just my 5 cent of information.

@balbes150
Here is a script that i wrote to automate the process of backing up the internal EMMC in debian ( and hopefully ubuntu ) in case i ( or someone else ) would like to put armbian in EMMC

The script works great for me, and does some checks and takes decisions.

Maybe you find a use for this in your next images.
If someone try the script and find any bugs i will be glad to squash them :D

Here is the script:

#!/bin/bash
# Author: xXx
# Purpose: Automate the process of backing up internal storage.
# Date: 4 Jan 2017 20:22:00 EET
reset
_r=$(tput setaf 1)
_g=$(tput setaf 2)
_b=$(tput setaf 4)
_y=$(tput setaf 3)
_x=$(tput sgr0)
OUTDIR="/root"
[ $(whoami) != root ] && echo "$_r Please run this program as root""$_x" && exit 1
avail=$(lsblk | grep -oE mmcblk[0-9] | sort | uniq)
runfrom=$(lsblk | grep /$ | grep -oE mmcblk[0-9])
emmc=$(echo $avail | sed "s/$runfrom//" | sed "s/ //g")
image=$(echo $(cat /proc/cpuinfo | egrep '(Hardware|Revision)' | awk '{print $3}') | sed "s/ /-/g")-emmc.img
[ -f $OUTDIR/$image.gz ] && echo "$_y DELETING PREVIOUSLY CREATED IMAGE...""$_x" && rm -rf $OUTDIR/$image
intsize=$(fdisk -s /dev/$emmc)
rootfree=$(df | grep /$ | awk '{print $4}')
echo "$_b AVAILABLE DEVICES: "$_g"$(echo $avail)""$_x"
echo "$_b YOU ARE RUNNING "$_g"$(lsb_release -c | awk '{print $2}')"$_b" FROM "$_g"$runfrom""$_x"
echo "$_b INTERNAL EMMC IS: "$_g"$emmc"$_b" SIZE: "$_g"$intsize""$_x"
echo "$_b ROOT FREE SPACE IS: "$_g"$rootfree""$_x"
[ $rootfree -le $intsize ] && echo "$_r NOT ENOUGH FREE SPACE!!! $_x" && exit 1
echo "$_b JOB STARTED!"$_x""
echo "$_b SAVING AND COMPRESSING TO "$_g"$OUTDIR/$image.gz"$_x"..."
dd if=/dev/$emmc | pv -s $intsize"K" | gzip > $OUTDIR/$image.gz
echo "$_g JOB FINISHED!"$_x""

Posted

it is kid of annoying. Short comment on where to look from someone who knows how the resolution in armbian is determined would help so i can fix it myself. :-)

 

View post #381 in this thread.

 

 

@balbes150

 

Results from GT1:

 

1) ethernet has stopped working on your latest image;]

2) WiFi is working on GT1 by default;

3) install.sh eMMC script is working, I'm able to boot from eMMC;

 

Only got a error on DTB, look:

 

 

 

You forgot to copy the correct file dtb (dtb.img) to the root of the FAT partition of the carrier.

 

 

 

Hi !

I had several resolution problem like the guys before (mixed ligns and columns).

But there is the oupout from mine (GT1 with SN starting by A912), my device is not reconize when I plug it into the usb port (don't know why) so I'm not very sure I want to write on my internal memory :

 

All versions of images 20161227 universal (work with external drives). Do not run the installation script.

 

 

 

Hi to all! My first post here...

First of all i am running Armbian_5.24_Amlogic-s905x_Debian_jessie_3.14.29_20161223.img on MiniM8S 2G MEM / 8G EMMC

I'm impressed with the performance of the box, and a big THANK YOU to balbes150 for his work.

I had to put dtb.img from LibreELEC image to my (Armbian_5.24...20161223.img) SD CARD in order to be able to boot it on my system ( otherwise only archlinux it was able to boot without dtb.img ).

I put MATE XORG on top of that and everything is OK except two things:

1) Video performance of mpv is a no-go ( No hardware accel ? )

2) My HDMI resolution is on 1280x720 only.

I'm quite new to this armbian distro, and there any many things i don't know (some how and why things i believe :) )

I can confirm that running pacman -Syu in archlinux ( ArchLinux_4Gb_20161201.img.gz ) bricked my MiniM8S ( a thing that was expected after all ) and i had to do the pin sorting method + USB Burning Tool in Windows to bring it back to life.

I'm not asking questions here (mainly), just my 5 cent of information.

@balbes150

Here is a script that i wrote to automate the process of backing up the internal EMMC in debian ( and hopefully ubuntu ) in case i ( or someone else ) would like to put armbian in EMMC

The script works great for me, and does some checks and takes decisions.

Maybe you find a use for this in your next images.

If someone try the script and find any bugs i will be glad to squash them :D

Here is the script:

 

 

HW (libMali) appeared only in the latest images Armbian. In the image of ArchLinux it is not.

Thanks for the additional script. I looked at its contents. Have you tried to use it to restore ? I have my doubts about the use of compression together with the creation of a copy. I have tried many times to use compression along with the creation of a copy, and each time, after trying system restore (emmc) from this archive, TV box does not boot (broken u-boot). So I refused from the Association of teams of data capture and simultaneous compression.

Posted

hello balbes150, i'm back testing armbian on my amlogic devices.

 

i'd like to know if things have changed with dtb (auto) loading ?

 

i'm testing a beelink minimxiii (s905, 2GB, Gigabit), installed your universal boot v0.6 and booted 4-6 weeks old image (xenial desktop, don't know which version but it had a kernel 3.14.79, now it's 3.14.29, what happened ?) and it booted fine, ethernet "ok" (poor up performances), 2GB ram available.

 

Then flashed your latest Armbian_5.24_Amlogic-s905x_Ubuntu_xenial_3.14.29_20161223.img, and it won't boot.

Stuck at the beelink logo, probably didn't pass uboot, i will install serial if necessary but no time right now.

 

i haven't done anything concerning dtb (no dtb.img on the root folder) but i have already dumped the /dev/block/boot in adb so i can extract my dtb from it. i don't know the board version of that minimx yet.

 

i'm assuming your "s905x" images are also for s905, as you don't have "s905" image anymore, am i wrong ?

 

thx for clearing up those basic questions so i don't loose too much time doing things that are not correct anymore.

Posted

@balbes150

 

Have you tried to use it to restore ? I have my doubts about the use of compression together with the creation of a copy.

No! I have never tried to restore yet as i am still learning the ins and outs of this box ( Mini M8S ) in conjunction with this distro ( armbian ).

But i have created 4 times uncompressed image of my emmc, and 4 times compressed.

Then all 4 times, the uncompressed images and the extracted compressed images checked with md5 and was identical.

So... if the uncompressed boots, then the compressed should boot the same.

Well... the problem you described maybe is emmc brand specific, or my emmc is from a good or standards compatible brand?

Only the brave testers will answer that.

Anyway... i thing i'll get brave soon ;-)
I'm also working on the script to accept USB booters ( not only SD booters ) so it will be easy to add a dialog for the user to deny compression.

When the script will be well tested and error-free, i'll post it back here.

My 5 cent info again:

I used usb boot with the test image Armbian_5.24_Amlogic-s905x_Debian_jessie_3.14.29_desktop_20161227.img.xz today and:

1) mpv and vlc still not able to play videos in real time ( audio is OK ) glxinfo says "direct rendering: yes"

2) when i put mpv (and vlc) in fullscreen the video and the program freezes, but the audio keeps looping the last few second it had in memory until i reboot ( killing mpv,vlc e.t.c. by hand never helped stoping the loop ).

3) I had to put "amlogics905x_init.sh" from "v_5.24" folder in the root of my usb in order to have 1080p resolution, but it varies from boot to boot with corrupted graphics.

I have read all the post in this thread and i still don't know many things, so maybe i'm doing something wrong.
Thanks again.

Posted

Function startup dtb data from the internal memory, if not found the file (the dtb.img), left in all images.

 

The digital version of the kernel was "below" (3.14.29), since there are other source codes. The version number does not matter. It is possible not to pay attention.

 

You tried to set the system to internal memory ? I think You, before installing, add the file "dtb.img" (it is automatically stored in the memory to work correctly a new kernel).

 

Yes, all versions of images now universal , suitable for s905 and s905x.

Posted

@balbes150

No! I have never tried to restore yet as i am still learning the ins and outs of this box ( Mini M8S ) in conjunction with this distro ( armbian ).

But i have created 4 times uncompressed image of my emmc, and 4 times compressed.

Then all 4 times, the uncompressed images and the extracted compressed images checked with md5 and was identical.

So... if the uncompressed boots, then the compressed should boot the same.

Well... the problem you described maybe is emmc brand specific, or my emmc is from a good or standards compatible brand?

Only the brave testers will answer that.

Anyway... i thing i'll get brave soon ;-)

I'm also working on the script to accept USB booters ( not only SD booters ) so it will be easy to add a dialog for the user to deny compression.

When the script will be well tested and error-free, i'll post it back here.

My 5 cent info again:

I used usb boot with the test image Armbian_5.24_Amlogic-s905x_Debian_jessie_3.14.29_desktop_20161227.img.xz today and:

1) mpv and vlc still not able to play videos in real time ( audio is OK ) glxinfo says "direct rendering: yes"

2) when i put mpv (and vlc) in fullscreen the video and the program freezes, but the audio keeps looping the last few second it had in memory until i reboot ( killing mpv,vlc e.t.c. by hand never helped stoping the loop ).

3) I had to put "amlogics905x_init.sh" from "v_5.24" folder in the root of my usb in order to have 1080p resolution, but it varies from boot to boot with corrupted graphics.

I have read all the post in this thread and i still don't know many things, so maybe i'm doing something wrong.

Thanks again.

 

What do You mean by the term "bootable USB" ? All the images are universal and work with all SD cards and USB drives. To create a boot (u-boot runs completely from the USB stick) need binaries bl2\3 supplied by Amlogic. I was not able to find freely available source code to build.

For video playback it is better to use the Ubuntu images. There is better support.

Posted

 

What do You mean by the term "bootable USB"

What i meant by the term "USB BOOTERS" is this:

People that used SD CARD to boot to armbian and to backup their internal emmc is "SD BOOTERS" for me.

People that user USB FLASH to boot to armbian and to backup their internal emmc is "USB BOOTERS" for me.

The script that i posted earlier does NOT HANDLE "USB BOOTERS" and expects one to have booted the system from SD CARD.

This will change in the next version of the script, since i am now able to start the system from USB FLASH, and test it in the "real thing".

I apologize if my bad english caused any misunderstandings.

Posted

Function startup dtb data from the internal memory, if not found the file (the dtb.img), left in all images.

 

The digital version of the kernel was "below" (3.14.29), since there are other source codes. The version number does not matter. It is possible not to pay attention.

 

Yes, all versions of images now universal , suitable for s905 and s905x.

 

Okay then there's a problem somewhere.

 

- I found back my old image that is working fine and flashed it to another sdcard, so i could test a full firstrun boot :

Armbian_5.24_Vegas95_Ubuntu_xenial_3.14.79_desktop_20161103.img

 

That image boots okay on my minimxiii, "first run" then reboot, hdmi ok, ethernet ok, 2GB ram ok.

 

- Now i flashed your new image on another sdcard and it will not boot :

Armbian_5.24_Amlogic-s905x_Ubuntu_xenial_3.14.29_20161223.img

 

As i said above it stays stuck at the beelink logo (probably uboot).

 

I have not used a /boot/dtb.img on either of those two clean images.

 

Do they both use the same uboot code or has it changed between versions ?

Do you want me to test something else before i solder a serial to see uboot ?

 

 

 

 

You tried to set the system to internal memory ? I think You, before installing, add the file "dtb.img" (it is automatically stored in the memory to work correctly a new kernel).

 

Sorry i don't quite understand what you mean.

I did not install armbian to emmc, if that's what you're asking, i'm only using your universal boot v0.6 aml_autoscript and sdcard.

 

thx

Posted

In the image 20161223 copy of the dtb directory into the root of the FAT partition has the correct dtb.img. Kernel changed your dtb data in the internal memory are not suitable for the new kernel.

Posted

@balbes150

ok, i copied the dtb directory 20161103 (boot ok) into the 20161223 BOOT partition (replaced the original dtb directory).  it did not work.

 

then i extracted my dtb.img from the /dev/block/boot dump (adb dump before installing aml_autoscript and booting armbian)

and copied it into the BOOT partition root of both sdcards.

 

20161103 still works fine, of course i can't confirm which dtb was loaded in uboot but if s905_autoscript works then it should have loaded my dtb.img.

 

and 20161223 did not boot with that very same dtb.img.

 

I noticed that the filenames inside the dtb directory are completely different between the 20161103 (mini_m8s.dtb, mxq_pro_4k.dtb ...) and 20161223 (gxbb_p200_2G.dtb, gxbb_p200.dtb...)

Do i have to rename all the dtb somehow ?

 

Anyways i was never very confident with those dtb files, i never managed to get a system to boot by trying random dtb files, and my original device dtb should boot the 20161223 image, right ?

 

Also i was reading kszaq s905/x libreelec install notes and he writes this : 

"Important: Do not use device trees from previous build! You also cannot use device tree from Android firmware as in 99% cases it won't work."

 

- "Do not use device trees from previous build!" :

that i can understand as dts sources are build against your kernel source and config.

 

- but why does he say the next thing ?

"You also cannot use device tree from Android firmware as in 99% cases it won't work."

and does that also concern the /dev/block/boot dtb already in the internal memory ? or is it specific to his libreelec builds ?

 

I'll test his latest libreelect image and see if it works. But i'll most likely try to solder serial as soon as i can so we can understand why your new s905x image won't boot here.

i'll also the same 20161223 image on my other s905 box i have here, see if it boots or not.

Posted

@balbes150,

install.sh
IMAGE_DTB="/root/gxm_q201_2g_0000a800.dtb"

No errors during eMMC writing... but ethernet is still not appearing on ifconfig.

Posted

@balbes150

ok, i copied the dtb directory 20161103 (boot ok) into the 20161223 BOOT partition (replaced the original dtb directory).  it did not work.

 

then i extracted my dtb.img from the /dev/block/boot dump (adb dump before installing aml_autoscript and booting armbian)

and copied it into the BOOT partition root of both sdcards.

 

20161103 still works fine, of course i can't confirm which dtb was loaded in uboot but if s905_autoscript works then it should have loaded my dtb.img.

 

and 20161223 did not boot with that very same dtb.img.

 

I noticed that the filenames inside the dtb directory are completely different between the 20161103 (mini_m8s.dtb, mxq_pro_4k.dtb ...) and 20161223 (gxbb_p200_2G.dtb, gxbb_p200.dtb...)

Do i have to rename all the dtb somehow ?

 

Anyways i was never very confident with those dtb files, i never managed to get a system to boot by trying random dtb files, and my original device dtb should boot the 20161223 image, right ?

 

Also i was reading kszaq s905/x libreelec install notes and he writes this : 

"Important: Do not use device trees from previous build! You also cannot use device tree from Android firmware as in 99% cases it won't work."

 

- "Do not use device trees from previous build!" :

that i can understand as dts sources are build against your kernel source and config.

 

- but why does he say the next thing ?

"You also cannot use device tree from Android firmware as in 99% cases it won't work."

and does that also concern the /dev/block/boot dtb already in the internal memory ? or is it specific to his libreelec builds ?

 

I'll test his latest libreelect image and see if it works. But i'll most likely try to solder serial as soon as i can so we can understand why your new s905x image won't boot here.

i'll also the same 20161223 image on my other s905 box i have here, see if it boots or not.

 

NO NEED to copy the dtb directory from the old version to the new one. You need to copy a SINGLE file (gxbb_p200_2G.dtb or gxbb_p200.dtb). Rename it to "dtb.img".

Posted

NO NEED to copy the dtb directory from the old version to the new one. You need to copy a SINGLE file (gxbb_p200_2G.dtb or gxbb_p200.dtb). Rename it to "dtb.img".

 

okay it booted with gxbb_p200_2G.dtb

 

do you know why it won't boot with my original dtb file ? (extracted from /dev/block/boot)

Posted

dtb is a description of the data according to certain rules (variable names, etc.). The new version of the kernel has a different structure of the "name" (parameters). So your old data is "not clear" to the new kernel. The structure of your data only applies to the version of the kernels, which she was going. In the new images uses the new structure. You need to rebuild your data (source code) with the new kernel.

Posted

ok thx for the explanation, i'll try to do that.

Actually can i do it on the box directly, as i see you've included the dtc tools to manipulate device tree files ?

 

 

Then i have to try to understand why the gigabit on my minimxiii is so bad.

Don't worry it's not related to your linux image, i already tested that in adb with the stock android.

 

Well doing iperf3 tests, i get 980Mbps downstream (iperf3 -s on the box) and barely 100Mbps upstream (iperf -c ipofserver, on the box).

 

The upstream stability is ridiculous, it fluctuates between 5Mbps and 100Mbps.

If there's no way of fixing that then it's another device that will end up in my "useless crap" box.

 

I know tkaiser talked about fixing ethernet timings based on board tracks but i can't find it back..

Posted

@balbes150

i'm also seeing that you've fixed CONFIG_CPU_FREQ_GOV_PERFORMANCE=y in the kernel

 

is cpu freq scaling not working on those kernels at the moment ?

it was working on your old "s905" images.

thx

Posted

Hello again! Mini M8S here as i said before.
I installed Armbian_5.24_Amlogic-s905x_Ubuntu_xenial_3.14.29_desktop_20161227.img.xz from the Test directory, and i can confirm

that video playback is much better with ubuntu. Youtube is also OK if not in fullscreen mode. Also the crashes in mpv and vlc not happening
with this ubuntu test image.
Tried with SD and USB drives and both boot OK with dtb.img taken from my LibreELEC USB stick (7.0.3.011).

I tried installing this system in emmc 6 times with the included script "install.sh".
3 times while booted from SD CARD, and 3 times while booted from USB stick.

Each time installation went OK, but the system was never able to boot from emmc.

There is something i am missing here for sure.

I don't need or even want the official android OS, but i tried to restore it in order to confirm if compressed dd images will work or not.

I restored my compressed image with this command while booted from my reliable SD CARD:

gunzip -c /root/Amlogic-020b-emmc.img.gz | dd of=/dev/mmcblk1

My system came UP in the state it was when i backed it up.

So the good news here is that Mini M8S emmc can be backed up with compression and restored without problems.

But be carefull: Maybe this is not the case with every system as balbes150 have pointed out to me.

Thanks in advance for any info about how to boot MiniM8S from emmc.

Posted

@balbes150

i'm also seeing that you've fixed CONFIG_CPU_FREQ_GOV_PERFORMANCE=y in the kernel

 

is cpu freq scaling not working on those kernels at the moment ?

it was working on your old "s905" images.

thx

 

I'm trying to find the optimal settings.

 

 

Hello again! Mini M8S here as i said before.

I installed Armbian_5.24_Amlogic-s905x_Ubuntu_xenial_3.14.29_desktop_20161227.img.xz from the Test directory, and i can confirm

that video playback is much better with ubuntu. Youtube is also OK if not in fullscreen mode. Also the crashes in mpv and vlc not happening

with this ubuntu test image.

Tried with SD and USB drives and both boot OK with dtb.img taken from my LibreELEC USB stick (7.0.3.011).

I tried installing this system in emmc 6 times with the included script "install.sh".

3 times while booted from SD CARD, and 3 times while booted from USB stick.

Each time installation went OK, but the system was never able to boot from emmc.

There is something i am missing here for sure.

I don't need or even want the official android OS, but i tried to restore it in order to confirm if compressed dd images will work or not.

I restored my compressed image with this command while booted from my reliable SD CARD:

gunzip -c /root/Amlogic-020b-emmc.img.gz | dd of=/dev/mmcblk1

My system came UP in the state it was when i backed it up.

So the good news here is that Mini M8S emmc can be backed up with compression and restored without problems.

But be carefull: Maybe this is not the case with every system as balbes150 have pointed out to me.

Thanks in advance for any info about how to boot MiniM8S from emmc.

 

What size partition /dev/data ? Maybe not enough space. When you install you are copying a system from external media in the eMMC.

Posted

Here is some more info about the box:

 

lshw
amlogic-s905x
description: AArch64 Processor rev 4 (aarch64)
product: Amlogic
width: 64 bits
*-core
description: Motherboard
physical id: 0
capabilities: amlogic__gxbb
*-cpu:0
description: CPU
product: cpu
physical id: 0
bus info: cpu@0
size: 2016MHz
capacity: 2016MHz
capabilities: fp asimd evtstrm crc32 cpufreq
*-cpu:1
description: CPU
product: cpu
physical id: 1
bus info: cpu@1
size: 2016MHz
capacity: 2016MHz
capabilities: fp asimd evtstrm crc32 cpufreq
*-cpu:2
description: CPU
product: cpu
physical id: 2
bus info: cpu@2
size: 2016MHz
capacity: 2016MHz
capabilities: fp asimd evtstrm crc32 cpufreq
*-cpu:3
description: CPU
product: cpu
physical id: 3
bus info: cpu@3
size: 2016MHz
capacity: 2016MHz
capabilities: fp asimd evtstrm crc32 cpufreq
*-memory
description: System memory
physical id: 4
size: 1815MiB
*-usbhost:0
product: DWC OTG Controller
vendor: Linux 3.14.29 dwc_otg_hcd
physical id: 1
bus info: usb@2
logical name: usb2
version: 3.14
capabilities: usb-2.00
configuration: driver=hub slots=1 speed=480Mbit/s
*-usbhost:1
product: DWC OTG Controller
vendor: Linux 3.14.29 dwc_otg_hcd
physical id: 2
bus info: usb@1
logical name: usb1
version: 3.14
capabilities: usb-2.00
configuration: driver=hub slots=1 speed=480Mbit/s
*-usb
description: Keyboard
product: USB Receiver
vendor: Logitech
physical id: 1
bus info: usb@1:1
version: 29.00
capabilities: usb-2.00
configuration: driver=usbhid maxpower=98mA speed=12Mbit/s
*-network:0
description: Ethernet interface
physical id: 3
logical name: eth0
serial: ee:2e:ca:cb:e6:da
size: 10Mbit/s
capacity: 100Mbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=st_mac100 driverversion=March_2013 duplex=half link=no multicast=yes port=MII speed=10Mbit/s
*-network:1
description: Wireless interface
physical id: 4
logical name: wlan0
serial: cc:79:cf:49:93:51
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8723bs driverversion=3.14.29 firmware=N/A ip=192.168.1.7 link=yes multicast=yes wireless=IEEE 802.11bgn

 

And the available space on the box looks OK to me:

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            805M     0  805M   0% /dev
tmpfs           182M  8.0M  174M   5% /run
/dev/mmcblk0p2   30G  4.0G   25G  14% /
tmpfs           908M  112K  908M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           908M     0  908M   0% /sys/fs/cgroup
tmpfs           908M   72K  908M   1% /tmp
/dev/mmcblk0p1   64M   46M   19M  71% /boot
tmpfs           182M   28K  182M   1% /run/user/1000
tmpfs           182M     0  182M   0% /run/user/0
/dev/data       4.7G  722M  4.0G  16% /media/data

Posted

Hello everyone!
I have updated and tested the BACKUP/RESTORE script in many situations.
Below are some screenshots of the script in action:
 


backup uncompressed: backup_uncompressed.png
 
backup compressed:     backup_compressed.png
 
restore compressed:     restore_compressed.png
 
restore uncompressed: restore_uncompressed.png


 
Here is the finished BACKUP/RESTORE script:

 

#!/bin/bash
# Author: xXx
# Purpose: Automate the process of backing up internal storage.
# Date: 4 Jan 2017 20:22:00 EET
###############################################################################
# Update: 5 Jan 2017 19:48:00 EET                                             #
# Reason: Added support for when the user have started his machine            #
# from USB. Now the right source and destination should be selected.          #
# Added support for uncompressed images.                                      #
# Added detection if the user runs already from emmc.                         #
###############################################################################
# Update: 6 Jan 2017 21:43:00 EET                                             #
# Reason: Added functionality to restore images that this program creates.    #
###############################################################################
_r=$(tput bold && tput setaf 1)
_g=$(tput bold && tput setaf 2)
_b=$(tput bold && tput setaf 4)
_y=$(tput bold && tput setaf 3)
_x=$(tput sgr0)
OUTDIR="/root"
dobackup(){
echo $_y" DO YOU WANT COMPRESSION ? "$_x
while true
read -p " "$_b"YES=("$_y"y"$_b") NO=("$_y"n"$_b")"$_x" " yn
do
case $yn in
y)
COMPRESS=TRUE
break;;
n)
COMPRESS=FALSE
break;;
*)
;;
esac
done
if [ "$COMPRESS" = "TRUE" ];then
echo "$_b SAVING AND COMPRESSING "$_g"$emmc"$_b" TO "$_g"$OUTDIR/$image.gz"$_x"..."
dd if=/dev/$emmc | pv -s $intsize"K" | gzip > $OUTDIR/$image.gz
finish
else
echo "$_b SAVING "$_g"$emmc"$_b" TO "$_g"$OUTDIR/$image"$_x"..."
dd if=/dev/$emmc | pv -s $intsize"K" | dd of=$OUTDIR/$image
finish
fi
}
dorestore(){
echo $_y" DID YOU USED COMPRESSION WHEN YOU TOOK THE BACKUP ? "$_x
while true
read -p " "$_b"YES=("$_y"y"$_b") NO=("$_y"n"$_b")"$_x" " yn
do
case $yn in
y)
COMPRESS=TRUE
break;;
n)
COMPRESS=FALSE
break;;
*)
;;
esac
done
if [ "$COMPRESS" = "TRUE" ];then
[ ! -f $OUTDIR/$image.gz ] && echo "$_r NO IMAGE FOUND. MAKE SURE YOU HAVE MADE A BACKUP FIRST."$_x"" && exit 1
echo "$_y YOU ARE ABOUT TO MAKE SERIOUS CHANGES TO YOUR SYSTEM!!!"
echo " FILE "$_g"$OUTDIR/$image.gz"$_y" IS GOING TO BE WRITEN TO "$_g"$emmc"$_y" "
echo " MAKE SURE EVERYTHING IS OK AND:"
read -p " PRESS ENTER TO CONTINUE OR CTRL+C TO CANCEL $_x" blah
echo $_b" RESTORING $OUTDIR/$image.gz TO /dev/$emmc | PLEASE WAIT..."$_x
#echo " SOME MUMBO JUMBO APPEARS HERE..."
gunzip -c $OUTDIR/$image.gz | pv -s $intsize"K" | dd of=/dev/$emmc
finish
else
[ ! -f $OUTDIR/$image ] && echo "$_r NO IMAGE FOUND. MAKE SURE YOU HAVE MADE A BACKUP FIRST."$_x"" && exit 1
echo "$_y YOU ARE ABOUT TO MAKE SERIOUS CHANGES TO YOUR SYSTEM!!!"
echo " FILE "$_g"$OUTDIR/$image"$_y" IS GOING TO BE WRITEN TO "$_g"$emmc"$_y" "
echo " MAKE SURE EVERYTHING IS OK AND:"
read -p " PRESS ENTER TO CONTINUE OR CTRL+C TO CANCEL $_x" blah
echo $_b" RESTORING $OUTDIR/$image TO /dev/$emmc | PLEASE WAIT..."$_x
#echo " SOME MUMBO JUMBO APPEARS HERE..."
dd if=$OUTDIR/$image | pv -s $intsize"K" | dd of=/dev/$emmc
finish
fi
}
finish(){
echo "$_g JOB FINISHED!"$_x""
}
[ $(whoami) != root ] && echo "$_r Please run this program as root""$_x" && exit 1
avail=$(lsblk | grep -oE '(mmcblk[0-9]|sda[0-9])' | sort | uniq)
runfrom=$(lsblk | grep /$ | grep -oE '(mmcblk[0-9]|sda[0-9])')
[ "$runfrom" = "" ] && echo "$_r UNABLE TO FIND ROOT OF THE RUNNING SYSTEM!!! $_x" && exit 1
emmc=$(echo $avail | sed "s/$runfrom//" | sed "s/sd[a-z][0-9]//g" | sed "s/ //g")
[ "$emmc" = "" ] && echo "$_r UNABLE TO FIND YOUR EMMC DRIVE!!! $_x" && exit 1
[ "$(echo $emmc | grep mmcblk)" = "" ] && echo "$_r YOU DO NOT APPEAR TO HAVE AN EMMC DRIVE!!! $_x" && exit 1
intsize=$(fdisk -s /dev/$emmc)
rootfree=$(df | grep /$ | awk '{print $4}')
image=$(echo $(cat /proc/cpuinfo | egrep '(Hardware|Revision)' | awk '{print $3}') | sed "s/ /-/g")-emmc.img
echo "$_b AVAILABLE DEVICES: "$_g"$(echo $avail)""$_x"
echo "$_b YOU ARE RUNNING "$_g"$(lsb_release -c | awk '{print $2}')"$_b" FROM "$_g"$runfrom""$_x"
echo -e "$_b INTERNAL EMMC IS: "$_g"$emmc"$_b" SIZE: "$_g"$intsize""$_x"
echo -e "$_b ROOT ($runfrom) FREE SPACE IS:\t"$_g"$rootfree""$_x"
[ $rootfree -le $intsize ] && echo "$_r NOT ENOUGH FREE SPACE!!! $_x" && exit 1
[ $runfrom = $emmc ] && echo "$_r YOU ARE RUNNING ALREADY FROM EMMC!!! $_x" && exit 1
echo "$_y DO YOU WANT TO BACKUP OR RESTORE ? "$_x""
while true
read -p " "$_b"BACKUP=("$_y"b"$_b") RESTORE=("$_y"r"$_b")"$_x" " br
do
case $br in

dobackup
break;;
r)
dorestore
break;;
*)
;;
esac
done

 

 

 

You can also download the script from here
Please test the script and report any bugs.

Posted

I've just given the latest Ubuntu image a test drive and I'm delighted to report it's much better compared to the one I've been using so far (20160625):

- the temp sensor as well as WiFI works out of the box
- no problem with ZRAM swapping, I was able to go up to 3G without any OOM kills whatsoever (@balbes150, you can safely make ZRAM the default, dispensing with that puny swapfile)

- persistent eth0 MAC address
- the kernel still only supports 1.5GHz max clock (instead of 1.6GHz)
- I was unable to free the reserved memory which used to work with the old kernel

For now, I've copied the new kernel to my own image and love the benefits :)

@balbes150 Could you suggest a proper way of integrating the fdt commands via the s905x_init.sh script perhaps?
 

Posted

NEXBOX A95X running UBUNTU image (not the desktop). The fw_printenv output is the following if that is any help:

 

------------------------------------------------------------------------------------------------------------------------------------------------------

root@amlogic-s905x:~# fw_printenv
EnableSelinux=enforcing
aml_dt=gxl_p212_2g
baudrate=115200
bootcmd=run start_autoscript;run storeboot;
bootdelay=1
bootfromnand=0
bootfromrecovery=0
cmdline_keys=if keyman init 0x1234; then if keyman read usid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if keyman read mac ${loadaddr} str; then setenv bootargs ${bootargs} mac=${mac} androidboot.mac=${mac};fi;if keyman read deviceid ${loadaddr} str; then setenv bootargs ${bootargs} androidboot.deviceid=${deviceid};fi;fi;
cvbs_drv=0
cvbsmode=576cvbs
display_bpp=16
display_color_bg=0
display_color_fg=0xffff
display_color_index=16
display_height=1080
display_layer=osd1
display_width=1920
dtb_mem_addr=0x1000000
ethaddr=00:15:18:01:81:31
factory_reset_poweroff_protect=echo wipe_data=${wipe_data}; echo wipe_cache=${wipe_cache};if test ${wipe_data} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi; if test ${wipe_cache} = failed; then run init_display; run storeargs;if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;fi;
fb_addr=0x3d800000
fb_height=1080
fb_width=1920
fdt_high=0x20000000
firstboot=0
gatewayip=10.18.9.1
hdmimode=1080p60hz
hostname=arm_gxbb
init_display=osd open;osd clear;imgread pic logo bootup $loadaddr;bmp display $bootup_offset;bmp scale
initargs=rootfstype=ramfs init=/init console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xc81004c0 ramoops.pstore_en=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000
ipaddr=10.18.9.97
jtag=apao
loadaddr=1080000
netmask=255.255.255.0
outputmode=1080p60hz
preboot=run factory_reset_poweroff_protect;run upgrade_check;run init_display;run storeargs;run upgrade_key;run switch_bootmode;
recovery_from_flash=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if imgread kernel ${recovery_part} ${loadaddr} ${recovery_offset}; then wipeisb; bootm ${loadaddr}; fi
recovery_from_sdcard=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload mmc 0 ${loadaddr} recovery.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_from_udisk=setenv bootargs ${bootargs} aml_dt=${aml_dt} recovery_part={recovery_part} recovery_offset={recovery_offset};if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;wipeisb; bootm ${loadaddr};fi;
recovery_offset=0
recovery_part=recovery
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
serverip=10.18.9.113
start_autoscript=if usb start ; then run start_usb_autoscript;fi;if mmcinfo; then run start_mmc_autoscript;fi;
start_mmc_autoscript=if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi
start_usb_autoscript=if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi
storeargs=setenv bootargs ${initargs} androidboot.selinux=${EnableSelinux} logo=${display_layer},loaded,${fb_addr},${outputmode} maxcpus=${maxcpus} vout=${outputmode},enable hdmimode=${hdmimode} cvbsmode=${cvbsmode} hdmitx=${cecconfig} cvbsdrv=${cvbs_drv} androidboot.firstboot=${firstboot} jtag=${jtag}; setenv bootargs ${bootargs} androidboot.hardware=amlogic;run cmdline_keys;
storeboot=if imgread kernel boot ${loadaddr}; then bootm ${loadaddr}; fi;run update;
switch_bootmode=get_rebootmode;if test ${reboot_mode} = factory_reset; then run recovery_from_flash;else if test ${reboot_mode} = update; then run update;else if test ${reboot_mode} = cold_boot; then run try_auto_burn; fi;fi;fi;
try_auto_burn=update 700 750;
update=run usb_burning; run sdc_burning; if mmcinfo; then run recovery_from_sdcard;fi;if usb start 0; then run recovery_from_udisk;fi;run recovery_from_flash;
upgrade_check=echo upgrade_step=${upgrade_step}; if itest ${upgrade_step} == 3; then run init_display; run storeargs; run update;else fi;
upgrade_key=if gpio input GPIOAO_2; then echo detect upgrade key; sleep 3;if gpio input GPIOAO_2; then run update; fi;fi;
upgrade_step=2
usb_burning=update 1000
wipe_cache=successful
wipe_data=successful
----------------------------------------------------------------------------------------------------------------------------------------------------------

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

Important Information

Terms of Use - Privacy Policy - Guidelines