New cross compiler and builds on GNU Guix

This commit is contained in:
Adrien Bourmault 2023-01-04 01:18:39 +01:00
parent cc28730020
commit ced70b9c88
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
3 changed files with 14 additions and 12 deletions

View File

@ -311,14 +311,16 @@ all : $(CROSS-CC-DIR)/bin/x86_64-elf-gcc
## QEMU/DEBUG RELATED ## QEMU/DEBUG RELATED
test: all installonimage test: all installonimage
@qemu-system-x86_64 -vga std -enable-kvm -machine type=q35 -soundhw pcspk -cpu host -s \ @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 \ -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 & -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &
run: test run: test
testnokvm: all installonimage 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) \ -rtc base=localtime -m $(ram) -hda $(installdisk) \
-d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log &

View File

@ -21,8 +21,7 @@
# You should have received a copy of the GNU General Public License # # You should have received a copy of the GNU General Public License #
# along with OS/K. If not, see <https://www.gnu.org/licenses/>. # # along with OS/K. If not, see <https://www.gnu.org/licenses/>. #
#=----------------------------------------------------------------------------=# #=----------------------------------------------------------------------------=#
\n
. .
├── boot ├── boot
│   ├── grub │   ├── grub
@ -43,8 +42,7 @@
├── build ├── build
│   ├── create_disk.sh │   ├── create_disk.sh
│   ├── install-os-k.sh │   ├── install-os-k.sh
│   ├── kernel.ld │   └── kernel.ld
│   └── qemu.log
├── docs ├── docs
│   ├── boot │   ├── boot
│   │   ├── grub │   │   ├── grub
@ -180,4 +178,4 @@
├── ProjectTree ├── ProjectTree
└── README.md └── README.md
39 directories, 116 files 40 directories, 115 files

View File

@ -28,6 +28,8 @@ CL2='\033[1;36m'
CL3='\033[0m' CL3='\033[0m'
NC='\033[1;37m' NC='\033[1;37m'
LOSETUP=$(which losetup)
set -e #exit if error set -e #exit if error
echo ${CL2}[install-os-k.sh]${NC} Mount image... \(udisksctl\)${CL3} echo ${CL2}[install-os-k.sh]${NC} Mount image... \(udisksctl\)${CL3}
@ -39,7 +41,7 @@ sync
if [ -z $lpblock ]; if [ -z $lpblock ];
then then
echo Impossible to find an available loop device. Fatal error ! echo Impossible to find an available loop device. Fatal error !
return 13 exit 13
fi fi
mountpoint=$(udisksctl info -b $lpblock | grep MountPoint | cut -d ':' -f 2 | sed 's/ //g') mountpoint=$(udisksctl info -b $lpblock | grep MountPoint | cut -d ':' -f 2 | sed 's/ //g')
@ -52,7 +54,7 @@ fi
if [ -z $mountpoint ]; if [ -z $mountpoint ];
then then
echo Impossible to mount the image at $lpblock. Fatal error ! echo Impossible to mount the image at $lpblock. Fatal error !
return 13 exit 13
fi fi
echo ${CL2}[install-os-k.sh]${NC} Copying grub.cfg to $lpblock as $mountpoint 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} echo ${CL2}[install-os-k.sh]${NC} Unmount image... \(udisksctl\)${CL3}
udisksctl unmount --no-user-interaction -b $lpblock 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 ]; if [ -z $lpblock ];
then then
return 0 exit 0
fi fi
udisksctl loop-delete -b $lpblock udisksctl loop-delete -b $lpblock