forked from graydon/cpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTESTCPU
executable file
·37 lines (31 loc) · 1.17 KB
/
TESTCPU
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
#!/bin/bash
set -e
# You will need to put your host key and private key somewhere. They will be placed in the proper place in the image.
u-root \
-build=bb \
-files ssh_host_rsa_key:etc/ssh/ssh_host_rsa_key \
-initcmd=/bbin/cpud \
-files ~/.ssh/cpu_rsa.pub:key.pub \
all \
github.com/u-root/cpu/cmds/cpud \
github.com/u-root/cpu/cmds/cpu
sudo /usr/bin/qemu-system-x86_64 -kernel \
/home/rminnich/projects/linuxboot/mainboards/intel/generic/kernel-noinitramfs \
-cpu max \
-s \
-m 1024m \
-machine q35 \
-initrd /tmp/initramfs.linux_amd64.cpio \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0 \
-device e1000,netdev=n1 \
-netdev user,id=n1,hostfwd=tcp:127.0.0.1:23-:2222,net=192.168.1.0/24,host=192.168.1.1 \
-serial stdio \
-append earlyprintk=ttyS0,115200\ console=ttyS0 \
-monitor /dev/null \
# note we will exit here so the trash below is not a problem
exit 0
# junk
/home/rminnich/projects/linuxboot/linux/arch/x86/boot/bzImage \
# add the following line to qemu if you want to snoop packets.
-object filter-dump,id=f1,netdev=n1,file=/tmp/vm0.pcap \