Posts by SnT2k

    Posting here despite being a bit Lakka-related because I'm trying to compile Lakka using LibreELEC's build system. Also, it seems that experts on the build system hang out here more than at the Lakka forums. Apologies in advance (and be ready to do a facepalm).

    So I'm trying to create a Lakka build for my S812 device based on patches from LibreELEC. Since Lakka's build system is basically an older version of LibreELEC's (forked from OpenELEC), the existing project/device contents that I got from LibreELEC doesn't exactly work with Lakka's. So I replaced the scripts and tools folder of Lakka's with LibreELEC's, and replaced the packages/linux/package.mk with LibreELEC's too.

    Along the way, there were some build errors because of missing packages which I managed to fix by grabbing the relevant package.mk from LibreELEC and some CMake build problems which I fixed by replacing the config/functions with LibreELEC's too. So right now, I have this frankenstein of a build system that ~sorta~ works.

    However, I got stumped when compiling the linux kernel, it encountered errors when compiling the DTS:

    Upon inspecting the relevant lines in arch/arm/Makefile:

    Code
    dtbs: scripts
            $(Q)$(MAKE) $(build)=$(subst $(wildcard $(srctree)//),,$(subst $(join /,$(subst dtb,dts,$@)),,$(firstword $(wildcard $(srctree)/$(boot)/dts/amlogic/$(subst dtb,dts,$@) $(srctree)/$(CUSTOMER_DIR_NAME)/meson/dt/$(subst dtb,dts,$@))))) \
            MACHINE=$(MACHINE) \
            dtbs

    It seems that the $(build)=.... gets resolved to obj=, that is, the entire parameter, for some reason, resolves to nothing. I'm out of ideas on how to proceed but I imagine that I have to pull something again from the LibreELEC build system.

    EDIT: btw, the Linux version I'm using is this: GitHub - kszaq/linux at 263a24f2e8e17cdd527e5c4aa462240d5e156edb

    That's the first thing I actually checked! But that's just for compiling though. I was looking for how the directories are structured (e.g. how do the 'patches' in the packages resolved against the 'patches' in the projects?), how the build scripts interact with each other, and what are the entries in package.mk files which look like OpenWRT's package.mk files but slightly different.

    I managed to get most of the info by reading through the scripts and working backwards with the help of nice people here, so all's well and good.

    Hi balbes150, thanks for the effort! However, it seems that the Wifi problem is still present. To elaborate on the problem, the Wifi goes up allowing pinging and ssh as for a long time, but the moment I start downloading something (like addons), it gets cut off.

    Just to check if it's a hardware problem, I flashed the stock android firmware on the device and the wifi worked without any problems. I think I'll try looking around other threads to see what are the possible fixes. Though, any suggestion how to start debugging the thing beyond dmesg and lsmod dumps? I've tried scanning the loaded DTBs but it didn't give me much information.

    Hi all!

    I have a tool written in C that needs to be compiled for the host buildsystem. It aggregates DTBs for Amlogic devices which is used as one of the build step when generating the device image.

    How do I go about integrating this into the build system? For starters, I've tried creating a folder dtbTool under the tools folder, then adding tools/dtbTool/dtbTool.c and tools/dtbTool/Makefile, and finally inserting the make and $ROOT/tools/dtbTool/dtbTool commands in scripts/image. However, when the make executes, it generates the binary for the target platform. I know that this is the wrong way to do it, but I had to start from somewhere.

    I couldn't find the source code for handling Amlogic's Multi-DTB format so I wrote my own (thankfully, it's simple enough): github: aml-dtbtools
    The code is written in portable C and C++11 so those should compile without dependencies (works on 64-bit x86 and 32-bit ARM).

    The dtbTool is modified from the dtbTool source of QCOM which is floating around (it requires few modifications, surprisingly) while the splitter is based from reading the u-boot code.

    Hope this helps!


    Try to connect via SSH and get the list of modules that you are using (lsmod).


    Here's the output:

    Code
    Module                  Size  Used by
    dhd                   658858  0
    btsdio                  2434  0
    bluetooth             193132  1 btsdio
    8021q                  16201  0
    hid_logitech_dj         9603  0
    wifi_dummy               745  0
    mali                  161003  5

    Here's the relevant dmesg dumps if it helps:

    Judging from the dmesg log, it seems like it's loading the correct driver?


    Sorry, I not speak English, I don't understand the question, what You want to do ?

    Sorry for the late response, got caught up in something.

    Anyway, I tried replacing the dtb from KERNEL myself using mkbootimg (which works) but I see that you have already included the Amlogic Multi-DTB files in your latest builds.

    Tried the S812.LAN1000 builds and they work great! While LAN works 100%, Bluetooth is not recognized and the device tends to hang when using WiFi. In the 7.0.2 build, the device eventually hangs, in 8.0.0, network requests fail and the device hangs when a reboot is attempted.
    I've checked the WiFi chipset, it's the AP6335 Wireless module.


    After recording of the image on the media, FAT partition, there is a copy of the dtb file. Dtb data from this file are part of the kernel (kernel.img). This dtb file can be used to separate the kernel, the dtb data initramfs. For separate download of elements need to use another script file s805_autoscript. I checked the option in which dtb data are not part of the "kernel.img". In this embodiment, it is easy to replace the dtb data for any need without having to collect a new image. But it has a drawback. U-boot (which is used in all standard firmware platform S8xx) no support for separate load and store the dtb data in the internal memory. This feature (separate storage of the kernel and dtb data in the internal memory) appeared on the platform S9xx. If make the corresponding changes in u-boot, then can use a separate options storage of the kernel and the dtb data to internal memory.

    I see... so that's why it was possible to split the dtb.img on S905 devices. In any case, could you compile into the kernel.img the multi-dtb I uploaded (it actually got extracted from the boot.img file)?
    [hr]

    This is the correct value, as it should be. A portion of memory to be allocated for the graphics system and it is not displayed in the output.
    Anyway, is it possible that the lower ram in my case is due to the same reason as GWR? (Graphics taking up the ram)

    I checked the device RAM, it's only listing a total of 1613952kB instead of 2gB. Is this because of a mismatched DTB file?

    In any case, I managed to extract the AMLOGIC multi-dtb file from the image and uploaded it here: Dropbox - probox2ex+.dtb.img
    Also, it may be a stupid question, but can the DTB file be replaced post-install? I managed to do it for the RPi but that's a special case, I don't know how to do it for my device or if it's even possible.

    Hi, I managed to install LibreElec on my Probox2 EX+ using the MXIII Plus build: 20161115
    Here are the steps:

    • Download TWRP for MXIII Plus, I found the link here: index.php?t673262-5740.html the exact file is TWRP_MXIII_Plus_S812.img and it has a SHA1 hash: a2eb8d25d47c99a7cb4de4e3c5dfe2134380188d
    • Rename the file to recovery.img and copy it to the root of a FAT32-formatted MicroSD card.
    • Download the update ZIP version of LibreElec (look for the one with the filename LibreELEC-S812.MXIII_Plus.arm-[i]W.X.Y.Z[/i]-update.zip) and copy that into the MicroSD card.
    • Boot the device into the MicroSD card using the toothpick method (exactly the same procedure as the official "TF Card Update" method)
    • (Maybe optional) Install recovery.img into the recovery partition by going to the command line and issuing the command:
      Code
      dd if=/external_sd/recovery.img of=/dev/block/recovery ;sync;sync


      (the normal installation procedure does not seem to work). Then reboot into the recovery partition.

    • Go to install, and select the zip file copied in step (4). The installation should proceed smoothly.


    The thing seems to be stable so far, but haven't stress-tested it yet. Will let you know if problems crop up! HUGE thanks for the effort, balbes150!