Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
295 commits
Select commit Hold shift + click to select a range
f271ce2
Added PIGEN_DOCKER_OPTS to build-docker.sh (#521)
Claudenw Jun 16, 2021
4ebe549
Update Beginner's Guide download link
XECDesign Jun 17, 2021
54e1bb4
Added simple catch for default case in which PIGEN_DOCKER_OPTS is uns…
DBongiorno-CG Jun 17, 2021
d562f2a
Fix: update dependencies (#526)
fisiel Jun 22, 2021
f9d44ed
Copy debootstrap.log on failure
XECDesign Jun 22, 2021
42bbe02
Fix broken imagetool.sh --mount (#529)
bbinet Jun 24, 2021
ff1e8b1
Remove deprecated elevator key from cmdline (#535)
MichaIng Sep 1, 2021
f6048c7
Update 07-resize-init.diff
XECDesign Sep 1, 2021
029f258
Don't check for binfmt_misc on arm platforms
kormoc Dec 20, 2020
2f12cf9
Remove IMG_DATE from work directories
XECDesign Sep 20, 2021
a8596e0
Use sync mode when running 'kpartx -a'
Josh798 Oct 5, 2021
d9b4a4a
Switch to bullseye
XECDesign Oct 4, 2021
b23d0b1
Use raspi-config to disable predictable network interface names
XECDesign Oct 5, 2021
7c45f4e
stage3: install libcamera-tools and libcamera-apps
XECDesign Oct 5, 2021
456aa2e
bootstrap: do not install the info package
XECDesign Oct 5, 2021
d0eed3b
Update config.txt
XECDesign Oct 5, 2021
ac246e3
Use raspi-config to toggle boot_wait
XECDesign Oct 5, 2021
5a4b7ec
Update release notes
XECDesign Oct 5, 2021
b542f68
stage2: install python-is-python3
XECDesign Oct 7, 2021
93beb9f
stage2: install libcamera-apps-lite
XECDesign Oct 15, 2021
6d36377
Automatically load overlays for detected DSI displays
XECDesign Oct 29, 2021
85bc296
Update release notes
XECDesign Oct 29, 2021
288b21f
Update release notes
XECDesign Oct 29, 2021
68fee34
Do not use qcow2 images by default
XECDesign Nov 8, 2021
1e0c206
Fix imagetool example
marcone Nov 7, 2021
2798307
Update README.md
myxxmikeyxx Nov 10, 2021
9e52285
Remove omxplayer
XECDesign Nov 10, 2021
6117b9b
Add user to render group
XECDesign Nov 12, 2021
69cd279
Update chromium install
XECDesign Dec 2, 2021
3fb5442
Update release notes
XECDesign Dec 6, 2021
351024d
stage2: Install udisks2
XECDesign Dec 6, 2021
f04a414
Install mkvtoolnix for mkvmerge
XECDesign Dec 22, 2021
786af7c
stage3: install gnome-keyring
XECDesign Dec 22, 2021
23f75d6
Update release notes
XECDesign Jan 10, 2022
cc8f695
Add 7z and zip support
XECDesign Jan 12, 2022
231487d
Use trusted.gpg.d instead of apt-key
XECDesign Jan 13, 2022
6d2d36e
Don't try to use qemu-debootstrap
XECDesign Jan 14, 2022
40f67ce
Install ca-certificates during bootstrap
XECDesign Jan 14, 2022
f01430c
Update release notes
XECDesign Jan 20, 2022
0b4874f
Fix docker build with debian bullseye image
simonliedl Jan 19, 2022
c393ef1
Strip trailing spaces
XECDesign Feb 2, 2022
8862e4d
Add check and warning for a space presence in the base path
gromain Feb 2, 2022
7248200
Add gpg dependency
bwisn Feb 1, 2022
b3f6852
Update release notes
XECDesign Feb 3, 2022
c63a3ae
fix dash in README
Feb 16, 2022
b1d54c8
Provide information to build the 64 bit image in the README (#596)
gromain Feb 22, 2022
b2bd87c
Add more binfmt errors and hints to README
Feb 22, 2022
1ad53be
Add flush option to boot partition
XECDesign Feb 23, 2022
c5a906b
Fix whitespace
XECDesign Feb 23, 2022
a120c41
Fix fstab flush option
pelwell Feb 28, 2022
5d044ba
Addition of a `DEPLOY_COMPRESSION` option to the configuration (#592)
gromain Mar 1, 2022
95ac3cf
Remove default password
XECDesign Mar 18, 2022
b0316ae
Enable userconf-pi on first boot
XECDesign Mar 18, 2022
09ebc77
stage4: Install rpi-imager
XECDesign Mar 21, 2022
1b635da
stage4: Install rpi-wayland
XECDesign Mar 21, 2022
f1f6722
Update release notes
XECDesign Mar 28, 2022
f651a43
Update release notes
XECDesign Mar 29, 2022
226b479
stage1: install systemd-timesyncd
XECDesign Apr 4, 2022
3385618
Update release notes
XECDesign Apr 8, 2022
01b2432
Create a `DISABLE_FIRST_BOOT_USER_RENAME` flag to be set in config (#…
gromain Jun 17, 2022
eb82321
Prevent install of OpenJDK 11
XECDesign Apr 20, 2022
d3105c6
Use unbundled BlueJ variant
XECDesign Apr 20, 2022
00da851
Adjust partition formatting and mount options
XECDesign May 4, 2022
288a0a6
Update release notes
XECDesign May 4, 2022
4de913c
Modify 010_pi-nopasswd to match FIRST_USER_NAME
XECDesign Jun 14, 2022
db3cd43
stage2: Install NetworkManager
XECDesign Aug 9, 2022
68ddb44
Use raspi-config to set WPA_COUNTRY
XECDesign Aug 19, 2022
d53c4e5
Default to dhcpcd for now
XECDesign Aug 19, 2022
69cd410
Install picamera2
XECDesign Aug 30, 2022
ec643eb
Update release notes
XECDesign Aug 31, 2022
67491f1
Install 'file'
XECDesign Sep 1, 2022
7206ab1
Switch to sys-mods' firstboot script
XECDesign Sep 1, 2022
6625549
Update release notes
XECDesign Sep 6, 2022
c0cddb7
Update release notes
XECDesign Sep 7, 2022
cb26ff3
nodered is no longer included in full images
XECDesign Sep 14, 2022
59886d8
Update release notes
XECDesign Sep 15, 2022
8a42abc
Update release notes
XECDesign Sep 21, 2022
6a61be9
Disable first run wizard if DISABLE_FIRST_BOOT_USER_RENAME is set
XECDesign Sep 22, 2022
6b8e412
Update release notes
XECDesign Sep 26, 2022
4da0392
Update README.md document WPA_COUNTRY Code format (#636)
kralo Oct 3, 2022
f00b722
apt/retries: specify option from the Acquire group (#638)
kralo Oct 14, 2022
47e34ef
stage2: pre-install kms++-utils
XECDesign Nov 1, 2022
549681f
Updates to avoid common pitfalls when changing the RELEASE variable
XECDesign Nov 8, 2022
c3083ec
Add parameter to keep cap_setfcap
XECDesign Nov 8, 2022
1d13a29
use a single partitioned loop device (#641)
rfc6919 Nov 11, 2022
05081aa
Fix apt gpg key install
XECDesign Feb 8, 2023
5d2c6f3
export-image: change boot partition lable to 'bootfs'
XECDesign Feb 14, 2023
f2d3855
Update release notes
XECDesign Feb 14, 2023
cf40e4b
Check that docker is not set up in rootless mode (#679)
stefanb2 Mar 27, 2023
0db41e3
Ensure that deploy is always owned by user (#680)
stefanb2 Mar 27, 2023
b8437a7
DRY removal for docker run command line (#686)
stefanb2 Mar 28, 2023
4e92753
Use tmpfs for chroot /run and /tmp
XECDesign Mar 29, 2023
6dc45a8
Register binfmt_misc entry for docker build (#685)
moh53n Apr 3, 2023
9249e14
Copy container log to deploy (#688)
stefanb2 Apr 3, 2023
47eee1f
Update release notes
XECDesign Apr 25, 2023
01d24ef
Skip binfmt_misc register when unnecessary (#693)
stefanb2 May 9, 2023
446f3e3
Adds call to mknod if loop dev does not exist after call to `losetup …
bamartin125 Aug 17, 2023
ed68013
fix: support bash v3 by removing array usage (#705)
reubenmiller Sep 25, 2023
6aca615
Switch to Bookworm
XECDesign Sep 7, 2023
9d9d063
Remove/replace obsolete packages
XECDesign Sep 7, 2023
a524fe4
stage3: replace qpdfview with evince
XECDesign Sep 7, 2023
43c49d8
stage3: install eom
XECDesign Sep 7, 2023
9fc1385
stage3: install Firefox
XECDesign Sep 7, 2023
8dd23cb
Remove dhcpcd and associated options
XECDesign Sep 7, 2023
4a4a66e
export-image: auto-remove and purge packages on dist-upgrade
XECDesign Sep 7, 2023
88ac523
Enable Wayland by default
XECDesign Sep 7, 2023
c856800
Switch to new kernel and firmware packages
XECDesign Sep 7, 2023
64b498b
Don't generate NOOBS files
XECDesign Sep 7, 2023
188c155
Migrate to raspberrypi.com
XECDesign Sep 8, 2023
e6dd7ca
stage2: remove rng-tools
XECDesign Sep 12, 2023
574d3e7
stage0: only fetch armhf packages from Raspbian
XECDesign Sep 13, 2023
d7dde0c
stage5: disable greenfoot and bluej as they don't seem to work
XECDesign Sep 7, 2023
6051f1d
stage4: remove pimoroni packages for now
XECDesign Sep 13, 2023
3a6342b
stage0: install kernel headers
XECDesign Sep 14, 2023
7ae1a26
stage4: ignore power key and let raspberrypi-ui-mods handle it
XECDesign Sep 14, 2023
c4f98a8
Move picamera2 to stage3 - PyAV takes up too much space for lite images
XECDesign Aug 23, 2023
5b15e14
stage2: install GPIO libraries
XECDesign Sep 25, 2023
dc6a3c1
stage2: install python3-smbus2
XECDesign Sep 26, 2023
a0b8868
Update release notes
XECDesign Sep 27, 2023
fb56ad5
stage5: match rp-prefapps package list
XECDesign Oct 3, 2023
663401d
README.md: default release is bookworm (#715)
marcone Oct 16, 2023
0ef867e
Fix build-docker.sh CONTINUE=1 mode (#716)
stefanb2 Oct 17, 2023
d966897
README.md: add PI_GEN_RELEASE (#720)
stefanb2 Oct 23, 2023
19acff0
Fix typo (#725)
brevalferrari Nov 22, 2023
95c9fa8
stage2: include gpiod binary tools
XECDesign Nov 27, 2023
5b22a55
Update release notes
XECDesign Nov 27, 2023
193bae2
Remove obsolete packages
XECDesign Nov 28, 2023
399a5c2
stage2: install python3-venv
XECDesign Nov 29, 2023
ae81834
export-image: Add issue.txt symlink
XECDesign Nov 29, 2023
e07ee9b
Update release notes
XECDesign Nov 29, 2023
02b371d
stage4: Update beginner's guide URL, assuming the latest version is a…
XECDesign Nov 29, 2023
1377e90
Ensure loop device partition nodes are created (#741)
acinonyx Jan 4, 2024
c5fdb01
Update release notes
XECDesign Dec 8, 2023
ec04064
stage0: Only disable initramfs updates if update-initramfs.conf exists
XECDesign Dec 18, 2023
a143895
stage0: Check whether foreign architecture is needed
XECDesign Dec 18, 2023
30fa760
stage0: prevent kernel packages from creating useless symlinks
XECDesign Jan 17, 2024
e682f62
stage3: add vulkan support
XECDesign Jan 17, 2024
a125344
Remove cmdline.txt and config.txt symlinks
XECDesign Jan 22, 2024
0425477
stage2: rc.local drop-in no longer required, since Debian ships its o…
XECDesign Jan 23, 2024
c20ce09
export-image: make sure initramfs is created
XECDesign Jan 30, 2024
69037ce
Update README.md (#755)
tdewey-rpi Feb 19, 2024
502e5fa
Remove QCOW2 build mechanism (#648)
mmmspatz Feb 23, 2024
94cbf47
Create .gitlab-ci.yml file
XECDesign Feb 14, 2024
c029146
ensure_loopdev_partitions: let udev settle
XECDesign Feb 15, 2024
82e5642
README.md: Add xxd dependency (#750)
ckuhtz Feb 26, 2024
1ce1f1c
Replace libcamera-apps with rpicam-apps
XECDesign Mar 4, 2024
57c641a
Update release notes
XECDesign Mar 7, 2024
4ce1f1f
stage3: Remove fbturbo
XECDesign Mar 11, 2024
e8d8670
Update release notes
XECDesign Mar 11, 2024
99e1980
stage4: remove disable-pwr-button substage
XECDesign Mar 13, 2024
d92bef1
stage4: add meson
XECDesign Mar 13, 2024
b829737
Update release notes
XECDesign Mar 13, 2024
3b5e214
export-image: format boot partition with appropriate FAT size
XECDesign Mar 13, 2024
af5a88a
stage4: add openocd
XECDesign Mar 13, 2024
1109642
Update release notes
XECDesign Mar 15, 2024
7ce2538
Revert "Added docker-compose.yml for easy apt-cacher-ng startup"
XECDesign Apr 9, 2024
c70f96f
stage5: smartsim has been removed from recommended apps
XECDesign Apr 9, 2024
165e960
Fix keyboard configuration
XECDesign Apr 18, 2024
5780b1f
export stage list
Apr 25, 2024
f1c166a
export-image: run du with -x to avoid crossing filesystem boundaries
XECDesign Apr 29, 2024
e95e00f
Set a default IMG_NAME
XECDesign May 13, 2024
d87f764
build.sh: Warn user of unsupported build environment architecture and…
XECDesign May 13, 2024
9917c86
README.md: Consistent formatting of 'Default' values
XECDesign May 13, 2024
d790fed
Compare mount output using base of dirname (#771)
pevsonic May 15, 2024
fb48183
Expand trap cleanup function (#773)
tdewey-rpi May 15, 2024
75fe47c
Increase default swap size to 200
XECDesign May 27, 2024
07ab464
stage4: Pre-install labwc
XECDesign Jun 10, 2024
9b17be9
Update release notes
XECDesign Jun 10, 2024
ca5eb62
Enable DWC2 host mode support for CM5 by default
XECDesign Jun 24, 2024
0b115f3
stage4: Pre-install rpi-connect
XECDesign Jun 19, 2024
dca93d2
README: add specific stage build for Docker (#777)
beuss Jul 9, 2024
21e8e54
export-image: generate sbom file if syft is available
XECDesign Jul 23, 2024
7fe9ae5
stage3: Switch chromium package and remove unnecessary steps
XECDesign Aug 27, 2024
40a5c1c
stage3: switch to labwc by default
XECDesign Sep 11, 2024
a766e71
stage3: switch from arandr to raindrop
XECDesign Sep 11, 2024
674c30e
Replace python3-rpi.gpio with python3-rpi-lgpio
XECDesign Sep 18, 2024
8f88b83
stage4: install squeekboard
XECDesign Sep 23, 2024
9e65ea7
Update release notes
XECDesign Sep 26, 2024
f165f8a
Update release notes
XECDesign Oct 28, 2024
9dfbb15
Update release notes
XECDesign Oct 28, 2024
b8e497c
Allow export image customisation (#801)
learmj Oct 29, 2024
2aa7133
Create WORK_DIR earlier
XECDesign Oct 29, 2024
df6d0e2
Add kernel page size check
XECDesign Oct 29, 2024
1baee51
Improve PAGESIZE check and recommendation
XECDesign Oct 30, 2024
536dd58
README.md: Clarify early on that armhf and arm64 images should be bui…
XECDesign Oct 30, 2024
9dbd882
README.md: Fix TIMEZONE_DEFAULT description
XECDesign Oct 30, 2024
b91ab52
README.md: Remove obsolete warning
XECDesign Oct 30, 2024
3490307
Including kolibri-server in the image and setting everything up
jredrejo Nov 15, 2019
476d7ab
Scalfolding hostapd configuration
jredrejo Nov 22, 2019
b2f86cb
Finished first boot tasks
jredrejo Dec 2, 2019
382c9f7
Beginning documentation
jredrejo Dec 2, 2019
b8d19b3
some doc improvements
jredrejo Dec 2, 2019
378bba5
Change repo to kolibri-proposed to build the image
jredrejo Dec 5, 2019
56166f6
Make build-docker bulletproof
jredrejo Dec 10, 2019
f66fe91
More info on connectivity
jredrejo Dec 12, 2019
f8154b1
First attempt at creating pipeline
DXCanas Nov 28, 2019
2794afc
Downloading buildkite artifact for installation
DXCanas Dec 11, 2019
cc0d01c
Adding ability to preserve existing container
DXCanas Dec 11, 2019
9741ae8
Always preserving container.
DXCanas Dec 11, 2019
aad5c6a
Adding ability to set custom docker options.
DXCanas Dec 11, 2019
2f0c10e
Installing custom debian package.
DXCanas Dec 11, 2019
fcc7e4c
Running script in local build script.
DXCanas Dec 11, 2019
9249f2d
Add upload step to build script.
DXCanas Dec 12, 2019
a3d7bcf
Fixing conditional logic.
DXCanas Dec 12, 2019
876cb0d
Editing deb file installation
DXCanas Dec 12, 2019
ccef9c3
Using on_chroot function to install debian package
DXCanas Dec 13, 2019
cd12227
Coping dist to chroot for installation
DXCanas Dec 14, 2019
358c1eb
Removing docker volume mounting
DXCanas Dec 14, 2019
1eeba26
Adding upload triggers
DXCanas Dec 14, 2019
9ae7cb2
Fixing directory reference
DXCanas Dec 14, 2019
2134c18
fix chroot with dpkg
jredrejo Dec 16, 2019
1a80947
Ensure the dir is not moved inside an existing dist dir
jredrejo Dec 16, 2019
026d3a8
Adding block step so that pi image only builds when it's a tagged commit
DXCanas Dec 14, 2019
593a1b3
Revert "Adding block step so that pi image only builds when it's a ta…
DXCanas Dec 17, 2019
9f32efc
Move installation of packages to previous stages when possible
jredrejo Dec 19, 2019
55fc0f1
Adding block step so that pi image only builds when it's a tagged commit
DXCanas Dec 19, 2019
f3dbe8c
Revert "Adding block step so that pi image only builds when it's a ta…
DXCanas Dec 20, 2019
0aae0ec
Clear dist directory before moving files there.
DXCanas Dec 29, 2019
26e1664
Adding debug flag so that we can see whats running in bk
DXCanas Dec 29, 2019
2b2526b
Accounting for multiple images being generated.
DXCanas Dec 29, 2019
02d72b3
Uploading all images that match, rather than more complex scripting.
DXCanas Dec 29, 2019
2943df9
Automatically blocking build to save time and resources
DXCanas Feb 21, 2020
b0c434e
Stop retaining container.
DXCanas Mar 7, 2020
cf44ebb
Conditionalize autblock to only happen with triggered builds.
DXCanas Mar 7, 2020
72d934a
Adding bash flags in hopes that builds stop failing silently
DXCanas May 27, 2020
5090668
Creating dist, so that script doesn't fail during triggered builds
DXCanas May 27, 2020
999b06e
Specifying docker requierement for bk agent
DXCanas May 27, 2020
4eab8a6
Using kolibri release conditional to determine when to block builds
DXCanas Jun 24, 2020
83cd22d
Preparation of the raspberry image generation for Kolibri > 0.15
Dec 1, 2021
e1d15d4
Add github action for building the pi image.
rtibbles Mar 8, 2022
171204a
Create dependabot.yml
rtibbles May 1, 2023
a79f138
Bump actions/download-artifact from 2 to 3
dependabot[bot] May 1, 2023
512ea17
Bump actions/checkout from 2 to 3
dependabot[bot] May 1, 2023
eabfd64
Bump actions/upload-artifact from 2 to 3
dependabot[bot] May 1, 2023
8cc62f4
Update dependabot.yml
rtibbles Jan 20, 2024
6ca43a7
Bump the github group with 3 updates
dependabot[bot] Jan 20, 2024
66e68c6
Change the way deb files are downloaded
Feb 9, 2024
fc67898
Add asset building to PRs.
rtibbles Apr 2, 2024
7971978
Update build to rename image and zip file to include more specificity…
rtibbles Apr 2, 2024
e1d7107
Changes to work with Debian 12
jredrejo Nov 7, 2024
39a65e6
do not ask user password on boot
jredrejo Nov 7, 2024
8e6e275
Change default repository for kolibri from bionic to noble
jredrejo Nov 7, 2024
98c8bac
update Readme from upstream pi-gen
jredrejo Nov 7, 2024
f676706
Remove deprecated use of set-output
rtibbles Nov 6, 2024
e2ba148
Merge branch 'master' into rebase_upstream
jredrejo Nov 7, 2024
1a6a1d9
Change loop device size to avoid disk space problems
jredrejo Nov 12, 2024
2806c78
Remove old repo
jredrejo Nov 12, 2024
e23cb82
setup qemu and arm build
jredrejo Nov 12, 2024
85198d0
Remove buildkite
jredrejo Nov 12, 2024
4105a6e
update Makefile to use new image name schema
jredrejo Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .buildkite/build.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .buildkite/pipeline.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/build_zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ jobs:
with:
repository: learningequality/pi-gen
ref: ${{ inputs.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Download the debfile from URL and install
if: ${{ inputs.deb-url }}
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Download the debfile from URL and install
if: ${{ inputs.deb-url }}
run: make get-deb deb=${{ inputs.deb-url }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ dist/*
postrun.sh
.pc
*-pc
apt-cacher-ng/
4 changes: 4 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include:
- project: serge/pi-gen
ref: ci
file: 'pi-gen.yml'
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM i386/debian:buster
LABEL build=pigen
ENV DEBIAN_FRONTEND noninteractive
FROM i386/debian:bullseye
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update && \
apt-get -y install \
apt-get -y install --no-install-recommends \
git vim parted \
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\
libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc \
binfmt-support ca-certificates fdisk gpg pigz arch-test \
&& rm -rf /var/lib/apt/lists/*

COPY --from=multiarch/qemu-user-static:latest /usr/bin/qemu-arm-static /usr/bin/

COPY . /pi-gen/

VOLUME [ "/pi-gen/work", "/pi-gen/deploy"]
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ get-deb: clean-deb
fi

rename-zip:
# Get current date in YYYY-MM-DD format
$(eval DATE := $(shell date +%Y-%m-%d))
# Unzip the file so we can rename the image file
unzip -o deploy/image_Kolibri-lite.zip -d deploy
unzip -o deploy/image_$(DATE)-Kolibri-lite.zip -d deploy
# Clean up the original zip file
rm deploy/image_Kolibri-lite.zip
rm deploy/image_$(DATE)-Kolibri-lite.zip
# Get the version based on the debian file name kolibri_<version>-0ubuntu1_all.deb
$(eval VERSION=$(shell ls ${DIST_DIR} | grep kolibri | sed 's/kolibri_\(.*\)-0ubuntu1_all.deb/\1/'))
# Rename the image file to include the version
mv deploy/Kolibri-lite.img deploy/kolibri-pi-image-$(VERSION).img
mv deploy/$(DATE)-Kolibri-lite.img deploy/kolibri-pi-image-$(VERSION).img
# Zip the image file back up
zip -j deploy/kolibri-pi-image-$(VERSION).zip deploy/kolibri-pi-image-$(VERSION).img
# Clean up the extracted image file
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
5. Enjoy it!


This image sets up the Raspberry Pi to provide wifi using the essid `kolibri` without any password.

After following the above steps the Raspberry Pi will provide a wifi network named under the essid `kolibri` without any password.

After connecting a device to this wifi network provided by the Raspberry, you can open the url http://10.10.10.10 in a browser will allow you enjoy all the features of a working Kolibri server.
After connecting a device to this wifi network provided by the Raspberry, you can open the url http://10.10.10.10 in a browser will allow you enjoy all the features of a working Kolibri server.

By default the server does not have Internet access. To add content channels to Kolibri you can either connect an usb disk with content or plug and ethernet cable with Internet access.

In case you want to login into the server, the user is `pi` and the password is `kolibrifly`

VERY IMPORTANT: After installing the image, a ssh server is installed with a known password. CHANGE IT in case you want to connect it to Internet or be used by people who could mess it up.
**VERY IMPORTANT NOTICE**: After installing the image, a ssh server is installed with a known password. **CHANGE IT** in case you want to connect it to Internet or be used by people who could mess it up.


Expand All @@ -41,6 +43,6 @@ Using the `raspi-config` script we'll

- Add options to make the wifi encrypted



## Rebuilding the Kolibri Raspberry Pi image
123 changes: 95 additions & 28 deletions build-docker.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
#!/bin/bash -eu
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#!/usr/bin/env bash
# Note: Avoid usage of arrays as MacOS users have an older version of bash (v3.x) which does not supports arrays
set -eu

DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"

BUILD_OPTS="$*"

DOCKER="docker"
# Allow user to override docker command
DOCKER=${DOCKER:-docker}

if ! ${DOCKER} ps >/dev/null 2>&1; then
DOCKER="sudo docker"
# Ensure that default docker command is not set up in rootless mode
if \
! ${DOCKER} ps >/dev/null 2>&1 || \
${DOCKER} info 2>/dev/null | grep -q rootless \
; then
DOCKER="sudo ${DOCKER}"
fi
if ! ${DOCKER} ps >/dev/null; then
echo "error connecting to docker:"
Expand All @@ -32,7 +40,7 @@ done

# Ensure that the configuration file is an absolute path
if test -x /usr/bin/realpath; then
CONFIG_FILE=$(realpath -s "$CONFIG_FILE")
CONFIG_FILE=$(realpath -s "$CONFIG_FILE" || realpath "$CONFIG_FILE")
fi

# Ensure that the confguration file is present
Expand All @@ -41,12 +49,13 @@ if test -z "${CONFIG_FILE}"; then
exit 1
else
# shellcheck disable=SC1090
source "${CONFIG_FILE}"
source ${CONFIG_FILE}
fi

CONTAINER_NAME=${CONTAINER_NAME:-pigen_work}
CONTINUE=${CONTINUE:-0}
PRESERVE_CONTAINER=${PRESERVE_CONTAINER:-0}
PIGEN_DOCKER_OPTS=${PIGEN_DOCKER_OPTS:-""}

if [ -z "${IMG_NAME}" ]; then
echo "IMG_NAME not set in 'config'" 1>&2
Expand All @@ -73,31 +82,89 @@ fi
# Modify original build-options to allow config file to be mounted in the docker container
BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')"

${DOCKER} build -t pi-gen "${DIR}"
# Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead
case "$(uname -m)" in
x86_64|aarch64)
BASE_IMAGE=i386/debian:bullseye
;;
*)
BASE_IMAGE=debian:bullseye
;;
esac
${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"

if [ "${CONTAINER_EXISTS}" != "" ]; then
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM
time ${DOCKER} run --rm --privileged \
--volume "${CONFIG_FILE}":/config:ro \
-e "GIT_HASH=${GIT_HASH}" \
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
pi-gen \
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static || true &&
cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
rsync -av work/*/build.log deploy/" &
wait "$!"
DOCKER_CMDLINE_NAME="${CONTAINER_NAME}_cont"
DOCKER_CMDLINE_PRE="--rm"
DOCKER_CMDLINE_POST="--volumes-from=${CONTAINER_NAME}"
else
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}' SIGINT SIGTERM
time ${DOCKER} run --name "${CONTAINER_NAME}" --privileged \
--volume "${CONFIG_FILE}":/config:ro \
-e "GIT_HASH=${GIT_HASH}" \
pi-gen \
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static || true &&
cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
rsync -av work/*/build.log deploy/" &
wait "$!"
DOCKER_CMDLINE_NAME="${CONTAINER_NAME}"
DOCKER_CMDLINE_PRE=""
DOCKER_CMDLINE_POST=""
fi

# Check if binfmt_misc is required
binfmt_misc_required=1
case $(uname -m) in
aarch64)
binfmt_misc_required=0
;;
arm*)
binfmt_misc_required=0
;;
esac

# Check if qemu-arm-static and /proc/sys/fs/binfmt_misc are present
if [[ "${binfmt_misc_required}" == "1" ]]; then
if ! qemu_arm=$(which qemu-arm-static) ; then
echo "qemu-arm-static not found (please install qemu-user-static)"
exit 1
fi
if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
echo "binfmt_misc required but not mounted, trying to mount it..."
if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then
echo "mounting binfmt_misc failed"
exit 1
fi
echo "binfmt_misc mounted"
fi
if ! grep -q "^interpreter ${qemu_arm}" /proc/sys/fs/binfmt_misc/qemu-arm* ; then
# Register qemu-arm for binfmt_misc
reg="echo ':qemu-arm-rpi:M::"\
"\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:"\
"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:"\
"${qemu_arm}:F' > /proc/sys/fs/binfmt_misc/register"
echo "Registering qemu-arm for binfmt_misc..."
sudo bash -c "${reg}" 2>/dev/null || true
fi
fi

trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${DOCKER_CMDLINE_NAME}' SIGINT SIGTERM
time ${DOCKER} run \
$DOCKER_CMDLINE_PRE \
--name "${DOCKER_CMDLINE_NAME}" \
--privileged \
${PIGEN_DOCKER_OPTS} \
--volume "${CONFIG_FILE}":/config:ro \
-e "GIT_HASH=${GIT_HASH}" \
$DOCKER_CMDLINE_POST \
pi-gen \
bash -e -o pipefail -c "
dpkg-reconfigure qemu-user-static || true &&
# binfmt_misc is sometimes not mounted with debian bullseye image
(mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) &&
cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
rsync -av work/*/build.log deploy/
" &
wait "$!"

# Ensure that deploy/ is always owned by calling user
echo "copying results from deploy/"
${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy .
${DOCKER} cp "${CONTAINER_NAME}":/pi-gen/deploy - | tar -xf -

echo "copying log from container ${CONTAINER_NAME} to deploy/"
${DOCKER} logs --timestamps "${CONTAINER_NAME}" &>deploy/build-docker.log

ls -lah deploy

# cleanup
Expand Down
Loading
Loading