Build environment questions

Is it generally a good idea to build everything on the target device? If I want to use my x86 main machine to cross compile for my N2+ what would that look like? The instructions on the wiki say just run make image and when i tried that it proceeded to get busy, probably building for the wrong platform.

Any more documentation avaiable for this? Any advice?

also has anyone got a docker-compose of a build environment?

Is it neccessary to build an image once, and pull a bunch of files and such, to build addons?

I think most the things are there including docker.
You will have to be more precise what issues you have.

I use self builds myself, reason: I need to enable certain cgroup support in Linux kernel to restrict docker container resource and fine tune some parameters in kodi upnp server to better suit my usage.
Other than that, I think CE is pretty much out-of-the-box for daily use, normal users do not need to build themselves.

The main question is can i cross compile or do i have to build it on the target device

If i can cross compile what build options need to be specified

Did you even read the how to? No.
There is written about Ubuntu and this is not target, isn’t it?

1 Like

There is written about Ubuntu and this is not target, isn’t it?

It most certainly can be.

Here is ubuntu 20.04LTS by hardkernel for the N2+ Theoretically, I could load this up, build on the N2+ and dump the finished product to external drive.

Its not a lack of reading but a lack of inforation. You may know this stuff inside and out, but either I am reading the wrong things, or the documentation is lacking.

I read it and need more to go on beyond

Ubuntu 20.04 lts
make image
PROJECT=amlogic for legacy 9.2.x devices

Does this assume x86_64 to arm cross compilation?
Does this assume x86_64 to aarch64 cross compilation?
Does it throw the kitchen sink at every build?
How do I specificy what build on what architecture for what project type?

1 Like

The first line on wiki says

The CoreELEC “build-system” simplifies the complex task of cross-compiling .......

So take Ubuntu on your x86_64 PC and try to actually build something. Don’t be only theoretical: be practical too.

And at the end make wiki pages adjustments with information you are lacking.

The CoreELEC “build-system” simplifies the complex task of cross-compiling

That doesnt really explain, it just says it can make cross-compiling easier.

Don’t be only theoretical: be practical too.

Not an appealing path when it says builds take hours.

Things like specifying platform paramenters or architecture parameters someone probably knows off the top of their head.

So the first answer is

The build system by default cross-compiles x86_64 to ____ (need to figure out if armv7 or aarch64), from an ubuntu 20.04 LTS install.

Im guessing ill have to dig through the code to try to find the answer to my other question of how to specify platform. There is obviously a way to build for differnet platforms because different images exist for different platforms.

1 Like

Well, you still didn’t tell us what you actually want to achieve. You just need to use make for making .tar file for update only and make image to make disk images.

You don’t need to figure out anything - make and make image does it all automatically.

That first sentence irks me. Im not really someone who can do things without understanding what, why, and how.

If it’s all done automatically, that makes me think it’s all x86_64 to armv7 or armv7h , and the ‘kitchen sink’ method for platform specificity where support for all platforms are included in every build. That doesnt make sense with the different builds for different platforms available on the site though, unless a post-hoc script is run that adjusts dtb stuff for platform specificity.

I assume the addon build system would follow the same principles as the main build system

My end goal is to get up to speed with understanding the build tools, and maintain an addon project for the ng devices. I am just trying to get a proper build environment setup and the gist of how things actually function, so im not just walking off into the dark.

1 Like

I think you are on your own then to optimize everything to your requirements.
Don’t know if you really need to do that but you know better. And don’t expect much help because we have more important things to do then doing such tweaks.

Here are the parameters I was asking questions about if anyone else finds this thread with their curiousities

found in /coreelec/config/options

If parameter not forced do

export PROJECT=“${PROJECT:-Amlogic-ce}”
export DEVICE=“${DEVICE:-Amlogic-ng}”
export ARCH=“${ARCH:-arm}”

So i you run it without specifying any parameters you get

you get (PROJECT=amlogic-ce DEVICE=amlogic-ng ARCH=arm make image)

/coreelec/config/arch.arm breaks it down by chip
default target cpu selects chip which sorts to armv7-a

determine architecture’s family

case $TARGET_CPU in

Looking over the code base, it does look like aarch64 has quite a bit of work put into it, but I am guessing it is non-defaulted for driver based reasons.
AArch64 is the 64-bit state introduced in the Armv8-A architecture
armv8 includes both 32-bit execution and 64-bit execution states

So the default state of affairs for coreelec is cross-compiling x86_64 to armv7-a (with implied parameters PROJECT=amlogic-ce DEVICE=amlogic-ng ARCH=arm), normally done on ubuntu 20.04LTS.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.