Merge pull request #53 from urpylka/master

image_builder: fix pack
This commit is contained in:
Smirnov Artem
2018-06-25 14:53:51 +03:00
committed by GitHub
5 changed files with 51 additions and 24 deletions

View File

@@ -6,7 +6,19 @@ sudo apt-get install unzip zip git python-pip jq curl
sudo pip install YaDiskClient
```
2. Mount HDD
> TODO
```bash
nano /etc/fstab
```
```
proc /proc proc defaults 0 0
PARTUUID=37665771-01 /boot vfat defaults 0 2
PARTUUID=37665771-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
/dev/sdb1 none swap sw 0 0
/dev/sdb2 /mnt/hdd_system ext4 defaults,acl 0 0
/dev/sdb3 /mnt/hdd_builder ext4 defaults,acl 0 0
```
3. Enable swap on HDD
> TODO:

View File

@@ -14,7 +14,7 @@ pipeline {
string(name: 'GWBT_URL', defaultValue: 'https://github.com/CopterExpress/clever.git')
// Experimental function
booleanParam(name: 'SHRINK', defaultValue: false, description: 'SHRINK IMAGE')
booleanParam(name: 'SHRINK', defaultValue: true, description: 'SHRINK IMAGE')
booleanParam(name: 'DISCOVER_ROS_PACKAGES', defaultValue: false, description: 'DISCOVER ROS PACKAGES')
}
environment {
@@ -81,9 +81,13 @@ pipeline {
}
// TODO: Add finalising step, transfer mirror removal from ros.sh
stage('Shrink image') {
environment {
EXECUTE_FILE = 'image_builder/scripts/change_boot_part.sh'
}
when { expression { return params.SHRINK } }
steps {
sh "$WORKSPACE/image_builder/autosizer.sh ${params.BUILD_DIR}/${params.IMAGE_NAME}"
sh "$WORKSPACE/image_builder/image_config.sh execute ${params.BUILD_DIR}/${params.IMAGE_NAME} ${params.MOUNT_POINT} $WORKSPACE/$EXECUTE_FILE"
}
}
}

View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
echo -e "\033[0;31m\033[1m$(date) | #1 Change boot partition\033[0m\033[0m"
sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt
sed -i 's/.* \/boot vfat defaults 0 2$/\/dev\/mmcblk0p1 \/boot vfat defaults 0 2/' /etc/fstab
sed -i 's/.* \/ ext4 defaults,noatime 0 1$/\/dev\/mmcblk0p2 \/ ext4 defaults,noatime 0 1/' /etc/fstab
echo -e "\033[0;31m\033[1m$(date) | End of change boot partition\033[0m\033[0m"

View File

@@ -15,7 +15,7 @@ echo -e "\033[0;31m\033[1m$(date) | #1 Installing dirmngr & add key to apt-key\0
# Install a tool that apt-key uses to add ROS repository key
# http://wpblogger.su/tags/apt/
apt-get install --no-install-recommends -y dirmngr
apt-get install --no-install-recommends -y dirmngr=2.1.18-8~deb9u2
# setup keys
apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
@@ -31,11 +31,11 @@ apt-get update
echo -e "\033[0;31m\033[1m$(date) | #3 Installing wget, unzip, python-rosdep, python-rosinstall-generator, python-wstool, python-rosinstall, build-essential, cmake\033[0m\033[0m"
apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall-generator \
python-wstool \
python-rosinstall \
build-essential
python-rosdep=0.12.2-1 \
python-rosinstall-generator=0.1.14-1 \
python-wstool=0.1.17-1 \
python-rosinstall=0.7.8-1 \
build-essential=12.3
echo -e "\033[0;31m\033[1m$(date) | #4 rosdep init && rosdep update\033[0m\033[0m"

View File

@@ -10,22 +10,22 @@ echo -e "\033[0;31m\033[1m$(date) | #1 Software installing\033[0m\033[0m"
# TODO: Use dnsmasq instead of isc-dhcp-server
apt-get install --no-install-recommends -y \
unzip \
zip \
ipython \
screen \
byobu \
nmap \
lsof \
git \
dnsmasq \
tmux \
vim \
ipython3 \
cmake \
python-pip \
python3-pip \
libjpeg8-dev
unzip=6.0-21 \
zip=3.0-11 \
ipython=5.1.0-3 \
ipython3=5.1.0-3 \
screen=4.5.0-6 \
byobu=5.112-1 \
nmap=7.40-1 \
lsof=4.89+dfsg-0.1 \
git=1:2.11.0-3+deb9u3 \
dnsmasq=2.76-5+rpt1+deb9u1 \
tmux=2.3-4 \
vim=2:8.0.0197-4+deb9u1 \
cmake=3.7.2-1 \
python-pip=9.0.1-2+rpt2 \
python3-pip=9.0.1-2+rpt2 \
libjpeg8-dev=8d1-2
echo -e "\033[0;31m\033[1m$(date) | #2 Adding mjpg-streamer at /home/pi\033[0m\033[0m"
# https://github.com/jacksonliam/mjpg-streamer