diff --git a/README b/README index 9fa2d772..18f86a93 100644 --- a/README +++ b/README @@ -3,8 +3,8 @@ Photobooth OS - select defconfig make winf_photobooth_defconfig -- launch emulator -qemu-system-x86_64 -m 1024 -bios /usr/share/ovmf/OVMF.fd -drive file=output/images/disk.img,format=raw -vga virtio -nic user +- launch vm +qemu-system-x86_64 -m 1024 -bios /usr/share/ovmf/OVMF.fd -drive file=output/images/disk.img,format=raw -vga virtio -nic user,hostfwd=tcp:127.0.0.1:2222-:22 - pure linux path PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin diff --git a/board/winf-photobooth/overlay/etc/ssh/sshd_config.d/00-winf-photobooth.conf b/board/winf-photobooth/overlay/etc/ssh/sshd_config.d/00-winf-photobooth.conf new file mode 100644 index 00000000..a0e6527d --- /dev/null +++ b/board/winf-photobooth/overlay/etc/ssh/sshd_config.d/00-winf-photobooth.conf @@ -0,0 +1,2 @@ +PermitRootLogin yes +PasswordAuthentication no diff --git a/board/winf-photobooth/overlay/root/.ssh/authorized_keys b/board/winf-photobooth/overlay/root/.ssh/authorized_keys new file mode 100644 index 00000000..1d207e05 --- /dev/null +++ b/board/winf-photobooth/overlay/root/.ssh/authorized_keys @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILd0QCw/4QPUFU9GISk7y/l+qJ6NSuHf5CQANj928idJ mikee@Mikee diff --git a/board/winf-photobooth/overlay/root/run b/board/winf-photobooth/overlay/root/run deleted file mode 100755 index 8c97f9a3..00000000 --- a/board/winf-photobooth/overlay/root/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -SLINT_BACKEND=linuxkms RUST_BACKTRACE=full /usr/bin/winf-photobooth-app 2>log diff --git a/board/winf-photobooth/post-build.sh b/board/winf-photobooth/post-build.sh new file mode 100755 index 00000000..15a08b4c --- /dev/null +++ b/board/winf-photobooth/post-build.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# BEGIN: board/pc/post-build.sh +set -e + +BOARD_DIR=$(dirname "$0") + +# Detect boot strategy, EFI or BIOS +if [ -d "$BINARIES_DIR/efi-part/" ]; then + cp -f "$BOARD_DIR/grub-efi.cfg" "$BINARIES_DIR/efi-part/EFI/BOOT/grub.cfg" +else + cp -f "$BOARD_DIR/grub-bios.cfg" "$TARGET_DIR/boot/grub/grub.cfg" + + # Copy grub 1st stage to binaries, required for genimage + cp -f "$TARGET_DIR/lib/grub/i386-pc/boot.img" "$BINARIES_DIR" +fi + +# END: board/pc/post-build.sh + +sed -i '1s;^;Include /etc/ssh/sshd_config.d/*.conf\n;' $TARGET_DIR/etc/ssh/sshd_config diff --git a/configs/winf_photobooth_defconfig b/configs/winf_photobooth_defconfig index 29ee1616..d784bcff 100644 --- a/configs/winf_photobooth_defconfig +++ b/configs/winf_photobooth_defconfig @@ -4,10 +4,11 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_GLOBAL_PATCH_DIR="board/pc/patches" BR2_DOWNLOAD_FORCE_CHECK_HASHES=y BR2_TARGET_GENERIC_HOSTNAME="winf-photobooth" +BR2_TARGET_GENERIC_ISSUE="Welcome to WINF-Photobooth" BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_TARGET_GENERIC_ROOT_PASSWD="winf" BR2_ROOTFS_OVERLAY="board/winf-photobooth/overlay" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/pc/post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/winf-photobooth/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pc/post-image-efi.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y