mount qnx host file system via minicom

Hi there,

I flashed qnx into TK1 pro. I could mount qnx like fs-nfs3 -t 10.42.0.1:/home/userid/qnx660/target/qnx6/armle-v7/bin /bin from host to TK1 board via Ethernet connection.

Q1: How could I do it via minicom? Because I want to leave Ethernet cable to connect to outside.

Q2: When I run ifconfig on board, it seems there are two internet interface, where is the en0 on the board?

en0: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
media: Ethernet 100baseTX full-duplex
status: active
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
en1: flags=80008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,SHIM> mtu 1500
media: Ethernet 100baseTX full-duplex
status: active
inet 10.42.0.56 netmask 0xffffff00 broadcast 10.42.0.255

I do not have a TK1 Pro, nor QNX. I can only guess and give general information.

One comment is about NFS since I see what appears to be nfs3 in the question. Mounting an NFS file system as an ordinary mount point is simple in comparison to mounting your root file system via NFS. For ordinary mount you just need the kernel support option, and perhaps some user space tools for admin (I personally prefer iSCSI for this, but that’s another story).

As soon as NFS is used as a root file system, everything gets much more difficult. Now the boot loader has to download kernel images over tftp, and the boot loader very likely has to read the NFS partition (for example, u-boot file extlinux.conf). I’m not sure what this u-boot has for NFS support, if any.

If QNX was flashed to the root file system, then you wouldn’t need NFS support. Assuming the QNX uses ext4 like the L4T distribution, then there may be simple configuration edits to tell the system which partition is root. U-boot finds a config file based on flash commands, the config file tells the kernel where to find rootfs. Unfortunately, I have no idea how software differs on a Jetson TK1 Pro.

I do not know what network hardware is on the TK1 Pro, but it is possible to have more than one configuration for one hardware device, e.g., I’ve often had a second network card where I’ve assigned two private networks on the one network adapter on my host…called dual homing (my other network card connects to the internet…the dual homed card isolates development from peripherals like network accessed printers without taking one NIC for each network). There may also be separate configurations for IPv4 and IPv6 on the same network hardware. I do not know what the case is for your system.

I am a beginner of TK1 developer.

I followed the nvidia document “Installing the CUDA Toolkit and packages on the target” to mount qnx binaries and qt5 binaries from host to TK1 Pro using the command fs-nfs3.

During the setup, only mini-qnx OS flashed into TK1

I could run my Qt application TK1; the only issue is that my application needs internet connection. My host Linux has two internet interface - one(eth0) is connected to outside, the other one (eth1, shared, not using cross-over cable) to connect to TK1 board. I don’t know if there is anyway to set up internet route to allow my application using the host eth0?

minicom works too for login; but I could not mount qnx as I mentioned in the question.

Q3: why I could not create file in the root directory after ssh root@tk1_address?

Specifics tools and procedures for different distributions of Linux (e.g., Ubuntu, Fedora, Debian, Redhat, CentOS, SuSE) change, but in general most Linux systems with two network cards have no trouble acting as a bridge or router. I have several Jetsons, my host has multiple network cards…one card is dedicated to the internet, another is dedicated to the Jetsons. In the case of the Jetson network my host forwards the same way as a router would. My host is Fedora, most people here use Ubuntu 14.04…is Ubuntu what you use for host?

If your Jetson’s kernel is configured to support NFS, there is no reason you cannot export your Jetson for mount on the host. Earlier I had the impression you wanted Jetson to import/mount from a host export, which is much more problematic than exporting from Jetson and mount/import to host (simply exporting from an already booted Jetson does not require boot loader support).

I am unsure of what Q3 is asking, but if you mean can Jetson export “/” (the whole root file system), then the answer is yes. I think by default most kernels are configured to allow mounting NFS, you may need to compile the kernel with more features to export. User space packages may be involved for administrative details of export or import over NFS.

Beware that if you develop anything which pauses or crashes on either system of a pair of NFS-dependent machines, then you may get frustrated in cases where one machine failing forces dealing with those issues on the other machine as well. For example, kernel debugging via kgdboc serial kernel debugging software can halt things in unexpected ways when it hits a breakpoint.

Thanks,

Yes. I am using 14.04 although nvidia recommend 12.04; but 14.04 seems ok for my application.

I will try your suggestion “export your Jetson for mount on the host”. The kernel is set up by running installation file .run which support NFS. I have no more details. All of I could guess it is a minimum qnx OS.

Q3: I could mount host directory to root folder of TK1 target, for example fs-nfs3 -t 10.42.0.1:/home/userid/qt5/bin /qt5/bin; but if I remote login using ssh, I could manually create directory under the root /, for example mkdir /qt5.

pwd

/

ls

bin dev etc proc root tmp usr

mkdir /qt5

mkdir: /qt5: Function not implemented

I avoid NFS where possible. Some issues you may run into are permissions. NFS itself may make import or export restrictions at either side. There may also be issues related to conversion of user names to user ID number…other than root a user name may appear wrong when crossing between systems over NFS because it is the numeric ID which is preserved, not the user name. In this case you are running as root probably, so user ID would not be an issue…however, NFS often squashes root operations for security reasons. Then there is the whole issue of NFSv3 or NFSv4.

If not using NFS, what should I do? Copy all of binaries from host to device? What is size of TK1 internal memory? I don’t have SD/MMC Card inserted.

df -h

/dev/mmc0 7.2G 7.2G 0 100%
/dev/emmc0 59G 59G 0 100%

I don’t know what specifications are for a Jetson Pro, but I have to wonder where all the space went if everything is filled to 100% already. What restrictions do you have regarding adding additional devices physically attached now? Is there a known reason why disk space is filled up? Because of the need for temp files, operating at 100% filled disk could cause unforeseen problems.

NFS is good where a file server is needed…meaning multiple computers need simultaneous access to a group of files in a shared manner. If you can reserve that partition for just use on one device at a time, then you’ll get more reliable and faster service with iSCSI over gigabit (this is the “poor man’s” version of fiber-optic storage…the disk becomes available over copper instead of fiber…the disk appears as a normal local disk to the Jetson and can be formatted, partitioned, so on).

In terms of development, if you can’t compile natively on the Jetson, then I personally prefer the compile-copy-run theme. You might need to set up a script for sftp or scp, or use nSight Eclipse set up for remote work. This is somewhat opinionated, as I get very annoyed with the issues I’ve had in the past with NFS in a development environment, and had issues on one machine cause issues on another machine when something crashes and burns.