Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Installing NetBSD on Jetson Nano



Dan,

Responses below.

HTH,

Jason M.

On 1/20/22 3:34 AM, Dan MacDonald wrote:
Hi Jason

Thanks for your feedback.

So it sounds like I may be able to get away with writing the Tegra
u-boot to the arm64 image, once I have an image that includes the
tegra210-p3450-0000.dtb I require.

I have seen tegra210-p3450-0000.dtb on one of the NetBSD FTP sites. I
don't suppose I might be able to copy that dtb onto the NetBSD 9.2
arm64 image and expect it to work?

The dtb file needs to be on the DOS partition and it needs to be where u-boot expects it. If you build the u-boot package you should be able to see what dtb filename u-boot wants and what directory it should be in. This will be in the u-boot config file that gets created in the work directory under sysutils/u-boot-jetson-nano.

  I'd rather not have to but I
presume I'm going to have to build the latest NetBSD from source in
order to get an image that includes this dtb. Is there a guide to
building the aarch64 port of NetBSD 10 anywhere?

I don't see why you would need to build current just to get the dtb file. You might need to run -current to support the Jetson, but since there are NetBSD daily builds, you should just be able to download an image from: http://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/latest/evbarm-aarch64/binary/gzimg/

If you want a guide to compiling NetBSD google (compiling the kernel using build.sh). It's chapter 31 of the NetBSD guide (I think).

I'm hoping Jared will see this and be able to give exact instructions
so we can get this process documented either on the NetBSD Tegra page
or on the NetBSD wiki. The NetBSD web site could really do with a
overhaul- there seems to be lots of vital info missing and it looks
like a relic from the 90s.

On Wed, Jan 19, 2022 at 10:37 PM Jason Mitchell <jmitchel%bigjar.com@localhost> wrote:
On 1/19/22 4:43 AM, Dan MacDonald wrote:
I've not been able to find any instructions or confirmation that it is
possible to install NetBSD on the Jetson Nano other than a NetBSD
mailing list post from Jared McNeil saying that I would need to use
the tegra210-p3450-0000.dtb:

http://mail-index.netbsd.org/port-arm/2020/01/31/msg006479.html

I’ve tried the NetBSD 9.2 evbarm-aarch64 image and it wouldn’t boot
for me, likely because it doesn't include the tegra210-p3450-0000.dtb.

Would I need to build NetBSD 10 from source to install it on my Jetson
Nano or are there pre-built NetBSD arm64 images somewhere that do
include the required dtb and u-boot? I don't think the Jetson Nano
supports UEFI.

Recent versions of Jetpack (the reference OS for Jetson devices) and
Armbian let me boot straight from USB 3. Might this also be possible
with NetBSD or will I only be able to boot from MicroSD?

Thanks
Hello,

      From what I understand the boot process for ARM devices goes like this:

1) Device power on

1b) There could be a step here if there's some nvidia specific code on
the SPI flash or in ROM

2) Load u-boot from SPI flash or boot device*

3) Load EFI code on the DOS partition and execute it

4) The EFI code looks for a kernel on an FFS partition and executes it.

      The questions I don't know the answer to are:

1) Does the Jetson Nano have u-boot installed in SPI flash?

2) If u-boot is present on the boot media and in SPI flash which is
loaded first?

3) Where does the Jetson expect u-boot to be on the boot drive

      It looks like you're using a generic image which probably doesn't
have u-boot on it. There's a package in pkgsrc (and also in pkgsrc-wip)
containing u-boot for the Jetson nano (sysuttils/u-boot-jetson-nano). If
you downloaded that you could copy it onto a microSD card that contained
the base NetBSD ARM image (arm64.img.gz). I thought the package would
print the dd command necessary to install the u-boot file, but it
doesn't look like it does. I think:

      dd if=u-boot of=/dev/*disk* seek=64     is the command for other
platforms.

      To boot NetBSD off of a USB device I'm nearly certain you'll need
to load u-boot into the SPI flash. Maybe the Jetson will look for u-boot
on a USB device , I don't know.

      My understanding of this is incomplete, but hopefully this will
shed some light on the subject.

HTH,

Jason M.

* u-boot lives in unallocated space between the MBR and the DOS
partition starting at 0x8000 on the disk (at least on some ARM chips)




Home | Main Index | Thread Index | Old Index