Lineage Android OS for the Jetson Nano

I’m going to have to see some more of the log to know what’s going on there. t186 files should only be referenced if you also tried to build quill or quill_tab. Which isn’t a problem, just an fyi.

The wiki is unfortunately giving a red herring with the ‘you need a currently installed device or install zip’. That’s not true for tegra and I will see about getting the instructions fixed. These extract scripts download recovery images and releases directly from Nvidia. The source flag is ignored. So just running ‘./extract-files.sh’ is sufficient.

I just ran extract on my workstation with all the targets and archs available and it succeeded. It’s possible that some combination of devices fails as I didn’t test the permutation of all targets and and missing targets. Hopefully a full log will tell the issue.

Hi Steel01, thank you for your answer. I only tried to build porg. Finally, I managed to solve the problem. The extraction tool was trying to patch the tx2_xusb firmware, so I commented the line “patch_tx2_xusb;” in patches.sh from tegra-common folder and I was able to build the installation file without problem.

I would like to rebuilt the kernel to include the available Generic Bluetooth USB driver (btusb.c). I have experience building linux kernels for ubuntu, but in android I am a bit lost. Could you provide me some link to a good tutorial on that subject? I tried googling but it didn’t find any for lineageos.

Thank you.

Hi Steel01, thank you for your answer. I tried building only porg. Finally, I managed to solve the problem. The extraction script was trying to patch the tx2 xusb firmware, so I commented the line patch_tx2_xusb; from patches.sh in tegra-common folder. I was able to build the installation file without problem.

Now, I would like to build the kernel to include the Generic Bluetooth USB driver. I have experience building kernels in ubuntu, but I am a bit lost in android. Could you point me to a tutorial for customizing and building kernels for lineageos?

Thank you

Hello Steel01 in the steps by install flash using tegratools

./flash.sh: 24: ./flash.sh: source: not found
./flash.sh: 26: ./flash.sh: Syntax error: "(" unexpected

The flash.sh needed #!/bin/bash for some reason not detected source correctly with #!/bin/sh tested under Ubuntu 18.04 host .

@ELN
Oh derpppp. >< I’ve now got a patch on gerrit to fix the tx2 patch. That should be in t186-common, not tegra-common. Thanks for pointing that out.

The generic btusb driver is already being built.

And it’s loaded on porg:

However, it is not loaded for batuu, which is the nano 2gb variant. I set up batuu to disable bluetooth and use the realtek wifi usb card that ships with the slightly more expensive variant. If you’re using the 2gb variant and want to use usb bt, you’ll need to modifiy lkm_loader.sh to add the btusb.ko line to the batuu conditional. Then copy the following two lines into init.batuu.rc:

@_Diablo
Blast, I thought I fixed those a while back. Apparently not. I do use bash-isms in the scripts, so the #! should be bash. Ubuntu uses dash as the default shell, which is not compatible with bash scripts. Alternatively for now, you can run ‘bash flash.sh’ without modifying the script.

2 Likes

Thank you @Steel01 for the info. I am using the 4gb variant, and effectively, the btusb module is loaded. But I don’t understand why the bt usb dongle that I use (Vendor=0a12, Product=0001) is not working. It is included in the btusb.c file (CSR BlueCore devices), but when I open the Remotes&Accessories and I search for accessories no device is found.

That’s the part where I can’t really help anymore, as I don’t know or have the hardware in question. Need to look at dmesg to see if the kernel is enumerating the device properly. Then at logcat to see if the btlinux service is picking it up and using it properly.

Now Install Lineage os correctly but when install gapp error returned 70 tested with full , stock , pico , nano none installed correctly using 64GB sdcard.
70-gapp.sh not found
And unknown fuse request opcode 2016
Not work sideload gapps install?

Only see in df this structure

porg:/ $ df  
Filesystem            1K-blocks    Used Available Use% Mounted on
/dev/root               2064208 1358464    689360  67% /
tmpfs                   2025432     588   2024844   1% /dev
tmpfs                   2025432       0   2025432   0% /mnt
tmpfs                   2025432       0   2025432   0% /apex
/dev/block/mmcblk0p11    774064  184516    573820  25% /vendor
/dev/block/mmcblk0p10    237536     452    229224   1% /cache
/dev/block/mmcblk0p16  57783172   82968  57552748   1% /data
/data/media            57783172   82968  57552748   1% /storage/emulated

logs.tar.gz (1.5 KB)

logcat_searching.log.gz (7.3 KB)

Hi @Steel01, I have attached dmesg and logcat files. It seems that the usb device is enumerated properly, and the problem is with the btlinux service. I have also attached a logcat when “searching for accessories”.

From logcat:

11-26 15:33:10.759 3326 3492 D UsbHostManager: USB device attached: vidpid 0a12:0001 mfg/product/ver/serial null/CSR8510 A10/88.91/null hasAudio/HID/Storage: false/false/false
11-26 15:33:10.762 3326 3492 D UsbDeviceDescriptor: 1 configs
11-26 15:33:10.764 3326 3492 D UsbHostManager: Added device UsbDevice[mName=/dev/bus/usb/001/003,mVendorId=2578,mProductId=1,mClass=224,mSubclass=1,mProtocol=1,mManufacturerName=null,mProductName=CSR8510 A10,mVersion=88.91,mSerialNumberReader=com.android.server.usb.UsbSerialReader@95d3d1b,mConfigurations=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbConfiguration[mId=1,mName=null,mAttributes=224,mMaxPower=50,mInterfaces=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=129,mAttributes=3,mMaxPacketSize=16,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=64,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=130,mAttributes=2,mMaxPacketSize=64,mInterval=1]]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=0,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=1,mMaxPacketSize=0,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=1,mMaxPacketSize=0,mInterval=1]]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=1,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=1,mMaxPacketSize=9,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=1,mMaxPacketSize=9,mInterval=1]]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=2,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=1,mMaxPacketSize=17,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=1,mMaxPacketSize=17,mInterval=1]]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=3,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=1,mMaxPacketSize=25,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=1,mMaxPacketSize=25,mInterval=1]]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=4,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=1,mMaxPacketSize=33,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=1,mMaxPacketSize=33,mInterval=1]]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbInterface[mId=1,mAlternateSetting=5,mName=null,mClass=224,mSubclass=1,mProtocol=1,mEndpoints=[
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=3,mAttributes=1,mMaxPacketSize=49,mInterval=1]
11-26 15:33:10.764 3326 3492 D UsbHostManager: UsbEndpoint[mAddress=131,mAttributes=1,mMaxPacketSize=49,mInterval=1]]]]
11-26 15:33:10.767 4404 4404 I UsbDeviceAttachedReceiv: handling intent: Intent { act=android.hardware.usb.action.USB_DEVICE_ATTACHED flg=0x11000010 cmp=org.fdroid.fdroid/.nearby.UsbDeviceAttachedReceiver (has extras) }
11-26 15:33:10.768 3326 5114 W UriGrantsManagerService: No permission grants found for org.fdroid.fdroid
11-26 15:33:10.916 2969 2969 I android.hardware.bluetooth@1.0-btlinux: HCI device ready
11-26 15:33:10.916 2969 2969 E android.hardware.bluetooth@1.0-btlinux: VendorInterface → Unable to call initializationComplete(ERR)
11-26 15:33:10.917 2969 2969 E android.hardware.bluetooth@1.0-btlinux: BluetoothDeathRecipient::serviceDied - Bluetooth service died
11-26 15:33:10.917 2969 5187 E : ThreadRoutine unable to set SCHED_FIFO for pid 2969, tid 5187, error Operation not permitted
11-26 15:33:10.917 2969 2969 I android.hardware.bluetooth@1.0-btlinux: BluetoothHci::close()
11-26 15:33:10.917 2969 2969 I android.hardware.bluetooth@1.0-btlinux: Skipping unlink call, service died.

@_Diablo I tried to sideload the November nano openGApps in Recovery after sideloding lineageos installation file, but the system didn’t boot up. I read that there was a problem with the November built and it was recommended to install and older version (I think that 20210925 was ok), but I didn’t try it,

ok, i’m still trying… finally was able to enumerate the device nodes in /dev/block/platform, and 70090000.xusb was absolutely correct. When booting (connected with a jtag) the boot hangs at not finding init, so i guess the initrd can’t read the usb disk. Is it built using the usb patch to enable the enumerating of usb devices at boot time? where can i find that in the sources?

thanks

@Steel01 thanks for all of your work.
any idea on MIPI camera or USB webcameras?

got USB camera to work. It was a matter of applications not supporting it.
Still looking how to make MIPI camera connected to Jetson nano to work…

ok, the initrd file built for the kernel should need to go under the script at rootOnUSB/addUSBToInitramfs.sh at master · JetsonHacksNano/rootOnUSB · GitHub before going into boot.img, without this treatment the boot image can’t read the usb drive at all… any suggestions on where is the initrd built within the code?

Finally, I have already been able to install the gapps
You have to do a complete format to the sdcard
If you have a split structure of l4t, no matter how much I format it from the android recovery, it does not format it well and makes the partitions small to install the Gapps.

ubuntu14.04 ubuntu18.04 ubuntu20.04
I have find this problem.



It report
[ 0.0123 ] Parsing partition layout
[ 0.0132 ] tegraparser --pt flash_android_t210_emmc_p3448.xml.tmp
[ 0.0138 ] Invalid partition type NVCTYPE
[ 0.1578 ]
Error: Return value -11
Command tegraparser --pt flash_android_t210_emmc_p3448.xml.tmp

My device is Jetson nano B01 EMMC

@360828046 Meh. This what I get for not having a production module to test against. The emmc partition xml is completely broken. I’ll look into getting that fixed, but it may not be quick. And since I don’t have one to test against, it will again be a ‘best guess’.

@nickppv2000 Oh boy, cameras… The nvidia camera hal has been… fun to work with. Especially given there’s not much in the way of publicly supported android devices with mipi camera. More like… There aren’t any. Not since shield tablet and stuff has changed since t124. The consumer shield tv supports usb cameras. Beyond that, I’ve not had much luck. On t186+, I can’t even get it to fire up at all, it just crashes. I could try to do some testing against the jetson tx1, but don’t know if that will be soon.

To be honest, I’m not greatly familiar with how the tegra camera stuff works under the hood. I know mipi cameras have to be declared in the kernel device tree. But what the options do and mean eludes me. Is the camera you’re trying to use supported by l4t and already in the kernel dt?

Hi. Trying to build lineage os for porg_tab. You’ve mentioned that you had some problems with building kernel. I’m using Ubuntu 21.10 and have such error:

[  3% 3266/99306] Building Kernel Config
FAILED: out/target/product/porg_tab/obj/KERNEL_OBJ/.config
/bin/bash -c "(PATH=/home/konstantin/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/konstantin/android/lineage/prebuilts/gcc/linu
x-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-/bin:\$PATH PATH=/home/konstantin/android/lineage/prebuilts/tools-lineage
/linux-x86/bin:\$PATH LD_LIBRARY_PATH=/home/konstantin/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/ho
me/konstantin/android/lineage/prebuilts/tools-lineage/common/perl-base BISON_PKGDATADIR=/home/konstantin/android/lineage/prebuilts/build-to
ols/common/bison /home/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/make  -j16 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/in
clude:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64\" HOSTCC=/home/konstantin/android/lineage/prebu
ilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-gcc HOSTCXX=/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/ho
st/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-g++ LEX=/home/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home
/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/bison -C kernel/nvidia/linux-4.9/kernel/kernel-4.9 O=/home/konstantin/andro
id/lineage/out/target/product/porg_tab/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache /home/konstantin/android/lineage/prebuilts
/gcc/linux-x86/aarch64/aarch64-linux-gnu-6.4.1/bin/aarch64-linux-gnu-\" CROSS_COMPILE_ARM32=\"/home/konstantin/android/lineage/prebuilts/gc
c/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\"    VARIANT_DEFCONFIG= SELINUX_DEFCONFIG= tegra_android_defconfig )
 && (if [ ! -z \"\" ]; then echo \"Overriding kernel config with ''\"; echo  >> out/target/product/porg_tab/obj/KERNEL_OBJ/.config; PATH=/h
ome/konstantin/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-
linux-android-4.9/bin/aarch64-linux-android-/bin:\$PATH PATH=/home/konstantin/android/lineage/prebuilts/tools-lineage/linux-x86/bin:\$PATH 
LD_LIBRARY_PATH=/home/konstantin/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/konstantin/android/
lineage/prebuilts/tools-lineage/common/perl-base BISON_PKGDATADIR=/home/konstantin/android/lineage/prebuilts/build-tools/common/bison /home
/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/make  -j16 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86
_64-linux-gnu\" HOSTCFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64\" HOSTCC=/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/hos
t/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-gcc HOSTCXX=/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2
.17-4.8/bin/x86_64-linux-g++ LEX=/home/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/konstantin/android/li
neage/prebuilts/build-tools/linux-x86/bin/bison -C kernel/nvidia/linux-4.9/kernel/kernel-4.9 O=/home/konstantin/android/lineage/out/target/
product/porg_tab/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache /home/konstantin/android/lineage/prebuilts/gcc/linux-x86/aarch64
/aarch64-linux-gnu-6.4.1/bin/aarch64-linux-gnu-\" CROSS_COMPILE_ARM32=\"/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/arm/arm-li
nux-androideabi-4.9/bin/arm-linux-androidkernel-\"    oldconfig; fi ) && (PATH=/home/konstantin/android/lineage/out/host/linux-x86/bin:\$PA
TH PATH=/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-/bin:\$PATH PA
TH=/home/konstantin/android/lineage/prebuilts/tools-lineage/linux-x86/bin:\$PATH LD_LIBRARY_PATH=/home/konstantin/android/lineage/prebuilts
/tools-lineage/linux-x86/lib:\$LD_LIBRARY_PATH PERL5LIB=/home/konstantin/android/lineage/prebuilts/tools-lineage/common/perl-base BISON_PKG
DATADIR=/home/konstantin/android/lineage/prebuilts/build-tools/common/bison /home/konstantin/android/lineage/prebuilts/build-tools/linux-x8
6/bin/make  -j16 CFLAGS_MODULE=\"-fno-pic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-L/usr/lib/x86_64-linux-gnu -
L/usr/lib64\" HOSTCC=/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-gcc HOSTCXX=
/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-g++ LEX=/home/konstantin/android/
lineage/prebuilts/build-tools/linux-x86/bin/flex YACC=/home/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/bison -C kernel/
nvidia/linux-4.9/kernel/kernel-4.9 O=/home/konstantin/android/lineage/out/target/product/porg_tab/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\
"/usr/bin/ccache /home/konstantin/android/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-gnu-6.4.1/bin/aarch64-linux-gnu-\" CROSS_CO
MPILE_ARM32=\"/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\"    save
defconfig ) && (if [ ! -z \"\" ]; then echo \"Using additional config ''\"; kernel/nvidia/linux-4.9/kernel/kernel-4.9/scripts/kconfig/merge
_config.sh -m -O out/target/product/porg_tab/obj/KERNEL_OBJ out/target/product/porg_tab/obj/KERNEL_OBJ/.config kernel/nvidia/linux-4.9/kern
el/kernel-4.9/arch/arm64/configs/; PATH=/home/konstantin/android/lineage/out/host/linux-x86/bin:\$PATH PATH=/home/konstantin/android/lineag
e/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-/bin:\$PATH PATH=/home/konstantin/android/lineage/pre
builts/tools-lineage/linux-x86/bin:\$PATH LD_LIBRARY_PATH=/home/konstantin/android/lineage/prebuilts/tools-lineage/linux-x86/lib:\$LD_LIBRA
RY_PATH PERL5LIB=/home/konstantin/android/lineage/prebuilts/tools-lineage/common/perl-base BISON_PKGDATADIR=/home/konstantin/android/lineag
e/prebuilts/build-tools/common/bison /home/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/make  -j16 CFLAGS_MODULE=\"-fno-p
ic\" CPATH=\"/usr/include:/usr/include/x86_64-linux-gnu\" HOSTCFLAGS=\"-L/usr/lib/x86_64-linux-gnu -L/usr/lib64\" HOSTCC=/home/konstantin/a
ndroid/lineage/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-gcc HOSTCXX=/home/konstantin/android/lineage/prebui
lts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/x86_64-linux-g++ LEX=/home/konstantin/android/lineage/prebuilts/build-tools/linux-x86
/bin/flex YACC=/home/konstantin/android/lineage/prebuilts/build-tools/linux-x86/bin/bison -C kernel/nvidia/linux-4.9/kernel/kernel-4.9 O=/h
ome/konstantin/android/lineage/out/target/product/porg_tab/obj/KERNEL_OBJ ARCH=arm64 CROSS_COMPILE=\"/usr/bin/ccache /home/konstantin/andro
id/lineage/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-gnu-6.4.1/bin/aarch64-linux-gnu-\" CROSS_COMPILE_ARM32=\"/home/konstantin/android/
lineage/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androidkernel-\"    KCONFIG_ALLCONFIG=/home/konstantin/android/
lineage/out/target/product/porg_tab/obj/KERNEL_OBJ/.config alldefconfig; fi )"
make: Entering directory '/home/konstantin/android/lineage/kernel/nvidia/linux-4.9/kernel/kernel-4.9'
make[1]: Entering directory '/home/konstantin/android/lineage/out/target/product/porg_tab/obj/KERNEL_OBJ'
  GEN     ./Makefile
  HOSTCC  scripts/basic/fixdep
/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/../sysroot/usr/lib/crt1.o(.text+0x12): error: 
undefined reference to '__libc_csu_fini'
/home/konstantin/android/lineage/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/bin/../sysroot/usr/lib/crt1.o(.text+0x19): error: 
undefined reference to '__libc_csu_init'
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:101: scripts/basic/fixdep] Error 1
make[1]: *** [/home/konstantin/android/lineage/kernel/nvidia/linux-4.9/kernel/kernel-4.9/Makefile:463: scripts_basic] Error 2
make[1]: Leaving directory '/home/konstantin/android/lineage/out/target/product/porg_tab/obj/KERNEL_OBJ'
make: *** [Makefile:171: sub-make] Error 2
make: Leaving directory '/home/konstantin/android/lineage/kernel/nvidia/linux-4.9/kernel/kernel-4.9'
03:17:41 ninja failed with: exit status 1

Did you have the same problem? And were you required to downgrade Ubuntu to build it?

UPD: according to this Bug #1947584 “package libc6-dev 2.34-0ubuntu3: missing '__libc_c...” : Bugs : glibc package : Ubuntu - yes, looks like it is because of Ubuntu 21.10/glibc 2.34

Re issues building kernel:
https://review.lineageos.org/c/LineageOS/android_vendor_lineage/+/318916

ok, no news about booting from usb/nvme or adding usb syack to initrd while building?

thanks anyway for the effort to run android on this device

There is no initrd in the system-as-root android boot sequence. Which means the xusb firmware would need directly compiled into the kernel. You’ll have to add the firmware to the kernel source tree, then add the defconfig option for built-in firmware.