[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:
parent
bae0a775e1
commit
d8c5299dc0
|
@ -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
|
#/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so
|
||||||
|
|
|
@ -59,7 +59,11 @@ umount "${MOUNT_POINT}"
|
||||||
|
|
||||||
# from http://paulscott.co.za/blog/full-raspberry-pi-raspbian-emulation-with-qemu/
|
# from http://paulscott.co.za/blog/full-raspberry-pi-raspbian-emulation-with-qemu/
|
||||||
# ssh pi@localhost -p10022
|
# 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}"
|
mount "${LOOP_MAPPER_PATH}" "${MOUNT_POINT}"
|
||||||
cp -av "${OVERWRITE_FILES_AFTER_INIT_DIR}"/* "${MOUNT_POINT}"
|
cp -av "${OVERWRITE_FILES_AFTER_INIT_DIR}"/* "${MOUNT_POINT}"
|
||||||
|
|
Loading…
Reference in New Issue