This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
| obj-m += tcp_svr_sample.o | |
| all: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
| clean: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clea |
| adb shell am | |
| usage: am [subcommand] [options] | |
| usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] | |
| [--R COUNT] [-S] [--opengl-trace] <INTENT> | |
| am startservice <INTENT> | |
| am force-stop <PACKAGE> | |
| am kill <PACKAGE> | |
| am kill-all | |
| am broadcast <INTENT> | |
| am instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w] |
| /* please refer better example: https://github.com/dvdhrm/docs/tree/master/drm-howto/ */ | |
| #define _XOPEN_SOURCE 600 | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/mman.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <xf86drm.h> |
| # Useful for testing things that are time zone | |
| # sensitive - like scheduling things | |
| # Get current timezone | |
| sudo systemsetup -gettimezone | |
| # Get list of available timezones | |
| sudo systemsetup -listtimezones | |
| # Set the timezone to the selected timezone |
You have a repo and quite some developers have cloned the repo and working on it. Now you want to add a file to gitignore which is already checked-in or tracked by Git.(The file is already commited into the repo)
Below are the steps on how to ignore this file (lets say the filename is config.py):
Add it to .gitignore:
$ echo "config.py" >> .gitignore
| // This will works on Embedded GPU that implements .gem_prime_mmap like Rockchip ones. | |
| // This will fail on most DRM drivers for GPU with dedicated memory as they tend to NOT implement .gem_prime_mmap. | |
| #include <stdio.h> | |
| #include <libdrm/drm.h> | |
| #include <stdint.h> | |
| #include <sys/mman.h> | |
| #include <string.h> |
Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.
Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe)
Put C:\Program Files\qemu on your PATH, and run the below to check it's working (which will list out
the CPUs the AArch64 emulator can emulate):
qemu-system-aarch64 -M virt -cpu help