Coder Social home page Coder Social logo

jetson-ubuntu-core's Introduction

Ubuntu Core for Jetson TX1/TX2/Nano/Xavier

This repository contains scripts to create a tarball with all what is needed to flash Ubuntu Core 18 in a Jetson TX1/TX2/Nano/Xavier device.

Build instructions

First, you will need to build the kernel and gadget snaps for the device. For that, clone the following repos and follow the instructions in the respective README.md files:

https://github.com/alfonsosanchezbeato/jetson-kernel-snap https://github.com/alfonsosanchezbeato/jetson-gadget-snap

Then, install ubuntu-image with

snap install --edge ubuntu-image

(we need to use the edge channel for the moment for xavier images).

Once you have created the snaps, you can create an installation tarball by running

./build-core.sh <tx1|tx2|nano|xavier> <snap_account_id> <gadget_snap_file> <kernel_snap_file> [key_name]

The snap account id can be found in your account details in https://dashboard.snapcraft.io. You will need an Ubuntu One account for this. You will also need a key registered with snapcraft to be able to create a model for the device. The key name parameter is necessary only if different from default.

After building, you will find a file named out-<tx1|tx2|nano|xavier>/core-18-jetson-<tx1|tx2|nano|xavier>.tar.xz that contains instructions and all needed files to flash UC18 into the device.

You can also download the latest tarball from the releases tab.

jetson-ubuntu-core's People

Contributors

alfonsosanchezbeato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jetson-ubuntu-core's Issues

Update to latest SDK

Hello! Thank you very much for providing this port!

I've followed your posts and was able to build the UC image just fine even thought it is only working on a real Ubuntu 18 machine/VM with Snapcraft on it, and with the latest snapcraft it requires us to use --destructive-mode otherwise it would never cross-compile it.

The SDK being used is very old and I was trying to change it to make it work on the current SDK 32.4.3. However, I'm failing to get it to work because the source_sync.sh scripts takes 1 single tag for all the nvidia repos it will clone.

An example of this is the BCT repo:

Downloading default hardware/nvidia/platform/t19x/galen/bct source...
Cloning into '/home/guto/uc-test/jetson-kernel-snap/nano/parts/kernel/src/sources/hardware/nvidia/platform/t19x/galen/bct'...
remote: Enumerating objects: 389, done.
remote: Counting objects: 100% (389/389), done.
remote: Compressing objects: 100% (237/237), done.
remote: Total 389 (delta 271), reused 224 (delta 150)
Receiving objects: 100% (389/389), 259.74 KiB | 256.00 KiB/s, done.
Resolving deltas: 100% (271/271), done.
The default hardware/nvidia/platform/t19x/galen/bct source is downloaded in: /home/guto/uc-test/jetson-kernel-snap/nano/parts/kernel/src/sources/hardware/nvidia/platform/t19x/galen/bct
Couldn't find tag tegra-l4t-r32.4.3
/home/guto/uc-test/jetson-kernel-snap/nano/parts/kernel/src/sources/hardware/nvidia/platform/t19x/galen/bct source sync to tag tegra-l4t-r32.4.3 failed!

All the other repos that are part of the kernel snap are synced and have that 32.4.3 tag on them but the BCT doesn't.

Also, even using your repo without any changes, it looks like the NVidia libraries are not installed on the final image making it unusable to run things that leverage CUDA or the NVidia Container Runtime on it.

I was about to submit a PR against each repo updating them but I got stuck on it.

Do you have any idea what can be done to get it to work?

Thanks!

Compatibility with Jetson TK1

Hello
Thanks for this useful repo
I want to ask if it is possible to port Ubuntu Core on Jetson TK1?
Can I use the tarball of TX1 to flash the TK1?

Thanks in advance

missing kernel configs means lxd has no IP addrs

$ sudo lxd.check-kernel | grep missing
checkpoint restore: missing
CONFIG_UNIX_DIAG: missing
CONFIG_PACKET_DIAG: missing
CONFIG_NETLINK_DIAG: missing

knitzsche@localhost:~$ sudo lxc ls
+--------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+--------+---------+------+------+-----------+-----------+
| bionic | RUNNING | | | CONTAINER | 0 |
+--------+---------+------+------+-----------+-----------+

flash script question

I'm trying to flash the SD card on a Jetson Xavier NX using the latest release. After starting the device in recover mode, patched the files needed based on the released README, I executed the sudo ./flash.sh ... command. Regardless if I use -r or not flashing fails with different reasons. Here are the error messages I'm getting for both versions of the command.

  1. sudo ./flash.sh jetson-xavier mmcblk0p1:
[   0.0188 ] 
[   0.0192 ] Signed file: /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/boot/tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
Generate header for tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
Generate 16-byte-size-aligned base file for tegra194-p2888-0001-p2822-0000_sigheader.dtb.encrypt
Remove temporary file
done.
Existing sosfile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/mb1_t194_prod.bin) reused.
Existing tegraboot(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/nvtboot_t194.bin) reused.
Existing cpu_bootloader(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/nvtboot_cpu_t194.bin) reused.
Existing mb2blfile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/nvtboot_recovery_t194.bin) reused.
Existing mtspreboot(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/preboot_c10_prod_cr.bin) reused.
Existing mcepreboot(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/mce_c10_prod_cr.bin) reused.
Existing mtsproper(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/mts_c10_prod_cr.bin) reused.
Existing mb1file(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/mb1_t194_prod.bin) reused.
Existing bpffile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/bpmp_t194.bin) reused.
copying bpfdtbfile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/t186ref/tegra194-a02-bpmp-p2888-a01.dtb)... done.
Existing scefile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/camera-rtcpu-sce.img) reused.
Existing camerafw(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/camera-rtcpu-rce.img) reused.
Existing spefile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/spe_t194.bin) reused.
Existing drameccfile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/dram-ecc.bin) reused.
Existing badpagefile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/badpage.bin) reused.
Existing wb0boot(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/warmboot_t194_prod.bin) reused.
Existing tosfile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/tos_t194.img) reused.
Existing eksfile(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/eks.img) reused.
copying soft_fuses(/home/giannis/ubuntuCore/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)... done.
copying dtbfile(/home/giannis/ubuntuCore/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb)... done.
Copying nv_boot_control.conf to rootfs
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
sed: can't read /home/giannis/ubuntuCore/Linux_for_Tegra/rootfs/etc/nv_boot_control.conf: Not a directory
Making system.img... 
cp: error writing 'mnt/boot/Image': No space left on device
Copying /home/giannis/ubuntuCore/Linux_for_Tegra/kernel/Image failed.
  1. sudo ./flash.sh -r jetson-xavier mmcblk0p1:
[   4.5852 ] tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem mem_rcm_sigheader.bct.encrypt
[   4.5864 ] Applet version 01.00.0000
[   4.6649 ] Sending bct_bootrom
[   4.6661 ] [................................................] 100%
[   4.7119 ] Sending bct_mb1
[   4.7457 ] [................................................] 100%
[   4.7984 ] Sending bct_mem
[   4.8890 ] [................................................] 100%
[   5.2757 ] 
Error: Return value 8
Command tegrarcm_v2 --download bct_bootrom br_bct_BR.bct --download bct_mb1 mb1_bct_MB1_sigheader.bct.encrypt --download bct_mem mem_rcm_sigheader.bct.encrypt
Failed flashing t186ref.

My system run Ubuntu 18.04 as a base and I am able to flash the device through NVIDIA's SDK manager. So is there a way for me to understand what am I doing wrong? Also is the ethernet connection a requirement for the flashing procedure to start or is it just for the first boot?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.