Building SD-card image from L4T

How to put wifi ssid/password to sdcard ?
How to specify the partition size?
the default seems 5.4Gb if using the tool below?
*$OUT/Linux_for_Tegra/tools/jetson-disk-image-creator.sh*

You can run l4t create default user script to your rootfs first and then run disk image creator script.

@WayneWWW
Thank you for your reply.
However, could you extend on how to add the wifi ssid entry, please?
So it will get incorporated to the sdcard image, please?

Moreover, the create default user script doesn’t seem to support specifying neither wifi nor the disk size, right?

sorry that no experience with that. Maybe other users can share their idea.

the create default user only seems to support these options

./l4t_create_default_user.sh 
ERROR: please run as sudo or root user
Usage:
l4t_create_default_user.sh [-u <username>] [-p <password>] [-a] [-h]
	-u | --username	- If not specified then default will be set to 'nvidia'.
	-p | --password	- If not set then randomized password will be generated.
	-a | --autologin - If specified autologin will be enabled. Default is disabled
	-n | --hostname - If not specified then default will be set to 'tegra-ubuntu'.
	-h | --help - print usage
	     --accept-license - Specified to accept the terms and conditions of EULA
Example:
l4t_create_default_user.sh -u nvidia -p NDZjMWM4
l4t_create_default_user.sh -u ubuntu -a
l4t_create_default_user.sh -n tegra

I tend to avoid Wi-Fi, but do you know if the SSID is in a file in “/etc”? If so, then just copy that file to the same place in the “rootfs/etc/”. My guess is that it will be somewhere in “/etc/wpa_supplicant” or “/etc/network” or “/etc/NetworkManager”.

I’ll give you a trick to find it: If you change the SSID to something else, and then change it back, some file will get an updated timestamp. From “/etc” look at the files most recently updated:

cd /etc
ls -ltr

The last file listed is the most recent file. Or the directory containing the file (you could “drill down” into directories). If you just made that update 10 seconds ago, then the timestamp will be from 10 seconds ago. If you find this on a running Jetson, then you just copy it to the “rootfs/” of the host PC.

@linuxdev Thank you for following up
I do not have content in these files:

/etc/wpa_supplicant.conf
/etc/networks

so it doesn’t seem they are processed. are they?
in the /etc/NetworkManager there are related files or at least one but when I just copied it to default nvidia sdcard in production overseas environment the unit just hasn’t got online with supplied systems connection name
maybe folks will add what exactly file needs to be added, or created to get automatic wifi connection. so posted here toohttps://forums.developer.nvidia.com/t/bsp-board-customization-adding-wifi/239509

for example for rpi there are default instructions available how to add wifi to sdcard image so first boot gets automatically connected

are there exact / confirmed steps how to implement it from 1 try on jetson without option to test several designs?

@linuxdev thank you for sharing.
Moreover I found an example for nano sdcard

But when I add just the wpa_supplicant.conf with ssid/password it doesn’t seem to get processed even on a running OS.

I don’t know of the specific network files used in the configuration. One of the problems is that some networks are managed, some are unmanaged, and other networks going up or down might change which config file is used (or if the network is enabled at all). I simply don’t know enough about Wi-Fi setup. The key though is knowing which files, and not just ones which are dynamically generated (if a startup configuration dynamically generates a file, then it doesn’t help to replace the generated file since it gets replaced every boot and every time the network changes). In the case where you might have got the right file, but it doesn’t operate, then you might try restarting networking.service. Sorry, I don’t know the specific requirements for Wi-Fi, but watching files related to Wi-Fi configuration change as Wi-Fi starts or stops would be key to finding out which files need to be copied (and then make sure the files don’t depend on a MAC address, except if that MAC exists on the computer it is being transferred to).

@linuxdev
Thank you for following up
Do you know by any chance how to get Jetson [ e.g. AGX devkit] or nx devkit possibly to boot from network or get flashed from the network? boot menu now seems to support nfs/ http boot? is there any documentation for it available?
Thanks
00_boot

I don’t know what NVIDIA did for network boot support. I know it is definitely possible with UEFI (JetPack 5.x+/L4T R34.x+), and in some cases of earlier releases, but I have not tried this myself so I don’t know what NVIDIA actually put in place. Having those in the menu might mean the drivers are there, but it might also just be a placeholder. If it does work, then likely it means running a step for IP address setup via an environment variable, plus loading the network driver. Don’t know for sure, NVIDIA would have to answer.

Flashing from the network definitely isn’t supported because true flashing requires the Jetson to be in recovery mode, and recovery mode is a custom USB device which is not running UEFI (or any boot code, it is a primitive access to memory…basically only the USB device driver plus clocks and rails are running).

What would be absolutely cool and useful would be if NVIDIA would publish a “dual boot” setup under UEFI (hint hint! :P). This could be a variation of A/B redundancy. If we had dual boot, then one o/s could be used with dd to write the other partitions. One could combine that with network boot to simulate network flash provided either o/s could be reached (you would no longer require recovery mode to flash, although if neither o/s survived you’d be back to traditional recovery mode flash).

Rumors are that NVIDIA is working on possibly alternate o/s flash (don’t know, but I suspect probably just Linux distributions). If this is true, then dual boot on a Jetson just became important (and it would help your network install case).

@linuxdev @WayneWWW
I can see that flashing to NFS is supported
Isn’t it for NX? AGX? Both? Neither of the two?

I know in earlier releases PXE/NFS boot was supported, but I don’t know if more recent releases have that support. In particular, I know that UEFI makes it easier to add such support, but I don’t know what is there by default in newer releases (I vaguely recall that this changed some time in R32.x). That is a release version difference, but there are also differences in boot drivers available by default for SD card models versus eMMC models. I just don’t know what the status is with current releases.

as far as I recollect Nvidia dropped NFS at the release when they introduced initrd method
Seems it got added to the documentation of the most recent release , it should implicate it is supported probably

I don’t know. In UEFI there would need to be a driver for network, and their quite possibly is, plus there would need to be some step to configure the network (such as setting an IP address in UEFI console…never tried). Once that is done, then the initrd method could just be told to use that network. Steps within UEFI would basically be for download of the kernel and anything not present and needed for the kernel to boot (e.g., possibly there would be a local initrd, but perhaps the initrd itself and/or some filesystem is run from the network as well). Don’t know, it would take experimentation.

So I guess the question for NVIDIA would what does the network boot option have, and what is it missing?