Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit f9db381

Browse files
pedrolamasmatmen
andauthored
fix: image build (#25)
Signed-off-by: Pedro Lamas <[email protected]> Co-authored-by: Mathis Mensing <[email protected]>
1 parent 103659c commit f9db381

File tree

11 files changed

+39
-32
lines changed

11 files changed

+39
-32
lines changed

.github/workflows/BuildRaspiOS.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- '**'
6-
tags-ignore:
6+
tags-ignore:
77
- '**'
88
pull_request:
99
types: [ opened, edited ]
@@ -17,24 +17,24 @@ jobs:
1717

1818
steps:
1919
- name: Install Dependencies
20-
run: sudo apt update; sudo apt install coreutils p7zip-full qemu-user-static zip
20+
run: sudo apt update; sudo apt install coreutils p7zip-full qemu-user-static zip
2121

2222
- name: Checkout CustomPiOS
2323
uses: actions/checkout@v2
2424
with:
2525
repository: 'guysoft/CustomPiOS'
2626
path: CustomPiOS
27-
27+
2828
- name: Checkout FluiddPI Project
2929
uses: actions/checkout@v2
3030
with:
3131
repository: ${{ github.repository }}
3232
path: repository
3333
submodules: true
3434

35-
- name: Download Raspbian Source Image
35+
- name: Download Raspberry Pi OS Source Image
3636
run: aria2c -d repository/src/image/ --seed-time=0 https://downloads.raspberrypi.org/raspios_lite_armhf_latest.torrent
37-
37+
3838
- name: Update CustomPiOS Paths
3939
run: cd repository/src && ../../CustomPiOS/src/update-custompios-paths
4040

@@ -43,11 +43,11 @@ jobs:
4343

4444
- name: Copy output image
4545
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspios-*-lite.img fluiddpi-raspios-lite-latest.img
46-
46+
4747
- name: Compress the image
4848
run: zip fluiddpi-raspios-lite-latest.zip fluiddpi-raspios-lite-latest.img
4949

5050
- uses: actions/upload-artifact@v1
5151
with:
5252
name: fluiddpi-raspios-lite-latest.zip
53-
path: fluiddpi-raspios-lite-latest.zip
53+
path: fluiddpi-raspios-lite-latest.zip

.github/workflows/ReleaseRaspiOS.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ jobs:
1616
with:
1717
repository: 'guysoft/CustomPiOS'
1818
path: CustomPiOS
19-
19+
2020
- name: Checkout FluiddPI Project
2121
uses: actions/checkout@v2
2222
with:
2323
repository: ${{ github.repository }}
2424
path: repository
2525
submodules: true
2626

27-
- name: Download Raspbian Source Image
27+
- name: Download Raspberry Pi OS Source Image
2828
run: aria2c -d repository/src/image/ --seed-time=0 https://downloads.raspberrypi.org/raspios_lite_armhf_latest.torrent
29-
29+
3030
- name: Update CustomPiOS Paths
3131
run: cd repository/src && ../../CustomPiOS/src/update-custompios-paths
3232

@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: Copy output image
3737
run: cp ${{ github.workspace }}/repository/src/workspace/*-raspios-*-lite.img fluiddpi-raspios-lite-latest.img
38-
38+
3939
- name: Compress the image
4040
run: zip fluiddpi-raspios-lite-latest.zip fluiddpi-raspios-lite-latest.img
4141

@@ -52,4 +52,4 @@ jobs:
5252
upload_url: ${{ github.event.release.upload_url }}
5353
asset_path: fluiddpi-raspios-lite-latest.zip
5454
asset_name: fluiddpi-rpi-lite-${{ github.event.release.tag_name }}.zip
55-
asset_content_type: application/zip
55+
asset_content_type: application/zip

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ build: verifyimage
66
docker-compose down
77

88
verifyimage:
9-
@if [ ! -f "src/image/raspbian_latest-raspbian.zip" ]; then echo "Raspbian image does not exist. Starting Download..."; curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf_latest > src/image/raspbian_latest-raspbian.zip; else \
10-
echo "Raspbian image found. Starting checksum verification"; curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf_latest.sha1 > src/image/raspbian_latest-raspbian.zip.sha1; \
11-
IMAGE_SHA1=`sha1sum src/image/raspbian_latest-raspbian.zip | awk '{print $$1}'`; \
12-
DL_SHA1=`awk '{print $$1}' src/image/raspbian_latest-raspbian.zip.sha1`; \
13-
if [ "$$IMAGE_SHA1" != "$$DL_SHA1" ]; then echo "SHAs do not match."; echo "Got $$IMAGE_SHA1"; echo "Expected $$DL_SHA1"; echo "Starting image download"; curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf_latest > src/image/raspbian_latest-raspbian.zip; else echo "SHAs Matched"; fi; fi
9+
@if [ ! -f "src/image/raspberry_pi_os-latest.zip" ]; then echo "Raspbian image does not exist. Starting Download..."; curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf_latest > src/image/raspberry_pi_os.zip; else \
10+
echo "Raspberry Pi OS image found. Starting checksum verification"; curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf_latest.sha1 > src/image/raspberry_pi_os-latest.zip.sha1; \
11+
IMAGE_SHA1=`sha1sum src/image/raspberry_pi_os-latest.zip | awk '{print $$1}'`; \
12+
DL_SHA1=`awk '{print $$1}' src/image/raspberry_pi_os-latest.zip.sha1`; \
13+
if [ "$$IMAGE_SHA1" != "$$DL_SHA1" ]; then echo "SHAs do not match."; echo "Got $$IMAGE_SHA1"; echo "Expected $$DL_SHA1"; echo "Starting image download"; curl -J -L https://downloads.raspberrypi.org/raspios_lite_armhf_latest > src/image/raspberry_pi_os-latest.zip; else echo "SHAs Matched"; fi; fi
1414

1515
clean:
1616
rm -rf src/workspace
1717
rm -f src/build.log
18-
rm -f src/image/raspbian_latest-raspbian.zip.sha1
18+
rm -f src/image/raspberry_pi_os-latest.zip.sha1
1919

2020
distclean:
2121
rm -rf src/image/*.zip

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A pi image with Klipper, Moonraker and Fluidd pre-installed.
44

5-
This repository contains the necessary code to generate the distribution from an existing Raspbian lite distro image.
5+
This repository contains the necessary code to generate the distribution from an existing Raspberry Pi OS lite distro image.
66

77
## Where to download?
88

@@ -44,8 +44,6 @@ Recommended environment is Ubuntu or similar, with docker and docker-compose ins
4444
- [docker](https://docs.docker.com/engine/install/ubuntu/)
4545
- [docker-compose](https://docs.docker.com/compose/install/)
4646
- [qemu-arm-static](http://packages.debian.org/sid/qemu-user-static)
47-
- [CustomPiOS](https://github.com/guysoft/CustomPiOS)
48-
- [Downloaded Raspbian Image](http://www.raspbian.org/)
4947
- QEMU for emulation
5048
- around ~5gb free space
5149

@@ -86,7 +84,7 @@ make distclean
8684
```bash
8785
fluiddpi/
8886
/emulation - Contains dependencies for emulation testing
89-
/src/image - Contains our base raspbian image
87+
/src/image - Contains our base Raspberry Pi OS image
9088
/src/workspace - Created during build, and output for compiled images
9189
```
9290

src/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Build FluiddPI From within FluiddPI / OctoPi / Raspbian / Debian / Ubuntu
2-
FluiddPI can be built from Debian, Ubuntu, Raspbian, OctoPi, or even FluiddPI. Build requires about 5 GB of free space available. You can build it by issuing the following commands:
1+
Build FluiddPI From within FluiddPI / OctoPi / Raspberry Pi OS / Debian / Ubuntu
2+
FluiddPI can be built from Debian, Ubuntu, Raspberry Pi OS, OctoPi, or even FluiddPI. Build requires about 5 GB of free space available. You can build it by issuing the following commands:
33

44
sudo apt-get install gawk util-linux qemu-user-static git p7zip-full python3
55

src/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export DIST_NAME=FluiddPI
22
export DIST_VERSION=0.4.0
33
export BASE_IMAGE_ENLARGEROOT=2500
44
export BASE_IMAGE_RESIZEROOT=500
5-
export MODULES="base(network,raspicam,klipper,moonraker,fluidd,mjpgstreamer,password-for-sudo)"
5+
export MODULES="base,releaseinfochange(network,raspicam,klipper,moonraker,fluidd,mjpgstreamer,password-for-sudo)"

src/image/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Place zipped Rasbian image here.
22

33
If not otherwise specified, the build script will always use the most
4-
recent zip file matching the file name pattern "*-raspbian.zip" located
4+
recent zip file matching the file name pattern "*.zip" located
55
here.

src/modules/klipper/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[ -n "$KLIPPER_SRC_DIR" ] || KLIPPER_SRC_DIR=/home/pi/klipper
22
[ -n "$KLIPPER_PYTHON_DIR" ] || KLIPPER_PYTHON_DIR=/home/pi/klippy-env
33

4-
[ -n "$KLIPPER_REPO_SHIP" ] || KLIPPER_REPO_SHIP=https://github.com/KevinOConnor/klipper.git
4+
[ -n "$KLIPPER_REPO_SHIP" ] || KLIPPER_REPO_SHIP=https://github.com/Klipper3d/klipper.git
55
[ -n "$KLIPPER_REPO_BRANCH" ] || KLIPPER_REPO_BRANCH=master

src/modules/klipper/start_chroot_script

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ apt update
2222
apt install wget git gpiod -y
2323

2424
# Packages for python cffi
25-
apt install python-virtualenv virtualenv python-dev libffi-dev build-essential -y
25+
apt install virtualenv python-dev libffi-dev build-essential -y
2626

2727
# kconfig requirements
2828
apt install libncurses-dev -y
@@ -33,7 +33,7 @@ apt install libusb-dev -y
3333
# AVR chip installation and building
3434
apt install avrdude gcc-avr binutils-avr avr-libc -y
3535
apt install stm32flash dfu-util libnewlib-arm-none-eabi -y
36-
apt install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0 -y
36+
apt install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0-0 -y
3737

3838
#Make sure user pi has access to serial ports
3939
usermod -a -G tty pi

src/modules/mjpgstreamer/start_chroot_script

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ install_cleanup_trap
1616
unpack /filesystem/home/pi /home/pi pi
1717

1818
apt update
19-
apt install -y --allow-downgrades git cmake=3.13.4-1 cmake-data=3.13.4-1
19+
apt install -y --allow-downgrades git cmake cmake-data
2020
cd /home/pi
2121
#mjpg-streamer
2222
if [ "$MJPGSTREAMER_INCLUDE_MJPGSTREAMER" == "yes" ]
2323
then
2424
echo "--- Installing mjpg-streamer"
2525
if [ $( is_in_apt libjpeg62-turbo-dev ) -eq 1 ]; then
2626
apt-get -y --force-yes install libjpeg62-turbo-dev
27-
elif [ $( is_in_apt libjpeg8-dev ) -eq 1 ]; then
27+
elif [ $( is_in_apt libjpeg8-dev ) -eq 1 ]; then
2828
apt-get -y --force-yes install libjpeg8-dev
2929
fi
30-
30+
3131
apt-get -y --allow-downgrades --allow-remove-essential --allow-change-held-packages --no-install-recommends install imagemagick ffmpeg libv4l-dev
3232
gitclone MJPGSTREAMER_MJPGSTREAMER_REPO mjpg-streamer
3333
pushd mjpg-streamer

0 commit comments

Comments
 (0)