diff --git a/Makefile b/Makefile index b6eaa12..c383ec0 100644 --- a/Makefile +++ b/Makefile @@ -311,14 +311,16 @@ all : $(CROSS-CC-DIR)/bin/x86_64-elf-gcc ## QEMU/DEBUG RELATED test: all installonimage - @qemu-system-x86_64 -vga std -enable-kvm -machine type=q35 -soundhw pcspk -cpu host -s \ - -rtc base=localtime -m $(ram) -hda $(installdisk) -net nic,model=rtl8139 \ + @qemu-system-x86_64 -vga std -enable-kvm -machine type=q35 -cpu host -s \ + -rtc base=localtime -m $(ram) -hda $(installdisk) -net nic,model=rtl8139 \ + -audiodev pa,id=snd0 -machine pcspk-audiodev=snd0 \ -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & run: test testnokvm: all installonimage - @qemu-system-x86_64 -vga std -cpu $(cpu) -machine type=q35 -soundhw pcspk -s \ + @qemu-system-x86_64 -vga std -cpu $(cpu) -machine type=q35 -s \ + -audiodev pa,id=snd0 -machine pcspk-audiodev=snd0 \ -rtc base=localtime -m $(ram) -hda $(installdisk) \ -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & diff --git a/ProjectTree b/ProjectTree index dda3944..6404d60 100644 --- a/ProjectTree +++ b/ProjectTree @@ -21,8 +21,7 @@ # You should have received a copy of the GNU General Public License # # along with OS/K. If not, see . # #=----------------------------------------------------------------------------=# - - +\n . ├── boot │   ├── grub @@ -43,8 +42,7 @@ ├── build │   ├── create_disk.sh │   ├── install-os-k.sh -│   ├── kernel.ld -│   └── qemu.log +│   └── kernel.ld ├── docs │   ├── boot │   │   ├── grub @@ -180,4 +178,4 @@ ├── ProjectTree └── README.md -39 directories, 116 files +40 directories, 115 files diff --git a/build/install-os-k.sh b/build/install-os-k.sh index abb4cc4..ac5443a 100755 --- a/build/install-os-k.sh +++ b/build/install-os-k.sh @@ -28,6 +28,8 @@ CL2='\033[1;36m' CL3='\033[0m' NC='\033[1;37m' +LOSETUP=$(which losetup) + set -e #exit if error echo ${CL2}[install-os-k.sh]${NC} Mount image... \(udisksctl\)${CL3} @@ -39,7 +41,7 @@ sync if [ -z $lpblock ]; then echo Impossible to find an available loop device. Fatal error ! - return 13 + exit 13 fi mountpoint=$(udisksctl info -b $lpblock | grep MountPoint | cut -d ':' -f 2 | sed 's/ //g') @@ -52,7 +54,7 @@ fi if [ -z $mountpoint ]; then echo Impossible to mount the image at $lpblock. Fatal error ! - return 13 + exit 13 fi echo ${CL2}[install-os-k.sh]${NC} Copying grub.cfg to $lpblock as $mountpoint @@ -66,10 +68,10 @@ sync echo ${CL2}[install-os-k.sh]${NC} Unmount image... \(udisksctl\)${CL3} udisksctl unmount --no-user-interaction -b $lpblock -lpblock=$(/sbin/losetup -j $1 | cut -d ':' -f 1) +lpblock=$($LOSETUP -j $1 | cut -d ':' -f 1) if [ -z $lpblock ]; then - return 0 + exit 0 fi udisksctl loop-delete -b $lpblock