Skip to content

Commit

Permalink
Release Version 6.0 (#64)
Browse files Browse the repository at this point in the history
* initial updates

* disable X86 SIMD for uhd

* add dependencies to hackrf

* replace swig with pybind

* add gnuradio 3.9 dependencies

* Install pybind11 via pip

* compile pybind11 from source

* fix volk build script perm

* ignore apt packages for dump1090

* fix dpkg ignore dependencies

* remove dump1090

* update foxtelem

* update foxtelem filename

* upgrade to bullseye

* change i386 to arm32v7 docker

* revert arch detection

* use native docker image to build

* Add missing dependency.

* fix dependency

* add dependency

* Fix dependencies.

* add raspi-config package

* update packages to bullseye

* add missing packages

* remove pip install of ninja and cmake

* set uhd arch to armhf

* nuke python2

* change armhf to armv6-m

* add hardware float to the armv6 flags

* tweak armv6 build

* disable neon for armv6

* fix rtlsdr-airband build

* Add multicore compression.

* First batch of new software for v6.0.

* Remove uneeeded dependencies.

* Second batch of new applications for v6.0.

* Third batch of new applications for v6.0.

* Forth batch of new applications for v6.0.

* Fix SDRplay build script.

* Fix char escape.

* Fix LeanDVB build.

* Fix QtDAB build.

* Add more desktop shortcuts.

* final fixes
  • Loading branch information
luigifcruz committed Dec 31, 2021
1 parent fcf6fdd commit 0cce144
Show file tree
Hide file tree
Showing 129 changed files with 596 additions and 375 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ RUN apt-get -y update && \
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 bc\
binfmt-support ca-certificates qemu-utils kpartx \
libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\
binfmt-support ca-certificates qemu-utils kpartx util-linux fdisk \
&& rm -rf /var/lib/apt/lists/*

COPY . /pi-gen/
Expand Down
14 changes: 14 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Copyright (c) 2015 Raspberry Pi (Trading) Ltd.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ List of pre-installed software:
- [gpredict](https://github.com/csete/gpredict)
- [EliasOenal/multimon-ng](https://github.com/EliasOenal/multimon-ng)
- [pabr/leansdr](https://github.com/pabr/leansdr)
- [QtDAB](https://github.com/JvanKatwijk/qt-dab)
- [IIO Oscilloscope](https://github.com/analogdevicesinc/iio-oscilloscope)
- [RTL-AIS](https://github.com/dgiardini/rtl-ais)
- [Inspectrum](https://github.com/miek/inspectrum)
- [WSJT-X](https://physics.princeton.edu/pulsar/k1jt/wsjtx.html)
- [nrsc5](https://github.com/theori-io/nrsc5)
- [xwxapt](https://www.qsl.net/5b4az/pkg/apt/xwxapt/xwxapt.html)
- [GLRPT](https://github.com/dvdesolve/glrpt)
- [SDR++](https://github.com/AlexandreRouma/SDRPlusPlus)

### Radios
We currently support the following SDR:
Expand All @@ -50,6 +59,7 @@ We currently support the following SDR:
- [Airspy HF+](https://airspy.com/airspy-hf-plus/)
- [HackRF One](https://greatscottgadgets.com/hackrf/one/)
- [USRP](https://www.ettus.com/products/)
- [SDRplay](https://www.sdrplay.com/)

## Getting started

Expand Down
20 changes: 4 additions & 16 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ 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 @@ -74,22 +75,7 @@ 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@')"

# 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)
case "$(uname -m)" in
aarch64)
BASE_IMAGE=arm32v7/debian:buster
;;
*)
BASE_IMAGE=i386/debian:buster
;;
esac
;;
*)
BASE_IMAGE=debian:buster
;;
esac
BASE_IMAGE=debian:buster
${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"

if [ "${CONTAINER_EXISTS}" != "" ]; then
Expand All @@ -98,6 +84,7 @@ if [ "${CONTAINER_EXISTS}" != "" ]; then
--cap-add=ALL \
-v /dev:/dev \
-v /lib/modules:/lib/modules \
${PIGEN_DOCKER_OPTS} \
--volume "${CONFIG_FILE}":/config:ro \
-e "GIT_HASH=${GIT_HASH}" \
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
Expand All @@ -112,6 +99,7 @@ else
--cap-add=ALL \
-v /dev:/dev \
-v /lib/modules:/lib/modules \
${PIGEN_DOCKER_OPTS} \
--volume "${CONFIG_FILE}":/config:ro \
-e "GIT_HASH=${GIT_HASH}" \
pi-gen \
Expand Down
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ run_stage(){
STAGE_WORK_DIR="${WORK_DIR}/${STAGE}"
ROOTFS_DIR="${STAGE_WORK_DIR}"/rootfs

if [ "${USE_QCOW2}" = "1" ]; then
if [ "${USE_QCOW2}" = "1" ]; then
if [ ! -f SKIP ]; then
load_qimage
fi
Expand All @@ -121,7 +121,7 @@ run_stage(){
unmount "${WORK_DIR}/${STAGE}"
fi
fi

if [ ! -f SKIP_IMAGES ]; then
if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ]; then
EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}"
Expand Down Expand Up @@ -219,7 +219,7 @@ export TARGET_HOSTNAME=${TARGET_HOSTNAME:-raspberrypi}

export FIRST_USER_NAME=${FIRST_USER_NAME:-pi}
export FIRST_USER_PASS=${FIRST_USER_PASS:-raspberry}
export RELEASE=${RELEASE:-buster}
export RELEASE=${RELEASE:-bullseye}
export WPA_ESSID
export WPA_PASSWORD
export WPA_COUNTRY
Expand Down Expand Up @@ -265,7 +265,7 @@ source "${SCRIPT_DIR}/common"
source "${SCRIPT_DIR}/dependencies_check"

export NO_PRERUN_QCOW2="${NO_PRERUN_QCOW2:-1}"
export USE_QCOW2="${USE_QCOW2:-1}"
export USE_QCOW2="${USE_QCOW2:-0}"
export BASE_QCOW2_SIZE=${BASE_QCOW2_SIZE:-12G}
source "${SCRIPT_DIR}/qcow2_handling"
if [ "${USE_QCOW2}" = "1" ]; then
Expand Down
4 changes: 3 additions & 1 deletion depends
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ zerofree
zip
mkdosfs:dosfstools
capsh:libcap2-bin
bsdtar
bsdtar:libarchive-tools
grep
rsync
xz:xz-utils
Expand All @@ -17,3 +17,5 @@ file
git
lsmod:kmod
bc
qemu-nbd:qemu-utils
kpartx
2 changes: 1 addition & 1 deletion export-image/04-finalise/01-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fi

if [ "${DEPLOY_ZIP}" == "1" ]; then
pushd "${STAGE_WORK_DIR}" > /dev/null
xz -c "$(basename "${IMG_FILE}")" > "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.img.xz"
xz -T16 -c "$(basename "${IMG_FILE}")" > "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.img.xz"
popd > /dev/null
rm -f "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
else
Expand Down
9 changes: 9 additions & 0 deletions inspectrum.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Name=Inspectrum
Comment=Inspectrum
Icon=
Exec=inspectrum
Type=Application
Encoding=UTF-8
Terminal=true
Categories=None;
7 changes: 5 additions & 2 deletions scripts/common
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ bootstrap(){
BOOTSTRAP_ARGS+=(--arch armhf)
BOOTSTRAP_ARGS+=(--components "main,contrib,non-free")
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
BOOTSTRAP_ARGS+=(--exclude=info)
BOOTSTRAP_ARGS+=("$@")
printf -v BOOTSTRAP_STR '%q ' "${BOOTSTRAP_ARGS[@]}"

setarch linux32 capsh --drop=cap_setfcap -- -c "'${BOOTSTRAP_CMD}' $BOOTSTRAP_STR" || true

if [ -d "$2/debootstrap" ]; then
rmdir "$2/debootstrap"
if [ -d "$2/debootstrap" ] && ! rmdir "$2/debootstrap"; then
cp "$2/debootstrap/debootstrap.log" "${STAGE_WORK_DIR}"
log "bootstrap failed: please check ${STAGE_WORK_DIR}/debootstrap.log"
return 1
fi
}
export -f bootstrap
Expand Down
25 changes: 20 additions & 5 deletions scripts/dependencies_check
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,26 @@ dependencies_check()
false
fi

# If we're building on a native arm platform, we don't need to check for
# binfmt_misc or require it to be loaded.

if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then
echo "Module binfmt_misc not loaded in host"
echo "Please run:"
echo " sudo modprobe binfmt_misc"
exit 1
binfmt_misc_required=1

case $(uname -m) in
aarch64)
binfmt_misc_required=0
;;
arm*)
binfmt_misc_required=0
;;
esac

if [[ "${binfmt_misc_required}" == "1" ]]; then
if ! grep -q "/proc/sys/fs/binfmt_misc" /proc/mounts; then
echo "Module binfmt_misc not loaded in host"
echo "Please run:"
echo " sudo modprobe binfmt_misc"
exit 1
fi
fi
}
6 changes: 3 additions & 3 deletions scripts/qcow2_handling
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ connect_blkdev() {
init_nbd
qemu-nbd --discard=unmap -c $NBD_DEV "$1"
sync
kpartx -a $NBD_DEV
kpartx -as $NBD_DEV
sync
CURRENT_IMAGE="$1"
}
Expand Down Expand Up @@ -108,7 +108,7 @@ load_qimage() {
254MiB,,83;
EOF
sync
kpartx -a $NBD_DEV
kpartx -as $NBD_DEV
mkdosfs -n boot -F 32 -v $MAP_BOOT_DEV
mkfs.ext4 -L rootfs -O "^huge_file,^metadata_csum,^64bit" $MAP_ROOT_DEV
sync
Expand All @@ -123,7 +123,7 @@ EOF
sync
qemu-nbd --discard=unmap -c $NBD_DEV image-${STAGE}.qcow2
sync
kpartx -a $NBD_DEV
kpartx -as $NBD_DEV
fi

mount -v -t ext4 $MAP_ROOT_DEV "${ROOTFS_DIR}"
Expand Down
1 change: 1 addition & 0 deletions stage0/02-firmware/01-packages
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
raspberrypi-bootloader
raspberrypi-kernel
raspi-config
2 changes: 1 addition & 1 deletion stage1/00-boot-files/files/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait
31 changes: 23 additions & 8 deletions stage1/00-boot-files/files/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
Expand Down Expand Up @@ -56,10 +52,29 @@
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
#dtoverlay=vc4-fkms-v3d
4 changes: 3 additions & 1 deletion stage1/02-net-tweaks/00-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
echo "${TARGET_HOSTNAME}" > "${ROOTFS_DIR}/etc/hostname"
echo "127.0.1.1 ${TARGET_HOSTNAME}" >> "${ROOTFS_DIR}/etc/hosts"

ln -sf /dev/null "${ROOTFS_DIR}/etc/systemd/network/99-default.link"
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_net_names 1
EOF
2 changes: 1 addition & 1 deletion stage1/03-install-packages/00-packages
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libraspberrypi-bin libraspberrypi0 raspi-config
libraspberrypi-bin libraspberrypi0
7 changes: 3 additions & 4 deletions stage2/01-sys-tweaks/00-packages
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ssh less fbset sudo psmisc strace ed ncdu crda
console-setup keyboard-configuration debconf-utils parted unzip
build-essential manpages-dev python bash-completion gdb pkg-config
python-rpi.gpio v4l-utils
python-gpiozero
build-essential manpages-dev bash-completion gdb pkg-config
python-is-python3
python3-rpi.gpio v4l-utils
python3-gpiozero
avahi-daemon
lua5.1
Expand All @@ -26,7 +26,6 @@ policykit-1
ssh-import-id
rng-tools
ethtool
vl805fw
ntfs-3g
pciutils
rpi-eeprom
Expand Down
4 changes: 2 additions & 2 deletions stage2/01-sys-tweaks/00-patches/07-resize-init.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- stage2.orig/rootfs/boot/cmdline.txt
+++ stage2/rootfs/boot/cmdline.txt
@@ -1 +1 @@
-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
+console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
-console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait
+console=serial0,115200 console=tty1 root=ROOTDEV rootfstype=ext4 fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh
7 changes: 4 additions & 3 deletions stage2/02-net-tweaks/01-run.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash -e

install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d"
install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/"

install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"

on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 0
EOF

if [ -v WPA_COUNTRY ]; then
echo "country=${WPA_COUNTRY}" >> "${ROOTFS_DIR}/etc/wpa_supplicant/wpa_supplicant.conf"
fi
Expand Down
3 changes: 0 additions & 3 deletions stage2/02-net-tweaks/files/wait.conf

This file was deleted.

4 changes: 2 additions & 2 deletions stage3/00-install-packages/00-packages
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base gstreamer1.0-plugins-g
qpdfview gtk2-engines alsa-utils
desktop-base
git
omxplayer
raspberrypi-artwork
policykit-1
gvfs
rfkill
Expand All @@ -13,3 +11,5 @@ fonts-droid-fallback
fonts-liberation2
obconf
arandr
libcamera-tools
libcamera-apps
2 changes: 1 addition & 1 deletion stage3/00-install-packages/00-packages-nr
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ mousepad
lxde lxtask menu-xdg
zenity xdg-utils
gvfs-backends gvfs-fuse
lightdm gnome-themes-standard-data gnome-icon-theme
lightdm gnome-themes-standard-data gnome-icon-theme
4 changes: 3 additions & 1 deletion stage3/01-tweaks/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash -e

rm -f "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/wait.conf"
on_chroot << EOF
SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_boot_wait 1
EOF
Loading

0 comments on commit 0cce144

Please sign in to comment.