[FIX] point_of_sale: posbox_create_image fixes

- don't add comments in posbox ld.so.preload, it causes the second line to be
  interpreted as a library.
- allow image creation in headless environment. This checks whether or not X is
  running and runs qemu-system-arm with or without graphics.
This commit is contained in:
Joren Van Onder 2015-08-12 15:46:43 +02:00 committed by Antony Lesuisse
parent bae0a775e1
commit d8c5299dc0
2 changed files with 5 additions and 2 deletions

View File

@ -1,2 +1 @@
# the used qemu-kernel doesn't work well with this library, so get rid of it
#/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so

View File

@ -59,7 +59,11 @@ umount "${MOUNT_POINT}"
# from http://paulscott.co.za/blog/full-raspberry-pi-raspbian-emulation-with-qemu/
# ssh pi@localhost -p10022
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda posbox.img -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::18069-:8069 -net nic
QEMU_OPTS=(-kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append 'root=/dev/sda2 panic=1 rootfstype=ext4 rw' -hda posbox.img -net user,hostfwd=tcp::10022-:22,hostfwd=tcp::18069-:8069 -net nic)
if [ -z ${DISPLAY:-} ] ; then
QEMU_OPTS+=(-nographic)
fi
qemu-system-arm "${QEMU_OPTS[@]}"
mount "${LOOP_MAPPER_PATH}" "${MOUNT_POINT}"
cp -av "${OVERWRITE_FILES_AFTER_INIT_DIR}"/* "${MOUNT_POINT}"