Compile 9.2.7 Amlogic-NG

Inject_bl301 could not be obtained while compiling 9.2.7, resulting in a compilation failure.What’s the solution?

Below is the error message:

GET inject_bl301 (archive)
–2021-04-03 21:16:56-- https://sources.coreelec.org/inject_bl301-aarch64-fa8b99844f2b59289c5c88b111228d740b34930b.tar.xz
Resolving sources.coreelec.org (sources.coreelec.org)… 116.203.16.118
Connecting to sources.coreelec.org (sources.coreelec.org)|116.203.16.118|:443… connected.
HTTP request sent, awaiting response… 404 Not Found
2021-04-03 21:16:57 ERROR 404: Not Found.

–2021-04-03 21:16:57-- http://sources.libreelec.tv/mirror/inject_bl301/inject_bl301-aarch64-fa8b99844f2b59289c5c88b111228d740b34930b.tar.xz
Resolving sources.libreelec.tv (sources.libreelec.tv)… 138.68.75.163
Connecting to sources.libreelec.tv (sources.libreelec.tv)|138.68.75.163|:80… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: https://sources.libreelec.tv/mirror/inject_bl301/inject_bl301-aarch64-fa8b99844f2b59289c5c88b111228d740b34930b.tar.xz [following]
–2021-04-03 21:16:57-- https://sources.libreelec.tv/mirror/inject_bl301/inject_bl301-aarch64-fa8b99844f2b59289c5c88b111228d740b34930b.tar.xz
Connecting to sources.libreelec.tv (sources.libreelec.tv)|138.68.75.163|:443… connected.
HTTP request sent, awaiting response… 404 Not Found
2021-04-03 21:16:58 ERROR 404: Not Found.

wrong arch, use ARCH=arm

For TX3 devices (S905X3), ARCH should choose ARM?If so, that means 32 bits, right?

No, kernel is 64bit, user space 32bit.

I am not sure how to select ARCH for TX3 (S905X3) when I compile 9.2.7 for tools/download-tool.Theoretically, you should have chosen aarch64, but the inject_bl301 and ceemmc tools were not in the source when you downloaded them.
After searching the source, we found that there are only ARM and those without ARM. What architecture platform is the one without ARM targeted at?
Anyway, for TX3 (S905X3), what exactly does Arch choose?arm?Or is it not selected by default?

Just use

PROJECT=Amlogic-ng ARCH=arm make

and don’t bother with download-tool at all.

Got it. Thank you!

According to your instructions, the following prompts appear. How to solve them?

PROJECT=Amlogic-ng ARCH=arm ./scripts/clean RTL8192CU
PROJECT=Amlogic-ng ARCH=arm make

When some other package will fail clean this one too and run make again.

And please next time copy only text from your console - no need to make images.

Before make, I have done PROJECT=Amlogic-ng ARCH=arm scripts/clean linux, this includes the removal of RTL8192CU, right?

No, just the package you specified: in this case linux.

As you said, after executing the command, Linux and RTL8192CU errors still appear

......
9974 blocks
make[1]: Entering directory '/home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/linux-6ca34bee70af36847a5f29182a3a83883407b2e8'
  CHK     include/config/kernel.release
  CHK     include/config/kernel.release_full
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
  CC      drivers/amlogic/media/dtv_demod/amlfrontend.o
drivers/amlogic/media/dtv_demod/amlfrontend.c: In function ‘delsys_set’:
drivers/amlogic/media/dtv_demod/amlfrontend.c:4147:23: error: ‘FE_DTMB’ undeclared (first use in this function); did you mean ‘PR_DTMB’?
   fe->ops.info.type = FE_DTMB;
                       ^~~~~~~
                       PR_DTMB
drivers/amlogic/media/dtv_demod/amlfrontend.c:4147:23: note: each undeclared identifier is reported only once for each function it appears in
drivers/amlogic/media/dtv_demod/amlfrontend.c:4151:23: error: ‘FE_ISDBT’ undeclared (first use in this function); did you mean ‘AML_ISDBT’?
   fe->ops.info.type = FE_ISDBT;
                       ^~~~~~~~
                       AML_ISDBT
drivers/amlogic/media/dtv_demod/amlfrontend.c: At top level:
drivers/amlogic/media/dtv_demod/amlfrontend.c:4699:42: error: ‘SYS_ANALOG’ undeclared here (not in a function); did you mean ‘SYS_TURBO’?
  .delsys = { SYS_DVBC_ANNEX_A, SYS_DTMB, SYS_ANALOG},
                                          ^~~~~~~~~~
                                          SYS_TURBO
make[5]: *** [scripts/Makefile.build:334: drivers/amlogic/media/dtv_demod/amlfrontend.o] Error 1
make[4]: *** [scripts/Makefile.build:648: drivers/amlogic/media/dtv_demod] Error 2
make[3]: *** [scripts/Makefile.build:648: drivers/amlogic/media] Error 2
make[2]: *** [scripts/Makefile.build:648: drivers/amlogic] Error 2
make[1]: *** [Makefile:1088: drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/linux-6ca34bee70af36847a5f29182a3a83883407b2e8'
FAILURE: scripts/install linux has failed!
[065/297] [FAIL] install linux

The following logs for this failure are available:
  stdout: /home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/.threads/logs/65/stdout
  stderr: /home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/.threads/logs/65/stderr

parallel: This job failed:
package_worker 2 65 297 'install linux'
UNPACK      RTL8192CU
    APPLY PATCH (common)      packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0001-add_device_ID_330d.patch
patching file hal/rtl8192c/usb/usb_halinit.c
    APPLY PATCH (common)      packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0002-fix_310_proc2.patch
patching file os_dep/linux/os_intfs.c
Hunk #1 succeeded at 277 with fuzz 1.
Hunk #2 succeeded at 767 (offset 4 lines).
    APPLY PATCH (common)      packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0101-gcc-4.9.patch
patching file os_dep/linux/pci_intf.c
patching file os_dep/linux/usb_intf.c
Hunk #1 succeeded at 1584 (offset 7 lines).
    APPLY PATCH (common)      packages/linux-drivers/RTL8192CU/patches/RTL8192CU-0102-gcc-5.patch
patching file include/ieee80211.h
FAILURE: linux:target.build.failed exists, a previous dependency process has failed (seq: 65)

The following logs for this failure are available:
  stdout: /home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/.threads/logs/65/stdout
  stderr: /home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/.threads/logs/65/stderr

FAILURE: scripts/install RTL8192CU has failed!
[066/297] [FAIL] install RTL8192CU

The following logs for this failure are available:
  stdout: /home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/.threads/logs/66/stdout
  stderr: /home/matt/CoreELEC/build.CoreELEC-Amlogic-ng.arm-9.2-devel/.threads/logs/66/stderr

parallel: This job failed:
package_worker 1 66 297 'install RTL8192CU'
Parallel build failure - see log for details. Time of failure: Mon Apr  5 01:30:45 PDT 2021
make: *** [Makefile:9: release] Error 1
drivers/amlogic/media/dtv_demod/amlfrontend.c:4699:42: error: ‘SYS_ANALOG’ undeclared here (not in a function); did you mean ‘SYS_TURBO’?
  .delsys = { SYS_DVBC_ANNEX_A, SYS_DTMB, SYS_ANALOG},
                                          ^~~~~~~~~~
                                          SYS_TURBO

When you did not modify anything try a complete clean build again:

PROJECT=Amlogic-ng ARCH=arm make clean
PROJECT=Amlogic-ng ARCH=arm make

OK.

The first compilation after Clone was no problem, then I changed the part about the network via menuconfig to turn on nf_tables etc so that some of the proxy tools would work. Does it have anything to do with me doing this?

It worked before but not after changes. I would say yes :slight_smile:

Post your linux config file to check.

linux package is not successful build. So you may change the linux config and try first PROJECT=Amlogic-ng ARCH=arm ./scripts/build linux if it is ok or not. If linux is built the other packages should work also again.

linux.aarch64.conf (157.0 KB)

So what you mean is that the first build should use the default linux.aarch64.conf, and when it’s done, just replace it with the new linux.aarch64.conf, and then build again.Isn’t it?

You still don’t understand the difference between arm and arm64: You don’t have to worry anything about this. Just use PROJECT= ARCH=arm and that’s it.
Don’t change kernel from arm64 to arm. Just set the options you need to set. Like nf_tables and other.

And you don’t need to build first with default config file - you can use your new one. But config file must be without issues.

As you can see diff with default config file and yours is crazy big!