Hugo Posted July 5, 2017 Posted July 5, 2017 Hi folks, I have one of those cheap boxes based off Amlogic S905X, and while ARMbian boots properly, I really wanted OpenGL support and 2D and 3D acceleration in Xorg. After looking for a while I found Amlogic's buildroot package , which has full wifi, hdmi, and full mali support including GL, and cross compiled an image based off gcc-linaro-6.3.1, uboot-2015-next, and kernel 4.9. I managed to build the whole thing with no major issue, and flashed it using USB Burning Tool. But the box was then stuck in an infinite reset loop. I connected the serial console, and this is the output: Spoiler GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0; TE: 76284 BL2 Built : 11:58:42, May 27 2017. gxl gc3c9a84 - xiaobo.gu@droid05 set vcck to 1120 mv set vddee to 1000 mv Board ID = 2 CPU clk: 1200MHz DQS-corr enabled DDR scramble enabled DDR3 chl: Rank0+1 @ 912MHz - PASS Rank0: 1024MB(auto)-2T-13 Rank1: 1024MB(auto)-2T-13 DataBus test pass! AddrBus test pass! -s Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000 New fip structure! Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600 Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600 Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00064000 NOTICE: BL3-1: v1.0(release):5fba975 NOTICE: BL3-1: Built : 14:24:33, Jun 15 2017 [BL31]: GXL CPU setup! NOTICE: BL31: BL33 decompress pass mpu_config_enable:ok [Image: gxl_v1.1.3221-2cfba69 2017-05-27 16:03:58 qiufang.dai@droid07] OPS=0x82 1c 98 37 9d 96 21 7 e5 25 b2 c6 e3 [0.296355 Inits done] secure task start! high task start! low task start! ERROR: Error initializing runtime service opteed_fast U-Boot 2015.01 (Jul 03 2017 - 23:13:17) DRAM: 2 GiB Relocation Offset is: 76ebd000 register usb cfg[0][1] = 0000000077f5c430 [CANVAS]canvas init vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters vpu: clk_level = 7 vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300) vpu: vpu_clk_gate_init_off vpp: vpp_init boot_device_flag : 1 Nand PHY Ver:1.01.001.0006 (c) 2013 Amlogic Inc. init bus_cycle=6, bus_timing=7, system=5.0ns reset failed get_chip_type and ret:fffffffe get_chip_type and ret:fffffffe chip detect failed and ret:fffffffe nandphy_init failed and ret=0xfffffff1 MMC: aml_priv->desc_buf = 0x0000000073ebd6b0 aml_priv->desc_buf = 0x0000000073ebf9d0 SDIO Port B: 0, SDIO Port C: 1 emmc/sd response timeout, cmd8, status=0x1ff2800 emmc/sd response timeout, cmd55, status=0x1ff2800 init_part() 293: PART_TYPE_AML [mmc_init] mmc init success dtb magic edfe0dd0 Amlogic multi-dtb tool Single dtb detected start dts,buffer=0000000073ec2200,dt_addr=0000000073ec2200 Amlogic multi-dtb tool Single dtb detected parts: 11 00: logo 0000000002000000 1 01: recovery 0000000002000000 1 02: rsv 0000000000800000 1 03: tee 0000000000800000 1 04: crypt 0000000002000000 1 05: misc 0000000002000000 1 06: instaboot 0000000000400000 1 07: boot 0000000002000000 1 08: system 0000000080000000 1 09: cache 0000000020000000 2 10: data ffffffffffffffff 4 init_part() 293: PART_TYPE_AML eMMC/TSD partition table have been checked OK! check pattern success mmc env offset: 0x27400000 In: serial Out: serial Err: serial reboot_mode=watchdog_reboot hpd_state=0 cvbs performance type = 6, table = 0 [store]To run cmd[emmc dtb_read 0x1000000 0x40000] _verify_dtb_checksum()-917: calc 779af835, store 779af835 _verify_dtb_checksum()-917: calc 779af835, store 779af835 dtb_read()-1039: total valid 2 dtb_read()-1106: do nothing Amlogic multi-dtb tool Single dtb detected Net: dwmac.c9410000amlkey_init() enter! "Synchronous Abort" handler, esr 0x96000210 ELR: 77efe52c LR: 77efe52c x0 : 0000000077fbc000 x1 : 0000000000000001 x2 : 0000000000000000 x3 : 0000000000000000 x4 : 0000000000000000 x5 : 0000000000000004 x6 : ffffff80ffffffc8 x7 : 0000000000000044 x8 : 0000000000000000 x9 : 0000000000000000 x10: 0000000000000000 x11: 0000000000000000 x12: 0000000000000000 x13: 0000000000000000 x14: 0000000000000000 x15: 0000000000000000 x16: 0000000000000000 x17: 0000000000000000 x18: 0000000073eace28 x19: 0000000077f39618 x20: 0000000077f62000 x21: 00000000ffffffff x22: 0000000077f4a2c2 x23: 0000000077f48b89 x24: 0000000077f5951e x25: 0000000077f4a291 x26: 0000000000000000 x27: 0000000000000000 x28: 0000000000000000 x29: 0000000073eacc60 Resetting CPU ... resetting ... The problem is with the Synchronous Abort at the end, but I have never seen that before, and I cannot figure out what is causing it. I know this has nothing to do with Armbian per se, but seeing as it is a u-boot issue, I was wondering if anyone ran into this issue before, and how I can figure it out? While the box was stuck in infinite reset, the USB burning tool couldn't connect at all, and uboot wasn't configured to boot from SD card... I managed to get out of the loop and reprogram via USB by shorting pins 31 and 32 on the eMMC during bootup, and reflashed the stock firmware. Everything is now back to Android and behaving normally, but I really would love to be able to boot that image that took me roughly 6 hours to compile... Thanks for any help!
debianxfce Posted July 5, 2017 Posted July 5, 2017 It is better to boot from a microSD card or USb memory. It is much easier to test and you wont brick your device. The aml_autoscript starts s905_autoscript that specifies where the box starts to look zImage and uInitrd files. If the kernel can not be started then the boot process stays in loop (see the .cmd file) . It is better to build sd card image using armbian scripts that are easy to modify to your projects. Configure it using and creating new files in lib/config/boards&kernel&sources directories. https://github.com/150balbes/lib You can try balbes or mine install images. In my image there is mali 400 kernel driver enabled and support for brcm wifi. For gpu accelerated graphics, you need some special libdrm and other X components that are not in Debian repositories https://www.youtube.com/watch?v=UsNzZn-luc0
balbes150 Posted July 5, 2017 Posted July 5, 2017 IMHO. You have a problem not the right build u-boot (possibly not used the correct GCC or src). I don't recommend to change (flash) u-boot and dtb, if they are collected using source not from the manufacturer of the TV set-top box.
Recommended Posts