diff --git a/README b/README index f0421aeb..e82307a2 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ Photobooth OS make winf_photobooth_defconfig - launch vm -qemu-system-x86_64 -m 1024 -bios /usr/share/ovmf/OVMF.fd -drive file=output/images/disk.img,format=raw -accel kvm -cpu host -smp 2,sockets=1,cores=2,threads=1 -vga none -device virtio-vga,xres=1280,yres=1024 -nic user,hostfwd=tcp:127.0.0.1:2222-:22 -device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,hostbus=1,hostaddr=2 +qemu-system-x86_64 -m 1024 -bios /usr/share/ovmf/OVMF.fd -drive file=output/images/disk.img,format=raw -accel kvm -cpu host -smp 2,sockets=1,cores=2,threads=1 -vga none -device virtio-vga,xres=1280,yres=1024 -nic user,net=192.168.7.0/24,hostfwd=tcp:127.0.0.1:2222-192.168.7.1:22 -device qemu-xhci,id=xhci -device usb-host,bus=xhci.0,hostbus=1,hostaddr=2 - pure linux path @@ -19,6 +19,11 @@ make linux-update-defconfig - hostname winf-photobooth.local +- networking +eth0: 192.168.7.1/24, DHCP 192.168.7.100-200 +plug in device -> gets IP; ssh root@192.168.7.1 / root@winf-photobooth.local +qemu vm: ssh -p 2222 root@127.0.0.1 + Original README: diff --git a/board/winf-photobooth/grub-efi.cfg b/board/winf-photobooth/grub-efi.cfg index 9c2b8daf..354b834c 100644 --- a/board/winf-photobooth/grub-efi.cfg +++ b/board/winf-photobooth/grub-efi.cfg @@ -2,5 +2,5 @@ set default="0" set timeout="0" menuentry "WINF-Photobooth" { - linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1 + linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1 net.ifnames=0 } diff --git a/board/winf-photobooth/overlay/etc/dnsmasq.conf b/board/winf-photobooth/overlay/etc/dnsmasq.conf new file mode 100644 index 00000000..394e8aba --- /dev/null +++ b/board/winf-photobooth/overlay/etc/dnsmasq.conf @@ -0,0 +1,21 @@ +# DHCP server for devices plugged into the photobooth's ethernet port. +# The photobooth is a standalone network host, not a client: no upstream +# DNS, no forwarding. + +interface=eth0 +except-interface=lo +bind-interfaces + +# No upstream resolvers (no client mode anymore) +no-resolv +local=/local/ + +# Serve the booth's own name over DNS as well (avahi does mDNS) +address=/winf-photobooth.local/192.168.7.1 +address=/winf-photobooth/192.168.7.1 + +# Hand out 192.168.7.100-200 to plugged-in devices, 12h leases +dhcp-range=192.168.7.100,192.168.7.200,255.255.255.0,12h +dhcp-authoritative +dhcp-option=option:router,192.168.7.1 +dhcp-option=option:dns-server,192.168.7.1 diff --git a/board/winf-photobooth/overlay/etc/network/interfaces b/board/winf-photobooth/overlay/etc/network/interfaces new file mode 100644 index 00000000..abc1db80 --- /dev/null +++ b/board/winf-photobooth/overlay/etc/network/interfaces @@ -0,0 +1,12 @@ +# The photobooth is NOT a network client. It runs a DHCP server on its +# ethernet port: plug a device into eth0 and it gets an address from +# 192.168.7.0/24 (see /etc/dnsmasq.conf). The photobooth itself is +# 192.168.7.1. + +auto lo +iface lo inet loopback + +auto eth0 +iface eth0 inet static + address 192.168.7.1 + netmask 255.255.255.0 diff --git a/configs/winf_photobooth_defconfig b/configs/winf_photobooth_defconfig index e5162f76..65e64c79 100644 --- a/configs/winf_photobooth_defconfig +++ b/configs/winf_photobooth_defconfig @@ -7,7 +7,7 @@ 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_SYSTEM_DHCP="eth0" +BR2_SYSTEM_DHCP="" BR2_ROOTFS_OVERLAY="board/winf-photobooth/overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="board/winf-photobooth/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pc/post-image-efi.sh" @@ -58,9 +58,7 @@ BR2_PACKAGE_LIBV4L=y BR2_PACKAGE_LIBV4L_UTILS=y BR2_PACKAGE_AVAHI=y BR2_PACKAGE_AVAHI_DAEMON=y -BR2_PACKAGE_CONNMAN=y -BR2_PACKAGE_CONNMAN_WIFI=y -BR2_PACKAGE_CONNMAN_CLIENT=y +BR2_PACKAGE_DNSMASQ=y BR2_PACKAGE_OPENSSH=y BR2_PACKAGE_WIRELESS_REGDB=y BR2_PACKAGE_NANO=y