How to compile a personalized CoreELEC

Hi, my device processor is Amlogic s905l3a, I want to compile 19.5-Matrix_rc2 so that it has the complete functions of ipset and iptables (for openwrt), how should I modify those files? It would be very grateful if you could tell me the specific modification parameters (or examples).

First steps:
https://wiki.coreelec.org/coreelec:build_ce

I have read this carefully and compiled CoreELEC according to the default configuration, and it can run successfully on my device, but openwrt still cannot run perfectly. I heard that there may be no complete ipset function, so I hope to be able to guide me which file to modify. Able to get full ipset functionality, thanks!

Probbably something at CoreELEC/linux.aarch64.conf at coreelec-20 ¡ CoreELEC/CoreELEC ¡ GitHub

Amend this file ~/CoreELEC/CoreELEC/blob/coreelec-20/projects/Amlogic/linux/linux.aarch64.conf to get the function I want?

I don’t quite understand what it means. I have changed all the following codes to this. Can it be compiled like this?

CONFIG_IP_SET=m
CONFIG_IP_SET_MAX=256
CONFIG_IP_SET_BITMAP_IP=m
CONFIG_IP_SET_BITMAP_IPMAC=m
CONFIG_IP_SET_BITMAP_PORT=m
CONFIG_IP_SET_HASH_IP=m
CONFIG_IP_SET_HASH_IPMARK=m
CONFIG_IP_SET_HASH_IPPORT=m
CONFIG_IP_SET_HASH_IPPORTIP=m
CONFIG_IP_SET_HASH_IPPORTNET=m
CONFIG_IP_SET_HASH_MAC=m
CONFIG_IP_SET_HASH_NETPORTNET=m
CONFIG_IP_SET_HASH_NET=m
CONFIG_IP_SET_HASH_NETNET=m
CONFIG_IP_SET_HASH_NETPORT=m
CONFIG_IP_SET_HASH_NETIFACE=m
CONFIG_IP_SET_LIST_SET=m
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=m
CONFIG_NF_SOCKET_IPV4=m
CONFIG_NF_TPROXY_IPV4=m
CONFIG_NF_DUP_IPV4=m
CONFIG_NF_LOG_ARP=m
CONFIG_NF_LOG_IPV4=m
CONFIG_NF_REJECT_IPV4=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_RPFILTER=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_SYNPROXY=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_CLUSTERIP=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
# end of IP: Netfilter Configuration

Try and see.

It has already started. I have experienced many failures. I don’t understand, so I can only do it recklessly.thanks for your guidance

You can edit linux config file with something like that

LDFLAGS="" make ARCH=arm64 CROSS_COMPILE=$(pwd)/build.CoreELEC-Amlogic-ne.arm-20/toolchain/bin/aarch64-none-elf- menuconfig -C build.CoreELEC-Amlogic-ne.arm-20/build/linux-13800472b175bb8d5845fa2b3644854163816e76

and at the end merge changes from .config file back to project linux config.

Thanks, I tried to get the configuration interface by running “make menuconfig” in the root directory, but it didn’t work, the official documentation doesn’t have this description.

Hi, did u success compile it? I need it please

Not successful yet, let us work together and get back to you when successful.

I would help but it is not clear what needs to be enabled.

Thank you very much for your enthusiastic help. The network in my area is restricted, and some foreign websites will be blocked and cannot be accessed directly. Now I have installed ‘OpenWRT’ in the ‘docker’ plug-in of ‘CoreELEC’, but the’ in ‘OpenWRT’ ‘passwall’ can’t help me to access the restricted websites, domestic forums say it’s because ‘CoreELEC’ doesn’t have a complete ipset or iptables module, so I need to compile firmware with complete network functions by myself.
I don’t know if I understand what I described, thank you again for your help.

try openwrt+openclash instead.
more specifically, for openwrt use lienol’s repo, not official openwrt.

Openclash can’t solve this problem either, it should be the reason why the CoreELEC kernel function is not complete, the kernel must be recompiled to solve the problem.

I’m not a pro, but I built CE with kernel tweaks myself.
My personal experience:

Follow official CE build guide, make a successful run first, then ssh to your build host and locate

/CoreELEC/build.CoreELEC-Amlogic-ng.arm-XX/build/linux-XXXXXXXXXXXXXXXXXXXXX

XX need to be replaced by yours path. This only exists after you have at least one successful build, so just use the default script and obtain one first.

cd to the dir above then type

make meuconfig

To enter kernel config menu, should be easy from now on for you as you have compiled openwrt by yourself. Default iptables and ipset are compiled as modules/m, so change them to Y and build kernel again with

PROJECT=Amlogic-ce ARCH=arm ./scripts/build linux

change Amlogic-ce accordingly if you are building for different platform.

1 Like

When you modify something in the build.* folder you will need to remove the stamp of the package you want to rebuild.

Like with the short cmd:
rm -f build.CoreELEC-Amlogic-ng.arm-20/.stamps/linux/build_target

Starting over, hope it works out!

Thanks a lot, can you share your config file?
My email gnsxsb@gmail.com