Meson 8* Lives!

  • dtech I think the idea was to get the box booting any non-Android OS first, and work forwards from there.

    There's nothing wrong with that, but at the moment I see that my legacy images are currently being tested, and the upstream autoscript is not really compatible with them, that's why I indicated that.

    By the way, my legacy autoscript does not have statically defined memory addresses that are present in the upstream version. Since there are some differences between S805 (m8b) and S8X2 (m8 and m8m2) in this area, it is not surprising why the 's805_' prefix is included in the name of s805_autoscript.

  • dtech I think the idea was to get the box booting any non-Android OS first, and work forwards from there.

    Just taking steps to launch any image and then modifying the DTB by patching or replacing it with the existing board file to match the actual system profile, knowing that the 2GB memory configuration in the latest builds will most likely cause it to fail to boot.

  • Thanks to everyone for your replies dtech   Synerworks   chewitt

    dtech, from what I read in the link.

    Quote

    External DTB cannot be used with Meson8* (S805/S8X2), because there it only takes into consideration those that are integrated into the kernel!

    This means that I must use the original kernel, or I can try to boot with the upstream images?

    I will try with an upstream image, and edit the script as you suggest and if I succeed I will keep you posted.

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

    From what I understand my TV BOX is quite strange.
    CPU is S802-B, wifi doesn't match what I saw (ap6210), 1GB RAM, anyway, it's pretty fluid and that's why I want to rescue it with any other OS (KitkKat 4.4.2 is already obsolete). My intentions are to find an OS as stable as possible, and eventually install it on the system memory.

    I have access to it by UART, now I'm trying to copy the original boot loader to a USB.
    At the moment I am following these steps.
    https://www.synacktiv.com/publications/i-hack-u-boot
    I don't have a clear procedure for amlogic, I understand that if I can extract the original content, I could check the original files and from there see what corrections to make to the precompiled images, if anyone can contribute, I would appreciate it.

  • This means that I must use the original kernel, or I can try to boot with the upstream images?

    No, this means that the legacy 3.10 kernel does not care about the dtb.img file in the root of the SD card because it cannot load from there. Actually, the dtb is integrated into the kernel.img, which it loads.

    But, if you would like to try with my legacy image, I recommend the MXIII-1G image, because this is the only image with 1GB RAM support for an S802 device. In theory, this should boot without any modifications.

    wifi doesn't match what I saw (ap6210)

    Since the v9.2.8.12 image, this is completely irrelevant, it will probably work, including the bluetooth part...

    Quote

    LibreELEC v9.2.8.12 (2023-11-20):

    ...

    • S8X2: apply bcmdhd driver update for all devices,

    I have access to it by UART, now I'm trying to copy the original boot loader to a USB.

    This is completely unnecessary.

    1. If the toothpick method does not work, but you have UART access, first of all write the image suggested above to an SD card with this program.

      When finished, put the SD card into the box.
    2. Interrupt the startup process of uboot, then copy the contents of the aml_autoscript file line by line after the prompt:
    Code
    setenv bootfromnand 0
    setenv upgrade_step 2
    setenv startfromsd 'if mmcinfo; then if fatload mmc 0 ${loadaddr} kernel.img; then setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi'
    setenv startfromext 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; exit; fi; if test ${reboot_mode} = switch_system; then exit; fi; run startfromsd'
    setenv bootcmd 'run startfromext; run storeboot'
    saveenv
    run storeargs
    run startfromsd
    run recovery

    ^ If everything went well, you can't paste the last line, because LibreELEC starts after run startfromsd.
    However, if this is not the case, please send the messages displayed afterwards.

    Don't even try to boot from USB, because loading the kernel doesn't work for S8xx devices.

  • You are going over and above what is required to attempting to boot any image at this point. The preliminary step was to get any type of failure on booting any image whatsoever to get to roadmap on what works and what does not. Whether all equipment on the box works at the moment was not important, so it has an AP6210 wifi, the AP6330 version of LibreELEC will support it. Anyhow, if something were to boot up and or burn up on boot, the next step would have been to get the correct DTB to match your box profile. Dtechs builds just have the 'dtb.img' on the SD image as a reference to what the 'kernel.img' build included. The strategy was to rip open the 'kernel.img' with Android Image Kitchen and replace the existing DTB with your Android specific one or simply to modify the existing DTB memory configuration to match yours and repackage it. This process is only valid for his 3.10.x kernels since the DTB structure is compatible.

    The effort is not to burden Dtech with every flavour of M8 box out there and cut images specifically to each one. By the way, your box seems to be equivalent to the MyGica ATV582 based on the board images you provided. Once your box begins to work, you may need to modify your remote configuration to match your controller for your box. Use a USB keyboard for the time being to access the box.

  • dtech
    Thank you very much. It started on the first try.

    I leave the output of the session in case any data is useful.

    I confirm that it worked with the MXIII-1G image.

    Synerworks
    Thank you for the clarifications. Not fully understanding the charging process myself, I thought it was necessary to match the model name or some other particularity.


    At the moment everything is working, the remote control works as it comes with a separate usb wireless reader
    I am surprised how well everything works, I didn't think it would be so simple.

    Congratulations for this great job.

  • Since you do not overwrite the contents of the EMMC when booting from the SD card, you will not need to do a backup of the existing dated firmware, as illustrated in your log posting. To launch LibreELEC or Armbian from the SD card, you will need to follow the toothpick method discussed in these forums, once you have any image put on a SD card. You can obtain Christian Hewitt's LibreELEC images using his AMLMX builds, Gabor Dee's excellent legacy LibreELEC build, found in these forums, or grab SLAzurin's build of S8xx Armbian from GitHub, which also has a sample image for download that can be used. Once you have something coming up, I can go at length into getting things up to the latest 2024 releases.

    Going through your log, you seemed to be looking for development tools, however, since LibreELEC has just enough OS for KODI, you will not find anything more than a fantastic media box. If you want, you can see Christian's bleeding edge version of LibreELEC, specifically the AMLMX box image. Other than that, if you plan on using it as an engineering platform, the SLAzurin's Armbian build is a good start, just configure it to use the supplied MXIII DTB.

    While it is possible to bring up a full GUI desktop environment on your S802 box, your device may not cut the mustard since the current footprint on an existing 2GB box takes some 45%+ of the memory resources just to have a basic terminal session running, therefore sticking with a CLI would still be the way to go, it leaves enough headroom to build your applications including legacy and next generation LibreELEC images, short of adding external storage for swap.

  • Synerworks

    Thanks for the suggestion.

    Considering that the CPU is a 32bit CPU, using it as a desktop computer is a bit ambitious.
    I am satisfied with KODI and some applications, if you could have Netflix or Youtube, the better..
    Otherwise, a good use is retro game console.
    I checked on the Lakka and similar websites, but the Lakka version is very old. 2.3, it boots, but the remote controller is not fully functional. Maybe i can take some resources from this one to configure the lakka rom.
    My intention is to rescue this device since the CPU has good support for video decoding, I noticed it very fluid.
    For ARMBIAN I already have a NANOPC-T4.
    Other 2 devices that I have to review, are:
    - REMIX MINI RM1G (Allwinner H64)
    - USB STICK (ugoos qc802), I think the CPU is RockChip RK3188

    But I'll leave that for later and another topic.

    Edited once, last by Thefinaldoom (January 12, 2024 at 12:11 AM).

  • H3N7R1K If you expected this experimental and developed-for-free (nobody charged you money) image to do anything more than boot (which might be pushing it on some hardware) you have rather inapropriate expectations. As the tone and language of your post were also not appropriate for the forum, it has been deleted.

  • Martin has posted a recent AMLMX branch GitHub - xdarklight/linux at meson-mx-integration-6.7-20231221, with several changes, however, the display initialization at boot still fails without the fix to the latest 6.7.0-rcx branch. The compatible targets appear to include AMLGX devices but has left the Meson8x out as specified in their DTS. Perhaps, if you plan to generate a future cut of LibreElec for Amlogic S8xx boxes, check the patch to bring up the display.

    Martin's bloodhound work has identified the HDMI initialization issue that impacted previous AMLMX builds, GitHub - xdarklight/linux at meson-mx-integration-6.8-20240310, works once again without resorting to the previous kludge. Therefore, any recent builds for LibreElec AMLMX against this branch should at least come up to the KODI target. Checking into it now that Armbian is operating as previously on the S8xx boxes. Results to follow. Not LibreElec but getting there.

    Edited 4 times, last by Synerworks: Attachment missing; updated link. (March 11, 2024 at 4:00 PM).