alias grepc='grep --include=\*{h,c,cpp}'
alias grepdts='grep --include=\*{dts,dtsi}'
Enable HDMI in rpi 2:
In target/linux/brcm2708/image/config.txt, hdmi_safe=1
During first start, the device is set to 'static IP mode' (192.168.1.1)
Recommend to change the DHCP network IP pool, range starts from 192.168.1.20
Config gateway and DNS to download the package:
In vi /etc/config/network (default static IP),
#router gateway IP
option gateway '192.168.1.XXX'
#config DNS
list dns '8.8.8.8'
or change to use dhcp client instead of static IP to download / update the opkg package.
Check network connection:
ping 8.8.8.8 to check whether the gateway is config properly.
ping www.openwrt.org to check whether the DNS is setup properly.
| ctrl-b ? | List combination key, press q to quit |
| ctrl-b x | Exit curent panel / window |
| ctrl-b % | Split panel (horziontal) |
| ctrl-b “ | Split panel (vertical) |
| ctrl-b (arrow key) | Switch panel |
| ctrl-b ctrl-(arrow key) | Adjust panel size per 1 unit |
| ctrl-b alt-(arrow key) | Adjust panel size per 5 unit |
| ctrl-b z | Maximize current panel (restore to original panel size if issue this key again) |
| ctrl-b (page up | page down) | Scroll up / scroll down |
| ctrl-b alt-o | Rotate panel clockwise |
| ctrl-b ctrl-o | Rotate panel anti-clockwise |
| ctrl-b c | Create window |
| ctrl-b , | Rename window |
| ctrl-b . | Rename window ID |
| ctrl-b (num key) | Switch window according to window ID |
| ctrl-b p | Switch to previous window |
| ctrl-b n | Switch to next window |
https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process
sudo apt-get install ???
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Issue below command to solve the problem:
$sudo rm /var/lib/apt/lists/lock
| set args | set arguments |
| show args | show arguments |
| Run (or gdb –args <program> <args...>) |
run with argument(if previous was set by "set args") |
| load | load the program |
| attach process-id (or gdb –pid <pid>) |
debug an already running process |
| detach | release the previous attached process |
| symbol-file filename | Read symbol table information from file filename |
| i threads | Display thread |
| i share | Print the names of the shared libraries which are currently loaded |
| c | continue |
| b | add breakpoint |
| w | add watchpoint |
| s | step |
| n | next |
| si | step instruction |
| info all-registers | show all registers |
| i r | same as info registers |
| i r rax | display register rax value (HEX) |
| p/x $rax | display register rax value (HEX) |
| p/d $rax | display register rax value (signed DEC) |
| p/u $rax | display register rax value (unsigned DEC) |
| p/t $rax | display register rax value (BIN) |
| p/f $rax | display register rax value (Floating point number) |
| p/c $rax | display register rax value (CHAR) |
| p/a $rip | display register rip value (ADDRESS) |
| x /i $pc | print next instruction to be executed |
| p *array@len | display array content |
| p/x (short[2])0x12345678 | display array content |
| x /256xb mem | examine memory, 256=repeat count, x=hex, {b=byte, h=2bytes,w=4bytes,g=8bytes} |
| set *((int *) mem) = value | set memory content (char, short, int, long, long long) |
| set *((char *) reg) = *((char *) reg) | 0x80 | set peripheral register bit |
| set *((char *) reg) = *((char *) reg) & (~0x80) | clear peripheral register bit |
| l filename:function | list the source in the filename:function |
| l function | list the source in function |
| l + | list more |
| l - | list less |
| bt | backtrace |
| f n | select frame number n |
| set $f00=*object_ptr | set convenience variable |
| show convenience | show convenience variable |
| source gdbscriptFile | load GDB script file |
| define print_vars p var1 p var2 end |
create GDB function |
| disas | view disassemble |
"$*" is equivalent to "$1c$2c...", where c
is the first character of the value of the IFS variable. If IFS is
unset, the parameters are separated by spaces. If IFS is null, the
parameters are joined without intervening separators.@ Expands to the positional parameters, starting from
one. When the expansion occurs within double quotes, each parameter
expands to a separate word. That is, "$@" is equivalent to "$1" "$2"
... If the double-quoted expansion occurs within a word, the
expansion of the first parameter is joined with the beginning part
of the original word, and the expansion of the last parameter is joined
with the last part of the original word. When there are no positional
parameters, "$@" and $@ expand to nothing (i.e., they are removed).