Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix psplash loading and startup #74

Open
wants to merge 1 commit into
base: 20-arm64
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions psplash/initrd/scripts/init-bottom/ORDER

This file was deleted.

19 changes: 0 additions & 19 deletions psplash/initrd/scripts/init-bottom/disable-getty

This file was deleted.

10 changes: 0 additions & 10 deletions psplash/initrd/scripts/init-bottom/end.psplash.service

This file was deleted.

11 changes: 0 additions & 11 deletions psplash/initrd/scripts/init-bottom/kiosk.autoconnect.service

This file was deleted.

8 changes: 0 additions & 8 deletions psplash/initrd/scripts/init-top/ORDER

This file was deleted.

23 changes: 0 additions & 23 deletions psplash/initrd/scripts/init-top/psplash

This file was deleted.

13 changes: 13 additions & 0 deletions psplash/initrd/usr/lib/systemd/system/psplash-start.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Start psplash boot splash screen
DefaultDependencies=no
RequiresMountsFor=/run
After=systemd-modules-load.service

[Service]
Type=notify
ExecStart=@/usr/bin/psplash @psplash
RemainAfterExit=yes

[Install]
WantedBy=basic.target
13 changes: 11 additions & 2 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ parts:
DESTDIR=${SNAPCRAFT_PART_INSTALL} \
ARCH="$(dpkg-architecture -t $BUILD_ARCH_TRIPLET -q DEB_HOST_ARCH)" \
${OPTIONAL_ARGS:-}
# add handling of psplash.img to u-boot config
cp ${SNAPCRAFT_PART_SRC}/stage/bootscr.rpi ${SNAPCRAFT_PART_BUILD}/bootscr.rpi
sed -i \
-e '/setenv kernel_bootpart/a setenv psplash_file "psplash.img"\nsetenv psplash_part "1"' \
-e 's/setenv ramdisk_param "${.*/setenv ramdisk_size "${filesize}"\n setenv ramdisk_param "${ramdisk_addr_r}:${ramdisk_size}"/g' \
-e '/for cmd in ${try_boot}; do/i \ if test -e ${devtype} ${devnum}:${psplash_part} ${psplash_file}; then setexpr psplash_addr ${ramdisk_addr_r} + 0x${ramdisk_size}; load ${devtype} ${devnum}:${psplash_part} ${psplash_addr} ${psplash_file}; setenv psplash_size "${filesize}"; setexpr ramdisk_size 0x${ramdisk_size} + 0x${psplash_size}; setenv ramdisk_param "${ramdisk_addr_r}:${ramdisk_size}"; fi' \
${SNAPCRAFT_PART_BUILD}/bootscr.rpi
mkimage -A arm64 -O linux -T script -C none -n "boot script" \
-d ${SNAPCRAFT_PART_BUILD}/bootscr.rpi ${SNAPCRAFT_PART_INSTALL}/boot-assets/boot.scr
prime:
- boot-assets/*
- uboot.conf
Expand Down Expand Up @@ -92,8 +101,8 @@ parts:
ARCH=$(dpkg-architecture -t "${BUILD_ARCH_TRIPLET}" -q DEB_HOST_ARCH) make
rm -rf $SNAPCRAFT_PART_INSTALL/usr
cp -a $TREE/initrd .
mkdir -p initrd/bin
cp psplash initrd/bin
mkdir -p initrd/usr/bin
cp psplash initrd/usr/bin
mkdir -p $SNAPCRAFT_PART_INSTALL/boot-assets
cd initrd && find . | cpio --quiet -o -H newc | lz4 -9 -l >> \
"${SNAPCRAFT_PART_INSTALL}/boot-assets/psplash.img"
Expand Down