项目作者: Wolnosciowiec-Archive

项目描述 :
ARM image build automation
高级语言: Makefile
项目地址: git://github.com/Wolnosciowiec-Archive/arm-image-toolkit.git
创建时间: 2019-03-02T10:10:48Z
项目社区:https://github.com/Wolnosciowiec-Archive/arm-image-toolkit

开源协议:

下载


ARM Image Toolkit

Automation of sdcard image building and provisioning for ARM.
At first you need to adjust a configuration file, it’s placed in rpi.json

Requirements:

  • vagrant
  • VirtualBox
  • bash
  • GNU make
  • qemu
  • wget

Quick start

1) Running built image

  1. make build_raspbian_arm CONFIG=rpi.json
  2. make run_raspbian_arm

2) Flashing built image into sdcard

  1. make build_raspbian_arm USER_PASSWD=some_passwd
  2. make flash_sdcard MMC_DEVICE=/dev/mmcblk0

Usage with Ansible

  1. make build_raspbian_arm PLAYBOOK=/path/to/ansible/playbook.yml

If you are using roles from Ansible Galaxy, then you may want to install them at first.
To install Ansible Galaxy roles create a file .image-builder.sh in same folder as playbook.yml
The file needs to be executable.

Example:

  1. #!/bin/bash
  2. ansible-galaxy install blackandred.server_multi_user
  3. ansible-galaxy install blackandred.server_docker_project
  4. ansible-galaxy install blackandred.server_ssh_fallback_port
  5. ansible-galaxy install blackandred.server_basic_software
  6. ansible-galaxy install blackandred.server_basic_security

Usage without Ansible

You may want to delete Ansible section in rpi.json and run just:

  1. make build_raspbian_arm

Parameters

If you do not want to always type parameters in shell you can save them in the .env file.

Example of .env file:

  1. MMC_DEVICE=/dev/mmcblk0

With such env file you can type just:

  1. make flash_sdcard