Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 88ffa5b

Browse files
committed
Update to L4T 28.2.1
1 parent 6d6786c commit 88ffa5b

File tree

9 files changed

+79
-28
lines changed

9 files changed

+79
-28
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Jetsonhacks
3+
Copyright (c) 2017-18 Jetsonhacks
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@ Removes all of the kernel sources and compressed source files. You may want to m
3434
The copyImage.sh script copies the Image to the current device. If you are building the kernel on an external device, for example a SSD, you will probably want to copy the Image file over to the eMMC in the eMMC's /boot directory. The Jetson will usually try to boot from the eMMC before switching to a different device. Study the boot sequence of the Jetson to properly understand which Image file is being used.
3535

3636

37-
Special thanks to Raffaello Bonghi (https://github.com/rbonghi) for jeston_easy scripts.
38-
37+
Special thanks to Raffaello Bonghi (https://github.com/rbonghi) for jetson_easy scripts.
38+
Special thanks to Shreeyak (https://github.com/Shreeyak) for discussing alternatives to get source directly from NVIDIA git repositories.
3939

4040
### Release Notes
41+
July, 2018
42+
* vL4T28.2.1
43+
* L4T 28.2.1 (JetPack 3.2.1)
44+
* Fix issue with scripts jetson_variables to determine L4T version.
45+
** Special thanks to Shreeyak (https://github.com/Shreeyak)
46+
* Refactored scripts/getKernelSources and getKernelSourcesNoGUI
47+
4148
April, 2018
4249
* vL4T28.2r3
4350
* L4T 28.2 (JetPack 3.2)

getKernelSources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "$JETSON_DESCRIPTION"
77
echo "Jetpack $JETSON_JETPACK [L4T $JETSON_L4T]"
88

99
# Check to make sure we're installing the correct kernel sources
10-
L4TTarget="28.2"
10+
L4TTarget="28.2.1"
1111
if [ $JETSON_L4T == $L4TTarget ] ; then
1212
echo "Getting kernel sources"
1313
sudo ./scripts/getKernelSources.sh

getKernelSourcesNoGUI.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "$JETSON_DESCRIPTION"
77
echo "Jetpack $JETSON_JETPACK [L4T $JETSON_L4T]"
88

99
# Check to make sure we're installing the correct kernel sources
10-
L4TTarget="28.2"
10+
L4TTarget="28.2.1"
1111
if [ $JETSON_L4T == $L4TTarget ] ; then
1212
echo "Getting kernel sources"
1313
sudo ./scripts/getKernelSourcesNoGUI.sh

scripts/getKernelSources.sh

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
#!/bin/bash
2-
apt-add-repository universe
3-
apt-get update
4-
apt-get install qt5-default pkg-config -y
5-
cd /usr/src
6-
wget -N http://developer.download.nvidia.com/embedded/L4T/r28_Release_v2.0/GA/BSP/tx2_sources.tbz2
7-
sudo tar -xvf tx2_sources.tbz2 public_release/kernel_src.tbz2
8-
tar -xvf public_release/kernel_src.tbz2
9-
# Space is tight; get rid of the compressed kernel source
10-
rm -r public_release
11-
cd kernel/kernel-4.4
12-
# Go get the default config file; this becomes the new system configuration
13-
zcat /proc/config.gz > .config
14-
# Ready to configure kernel
2+
# Get the source ;
3+
source scripts/getKernelSourcesNoGUI.sh
4+
# We use QT 5 for the configuration GUI
5+
apt-get install qt5-default -y
6+
cd /usr/src/kernel/kernel-4.4
157
make xconfig
168

scripts/getKernelSourcesNoGUI.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ apt-add-repository universe
33
apt-get update
44
apt-get install pkg-config -y
55
cd /usr/src
6-
wget -N http://developer.download.nvidia.com/embedded/L4T/r28_Release_v2.0/GA/BSP/tx2_sources.tbz2
7-
sudo tar -xvf tx2_sources.tbz2 public_release/kernel_src.tbz2
6+
wget -N https://developer.download.nvidia.com/embedded/L4T/r28_Release_v2.1/public_sources.tbz2
7+
sudo tar -xvf public_sources.tbz2 public_release/kernel_src.tbz2
88
tar -xvf public_release/kernel_src.tbz2
99
# Space is tight; get rid of the compressed kernel source
1010
rm -r public_release

scripts/jetson_variables.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ if [ -f /sys/module/tegra_fuse/parameters/tegra_chip_id ]; then
4545
esac
4646
JETSON_DESCRIPTION="NVIDIA Jetson $JETSON_BOARD"
4747
fi
48+
export JETSON_BOARD
4849

4950
# NVIDIA Jetson version
5051
# reference https://devtalk.nvidia.com/default/topic/860092/jetson-tk1/how-do-i-know-what-version-of-l4t-my-jetson-tk1-is-running-/
@@ -54,7 +55,7 @@ if [ -f /etc/nv_tegra_release ]; then
5455

5556
# Load release and revision
5657
JETSON_L4T_RELEASE=$(echo $JETSON_L4T_STRING | cut -f 1 -d ',' | sed 's/\# R//g' | cut -d ' ' -f1)
57-
JETSON_L4T_REVISION=$(echo $JETSON_L4T_STRING | cut -f 2 -d ',' | sed 's/\ REVISION: //g' | cut -d. -f1)
58+
JETSON_L4T_REVISION=$(echo $JETSON_L4T_STRING | cut -f 2 -d ',' | sed 's/\ REVISION: //g' )
5859
# unset variable
5960
unset JETSON_L4T_STRING
6061

@@ -65,13 +66,17 @@ if [ -f /etc/nv_tegra_release ]; then
6566
# https://developer.nvidia.com/embedded/jetpack-archive
6667
if [ "$JETSON_BOARD" = "TX2i" ] ; then
6768
case $JETSON_L4T in
69+
"28.2.1")
70+
JETSON_JETPACK="3.2.1" ;;
6871
"28.2")
6972
JETSON_JETPACK="3.2" ;;
7073
*)
7174
JETSON_JETPACK="UNKNOWN" ;;
7275
esac
7376
elif [ "$JETSON_BOARD" = "TX2" ] ; then
7477
case $JETSON_L4T in
78+
"28.2.1")
79+
JETSON_JETPACK="3.2.1" ;;
7580
"28.2")
7681
JETSON_JETPACK="3.2" ;;
7782
"28.1")
@@ -84,7 +89,7 @@ if [ -f /etc/nv_tegra_release ]; then
8489
elif [ "$JETSON_BOARD" = "TX1" ] ; then
8590
case $JETSON_L4T in
8691
"28.2")
87-
JETSON_JETPACK="3.2" ;;
92+
JETSON_JETPACK="3.2 or 3.2.1" ;;
8893
"28.1")
8994
JETSON_JETPACK="3.1" ;;
9095
"24.2.1")
@@ -127,12 +132,18 @@ else
127132
fi
128133

129134
# Read opencv version
130-
if hash pkg-config --modversion opencv 2>/dev/null; then
135+
pkg-config --exists opencv
136+
if [ $? == "0" ] ; then
131137
JETSON_OPENCV=$(pkg-config --modversion opencv)
132138
else
133139
JETSON_OPENCV="NOT INSTALLED"
134140
fi
135141

142+
export JETSON_BOARD
143+
export JETSON_CUDA
144+
export JETSON_JETPACK
145+
export JETSON_L4T
146+
136147
# TODO Add enviroments variables:
137148
# - UID -> https://devtalk.nvidia.com/default/topic/996988/jetson-tk1/chip-uid/post/5100481/#5100481
138149
# - GCID, BOARD, EABI

scripts/makeKernel.sh

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,53 @@
11
#!/bin/bash
22
# Builds the kernel and modules
3-
# Assumes that the .config file is available
3+
# Assumes that the .config file is available in /proc/config.gz
4+
# Added check to see if make builds correctly; retry once if not
5+
46
cd /usr/src/kernel/kernel-4.4
57
make prepare
68
make modules_prepare
79
# Make alone will build the dts files too
8-
# make -j6
9-
make -j6 Image
10-
make modules
10+
# Get the number of CPUs
11+
NUM_CPU=$(nproc)
12+
time make -j$(($NUM_CPU - 1)) Image
13+
if [ $? -eq 0 ] ; then
14+
echo "Image make successful"
15+
else
16+
# Try to make again; Sometimes there are issues with the build
17+
# because of lack of resources or concurrency issues
18+
echo "Make did not build " >&2
19+
echo "Retrying ... "
20+
# Single thread this time
21+
make Image
22+
if [ $? -eq 0 ] ; then
23+
echo "Image make successful"
24+
else
25+
# Try to make again
26+
echo "Make did not successfully build" >&2
27+
echo "Please fix issues and retry build"
28+
exit 1
29+
fi
30+
fi
31+
32+
time make -j$(($NUM_CPU - 1)) modules
33+
if [ $? -eq 0 ] ; then
34+
echo "Modules make successful"
35+
else
36+
# Try to make again; Sometimes there are issues with the build
37+
# because of lack of resources or concurrency issues
38+
echo "Make did not build " >&2
39+
echo "Retrying ... "
40+
# Single thread this time
41+
make modules
42+
if [ $? -eq 0 ] ; then
43+
echo "Module make successful"
44+
else
45+
# Try to make again
46+
echo "Make did not successfully build" >&2
47+
echo "Please fix issues and retry build"
48+
exit 1
49+
fi
50+
fi
51+
1152
make modules_install
1253

scripts/removeAllKernelSources.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
cd /usr/src
44
rm -r kernel
55
rm -r hardware
6-
rm tx2_sources.tbz2
6+
rm public_sources.tbz2
77

0 commit comments

Comments
 (0)