mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 18:37:41 +01:00
Compare commits
2 Commits
nodejs-upd
...
4707-armpa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ac7c70486 | ||
|
|
79fce786c6 |
@@ -5,7 +5,7 @@ variable "image_link" { default = "https://downloads.raspberrypi.org/raspios_arm
|
|||||||
variable "image_checksum" { default = "7e53a46aab92051d523d7283c080532bebb52ce86758629bf1951be9b4b0560f" }
|
variable "image_checksum" { default = "7e53a46aab92051d523d7283c080532bebb52ce86758629bf1951be9b4b0560f" }
|
||||||
variable "image_size" { default = "24G" }
|
variable "image_size" { default = "24G" }
|
||||||
|
|
||||||
source "arm" "raspiblitz-arm64-rpi" {
|
source "qemu" "raspiblitz-arm64-rpi" {
|
||||||
file_checksum_type = "sha256"
|
file_checksum_type = "sha256"
|
||||||
file_checksum = var.image_checksum
|
file_checksum = var.image_checksum
|
||||||
file_target_extension = "xz"
|
file_target_extension = "xz"
|
||||||
@@ -34,6 +34,15 @@ source "arm" "raspiblitz-arm64-rpi" {
|
|||||||
image_type = "dos"
|
image_type = "dos"
|
||||||
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
|
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
|
||||||
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
|
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
|
||||||
|
# If required, you can specify CPU and memory settings
|
||||||
|
qemuargs = [
|
||||||
|
["-m", "1024M"], # Set memory to 1GB
|
||||||
|
["-smp", "4"] # Set the number of CPU cores
|
||||||
|
]
|
||||||
|
|
||||||
|
# Use the same architecture as the host (ARM)
|
||||||
|
accelerator = "none"
|
||||||
|
headless = true
|
||||||
}
|
}
|
||||||
|
|
||||||
build {
|
build {
|
||||||
|
|||||||
@@ -30,32 +30,32 @@ if ! packer version 2>/dev/null; then
|
|||||||
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
||||||
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
||||||
sudo apt-get update -y && sudo apt-get install packer=1.10.0-1 -y || exit 1
|
sudo apt-get update -y && sudo apt-get install packer=1.10.0-1 -y || exit 1
|
||||||
else
|
|
||||||
echo "# Packer is installed"
|
echo "# Packer is installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n# Install Go"
|
# echo -e "\n# Install Go"
|
||||||
export PATH=$PATH:/usr/local/go/bin
|
# export PATH=$PATH:/usr/local/go/bin
|
||||||
# https://go.dev/dl/
|
# # https://go.dev/dl/
|
||||||
GOVERSION="1.20.6"
|
# GOVERSION="1.20.6"
|
||||||
GOHASH="b945ae2bb5db01a0fb4786afde64e6fbab50b67f6fa0eb6cfa4924f16a7ff1eb"
|
# GOHASH="b945ae2bb5db01a0fb4786afde64e6fbab50b67f6fa0eb6cfa4924f16a7ff1eb"
|
||||||
if ! go version 2>/dev/null | grep "${GOVERSION}"; then
|
# if ! go version 2>/dev/null | grep "${GOVERSION}"; then
|
||||||
wget --progress=bar:force https://go.dev/dl/go${GOVERSION}.linux-amd64.tar.gz
|
# wget --progress=bar:force https://go.dev/dl/go${GOVERSION}.linux-amd64.tar.gz
|
||||||
echo "${GOHASH} go${GOVERSION}.linux-amd64.tar.gz" | sha256sum -c - || exit 1
|
# echo "${GOHASH} go${GOVERSION}.linux-amd64.tar.gz" | sha256sum -c - || exit 1
|
||||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go${GOVERSION}.linux-amd64.tar.gz
|
# sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go${GOVERSION}.linux-amd64.tar.gz
|
||||||
sudo rm -rf go${GOVERSION}.linux-amd64.tar.gz
|
# sudo rm -rf go${GOVERSION}.linux-amd64.tar.gz
|
||||||
else
|
#else
|
||||||
echo "# Go ${GOVERSION} is installed"
|
# echo "# Go ${GOVERSION} is installed"
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
echo -e "\n# Download the packer-builder-arm plugin"
|
# echo -e "\n# Download the packer-builder-arm plugin"
|
||||||
git clone https://github.com/mkaczanowski/packer-builder-arm
|
# git clone https://github.com/mkaczanowski/packer-builder-arm
|
||||||
cd packer-builder-arm
|
# cd packer-builder-arm
|
||||||
# https://github.com/mkaczanowski/packer-builder-arm/releases
|
# # https://github.com/mkaczanowski/packer-builder-arm/releases
|
||||||
git reset --hard "v1.0.9"
|
# git reset --hard "v1.0.9"
|
||||||
echo -e "\n# Build the packer-builder-arm plugin"
|
# echo -e "\n# Build the packer-builder-arm plugin"
|
||||||
go mod download
|
# go mod download
|
||||||
go build || exit 1
|
# go build || exit 1
|
||||||
|
|
||||||
# set vars
|
# set vars
|
||||||
echo "# Setting the variables: $*"
|
echo "# Setting the variables: $*"
|
||||||
|
|||||||
Reference in New Issue
Block a user