diff --git a/image_builder/manual.sh b/image_builder/manual.sh old mode 100644 new mode 100755 index 21483adb..661a5e50 --- a/image_builder/manual.sh +++ b/image_builder/manual.sh @@ -1,30 +1,34 @@ -#! /bin/sh +#! /bin/bash -DEBIAN_FRONTEND = 'noninteractive' -LANG = 'C.UTF-8' -LC_ALL = 'C.UTF-8' +DEBIAN_FRONTEND='noninteractive' +LANG='C.UTF-8' +LC_ALL='C.UTF-8' + +mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc +echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register + +apt install unzip wget -WORKSPACE=$(pwd) BUILD_DIR=$(pwd) set -e -BUILD_DIR="/mnt/hdd_builder/workspace" RPI_DONWLOAD_URL="https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-12-01/2017-11-29-raspbian-stretch-lite.zip" IMAGE_NAME="clever_qemu.img" ./image_config.sh get_image ${BUILD_DIR} ${RPI_DONWLOAD_URL} ${IMAGE_NAME} +./image_config.sh resize_fs ${BUILD_DIR}/${IMAGE_NAME} 7G -MOVE_FILE="qemu-arm-orig" -MOVE_TO="/usr/bin/qemu-arm-static" - -echo -e "\033[0;31m\033[1mAdd qemu-interpretator\033[0m\033[0m" -./image_config.sh copy_to_chroot ${BUILD_DIR}/${IMAGE_NAME} $WORKSPACE/${MOVE_FILE} ${MOVE_TO} +./image_config.sh copy_to_chroot ${BUILD_DIR}/${IMAGE_NAME} "qemu-arm-resin" "/usr/bin/qemu-arm-static" +./image_config.sh copy_to_chroot ${BUILD_DIR}/${IMAGE_NAME} "scripts" "/" +./image_config.sh copy_to_chroot ${BUILD_DIR}/${IMAGE_NAME} "kinetic-ros-coex.rosinstall" "/home/pi/ros_catkin_ws/" #if ! [ -f $2/usr/bin/qemu-arm-static ]; #then cp $6/image/qemu-arm-orig $2/usr/bin/qemu-arm-static #fi -EXECUTE_FILE=$WORKSPACE/scripts/hardware_setup.sh - -./image_config.sh execute ${params.BUILD_DIR}/${params.IMAGE_NAME} $WORKSPACE/$EXECUTE_FILE \ No newline at end of file +./image_config.sh execute ${BUILD_DIR}/${IMAGE_NAME} scripts/change_boot_part.sh +./image_config.sh execute ${BUILD_DIR}/${IMAGE_NAME} scripts/init_image.sh qemu_build_17082018 raspbian_nov_2017 +./image_config.sh execute ${BUILD_DIR}/${IMAGE_NAME} scripts/software_install.sh +./image_config.sh execute ${BUILD_DIR}/${IMAGE_NAME} scripts/network_setup.sh +./image_config.sh execute ${BUILD_DIR}/${IMAGE_NAME} scripts/ros_install.sh https://github.com/CopterExpress/clever.git master True