Can I install FreeBSD on Jetson Nano?

Hello, I come with the question, is it possible to install FreeBSD on Jetson Nano? Also with USB support?

I shall move this question to the jetson forums, the community on that section will be able to help. Thanks

Not officially supported. This isn’t to say that you couldn’t get it to work, but it has a steep learning curve, and the GPU would probably remain inaccessible. The GPU driver is binary-only format, and is designed to load into an X server of a specific ABI (so if you don’t use the X server in that release of Linux, then the driver won’t load).

1 Like

Okay, I don’t care about FreeBSD GPU support anyway, so that’s not a problem. But I have to understand that then the other components such as the HDMI port and USB will work?

I couldn’t tell you. That’s the part about “steep learning curve”.

The background is that many parts of a computer are not “plug-n-play”. The concept of plug-n-play is that the component can self-describe, and then the operating system can decide how to deal with it. Pin functions, routing to peripherals, and just about everything on the carrier board are not plug-n-play. Thus these need manual specification.

I imagine this is similar in FreeBSD, but I’ve never touched it, so what I’m about to say might be off. If this is Linux, then the device tree is used for such specification. I consider it likely FreeBSD uses device trees as well, although it might have a different format and compile tool.

During boot of Linux the device tree is read. As the Linux kernel loads each kernel driver can see the device tree. If a tree node is not of interest to the driver, then it simply ignores the node. However, if the driver recognizes a tree node applies to it, then that information is passed as an argument to the driver as it loads. Information such as a physical device address to find the device at gets used to find and set up the device.

If you use FreeBSD, then your drivers probably listen for device tree content (don’t know for sure), but the Linux node might need to be rewritten for how a FreeBSD driver uses a device tree. The device tree is big, so this is a lot of work.

Also, you’d still need to use all of the boot stage software from the default Jetson install. Instead of loading the Linux kernel you’d need to set it up to hand off instead to the FreeBSD kernel. I don’t know what changes that would involve. However, a complication is that these earlier boot stages have also been set up (often, not always) to read the device tree. Bootloaders could need the tree as well, in which case you might end up with a separate tree for items where FreeBSD differs from what boot stage software uses. The fact that fairly universal bootloader software, e.g., Das U-Boot has built in abilities to use a device tree says there is a strong chance much of the tree structure would be an exact match between Linux and FreeBSD, but I don’t know…never tried to port to FreeBSD.

If the device tree is correct for USB and HDMI, then these should work if the FreeBSD has drivers for those particular devices.

1 Like

Okay, so if USB doesn’t work, is there any other way to add the driver? Just for the keyboard to start working

The driver is not the problem. The problem is device tree needs to tell the driver where to find the related hardware (e.g., the USB root hub). I can’t imagine FreeBSD would not include the more generic USB drivers, but the specific root hub in the carrier would need to inform the drivers where to look (in terms of physical address and routing of pins). If the driver is present, but the device tree is wrong, then you could use the saying that “the lights are on, but nobody is home”.

It is true though that a specific device on the SoC or module or carrier board might need a driver added, but most of that hardware is fairly pervasive in the computer world and is likely there by default. Sometimes you might need to add a driver, but in this case the real issue is the driver finding the hardware.

Okay I understand what’s going on, then is there any other way to point the Jetson without using the keyboard, or is there any alternative connection solution?

If you’ve used the NVIDIA boot content, then you have serial console up until Linux loads. Or, in your case, if your FreeBSD has the serial UART set up correctly for serial console, then that would work (but I’m doubtful FreeBSD would have this set up correctly by default, and that you’d have to work on both software and device tree to interact with serial console).

Using ssh would work if ethernet worked, but that too probably does not work unless the ethernet hardware is detected (and likely requires device tree edits).

Is this an SD card model, or is it an eMMC model? Working directly on the SD card on another host PC is easy, but the eMMC model probably requires cloning it (which requires a Linux desktop PC), editing the clone, and then flashing the clone back on (which also requires a Linux desktop PC).

It is hard for me to answer since I don’t know how the device tree is used and set up on FreeBSD. Even if the mechanism is the same, the names of drivers probably differ, the drivers likely use different arguments, and pretty much every node in the device tree needs to be ported over. That’s a steep learning curve.

1 Like

Okay, so I have a long road to success ahead of me. Thanks for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.