Jump to content

Armbian for Amlogic S805


jongerenchaos

Recommended Posts

Hi

I have already successfully tried to use zoneminder on NAS with ARMv5. I think s805 is possible to use zoneminder. Soon I should receive a sample TV box with S805 chip, then I'll be able to check it out. Armbian install it in internal memory. In manual mode it works. Need some time to test automatic procedures for installing to the internal memory.

Link to comment
Share on other sites

i've try more ditri on the mxq box tv  , the  " Armbian_5.14_Odroidc1_Debian_jessie_3.10.102 " no start by sd card but " AlexELEC-S805.MXQ_V31.arm-1.0.6-20160515.img " start on sd card

howto make sdcard armbian system with exemple alexelec ?

thank

Link to comment
Share on other sites

With a multi-boot system from Alex without making significant changes to the way that Linux will not work. You can try to use a universal multiboot. If you collect the correct script (not difficult), which is responsible for system start, you can try to achieve system operation.

Link to comment
Share on other sites

@@balbes150
i also have a few s805 boxes lying around, i wouldn't mind testing your images on hem too (i think i have at least one black mxq and one beelink s85, the two have different boards).
 
here's the current uboot env of my s85, it was most certainly modified by an openelec boot image, through a recovery update process.

I don't think i have an original uboot dump, but there should be some stock firmware around so i could restore it.

 

 

1080ioutputheight=1047
1080ioutputwidth=1863
1080ioutputx=28
1080ioutputy=16
576ioutputheight=559
576ioutputwidth=699
576ioutputx=10
576ioutputy=8
720poutputheight=719
720poutputwidth=1279
720poutputx=0
720poutputy=0
baudrate=115200
bootcmd=run storeboot
bootdelay=1
bootfile=boot.img
bootm_low=0x00000000
bootm_size=0x80000000
bootpath=u-boot.bin
bootsd=setenv bootargs ${bootargs} reboot_mode=${reboot_mode}; if test ${reboot_mode} != switch_system; then if mmcinfo; then if fatload mmc 0 ${loadaddr} kernel.img; then setenv bootargs ${bootargs} bootfromsd; bootm; fi;fi;fi;
bootsize=100000
bootstart=0
cecconfig=cec0
chipname=8726m8
console=ttyS0,115200n8
cvbs_drv=0
cvbsmode=576cvbs
digitaudiooutput=PCM
display_bpp=24
display_color_bg=0
display_color_fg=0xffff
display_color_format_index=24
display_height=1080
display_layer=osd2
display_width=1920
ethaddr=00:15:18:01:81:31
fb_addr=0x7900000
fb_height=720
fb_width=1280
firstboot=0
gatewayip=10.18.9.1
get_dt=checkhw
has.accelerometer=false
hdmimode=1080p50hz
hostname=arm_m8
initargs=init=/init console=ttyS0,115200n8 no_console_suspend  storage=2
initrd_high=60000000
ipaddr=10.18.9.97
loadaddr=0x12000000
loadaddr_logo=0x13000000
mmcargs=setenv bootargs console=${console} boardname=m8_board
netmask=255.255.255.0
normalsize=400000
normalstart=1000000
outputmode=1080p50hz
p0path=uImage
p0size=400000
p0start=1000000
p1path=android.rootfs
p1size=8000000
p1start=1400000
partnum=2
preboot=if itest ${upgrade_step} == 3; then run prepare; run storeargs; run update; fi; if itest ${upgrade_step} == 1; then  defenv; setenv upgrade_step 2; saveenv;fi; run prepare;run storeargs;get_rebootmode; clear_rebootmode; echo reboot_mode=${reboot_mode};run update_key; run switch_bootmode
preloaddtb=imgread dtb boot ${loadaddr}
prepare=logo size ${outputmode}; video open; video clear; video dev open ${outputmode};imgread res logo ${loadaddr_logo}; unpackimg ${loadaddr_logo}; logo source ${outputmode}; bmp display ${bootup_offset}; bmp scale;
recovery=echo enter recovery;if mmcinfo; then if fatload mmc 0 ${loadaddr} recovery.img; then bootm;fi;fi; if usb start 0; then if fatload usb 0 ${loadaddr} recovery.img; then bootm; fi;fi;if imgread kernel recovery ${loadaddr}; then bootm; else echo no recovery in flash; fi;
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
serverip=10.18.9.113
store=2
storeargs=setenv bootargs ${initargs} cvbsdrv=${cvbs_drv} vdaccfg=${vdac_config} logo=osd1,loaded,${fb_addr},${outputmode},full hdmimode=${hdmimode} cvbsmode=${cvbsmode} androidboot.firstboot=${firstboot} hdmitx=${cecconfig}
storeboot=echo Booting...; if unifykey get usid; then  setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;run bootsd;imgread kernel boot ${loadaddr};bootm;run recovery
switch_bootmode=if test ${reboot_mode} = factory_reset; then run recovery;else if test ${reboot_mode} = update; then run update;else if test ${reboot_mode} = usb_burning; then run usb_burning;else if test ${wipe_data} = failed; then echo wipe_data=${wipe_data}; run recovery;else   fi;fi;fi;fi
testaddr=0x12400000
update=run usb_burning; if mmcinfo; then if fatexist mmc 0 ${sdcburncfg}; then run sdc_burning; else if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;run recovery;fi;else run recovery;fi;
update_key=saradc open 0; if saradc get_in_range 0 0x50; then msleep 50; if saradc get_in_range 0 0x50; then echo update by key...; run update; fi;fi
upgrade_step=2
usb_burning=update 1000
vdac_config=0x10
video_dev=tvout
wipe_data=success

 

 

 

there's also a "dtb load from firmware", so universal dtb could work..

 

i'm not quite sure why the dtb load command here ("imgread dtb boot ${loadaddr}") is different from your autoscript one ("store dtb read $dtb_loadaddr") ?

and no use of dtb specific address..

Link to comment
Share on other sites

On platforms S805 uses an older version of u-boot and organization of memory is different from s905. Therefore, the algorithms and commands to the external load will be different. I now analyze and test different options. I would be useful to see the output of "help" from Your consoles. What would determine which commands are available in all devices (something you can use).

Link to comment
Share on other sites

from which system do you want the command "help" output ?

 

here i was in android adb, i don't have serial on that box to get into uboot command and don't really know if it can be done without it.

i grab the uboot environment from "strings /dev/block/env"

 

the s85 box as an otg port, not sure if it can be used to get into uboot.

Link to comment
Share on other sites

hello, i've boot with rs232 with my mxq box, i I don't know if it helps


amlnf_logic_init: START
amlnf_logic_init:  COMPLETE
get_boot_device_flag: init_ret 0
get_boot_device_flag NAND BOOT:
NAND BOOT,nand_env_relocate_spec : env_relocate_spec 49
uboot env amlnf_env_read : ####
set_storage_device_flag: store 1
      Multi dtb tool version: v2 .
      Multi dtb detected, support 2 dtbs.
        aml_dt soc: m8b platform: m201 variant: 1G
        dtb 0 soc: m8b                plat: m201               vari: 1G
        dtb 1 soc: m8b                plat: m201C              vari: 512M
      Find match dtb: 0
vpu clk_level in dts: 3
set vpu clk: 182150000Hz, readback: 182150000Hz(0x701)
Net:   Meson_Ethernet
init suspend firmware done. (ret:0)
cvbs trimming.1.v5: 0xa0, 0x0
hdmi tx power init
vdac open.1 = 0x1, 0x0
mode is: 4
viu chan = 1
config HPLL
config HPLL done
reboot_mode=charging
Hit Enter key to stop autoboot -- :  1 tstc enter

exit abortboot: 1
m8b_m201_1G#b
Unknown command 'b' - try 'help'
m8b_m201_1G#printenv
aml_dt=m8b_m201_1G
baudrate=115200
bootargs=init=/init console=ttyS0,115200n8 no_console_suspend storage=1 vdaccfg=0xa000 logo=osd1,loaded,0x7900000,576cvbs,full hdmimode=1080p cvbsmode=576cvbs androidboot.firstboot=0 hdmitx=cecf
bootcmd=run bootfromsd; run storeboot
bootdelay=1
bootfile=boot.img
bootfromnand=0
bootfromsd=if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; exit; fi; if mmcinfo; then if fatload mmc 0 ${loadaddr} kernel.img; then setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi
bootm_low=0x00000000
bootm_size=0x80000000
bootpath=u-boot.bin
bootsize=100000
bootstart=0
bootup_offset=0x13000240
bootup_size=0x322c8
cecconfig=cecf
chipname=8726m8
console=ttyS0,115200n8
cvbsmode=576cvbs
digitaudiooutput=PCM
display_bpp=16
display_color_bg=0
display_color_fg=0xffff
display_color_format_index=16
display_height=576
display_layer=osd2
display_width=720
ethact=Meson_Ethernet
ethaddr=00:15:18:01:81:31
fb_addr=0x7900000
fb_height=720
fb_width=1280
firstboot=0
gatewayip=10.18.9.1
get_dt=checkhw
has.accelerometer=false
hdmimode=1080p
hostname=arm_m8
initargs=init=/init console=ttyS0,115200n8 no_console_suspend  storage=1
initrd_high=60000000
ipaddr=10.18.9.97
loadaddr=0x12000000
loadaddr_logo=0x13000000
mmcargs=setenv bootargs console=${console} boardname=m8_board
netmask=255.255.255.0
normalsize=400000
normalstart=1000000
outputmode=576cvbs
p0path=uImage
p0size=400000
p0start=1000000
p1path=android.rootfs
p1size=8000000
p1start=1400000
partnum=2
preboot=if itest ${upgrade_step} == 3; then run prepare; run storeargs; run update; fi; if itest ${upgrade_step} == 1; then  defenv; setenv upgrade_step 2; saveenv;fi; run prepare;run storeargs;get_rebootmode; clear_rebootmode; echo reboot_mode=${reboot_mode};run update_key; run update_ir; run switch_bootmode
preloaddtb=imgread dtb boot ${loadaddr}
prepare=logo size ${outputmode}; video open; video clear; video dev open ${outputmode};imgread pic logo bootup ${loadaddr_logo}; bmp display ${bootup_offset}; bmp scale;
reboot_mode=charging
recovery=echo enter recovery;if mmcinfo; then if fatload mmc 0 ${loadaddr} recovery.img; then bootm;fi;fi; if usb start 0; then if fatload usb 0 ${loadaddr} recovery.img; then bootm; fi;fi;if imgread kernel recovery ${loadaddr}; then bootm; else echo no recovery in flash; fi;
sdc_burning=sdc_burn ${sdcburncfg}
sdcburncfg=aml_sdc_burn.ini
serverip=10.18.9.113
stderr=serial
stdin=serial
stdout=serial
store=1
storeargs=setenv bootargs ${initargs} vdaccfg=${vdac_config} logo=osd1,loaded,${fb_addr},${outputmode},full hdmimode=${hdmimode} cvbsmode=${cvbsmode} androidboot.firstboot=${firstboot} hdmitx=${cecconfig}
storeboot=echo Booting...; if unifykey get usid; then  setenv bootargs ${bootargs} androidboot.serialno=${usid};fi;if unifykey get mac; then setenv bootargs ${bootargs} mac=${ethaddr};fi;imgread kernel boot ${loadaddr};bootm;run recovery
switch_bootmode=if test ${reboot_mode} = factory_reset; then run recovery;else if test ${reboot_mode} = update; then run update;else if test ${reboot_mode} = usb_burning; then run usb_burning;else if test ${wipe_data} = failed; then echo wipe_data=${wipe_data}; run recovery;else   fi;fi;fi;fi
testaddr=0x12400000
update=run usb_burning; if mmcinfo; then if fatexist mmc 0 ${sdcburncfg}; then run sdc_burning; else if fatload mmc 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;run recovery;fi;else run recovery;fi;
update_ir=if irdetect; then run update; fi
update_key=saradc open 0; if saradc get_in_range 0 0x50; then msleep 50; if saradc get_in_range 0 0x50; then echo update by key...; run update; fi;fi
upgrade_step=0
usb_burning=update 1000
vdac_config=0xa000
video_dev=tvout
wipe_data=success


Link to comment
Share on other sites

ok , my help :


m8b_m201_1G#help
?       - alias for 'help'
adc     - M6 ADC test
amlnf   - AMLPHYNAND sub-system
amlnf_test- AMLPHYNAND sub-system
autoping- do auto ping test
autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
bmp     - manipulate BMP image data
boardid_prefetch- boardid sub-system
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
cali    - configure clock phare
calinfo - calinfo print the chip calibration info
cbusreg - cbus register read/write
checkhw - Get the hardware revsion
clear_rebootmode- clear rebootmode
clkmsr  - measure PLL clock
cmp     - memory compare
coninfo - print console devices and information
cp      - memory copy
crc32   - checksum calculation
dcache  - enable or disable data cache
defenv  - default environment
defenv_without- defenv without environment variables
dhcp    - boot image via network using DHCP/TFTP protocol
dtbinit - init some env by reading dtb file
dtbload - load binary dtb file from a dos filesystem
echo    - echo args to console
editenv - edit environment variable
efuse   - efuse version/licence/mac/hdcp/usid read/write or dump raw efuse data                                                                                                                                                              commands or info(display chip efuse info)
env     - environment handling commands
ethchk  - check ethernet status
ethdbg  - set ethernet debug level
ethmode - set ethernet mac mode
ethrst  - reset ethernet phy
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
false   - do nothing, unsuccessfully
fatexist- find the file from a dos filesystem
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fdt     - flattened device tree utility commands
get_img_size- get img size and save the result as a environment variable
get_rebootmode- get reboot mode
go      - start application at address 'addr'
gset    - gpio commands
help    - print command description/usage
icache  - enable or disable instruction cache
imgread - Read the image from internal flash with actual size
imxtract- extract a part of a multi-image
irdetect- Detect IR Key to start recovery system
irkey   - irkey key_value time_value
itest   - return true/false on integer compare
keyunify- key unify sub-system
kgdb    - enter gdb remote debug mode
loadb   - load binary file over serial line (kermit mode)
loadenv - load environment at address 'addr'
loads   - load S-Record file over serial line
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)
logo    - logo sub-system
loop    - infinite loop on address range
macreg  - ethernet mac register read/write/dump
md      - memory display
mdc_clk - do mdc clock
mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - mmcinfo <dev num>-- display MMC info
msleep  - delay execution for some time
msr     - Meson msr sub-system
mtest   - simple RAM read/write test
mw      - memory write (fill)
netspd_f- enforce eth speed
nm      - memory modify (constant address)
phyreg  - ethernet phy register read/write/dump
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
put     - put  storage
pwm     - pwm sub-system
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saradc  - saradc sub-system
saveenv - save environment variables to persistent storage
sdc_burn- Burning with amlogic format package in sdmmc
sdc_update- Burning a partition with image file in sdmmc card
secukey - security KEY sub-system
setenv  - set environment variables
sf      - SPI flash sub-system
showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
ssecukey- NAND KEY sub-system
store   - STORE sub-system
suspend - suspend
test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
true    - do nothing, successfully
unifykey- unifykey read/write based on the driver keymanage
unpackimg- unpack imgpack to single
update  - Enter v2 usbburning mode
usb     - USB sub-system
usbbc   - test usb bc
usbboot - boot from USB device
usid_prefetch- usid sub-system
uuid_prefetch- uuid sub-system
version - print monitor, compiler and linker version
video   - video sub-system

Link to comment
Share on other sites

Gathered a working version of the image armbian (console) for the s805. Checked on my existing Board with S805 (spot i5). The image starts and runs. Due to the lack of work on my Board USB connector, I was unable to test the USB flash drive. To use, you can write the image to the media, copy it to the root of the first (FAT) partition and rename "dtb.img" is needed for the Board file (from the directory dtb of the first partition of the written medium). Order of use

1. to activate your universal multiboot

2. to record an image on the medium

3. to correctly copy and rename on media suitable for Board dtb file.

To build dtb files for other models, please provide to me either a dts file from need model, or provide a link to the firmware or to provide a working dtb file from the correct model. In the first stage, you can try to use the files in the dtb (don't forget to copy to the root of the FAT partition and rename to "dtb.img").

 

https://yadi.sk/d/DnCkh3KBvAFES

 

 

Multiboot

 

 

https://yadi.sk/d/c9kY4tuLuPF3Y

 

p.s. Fixed the link to the multiboot

Edited by balbes150
Link to comment
Share on other sites

Method using the standard firmware. This procedure needs to be performed once.

1. to format the SD card to FAT

2. to download two of the file aml_autoscript aml_autoscript.zip

3. to record these files on a prepared map

4. start TV box

5. to connect the prepared map (with two files)

6. open the installed app Update&Backup

7. to choose as a local update files on the SD card (aml_autoscript.zip)

8. Run update

9, TV box to reboot two times and again will load the regular firmware.

10. pull the card

 

From that moment on the TV console activated universal multiboot and you can run it on a different system from external media. The internal system remains unchanged and no it does not suffer from this.

 

To use the image Armbian.

1. Download image

2. Write him a special program on the carrier

3. copy and rename "dtb.img" in the root of the FAT partition media that is appropriate for your set-top box dtb file (from the directory of the first partition dtb prepared media).

At the moment there are three files, you can try all three files. If the system fails to boot, you need to collect suitable for your TV box new dtb file. For this you need to send me the relevant information. On these links, you can read the details on how you can capture the image on the medium.

 

http://freaktab.com/forum/tv-player-support/amlogic-based-tv-players/s905/tronsmart-ac/firmware-roms-tools-at/565449-running-linux-from-sd-card-or-usb-flash-drive-using-balbes150-method-and-files

 

If you have any questions, feel free to ask questions, I will try to explain. :)

Link to comment
Share on other sites

@@balbes150

i'm having trouble installing your aml_autoscript on my s85 box, when it reboots in recovery i get the following errors :

 

E:footer is wrong

E:signature verification failed

Installation aborted.

 

I see this is a common error, but i don't know much about android an didn't find an easy trick to fix that myself.

The update files are on the root of my USB stick, and tried again from within recovery (update from external -> udisk) but got the same error.

thx

Link to comment
Share on other sites

This is a common mistake. Usually it is associated with a media error. Sometimes this error is related to a bad download of the file (error when downloading). First check how to prepare the media. Must be FAT system. The media is better to have no more than 2 GB. For the S805 is better to use SD card, because in many models of u-boot S805 not working install updates from a USB. They can only use the SD card activate the multi-boot. Alternatively, download the special image at the link. Burn it to the media. To replace the files on those that are designed to S805. PLEASE NOTE the files in the original image state is designed to S905 they need to replace the files for the S805.

 

 

https://yadi.sk/d/FcNyXwmhurN2D

 

 

 

Added in GIT a few new dtb files for multiple models (which found in free access). Please to those who have the opportunity to check their performance on these models. MXQ HD180 M808 M201.

 

https://github.com/150balbes/Amlogic_s905/tree/master/dtb_file/S805

Link to comment
Share on other sites

ok thx for the explanation, sorry i should have tried from sd card and it did work fine.

Your s805_autoscript udpate is okay now and i've checked my /dev/block/env to make sure your modifications are there.

 

now i'm trying to boot your image Armbian_5.17_Vegas85_Debian_jessie_3.10.102_20160915.img

i get two behaviors depending on which dtb.img file i'm using : 

 

 

-  when using your m201_1G/dtb.img, or my box dtb.img (with stripped headers, i'll explain below), i get no hdmi output (monitor says "no input") an no boot as far as i can tell, network light is on (not active), no dhcp request sent by the box.

 

- when i use my "split_bootimg.pl" dtb.img, taken from the /dev/block/boot of my box, or from a stock image, android boots as if no sd card was inserted.

 

here's the some firmware data for that box  : Beelink s85 firmwares and my dump

 

 

i'm feeling that split_bootimg.pl tool does not extract dtb.img properly for those s805 boot blob.

When i use it, the boot-second.gz generated is larger and has some kind of header at the beginning which makes dtc send "bad magic number" error when trying to decompile to dts.

 

i did find a workaround (remove hex header, that's why i called it "stripped"), then dtc works fine and dts output is clean and i get the "no hdmi" boot as described above.

Link to comment
Share on other sites

Share the link to Your dtb file. It is necessary to try to collect all variant dtb file based on the Assembly environment and the kernel sources , which in Armbian. Maybe it will help to start the system. It is advisable to try all the dtb files that are in the directory and on the website. Sometimes it helps initial boot (not all hardware will work, but the main thing is to find a basic piece of data).

 

 

 

In the last images added two scripts to perform a full backup and restore the entire internal memory (ddBR). It is convenient to use in front of various experiments with the contents of the internal memory.

Edited by balbes150
Link to comment
Share on other sites

i will do more tests tomorrow

 

the firmware images for my box are on the Mega.cz link above.

i did not put the dtb directly there yet, because i don't know if my dtb extraction tool works or not.

You'll find a "boot.img" in the "dump" and "firmwares/extract" directories which are the /dev/block/boot blob that contain the dtb bin.

 

i use "split_bootimg.pl" script from cnxsoft tutorial to extract the dtb.img but as i tried to explain above, i'm not sure the dtb blob is good.

Link to comment
Share on other sites

I uploaded the new images. Try them. You need to try everything available in the catalog of dtb files (from all models). I have oddly enough, the i5 is better earned the console image file from hq18. When using native dtb files (from version) i5) was the problem. The system did not boot (had a kernel panic) with the native tether 1Gb, which runs Android. With dtb file 512MB the system was started and worked, but was determined only 350 MB of memory. And file from hq18, it works correctly, the memory was 790 MB and the system was stably run. By the way, I downloaded the desktop Ubuntu image. It works for me, there is a Desk XFCE , but the colors are not correct and can not see the cursor. Have to move the fly at random.

 

I downloaded the firmware for the MXQ S85 and soon will try to get all dtb files and I'll post it on the website.

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