mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-30 20:44:26 +01:00
Add template to add new distros. Added a Makefile to initialize new environment. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
44 lines
1.1 KiB
Bash
44 lines
1.1 KiB
Bash
# - Arguments
|
|
# rootfs_dir=$1
|
|
#
|
|
# - Optional environment variables
|
|
#
|
|
# EXTRA_PKGS: Variable to add extra PKGS provided by the user
|
|
#
|
|
# BIN_AGENT: Name of the Kata-Agent binary
|
|
#
|
|
# REPO_URL: URL to distribution repository ( should be configured in
|
|
# config.sh file)
|
|
#
|
|
# Any other configuration variable for a specific distro must be added
|
|
# and documented on its own config.sh
|
|
#
|
|
# - Expected result
|
|
#
|
|
# rootfs_dir populated with rootfs pkgs
|
|
# It must provide a binary in /sbin/init
|
|
build_rootfs() {
|
|
# Mandatory
|
|
local ROOTFS_DIR=$1
|
|
|
|
#Name of the Kata-Agent binary
|
|
local BIN_AGENT=${BIN_AGENT}
|
|
|
|
# In case of support EXTRA packages, use it to allow
|
|
# users add more packages to the base rootfs
|
|
local EXTRA_PKGS=${EXTRA_PKGS:-}
|
|
|
|
#In case rootfs is created usign repositories allow user to modify
|
|
# the default URL
|
|
local REPO_URL=${REPO_URL:-YOUR_REPO}
|
|
|
|
#PATH where files this script is placed
|
|
#Use it to refer to files in the same directory
|
|
#Exmaple: ${CONFIG_DIR}/foo
|
|
local CONFIG_DIR=${CONFIG_DIR}
|
|
|
|
|
|
# Populate ROOTFS_DIR
|
|
# Must provide /sbin/init and /bin/${BIN_AGENT}
|
|
}
|