Skip to content

Instantly share code, notes, and snippets.

@ShinkoLab
Created September 22, 2023 05:06
Show Gist options
  • Save ShinkoLab/6a865ff203f374391e9c8d3f35f8c7cd to your computer and use it in GitHub Desktop.
Save ShinkoLab/6a865ff203f374391e9c8d3f35f8c7cd to your computer and use it in GitHub Desktop.
Raspberry Pi 4 用の Debian イメージを自分でビルドする

使い方

Vagrantで実行するとRPi4用のDebianイメージが出てくる

Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.provider "virtualbox" do |vb|
vb.cpus = 4
vb.memory = "4096"
end
config.vm.provision "shell", privileged: true, inline: <<-SHELL
apt update
apt install -y make vmdb2 dosfstools qemu-utils qemu-user-static debootstrap binfmt-support time kpartx bmap-tools python3 git
git clone --recursive https://salsa.debian.org/raspi-team/image-specs.git /home/vagrant/image-specs
chown -R vagrant:vagrant /home/vagrant/image-specs
SHELL
config.vm.provision "shell", privileged: true, inline: <<-SHELL
cd /home/vagrant/image-specs
make raspi_4_bullseye.img
cp *.img /vagrant/
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment