diff --git a/.drone.yml b/.drone.yml index 63b4451..3db9e96 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,23 +11,14 @@ steps: commands: - git submodule update --init --recursive -- name: dependencies +- name: prepare environment environment: DEBIAN_FRONTEND: noninteractive - commands: - - echo "Sleep 5 minutes to overcome the unattended-upgrades" - - sleep 300 - - apt-get update - - apt-get install -y sed make binutils build-essential diffutils gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc findutils wget - -- name: patch defconfig - environment: CONFIG_NAME: "rpi2_defconfig" commands: - - .drone/patch_defconfig.sh - -- name: configure - commands: + - .drone/install_dependencies.sh + - .drone/populate_overlay.sh + - .drone/patch_defconfig.sh - ./buildroot_make.sh rpi2_defconfig - name: restore cache @@ -77,23 +68,14 @@ steps: commands: - git submodule update --init --recursive -- name: dependencies +- name: prepare environment environment: DEBIAN_FRONTEND: noninteractive - commands: - - echo "Sleep 5 minutes to overcome the unattended-upgrades" - - sleep 300 - - apt-get update - - apt-get install -y sed make binutils build-essential diffutils gcc g++ bash patch gzip bzip2 perl tar cpio unzip rsync file bc findutils wget - -- name: patch defconfig - environment: CONFIG_NAME: "tlt113_minievm_defconfig" commands: - - .drone/patch_defconfig.sh - -- name: configure - commands: + - .drone/install_dependencies.sh + - .drone/populate_overlay.sh + - .drone/patch_defconfig.sh - ./buildroot_make.sh tlt113_minievm_defconfig - name: restore cache diff --git a/.drone/install_dependencies.sh b/.drone/install_dependencies.sh new file mode 100755 index 0000000..50b5918 --- /dev/null +++ b/.drone/install_dependencies.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +echo "Sleep 5 minutes to overcome the unattended-upgrade period" +sleep 300 +apt-get update +apt-get install -y \ + sed make binutils build-essential diffutils \ + gcc g++ bash patch gzip bzip2 perl tar cpio \ + unzip rsync file bc findutils wget openssl libssl-dev diff --git a/.drone/populate_overlay.sh b/.drone/populate_overlay.sh new file mode 100755 index 0000000..701e842 --- /dev/null +++ b/.drone/populate_overlay.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +SOURCE_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/../" &> /dev/null && pwd ) +USERS_TABLE=${SOURCE_PATH}/external_tree/customizations/users.table + +echo "Populating overlay directory..." + +PASSWORD=$(openssl rand -hex 8) + +echo "Generated default password for current build: ${PASSWORD}" + +echo "imi415 1000 imi415 1000 =${PASSWORD} /home/imi415 /bin/bash wheel imi415" > ${USERS_TABLE}