Not able to get login prompt on ttyACM0 on jetson Tx2

Hi,
I am using jetson tx2 4GB module SDK 32.4.3 and i am creating a new minimal size rootfs from the below link.

i am able to boot the device but i am not getting ttyACM0 port login console to do login,it is working with serial console that ttyUSB0.

how we can enable this so that i can login it through ACM0 port,any help will be appreciated.

hello anupam.kumar,

had you update the platform configuration file, i.e. p2771-0000-devkit.confto change the console prints?
it’s by default, APPEND ${cbootargs} ... console=ttyS0,115200n8 console=tty0 ...

Hi,

i am using p27771.conf.common file.

CMDLINE_ADD=“console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 isolcpus=1-2”;

this is the configuration right now…what changes required here,same setting work for primary rootfs but it is not working for recovery_rootfs that i have created from above link.

do i need to change anything in any file?

hello anupam.kumar,

may I know what’s the configuration of your platform? for example, $ zcat /proc/config.gz | grep -i acm

root@tegra-ubuntu:/home/ubuntu# zcat /proc/config.gz | grep -i acm

CONFIG_FB_MACMODES is not set

CONFIG_USB_ACM=m
CONFIG_USB_F_ACM=y
CONFIG_USB_CONFIGFS_ACM=y

this is the configuration.

hello anupam.kumar,

it means you’re configured it as a module in your kernel. would you please load the module.
please also look into kernel driver for more details.
i.e. $L4T_Sources/r32.5.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/drivers/usb/class/cdc-acm.c
thanks

Hi Chang,

I am not able to understand why it is related to usb acm driver…this driver is getting loaded but still i am not able to do login using ACM0 port,what is the actual issue here.

You had mentioned in the first post using ttyUSB0. What exact USB cabling are you using? From a micro-B USB through a serial UART USB cable to host PC? Are you trying to change the port which is used?

i am using uart USB cable.

i am able to login via ubuntu user but when i am trying to run as a root i am getting below error.

sudo su
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

could you please help here what i am missing in new rootfs.

Aha! The flash took place on a non-Linux filesystem type (host PC side). Perhaps NTFS filesystem? You’ll need to flash again, but the flash content needs to be on ext4.

What happens is that Windows (or non-Linux filesystems in general) has no concept of Linux permissions and has no way of preserving them when unpacking prior to generating the flash image. The security-based files must have certain privileged permissions, and if the filesystem cannot support those, or if the user trying to create them is not root/sudo, then you get the error you are naming. Was the flash performed in a directory which was not a native Linux filesystem type? Or if manually unpacked, was this done without sudo (keep in mind the driver package should not be unpacked sudo, but the sample rootfs should).

i am using linux system.

i am creating new custom rootfs by below process on tx2 device

sudo debootstrap bionic ~/rootfs http://ports.ubuntu.com/ubuntu-ports/
cd ~/rootfs
sudo tar -cpzf ../ubuntu_18.04_aarch64.tar.gz .
```===========================

copying this tar file from Tx2 device to my linux pc and extracting it and putting my stuff and creating image.....but after that i am not able to login as root user.

do i need to extract with any --same-owner command?

i am able to login via ttyUSB0 serial console but ttyACM0 login prompt i am not getting.

i checked the nv-l4t-usb-device-mode.service on Tx2 board and it is failing.

Loaded: loaded (/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode.servicc
�~W~O nv-l4t-usb-device-mode.service - Configure USB flashing port for device moo
de
Loaded: loaded (/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mode.servicc
e; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2021-05-13 12:15:12 UTC; 1min 244
s ago
Process: 3957 ExecStopPost=/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-mm
ode-stop.sh (code=exited, status=0/SUCCESS)
Process: 3870 ExecStart=/opt/nvidia/l4t-usb-device-mode/nv-l4t-usb-device-modee
-start.sh (code=exited, status=127)
Main PID: 3870 (code=exited, status=127)

May 13 12:15:09 tegra-ubuntu systemd[1]: nv-l4t-usb-device-mode.service: Main prr
ocess exited, code=exited, status=127/n/a
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: /opt/nvidia/ll
4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh: line 34: echo: write error: NN
o such device
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: rmdir: failedd
to remove ‘l4t/functions/ncm.usb0/’: No such file or directory
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: rmdir: failedd
to remove ‘l4t/functions/ecm.usb0/’: No such file or directory
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: rmdir: failedd
to remove ‘l4t/functions/mass_storage.0/’: No such file or directory
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: rmdir: failedd
to remove ‘l4t/functions/rndis.usb0/’: No such file or directory
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: /opt/nvidia/ll
4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh: line 50: /sbin/ifconfig: No ss
uch file or directory
May 13 12:15:11 tegra-ubuntu nv-l4t-usb-device-mode-stop.sh[3957]: /opt/nvidia/ll
4t-usb-device-mode/nv-l4t-usb-device-mode-stop.sh: line 51: /sbin/brctl: No suchh
file or directory
May 13 12:15:12 tegra-ubuntu systemd[1]: nv-l4t-usb-device-mode.service: Failed
with result ‘exit-code’.
May 13 12:15:12 tegra-ubuntu systemd[1]: Failed to start Configure USB flashing

===================

what is missing here in my new rootfs?

also /sys/kernel/configs/usb_gadget/l4t directory is not creating?

If you cd to rootfs/, what do you see with “df -H -T .”? If it does not say ext4 for type, then this is a problem. For example, if this is on a Windows partition type. Please note that if your commands to unpack there are 100% correct, then an NTFS or non-Linux filesystem type has absolutely no chance of succeeding. Flash will work fine, but any kind of root access will 100% fail.

hello anupam.kumar,

had you execute $OUT/Linux_for_Tegra/apply_binaries.sh for your rootfs?
could you please try to include -D options with minicom, in order to get it to bind to a specific device,
for example, $ minicom -b 115200 -8 -D /dev/ttyACM0
thanks