mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Use qcow2 by default for savevm, loadvm.
Create shortcuts for -t linux-reconfigure and -t host-qemu-reconfigure.
This commit is contained in:
@@ -95,6 +95,12 @@ If you change any package besides `kernel_module`, you must also request those p
|
||||
|
||||
Those aren't turned on by default because they take quite a few seconds.
|
||||
|
||||
Linux and QEMU rebuilds are so common that we have dedicated shortcut flags for them:
|
||||
|
||||
....
|
||||
./build -l -q
|
||||
....
|
||||
|
||||
==== Filesystem persistency
|
||||
|
||||
The root filesystem is persistent across:
|
||||
|
||||
8
build
8
build
@@ -7,7 +7,7 @@ j="$(($(nproc) - 2))"
|
||||
post_script_args=''
|
||||
x11=false
|
||||
v=0
|
||||
while getopts 'a:j:p:St:v' OPT; do
|
||||
while getopts 'a:j:lp:qSt:v' OPT; do
|
||||
case "$OPT" in
|
||||
a)
|
||||
arch="$OPTARG"
|
||||
@@ -15,9 +15,15 @@ while getopts 'a:j:p:St:v' OPT; do
|
||||
j)
|
||||
j="$OPTARG"
|
||||
;;
|
||||
l)
|
||||
extra_targets="$extra_args linux-reconfigure"
|
||||
;;
|
||||
p)
|
||||
post_script_args="$OPTARG"
|
||||
;;
|
||||
q)
|
||||
extra_targets="$extra_args host-qemu-reconfigure"
|
||||
;;
|
||||
S)
|
||||
qemu_sdl=''
|
||||
;;
|
||||
|
||||
@@ -5,6 +5,7 @@ BR2_PACKAGE_OVERRIDE_FILE="../buildroot_override"
|
||||
BR2_PACKAGE_STRACE=y
|
||||
BR2_ROOTFS_OVERLAY="../rootfs_overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="../rootfs_post_build_script"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="../rootfs_post_image_script"
|
||||
BR2_ROOTFS_USERS_TABLES="../user_table"
|
||||
|
||||
# Host GDB
|
||||
|
||||
@@ -10,7 +10,6 @@ net=true
|
||||
while getopts 'n' OPT; do
|
||||
case "$OPT" in
|
||||
n)
|
||||
echo asdfqwer
|
||||
net=false
|
||||
;;
|
||||
esac
|
||||
|
||||
4
rootfs_post_image_script
Executable file
4
rootfs_post_image_script
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
images_dir="$1"
|
||||
cd "$images_dir"
|
||||
"${HOST_DIR}/bin/qemu-img" convert -f raw -O qcow2 rootfs.ext2 rootfs.ext2.qcow2
|
||||
4
run
4
run
@@ -65,7 +65,7 @@ case "$arch" in
|
||||
-append 'root=/dev/vda nopat $extra_append' \
|
||||
-device edu \
|
||||
-device virtio-net-pci,netdev=net0 \
|
||||
-drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \
|
||||
-drive file=${images_dir}/rootfs.ext2.qcow2,if=virtio,format=qcow2 \
|
||||
-kernel ${images_dir}/bzImage \
|
||||
$extra_flags \
|
||||
"
|
||||
@@ -78,7 +78,7 @@ $extra_flags \
|
||||
-M versatilepb \
|
||||
-append 'root=/dev/sda $extra_append' \
|
||||
-device rtl8139,netdev=net0 \
|
||||
-drive file=${images_dir}/rootfs.ext2,if=scsi,format=raw \
|
||||
-drive file=${images_dir}/rootfs.ext2.qcow2,if=scsi,format=qcow2 \
|
||||
-dtb ${images_dir}/versatile-pb.dtb \
|
||||
-kernel ${images_dir}/zImage \
|
||||
-serial stdio \
|
||||
|
||||
Reference in New Issue
Block a user