-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_custom_image.sh
112 lines (89 loc) · 4.26 KB
/
create_custom_image.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash
# Created by SparkFun Electronics June 2021
# Author: Wes Furuya
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY without even the implied warrranty of
# MERCHANABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have reciede a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/license>
#
#==================================================================================
# Copyright (c) 2021 SparkFun Electronics
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#==================================================================================
#==================================================================================
# Clear Terminal
# clear
echo -e "\n\e[1;32mConfigure Custom Jetbot Image\e[0m"
# Remove Carriage Returns and Add Permissions
echo -e "\e[100mRemove Carriage Returns and Add Permissions\e[0m"
sed -i 's/\r$//' nvresizefs.sh
sed -i 's/\r$//' install_edimax_driver.sh install_aws_greengrass.sh install_jetbot.sh install_jetbot_ros.sh
echo -e "\e[1;33m- Adding File Permissions\e[0m"
# chmod +x install_edimax_driver.sh install_aws_greengrass.sh install_jetbot.sh install_jetbot_ros.sh
chmod +x * # all files
# Expand Partition to Fill SD Cards Space
echo -e "\e[100mRun Partition Expansion Script\e[0m"
sudo bash expand_partition.sh
# Download Package Information
echo -e "\e[1;33m- Download Package Information\e[0m"
sudo apt-get update
# # Enable All Ubuntu Packages
echo -e "\e[1;33m- Enable All Packages\e[0m"
sudo apt-add-repository main
sudo apt-add-repository universe
sudo apt-add-repository multiverse
sudo apt-add-repository restricted
# # Install htop, nano, and dkms
echo -e "\e[1;33m- - Install htop, nano, ipython3, pip3, and dkms\e[0m"
sudo apt-get -y install htop nano ipython3 dkms python3-pip
# Install Edimax WiFi Driver:
#==================================================================================
echo -e "\n\n\e[0;37mInstall Edimax WiFi Driver\e[0m"
./install_edimax_driver.sh
# Install Jetbot
#==================================================================================
# https://github.com/NVIDIA-AI-IOT/jetbot
echo -e "\n\n\e[0;37mInstall Jetbot\e[0m"
./install_jetbot.sh
# Install Jetbot ROS
#==================================================================================
echo -e "\n\n\e[0;37mRun Jetbot ROS Installation Script\e[0m"
./install_jetbot_ros.sh
# - Install ROS Melodic
# - Install Adafruit Libraries (ommitted # Already done in jetbot configuration script))
# - Create catkin workspace
# - Build jetson-inference
# - Build ros_deep_learning
# - Build jetbot_ros
# Install AWS Greengrass
#==================================================================================
echo -e "\n\n\e[0;37mRun AWS Greengrass Installation Script\e[0m"
./install_aws_greengrass.sh
# DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# ${DIR}/create-sdcard-image-from-scratch.sh\
# https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html
# sudo ./flash.sh -S 58GiB jetson-nano-sd mmcblk0p1
# Cleanup
#==================================================================================
./cleanup_image.sh