mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
run: time before env to use bash builtin and get decent format, runqemu: remove spaces from cmd to make copy and paste on SO easier
This commit is contained in:
4
run
4
run
@@ -45,9 +45,9 @@ make O="$outdir" olddefconfig
|
|||||||
# It shouldn't be necessary in the first place: https://bugs.busybox.net/show_bug.cgi?id=9936
|
# It shouldn't be necessary in the first place: https://bugs.busybox.net/show_bug.cgi?id=9936
|
||||||
# Even if were an autotools package, there is no general way currently to pass extra configs to it:
|
# Even if were an autotools package, there is no general way currently to pass extra configs to it:
|
||||||
# https://stackoverflow.com/questions/44341188/how-to-pass-extra-custom-configure-autotools-options-to-a-buildroot-package/44341225#44341225
|
# https://stackoverflow.com/questions/44341188/how-to-pass-extra-custom-configure-autotools-options-to-a-buildroot-package/44341225#44341225
|
||||||
env \
|
time \
|
||||||
|
env \
|
||||||
-u LD_LIBRARY_PATH \
|
-u LD_LIBRARY_PATH \
|
||||||
time \
|
|
||||||
make \
|
make \
|
||||||
O="$outdir" \
|
O="$outdir" \
|
||||||
BR2_JLEVEL="$(($(nproc) - 2))" \
|
BR2_JLEVEL="$(($(nproc) - 2))" \
|
||||||
|
|||||||
76
runqemu
76
runqemu
@@ -62,59 +62,59 @@ case "$arch" in
|
|||||||
extra_append="$extra_append kgdboc=ttyS0,115200"
|
extra_append="$extra_append kgdboc=ttyS0,115200"
|
||||||
fi
|
fi
|
||||||
cmd="$qemu_common \
|
cmd="$qemu_common \
|
||||||
-M pc \
|
-M pc \
|
||||||
-append 'root=/dev/vda nopat $extra_append' \
|
-append 'root=/dev/vda nopat $extra_append' \
|
||||||
-device edu \
|
-device edu \
|
||||||
-device lkmc_pci_min \
|
-device lkmc_pci_min \
|
||||||
-drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \
|
-drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \
|
||||||
-kernel ${images_dir}/bzImage \
|
-kernel ${images_dir}/bzImage \
|
||||||
-net nic,model=virtio \
|
-net nic,model=virtio \
|
||||||
$extra_flags
|
$extra_flags \
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
'arm')
|
'arm')
|
||||||
if $kgdb; then
|
if $kgdb; then
|
||||||
extra_append="$extra_append kgdboc=ttyAMA0,115200"
|
extra_append="$extra_append kgdboc=ttyAMA0,115200"
|
||||||
fi
|
fi
|
||||||
cmd="$qemu_common \
|
cmd="$qemu_common \
|
||||||
-M versatilepb \
|
-M versatilepb \
|
||||||
-append 'root=/dev/sda $extra_append' \
|
-append 'root=/dev/sda $extra_append' \
|
||||||
-drive file=${images_dir}/rootfs.ext2,if=scsi,format=raw \
|
-drive file=${images_dir}/rootfs.ext2,if=scsi,format=raw \
|
||||||
-dtb ${images_dir}/versatile-pb.dtb \
|
-dtb ${images_dir}/versatile-pb.dtb \
|
||||||
-kernel ${images_dir}/zImage \
|
-kernel ${images_dir}/zImage \
|
||||||
-net nic,model=rtl8139 \
|
-net nic,model=rtl8139 \
|
||||||
-serial stdio \
|
-serial stdio \
|
||||||
$extra_flags
|
$extra_flags \
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
'aarch64')
|
'aarch64')
|
||||||
if $kgdb; then
|
if $kgdb; then
|
||||||
extra_append="$extra_append kgdboc=ttyAMA0,115200"
|
extra_append="$extra_append kgdboc=ttyAMA0,115200"
|
||||||
fi
|
fi
|
||||||
cmd="$qemu_common \
|
cmd="$qemu_common \
|
||||||
-M virt \
|
-M virt \
|
||||||
-append 'root=/dev/sda $extra_append' \
|
-append 'root=/dev/sda $extra_append' \
|
||||||
-cpu cortex-a57 \
|
-cpu cortex-a57 \
|
||||||
-device virtio-net-device,netdev=eth0 \
|
-device virtio-net-device,netdev=eth0 \
|
||||||
-drive file=${images_dir}/rootfs.cpio,if=scsi,format=raw \
|
-drive file=${images_dir}/rootfs.cpio,if=scsi,format=raw \
|
||||||
-kernel ${images_dir}/Image \
|
-kernel ${images_dir}/Image \
|
||||||
-netdev user,id=eth0 \
|
-netdev user,id=eth0 \
|
||||||
-nographic \
|
-nographic \
|
||||||
-serial stdio \
|
-serial stdio \
|
||||||
$extra_flags
|
$extra_flags \
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
'mips64')
|
'mips64')
|
||||||
cmd="$qemu_common \
|
cmd="$qemu_common \
|
||||||
-M malta \
|
-M malta \
|
||||||
-append 'root=/dev/hda $extra_append' \
|
-append 'root=/dev/hda $extra_append' \
|
||||||
-cpu I6400 \
|
-cpu I6400 \
|
||||||
-drive file=${images_dir}/rootfs.ext2,format=raw \
|
-drive file=${images_dir}/rootfs.ext2,format=raw \
|
||||||
-kernel ${images_dir}/vmlinux \
|
-kernel ${images_dir}/vmlinux \
|
||||||
-nographic \
|
-nographic \
|
||||||
-net nic,model=pcnet \
|
-net nic,model=pcnet \
|
||||||
$extra_flags
|
$extra_flags \
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo "$cmd"
|
echo "$cmd"
|
||||||
|
|||||||
Reference in New Issue
Block a user