Integrating NVIDIA Jetson NANO

I am also interested on adding support for Jetson-Nano for my project, however I did not start yet.

2 Likes

I do not have much experience with this board and integration, but maybe @dwalkes has some input.

3 Likes

So, that’s my current progress: https://github.com/moqmar/meta-mender-community - it builds, but the partition layout isn’t working yet and I’m not really sure how the bootloader stuff will keep up. I’ll hopefully get this mostly running though in the next couple of days. :thinking:

2 Likes

Looking at the L4T R32.2.x BSPs, it looks like NVIDIA intends to add OTA bootloader update support to the Nano (and hopefully the Jetson TX1), but they don’t currently document it. If you’re willing to live without that, and just have Mender updating the kernel and rootfs, that should be doable by just adding in the U-Boot patches, updating the flash layout file, and excluding the script Dan added for the TX2. You’d have to reflash when a BSP change causes NVIDIA bootloader changes, though.

2 Likes

Hello Moqmar, I also started to work on this (I am interested only in rootfs update, bootloader update is low priority), so please keep your github branch updated (thanks a lot for uploading it!) and I will also push to my github (https://github.com/taurob/meta-mender-community) when I have some progress.

2 Likes

So, I got an image to build with meta-mender-tegra for the Nano - it boots, it has the correct Mender partitions mounted, and the Mender client is starting and connecting to my server. I have not tried rolling out an actual update through Mender yet, but will try on Monday if everything’s working. :slight_smile:

Oh, and it would be great if someone with a TX2 could try out if I broke something with my patches. :see_no_evil:

1 Like

Great to hear @moqmar.

I would suggest you to run trough the integration checklist to verify the integration. If this passes then deploying updates should work just fine :slight_smile:

2 Likes

Thank you, will do that on Monday. Currently I have the issue that I wasn’t using the .dataimg generated by Mender but an empty one, but that one doesn’t have all the required Mender files - unfortunately, it seems like when sdcard-layout.in is being applied with dd, the new .dataimg file isn’t written yet:

I’m using ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.dataimg in sdcard-layout_%.bbappend, and getting the following error:

| 2147483648 bytes (2.1 GB, 2.0 GiB) copied, 1.26477 s, 1.7 GB/s
| dd: failed to open '/mnt/build/yocto/tmp/deploy/images/jetson-nano/sdcard-layout-jetson-nano--20191206145610.dataimg': No such file or directory
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_image_tegraflash (log file is located at /mnt/build/yocto/tmp/work/jetson_nano-poky-linux/target-image/1.0-r0/temp/log.do_image_tegraflash.27948)
ERROR: Task (/mnt/build/yocto/recipes/system/target-image.bb:do_image_tegraflash) failed with exit code '1'

In /mnt/build/yocto/tmp/deploy/images/jetson-nano/, there is only a file called target-image-jetson-nano--20191206143758.dataimg, which seems to be from the last build…

2 Likes

@moqmar and @Ecordonnier sorry for the late response on this and @madisox/@mirzak thanks for weiging in. I’ve started a pull request at https://github.com/Trellis-Logic/meta-mender-community/pull/7 and we can move the discussion there if you like. I’ll take a look over the weekend and verify nothing is broken on TX2 or create a PR to your branch for anything I find. I’ll also try to replicate the issue you mentioned above. I’m glad to see someone is adding support to platforms other than TX2!

@moqmar: I tried the branch on a tx2 (stand-alone update by copying the .mender file to the rootfs). It is working fine.

Edit: I also tried the branch with an image on a jetson-nano, but it is not booting. I will check this further on Monday:
This is in my kernel logs:
[ 5.292537] EXT4-fs (mmcblk0p1): bad geometry: block count 879616 exceeds size of device (524288 blocks)

And this is in my file log.do_image_ext4:
DEBUG: Actual Partion size: 3602907136
DEBUG: Executing mkfs.ext4 …

Creating filesystem with 879616 4k blocks and 879984 inodes

1 Like

I put a couple of comments in https://github.com/Trellis-Logic/meta-mender-community/pull/7 based on my testing this weekend, none of which are related to the Nano changes I believe. I think TX2 is broken in a couple different ways right now for reasons I don’t yet understand.

@moqmar: you are probably using a custom SD-card layout? I had to make this change in meta-mender-tegra/classes/tegra-mender-setup.bbclass in order to be able to boot the jetson-nano with your branch:

-MENDER_STORAGE_TOTAL_SIZE_MB ??=“7000”
+MENDER_STORAGE_TOTAL_SIZE_MB ??=“4096”

The standard partition size of the rootfs is 2GB, so if you configure the ext4 filesystem to be 50% of 7000MB, this cannot work.

Current state: most stuff except for kernel updates is working, but updating the rootfs still throws an error (even though it works); for more details see https://github.com/Trellis-Logic/meta-mender-community/pull/7#issuecomment-565034143

@mirzak the branch is working (see https://github.com/Trellis-Logic/meta-mender-community/pull/9 ), and I am working on a pull-request, but for this we’ll need to add documentation. Do you have a preference between editing the wiki page of the jetson-tx2 and making it a page for all tegra boards, and creating a separated page for jetson-nano?

In my opinion the documentation for both boards is very similar, so I would rather extend this page.

1 Like

Great to hear that you where able to progress.

Prefer to have two separate pages even if they are similar, and this is the approach we have taken so far on other boards/devices.

The reason behind this is that the posts are optimized for consumers. Having to many options/paths in the guide adds confusion and we try to avoid it. It is also easier to find if there are separate pages/posts.

Understand that it takes a bit more effort to maintain such an approach, but again optimized for consumer :slight_smile:

1 Like