I apologize for that. I didn’t understand it properly at that time because as per quectel reference document we need to some changes in below file as per kernel version:
[KERNEL]/drivers/usb/serial/option.c
[KERNEL]/drivers/usb/serial/qcserial.c
[KERNEL]/drivers/net/usb/qmi_wwan.c
[KERNEL]/drivers/usb/serial/usb_wwan.c
Also, In the kernel menuconfig editor, enabling (to be added a module):
USB driver for GSM and CDMA modems
USB Modem (CDC ACM) support
QMI WWAN driver for Qualcomm MSM based 3G and LTE modems
PPP (Point-to-point protocol) support
Host for RNDIS and ActiveSync devices
For that I checked kernel source in /usr/src/linux-headers-4.9.201-tegra-ubuntu18.04_aarch64/kernel-4.9/drivers/usb/serial. but in this folder no any file available like option.c etc.
A per your suggestion, we are trying to do “make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4” command. Currently we are trying with two different process.
1). Trial 1:
Extract the kernel source.
Changes in option.c and qcserial.c file as per quectel document.
Trying to excute make command with below sequence.
1).TEGRA_KERNEL_OUT=
2). Go to kernel directory
3). make mrproper
4). mkdir -p $TEGRA_KERNEL_OUT
5). make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
6). make ARCH=arm64 O=$TEGRA_KERNEL_OUT menuconfig
7). Enable required modules.
8). make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
But we are getting “receipt for target ‘prepare3’ failed”. Please find below attachment for your reference.
Changes in option.c and qcserial.c file as per quectel document.
Trying to excute make command with below sequence.
1).TEGRA_KERNEL_OUT=
2). Go to kernel directory
3). For enable modules, manually change in existing tegra_defconfig file located in /arch/arm64/configs as per requirement.
4). make mrproper
5). mkdir -p $TEGRA_KERNEL_OUT
6). make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
7). make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
In this way, MAKE command done successfully but we found some .ko files missing in “TEGRA_KERNEL_OUT/drivers/usb/serial” folder which are most useful for us like (option.ko, usb_wwan.ko etc.).
Also, there are specify above missing file path in modules.builtin file but not in modules.order file.
I cannot give you the precise answer either because we do not know every upstream kernel driver there.
The “tegra_defconfig” is a pre-defined list for tegra specific driver. Thus, when you only use tegra_defconfig, it indeed has chance the driver you want is gone. As for menuconfig, it will ask you to enable those driver you need. However, it may also create conflict with tegra_defconfig so you need to figure it out by yourselves.
As for your “difficulty” for stpe 5,6,7, please elaborate what difficulty you have.
In steps 5, we need to replace the file from TEGRA_KERNEL_OUT folder to<release_packagep> path. But what is <release_packagep> path. also where we can excute step 7 command?
Also note that we are doing all this things on jetson nano 2GB dev board directly not in any x86 machine.
In a similar step 6, we found “$TEGRA_KERNEL_OUT/arch/arm64/boot/dts/” but not able to get any “Linux_for_Tegra/kernel/dtb/”. I thing this “Linux_for_Tegra/kernel/dtb/” path is same where we untar “public_resources.tbz2”.
Linux_for_Tegra is the driver package that would be installed by sdkmanager. It is not inside the public source tarball.
Also, if you are doing all this just for enabling some driver, then updating dts is not needed. Device tree is needed when your board is changing to custom board.
SDcard image is just providing a easy step for someone to try jetson nano/nx easily. However, when it comes to do customization or make it as a product, the sdcard image.
Also we are trying to setup ubuntu18.04 system with SDKmanager. So we need to do same steps or different steps for this.
Also if we used same process then how we can identify that which steps is not used for SDK manger.
The whole document for building a kernel is for sdkmanager case, which is doing cross compilation on host.
Also which method is best like direct do everything on board with SD card or first to do process in host system that flash on the board?
From my personal opinion, I would suggest you can try to learn how to use host system + Linux_for_Tegra to flash the board. It would be harder to learn it but you will also be aware of how those jetson tools are doing.
We have done full setup on x86 host system. We have done many setup successfully but unfortunately found error in “sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install \INSTALL_MOD_PATH=/Linux_for_Tegra/rootfs/”
Please find below attachment of the error screenshot.