1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00

Handle boot files via regular rootfs package machanisms

Just install the kernel package to the rootfs /boot directory and add a step
to the rootfs package to move /boot data out of the squasfs image.

Add linux package as regular dependency to the rootfs.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-07-15 16:19:44 +02:00
parent 4397267c37
commit 39c0c2c98d
7 changed files with 21 additions and 6 deletions

View file

@ -8,3 +8,4 @@ btrfs-progs
dosfstools dosfstools
nftables nftables
dhcpcd dhcpcd
linux

View file

@ -11,3 +11,4 @@ kbd
firmware-rpi3 firmware-rpi3
dhcpcd dhcpcd
linux-firmware-rpi3 linux-firmware-rpi3
linux-rpi3

View file

@ -30,7 +30,10 @@ deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2" local DEPLOY="$2"
install -m 755 "arch/arm/boot/zImage" "$DEPLOY/vmlinuz" mkdir -p "$DEPLOY/boot"
cp "arch/arm/boot/zImage" "$DEPLOY/boot/vmlinuz"
echo "boot/vmlinuz m 555 0 0" > "$DEPLOY/rootfs_files.txt"
} }
check_update() { check_update() {
@ -40,4 +43,4 @@ check_update() {
grep -o "raspberrypi-kernel_[0-9.]*-[0-9]" | \ grep -o "raspberrypi-kernel_[0-9.]*-[0-9]" | \
sed 's/raspberrypi-kernel_//g' | sed 's/-/./g' | \ sed 's/raspberrypi-kernel_//g' | sed 's/-/./g' | \
verson_find_greatest "$version" verson_find_greatest "$version"
} }

View file

@ -32,11 +32,14 @@ deploy() {
local SOURCE="$1" local SOURCE="$1"
local DEPLOY="$2" local DEPLOY="$2"
install -m 755 "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/vmlinuz" mkdir -p "$DEPLOY/boot"
cp "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/boot/vmlinuz"
echo "boot/vmlinuz m 555 0 0" > "$DEPLOY/rootfs_files.txt"
} }
check_update() { check_update() {
curl --silent -L https://www.kernel.org/feeds/kdist.xml | \ curl --silent -L https://www.kernel.org/feeds/kdist.xml | \
grep -o "[0-9.]*: longterm" | grep -o "[0-9.]*" | \ grep -o "[0-9.]*: longterm" | grep -o "[0-9.]*" | \
verson_find_greatest "$VERSION" verson_find_greatest "$VERSION"
} }

View file

@ -1,4 +1,4 @@
DEPENDS="rootfs linux" DEPENDS="rootfs"
build() { build() {
local SOURCE="$1" local SOURCE="$1"

View file

@ -1,4 +1,4 @@
DEPENDS="rootfs linux-rpi3 boot-rpi3" DEPENDS="rootfs boot-rpi3"
build() { build() {
local SOURCE="$1" local SOURCE="$1"

View file

@ -82,6 +82,13 @@ build() {
sed -i 's#etc/#cfg/preserve/etc/#g' "$DEPLOY/pseudo" sed -i 's#etc/#cfg/preserve/etc/#g' "$DEPLOY/pseudo"
sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$DEPLOY/pseudo" sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$DEPLOY/pseudo"
sed -i 's#usr/#cfg/preserve/usr/#g' "$DEPLOY/pseudo" sed -i 's#usr/#cfg/preserve/usr/#g' "$DEPLOY/pseudo"
# don't add stuff for the boot partition to the squashfs image
mv ${PKGBUILDDIR}/boot/* "$DEPLOY"
grep -v "^boot/" "$DEPLOY/pseudo" > "$DEPLOY/pseudo.temp"
mv "$DEPLOY/pseudo.temp" "$DEPLOY/pseudo"
echo "boot m 750 0 0" >> "$DEPLOY/pseudo"
} }
deploy() { deploy() {