Compare commits

...
Author SHA1 Message Date
Serge Schneider b71bf31793 Update os.json 2017-11-24 10:12:09 +00:00
Serge Schneider 4b08ad07b1 Update release notes 2017-11-24 10:12:08 +00:00
Serge Schneider aa8731012e Round image size up to nearest 4M block 2017-11-24 10:12:08 +00:00
Serge Schneider 53259b48d3 Remove fonts-arkpandora 2017-11-24 07:10:45 +00:00
Serge Schneider 5c44fc727e stage2: install man-db 2017-11-24 07:10:45 +00:00
Andrew Wedgbury 35994f5d9c Remove /etc/vnc/updateid when finalising 2017-11-22 15:49:37 +00:00
XECDesign 31fcc80953 Fix typo in export-image
Fixes #132
2017-11-07 05:43:01 +00:00
XECDesign 90adfb1551 Label root partition
Fixes #131
2017-11-06 10:53:05 +00:00
Rick 9f2941954f Add caution about WORK_DIR filesystem 2017-09-28 13:40:58 +01:00
Claus Strasburger 52c6748e67 fix docker-in-docker copying when not doing CONTINUE=1 2017-09-21 15:06:11 +01:00
Claus Strasburger 732a87415d Docker-Build enhancements
- don't use any volume mounts anymore to allow using docker-in-docker
(with docker.sock mounted)
- smaller Docker build context by ignoring some files
2017-09-21 12:53:01 +01:00
Serge Schneider 9aa87dbfb4 Fix font packages 2017-09-21 12:45:05 +01:00
Jacen 26fcf59f3f [adding] qemu emulation layout to test images with qemu 2017-09-14 10:12:30 +01:00
16 changed files with 78 additions and 18 deletions
+2
View File
@@ -1,3 +1,5 @@
output/
work/
deploy/
apt-cacher-ng/
.git/objects/*
+6
View File
@@ -61,11 +61,17 @@ The following environment variables are supported:
be built and cached. Note, `WORK_DIR` stores a complete copy of the target
system for each build stage, amounting to tens of gigabytes in the case of
Raspbian.
**CAUTION**: If your working directory is on an NTFS partition you probably won't be able to build. Make sure this is a proper Linux filesystem.
* `DEPLOY_DIR` (Default: `"$BASE_DIR/deploy"`)
Output directory for target system images and NOOBS bundles.
* `USE_QEMU` (Default: `"0"`)
This enable the Qemu mode and set filesystem and image suffix if set to 1.
A simple example for building Raspbian:
+11 -8
View File
@@ -13,9 +13,9 @@ if ! $DOCKER ps >/dev/null; then
fi
set -e
config_mount=()
config_file=()
if [ -f config ]; then
config_mount=("-v" "$(pwd)/config:/pi-gen/config:ro")
config_file=("--env-file" "$(pwd)/config")
source config
fi
@@ -24,7 +24,7 @@ CONTINUE=${CONTINUE:-0}
if [ "$*" != "" ] || [ -z "${IMG_NAME}" ]; then
if [ -z "${IMG_NAME}" ]; then
echo "IMG_NAME not set in 'build'" 1>&2
echo "IMG_NAME not set in 'config'" 1>&2
echo 1>&2
fi
cat >&2 <<EOF
@@ -60,18 +60,21 @@ if [ "$CONTAINER_EXISTS" != "" ]; then
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
cd /pi-gen; ./build.sh;
rsync -av work/*/build.log deploy/" &
wait
wait "$!"
else
trap "echo 'got CTRL+C... please wait 5s'; $DOCKER stop -t 5 ${CONTAINER_NAME}" SIGINT SIGTERM
time $DOCKER run --name "${CONTAINER_NAME}" --privileged \
-e IMG_NAME=${IMG_NAME}\
-v "$(pwd)/deploy:/pi-gen/deploy" \
"${config_mount[@]}" \
"${config_file[@]}" \
pi-gen \
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static &&
cd /pi-gen; ./build.sh &&
rsync -av work/*/build.log deploy/" &
wait
$DOCKER rm -v $CONTAINER_NAME
wait "$!"
fi
echo "copying results from deploy/"
$DOCKER cp "${CONTAINER_NAME}":/pi-gen/deploy .
ls -lah deploy
$DOCKER rm -v $CONTAINER_NAME
echo "Done! Your image(s) should be in deploy/"
+8 -4
View File
@@ -119,6 +119,7 @@ if [ "$(id -u)" != "0" ]; then
exit 1
fi
if [ -f config ]; then
source config
fi
@@ -128,6 +129,7 @@ if [ -z "${IMG_NAME}" ]; then
exit 1
fi
export USE_QEMU=${USE_QEMU:-0}
export IMG_DATE=${IMG_DATE:-"$(date +%Y-%m-%d)"}
export BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -177,10 +179,12 @@ for EXPORT_DIR in ${EXPORT_DIRS}; do
source "${EXPORT_DIR}/EXPORT_IMAGE"
EXPORT_ROOTFS_DIR=${WORK_DIR}/$(basename ${EXPORT_DIR})/rootfs
run_stage
if [ -e ${EXPORT_DIR}/EXPORT_NOOBS ]; then
source ${EXPORT_DIR}/EXPORT_NOOBS
STAGE_DIR=${BASE_DIR}/export-noobs
run_stage
if [ "${USE_QEMU}" != "1" ]; then
if [ -e ${EXPORT_DIR}/EXPORT_NOOBS ]; then
source ${EXPORT_DIR}/EXPORT_NOOBS
STAGE_DIR=${BASE_DIR}/export-noobs
run_stage
fi
fi
done
+5 -2
View File
@@ -15,8 +15,10 @@ fi
rm -f ${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache
rm -f ${ROOTFS_DIR}/usr/sbin/policy-rc.d
rm -f ${ROOTFS_DIR}/usr/bin/qemu-arm-static
if [ -e ${ROOTFS_DIR}/etc/ld.so.preload.disabled ]; then
mv ${ROOTFS_DIR}/etc/ld.so.preload.disabled ${ROOTFS_DIR}/etc/ld.so.preload
if [ "${USE_QEMU}" != "1" ]; then
if [ -e ${ROOTFS_DIR}/etc/ld.so.preload.disabled ]; then
mv ${ROOTFS_DIR}/etc/ld.so.preload.disabled ${ROOTFS_DIR}/etc/ld.so.preload
fi
fi
rm -f ${ROOTFS_DIR}/etc/apt/sources.list~
@@ -43,6 +45,7 @@ for _FILE in $(find ${ROOTFS_DIR}/var/log/ -type f); do
done
rm -f "${ROOTFS_DIR}/root/.vnc/private.key"
rm -f "${ROOTFS_DIR}/etc/vnc/updateid"
update_issue $(basename ${EXPORT_DIR})
install -m 644 ${ROOTFS_DIR}/etc/rpi-issue ${ROOTFS_DIR}/boot/issue.txt
+3 -2
View File
@@ -12,7 +12,8 @@ mkdir -p ${ROOTFS_DIR}
BOOT_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR}/boot --block-size=1 | cut -f 1)
TOTAL_SIZE=$(du --apparent-size -s ${EXPORT_ROOTFS_DIR} --exclude var/cache/apt/archives --block-size=1 | cut -f 1)
IMG_SIZE=$((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024)))
ROUND_SIZE="$((4 * 1024 * 1024))"
IMG_SIZE=$(((BOOT_SIZE + TOTAL_SIZE + (800 * 1024 * 1024) + ROUND_SIZE) / ROUND_SIZE * ROUND_SIZE))
truncate -s ${IMG_SIZE} ${IMG_FILE}
fdisk -H 255 -S 63 ${IMG_FILE} <<EOF
@@ -58,7 +59,7 @@ for FEATURE in metadata_csum 64bit; do
fi
done
mkdosfs -n boot -F 32 -v $BOOT_DEV > /dev/null
mkfs.ext4 -O $ROOT_FEATURES $ROOT_DEV > /dev/null
mkfs.ext4 -L rootfs -O $ROOT_FEATURES $ROOT_DEV > /dev/null
mount -v $ROOT_DEV ${ROOTFS_DIR} -t ext4
mkdir -p ${ROOTFS_DIR}/boot
+2 -1
View File
@@ -10,7 +10,8 @@
"Pi Model",
"Pi 2",
"Pi Zero",
"Pi 3"
"Pi 3",
"Pi Compute Module 3"
],
"url": "http://www.raspbian.org/",
"username": "pi",
@@ -1,4 +1,11 @@
UNRELEASED:
* Added battery monitor plugin for taskbar - works on x86 images or first-generation Pi-Top
* Added cutdown mode to PCManFM file manager to reduce complexity
* Added ability to rename files in PCManFM by clicking name when selected
* Bug fix in Bluetooth ALSA module to reduce truncation of audio at end of playback
* Various small tweaks, bug fixes and theme modifications
* New kernel and firmware
2017-09-07:
* Disable predictable network interface names for Ethernet devices
* Bug fix for keyboard settings dialog in Raspberry Pi Configuration
* Bug fix for crash on some videos and animations in Chromium
+1
View File
@@ -20,3 +20,4 @@ rpi-update
libmtp-runtime
rsync
htop
man-db
+20
View File
@@ -17,8 +17,28 @@ systemctl disable nfs-common
systemctl disable rpcbind
systemctl disable ssh
systemctl enable regenerate_ssh_host_keys
EOF
if [ "${USE_QEMU}" = "1" ]; then
echo "enter QEMU mode"
install -m 644 files/90-qemu.rules ${ROOTFS_DIR}/etc/udev/rules.d/
if [ -e ${ROOTFS_DIR}/etc/ld.so.preload.disabled ]; then
rm ${ROOTFS_DIR}/etc/ld.so.preload.disabled
touch ${ROOTFS_DIR}/etc/ld.so.preload.disabled
fi
if [ -e ${ROOTFS_DIR}/etc/ld.so.preload ]; then
rm ${ROOTFS_DIR}/etc/ld.so.preload
touch ${ROOTFS_DIR}/etc/ld.so.preload
fi
on_chroot << EOF
systemctl disable resize2fs_once
EOF
echo "leaving QEMU mode"
else
on_chroot << EOF
systemctl enable resize2fs_once
EOF
fi
on_chroot << \EOF
for GRP in input spi i2c gpio; do
+3
View File
@@ -0,0 +1,3 @@
KERNEL=="sda", SYMLINK+="mmcblk0"
KERNEL=="sda?", SYMLINK+="mmcblk0p%n"
KERNEL=="sda2", SYMLINK+="root"
+3
View File
@@ -1 +1,4 @@
IMG_SUFFIX="-lite"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi
+1
View File
@@ -10,3 +10,4 @@ rfkill
chromium-browser rpi-chromium-mods
gldriver-test
fonts-droid-fallback
fonts-liberation2
-1
View File
@@ -8,7 +8,6 @@ python-serial python3-serial
python-picamera python3-picamera
debian-reference-en dillo x2x
raspberrypi-net-mods raspberrypi-ui-mods
fonts-liberation2
smartsim
python-pip python3-pip
python3-numpy
+3
View File
@@ -1 +1,4 @@
IMG_SUFFIX="-4GB"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi
+3
View File
@@ -1 +1,4 @@
IMG_SUFFIX=""
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi