Skip to content

Commit 5955b45

Browse files
Add support for Jetson TX2
1 parent e6f2f11 commit 5955b45

File tree

9 files changed

+61
-8
lines changed

9 files changed

+61
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/out-tx1/
2+
/out-tx2/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Ubuntu Core for Jetson TX1
1+
# Ubuntu Core for Jetson TX1/TX2
22

33
This repository contains scripts to create a tarball with all what is
4-
needed to flash Ubuntu Core 18 in a Jetson TX1 device.
4+
needed to flash Ubuntu Core 18 in a Jetson TX1 or TX2 device.
55

66
## Build instructions
77

@@ -15,7 +15,7 @@ instructions in the respective README.md files:
1515
Once you have created the snaps, you can create an installation tarball
1616
by running
1717

18-
`./build-core.sh tx1 <snap_account_id> <gadget_snap_file> <kernel_snap_file> [key_name]`
18+
`./build-core.sh <tx1|tx2> <snap_account_id> <gadget_snap_file> <kernel_snap_file> [key_name]`
1919

2020
The snap account id can be found in your account details in
2121
<https://dashboard.snapcraft.io>. You will need an Ubuntu One account
@@ -25,7 +25,7 @@ able to create a model for the device. The key name parameter is
2525
necessary only if different from `default`.
2626

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

3131
You can also download the latest tarball from the [releases tab](

build-core.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,19 @@ ubuntu-image snap --output-dir "$outdir" --workdir "$outdir" \
7171
# Generate tarball with all the needed parts for flashing
7272
final_tree="$outdir"/final_tree
7373
bootloader_dir="$final_tree"/bootloader
74-
u_boot_dir="$bootloader_dir"/t210ref/p2371-2180
74+
if [ "$board" = tx1 ]; then
75+
u_boot_dir="$bootloader_dir"/t210ref/p2371-2180
76+
writable_part=18
77+
else
78+
u_boot_dir="$bootloader_dir"/t186ref/p2771-0000/500
79+
writable_part=30
80+
fi
7581
mkdir -p "$u_boot_dir"
7682
cp "$outdir"/unpack/gadget/u-boot.bin "$u_boot_dir"
7783
cp "$outdir"/volumes/jetson/part0.img "$bootloader_dir"/system.img
78-
cp "$outdir"/volumes/jetson/part18.img "$bootloader_dir"/system-data.ext4
79-
cp tarball-parts/* "$final_tree"
84+
cp "$outdir"/volumes/jetson/part"$writable_part".img "$bootloader_dir"/system-data.ext4
85+
cp tarball-parts/"$board"/* "$final_tree"
8086
pushd .
8187
cd "$final_tree"
82-
tar -cJf ../core-18-jetson-"$board".tar.xz *
88+
tar -cJf ../core-18-jetson-"$board".tar.xz -- *
8389
popd
File renamed without changes.

tarball-parts/tx2/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Intructions for flashing Ubuntu Core 18 in Jetson TX2
2+
3+
Download and extract the 32.1 L4T release from nvidia:
4+
5+
```
6+
wget https://developer.nvidia.com/embedded/dlc/l4t-jetson-driver-package-32-1-JAX-TX2 \
7+
-O JAX-TX2-Jetson_Linux_R32.1.0_aarch64.tbz2
8+
tar xf JAX-TX2-Jetson_Linux_R32.1.0_aarch64.tbz2
9+
```
10+
11+
Extract the UC tarball inside the L4T directory and apply the
12+
necessary patches:
13+
14+
```
15+
cd Linux_for_Tegra
16+
tar xvf <path_to_tarball>/core-18-jetson-tx2.tar.xz
17+
patch -p1 < p2771-0000.conf.common.patch
18+
patch -p1 < flash_l4t_t186.xml.patch
19+
```
20+
21+
Then, put the device in [recovery mode](https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-321/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fflashing.html)
22+
and flash it. The only difference with normal flashing is that you need
23+
to use the `'-r'` flag to avoid creating a new system image:
24+
25+
`sudo ./flash.sh -r jetson-tx2 mmcblk0p1`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/bootloader/t186ref/cfg/flash_l4t_t186.xml 2019-03-27 13:43:33.172843137 +0100
2+
+++ b/bootloader/t186ref/cfg/flash_l4t_t186.xml 2019-03-27 13:46:23.119618269 +0100
3+
@@ -449,6 +449,7 @@
4+
<file_system_attribute> 0 </file_system_attribute>
5+
<allocation_attribute> 0x808 </allocation_attribute>
6+
<percent_reserved> 0 </percent_reserved>
7+
+ <filename> system-data.ext4 </filename>
8+
</partition>
9+
<partition name="secondary_gpt" type="secondary_gpt">
10+
<allocation_policy> sequential </allocation_policy>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/p2771-0000.conf.common 2019-03-27 13:50:19.427467184 +0100
2+
+++ b/p2771-0000.conf.common 2019-03-28 11:54:31.556401208 +0100
3+
@@ -228,7 +228,7 @@
4+
if [ -z "${USE_UBOOT}" ]; then
5+
USE_UBOOT=1;
6+
fi;
7+
-ROOTFSSIZE=28GiB;
8+
+ROOTFSSIZE=67108864;
9+
CMDLINE_ADD="console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0";
10+
target_board="t186ref";
11+
ROOT_DEV="mmcblk0p12 ------------ internal eMMC.

0 commit comments

Comments
 (0)