-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (59 loc) · 2.49 KB
/
Makefile
File metadata and controls
75 lines (59 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.DEFAULT_GOAL := no_target
no_target:
@echo "Error: You must provide a make target." >&2
.PHONY: deploy
deploy:
./deploy-workbench.sh
# faster deploy for debugging/development purposes
# on pedro's laptop the difference is around 14s vs 1min20s
deploy_dev:
DEBUG=1 ./deploy-workbench.sh
# force deploy of bullseye
deploy_bookworm:
VERSION_CODENAME='bookworm' ./deploy-workbench.sh
# remove all files generated by deploy process
deploy_clean:
rm -rfv ./iso
# Install workbench-script requirements
install_dependencies:
install-dependencies.sh
boot_iso:
sudo qemu-system-x86_64 \
-enable-kvm -m 2G -vga qxl -netdev user,id=wan -device virtio-net,netdev=wan,id=nic1 \
-drive format=raw,file=$(ISO_FILE),cache=none,if=virtio
boot_iso_from_usb:
sudo qemu-system-x86_64 \
-enable-kvm -m 2G -vga qxl -netdev user,id=wan -device virtio-net,netdev=wan,id=nic1 \
-drive format=raw,file=$(USB_DEVICE),cache=none,if=virtio
# src https://www.ubuntubuzz.com/2021/04/how-to-boot-uefi-on-qemu.html
# needs `sudo apt-get install ovmf`
boot_iso_uefi:
sudo qemu-system-x86_64 \
-bios /usr/share/ovmf/OVMF.fd \
-enable-kvm -m 2G -vga qxl -netdev user,id=wan -device virtio-net,netdev=wan,id=nic1 \
-drive format=raw,file=$(ISO_FILE),cache=none,if=virtio
boot_iso_uefi_secureboot:
sudo cp /usr/share/OVMF/OVMF_VARS_4M.ms.fd /tmp/efivars_4M.fd
sudo qemu-system-x86_64 \
-machine q35,smm=on -global driver=cfi.pflash01,property=secure,value=on \
-drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE_4M.secboot.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=/tmp/efivars_4M.fd \
-enable-kvm -m 2G -vga qxl -netdev user,id=wan -device virtio-net,netdev=wan,id=nic1 \
-drive file=$(ISO_FILE),cache=none,if=virtio,format=raw,index=0,media=disk \
-boot menu=on
# when you change something, you need to refresh it this way
regenerate_pxe_install:
./deploy-workbench.sh
pxe/install-pxe.sh
es_gen:
$(MAKE) es_gen_po
$(MAKE) es_gen_mo
es_gen_po:
cp locale/es/LC_MESSAGES/messages.po locale/es/LC_MESSAGES/messages.pot.bak
pygettext3 -p locale/es/LC_MESSAGES/ workbench-script.py
# src https://stackoverflow.com/questions/7496156/gettext-how-to-update-po-and-pot-files-after-the-source-is-modified
msgmerge -N locale/es/LC_MESSAGES/messages.pot.bak locale/es/LC_MESSAGES/messages.pot > locale/es/LC_MESSAGES/messages.po
rm locale/es/LC_MESSAGES/messages.pot.bak
rm locale/es/LC_MESSAGES/messages.pot
es_gen_mo:
msgfmt locale/es/LC_MESSAGES/messages.po -o locale/es/LC_MESSAGES/messages.mo