mirror of
https://github.com/source4learn/raspberry-pi-os-image-builder.git
synced 2025-08-03 15:55:28 +00:00
Refactor structure
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
# Cache objects
|
||||
packer-builder-arm-image
|
||||
output-arm-image
|
||||
packer_cache/
|
||||
|
||||
# Crash log
|
||||
|
@ -1,2 +1,2 @@
|
||||
# raspberry-pi-os-image-builder
|
||||
# Raspberry Pi OS Image with Packer
|
||||
Build custom Raspberry Pi OS Image with Packer
|
||||
|
@ -1,50 +1,49 @@
|
||||
{
|
||||
"variables": {
|
||||
"variables": {
|
||||
},
|
||||
"builders": [
|
||||
{
|
||||
"type": "arm-image",
|
||||
"iso_url": "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip",
|
||||
"iso_checksum": "sha256:ea92412af99ec145438ddec3c955aa65e72ef88d84f3307cea474da005669d39",
|
||||
"target_image_size": 2147483648
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./rasp.png",
|
||||
"destination": "/home/pi/rasp.png"
|
||||
},
|
||||
"builders": [
|
||||
{
|
||||
"type": "arm-image",
|
||||
"iso_url": "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip",
|
||||
"iso_checksum": "sha256:ea92412af99ec145438ddec3c955aa65e72ef88d84f3307cea474da005669d39",
|
||||
"target_image_size": 2147483648
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./rasp.png",
|
||||
"destination": "/home/pi/rasp.png"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./scripts/.bash_profile",
|
||||
"destination": "/home/pi/.bash_profile"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./scripts/.xinitrc",
|
||||
"destination": "/home/pi/.xinitrc"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./scripts/splashscreen.service",
|
||||
"destination": "/etc/systemd/system/splashscreen.service"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"echo 'Install APT Packages'",
|
||||
"echo nameserver 8.8.8.8 > /etc/resolv.conf",
|
||||
"apt-get update",
|
||||
"apt-get -y install --no-install-recommends xserver-xorg-video-all xserver-xorg-input-all xserver-xorg-core xinit x11-xserver-utils fbi curl",
|
||||
"rm -f /etc/motd",
|
||||
"chown pi:pi -R /home/pi/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "./scripts/run.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./scripts/.bash_profile",
|
||||
"destination": "/home/pi/.bash_profile"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./scripts/.xinitrc",
|
||||
"destination": "/home/pi/.xinitrc"
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"source": "./scripts/splashscreen.service",
|
||||
"destination": "/etc/systemd/system/splashscreen.service"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"echo 'Install APT Packages'",
|
||||
"echo nameserver 8.8.8.8 > /etc/resolv.conf",
|
||||
"apt-get update",
|
||||
"apt-get -y install --no-install-recommends xserver-xorg-video-all xserver-xorg-input-all xserver-xorg-core xinit x11-xserver-utils fbi curl",
|
||||
"rm -f /etc/motd",
|
||||
"chown pi:pi -R /home/pi/"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"script": "./scripts/run.sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
sudo /usr/bin/fbi -d /dev/fb0 --vt 1 --noverbose -a /home/pi/rasp.png
|
||||
|
||||
|
@ -10,5 +10,4 @@ sed -i '/^exit[ /t]*0/i dmesg --console-off\n' /etc/rc.local
|
||||
echo "Enable Raspberry Pi Default Services"
|
||||
systemctl enable ssh
|
||||
systemctl enable getty@
|
||||
systemctl enable unblockwifi
|
||||
systemctl enable splashscreen
|
||||
|
@ -6,4 +6,4 @@ After=local-fs.target
|
||||
Type=forking
|
||||
ExecStart=sudo /usr/bin/fbi -d /dev/fb0 --vt 1 --noverbose -a /home/pi/rasp.png &
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
WantedBy=sysinit.target
|
||||
|
Reference in New Issue
Block a user