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?