connection-> Data
Auto-login username (user111)
connection-> SSH -> Auth -> Credentials
private key file for authentication:
(xxxx.ppk)
connection-> SSH -> bugs
Ignore SSH-2 maximum packet size (ON)
connection-> Data
Auto-login username (user111)
connection-> SSH -> Auth -> Credentials
private key file for authentication:
(xxxx.ppk)
connection-> SSH -> bugs
Ignore SSH-2 maximum packet size (ON)
https://dracut.wiki.kernel.org/index.php/Main_Page
https://man7.org/linux/man-pages/man8/dracut.8.html
https://linuxconfig.org/how-to-build-an-initramfs-using-dracut-on-linux
linux開機dracut#
https://www.itread01.com/p/1390355.html
http://linux.51yip.com/search/dracut
http://stahlworks.com/dev/swiss-file-knife.html
資訊科技小舖: 小工具的集合Swiss File Knife (cola-zero.blogspot.com)
小工具的集合Swiss File Knife
Swiss File Knife提供類似Linux與Unix系統的Shell功能,可以進行檔案管理、檔案切割與組合、進位轉換、執行檔轉成原始碼、檔案MD5計算與比較、FTP server、封包監控、將多個Swiss File Knife指令組成Script執行
https://wiki.centos.org/zh-tw/TipsAndTricks/CreateNewInitrd
建立一個新的起始用 RAM 磁碟映像
以 CentOS 的安裝碟開機(例如首張 CD 或 DVD)。
在 boot: 提示符輸入 linux rescue。
以讀寫模式掛載所有檔案系統。
mount --bind /proc /mnt/sysimage/proc
mount --bind /dev /mnt/sysimage/dev
mount --bind /sys /mnt/sysimage/sys
chroot /mnt/sysimage
在採用多路徑主目錄('/')的 CentOS7 下,請先執行以下指令,然後才 chroot 進入 '/mnt/sysimage':
mount --bind /run /mnt/sysimage/run
systemctl start multipathd.service
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/updating-drivers-during-installation_installing-rhel-as-an-experienced-user#performing-an-assisted-driver-update_updating-drivers-during-installation
http://cjcheema.com/2019/06/how-to-recover-or-rebuild-initramfs-in-centos-7-linux/
How to recover or rebuild initramfs in CentOS 7 Linux
https://access.redhat.com/discussions/3722151
https://bugs.centos.org/view.php?id=16898
http://elrepoproject.blogspot.com/2019/08/rhel-80-and-support-for-removed-adapters.html
hexadecimal 16
decimal 10
octal 8
binary 2
4bit 2補數
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000 -8
9 1001 -7
10 a 1010 -6
11 b 1011 -5
12 c 1100 -4
13 d 1101 -3
14 e 1110 -2
15 f 1111 -1
16bit 2補數
0x7fff = 32767
0x8000 = 32768, -32768
32bit 2補數
0x7fffffff = 2147483647
0x80000000 = 2147483648, -2147483648
1k = 1024 = 0x400
4k = 4096 = 0x1000
8k = 8192 = 0x2000
8khz sampling rate, period 125us, 0.125ms
git repo 管理
有一個使用情形是用 repo管理
已經出一版 1.0 sdk了。
如果是有patch的話想只出1.01有修改的檔案
如 project a 的 ddd.c 和 project b的 eee.c
是不是有對應的指令可以做到
repo forall -c 'git diff --src-prefix=old/$REPO_PATH/ --dst-prefix=new/$REPO_PATH/ v1.0 v1.0.1' > all.patch
This command generates a single patch for the change from v1.0 to v1.0.1 tags.
將有修改後的檔案 tar起來。
single tar file:: files the change from v1.0 to v1.0.1 tags.
List file different to `filelist`
$ repo forall -c 'git diff HEAD v1.0.1 v1.0 --name-only | sed -e "s|^|$REPO_PATH/|"' > filelist
Create tarball according to `filelist`
$ tar jcvf test.tar.bz2 `cat filelist`
https://stackoverflow.com/questions/33030289/is-there-a-tool-to-create-repo-manifest-file-with-sha-based-on-current-work-dire
The repo manifest command creates manifest files with fixed SHA-1s based on the current workspace.
repo manifest -r -o my-manifest.xml
只用git管理的情形
http://stackoverflow.com/questions/12841360/git-archive-from-changed-files-on-bare-repos
git archive --format=tar --prefix='/' master `git diff V1.02 master --name-only` | gzip -9 > ~/tars/update-v1.02-`git describe master --tags`.tar.gz
https://www.jianshu.com/p/58e5d4f9f9a9
https://source.android.com/setup/develop/repo
大丈夫日記
http://ryan0210.blogspot.com/2013/10/coding-repo-git.html
泰勞筆記
https://thai-lin.blogspot.com/2017/05/repo-git.html
repo sync -j threadcount
-j threadcount :在線程之間拆分同步,以加快完成速度。確保不要通過為其他任務保留一些CPU來壓倒計算機。要查看可用CPU的數量,請首先運行: nproc --all
git push origin master
1.
直接 push:
$ git push orgin default:master
2.
進到 code review的push 指令
git push origin default:refs/for/master
PS. 其實 repo upload 指令,就是把 topic branch push 到 refs/for/project-branch,
就會直接進到 code-review 頁面上
tig
m main view
d diff view
r branch view the branches, remotes and tags in the repository.
t tree view
b blame view Displays the file content annotated or blamed by commits.
all view
j k up/down
J K next/previous
上鍵 下鍵 next/previous
page up/down : page up down
q 關閉 畫面
in main view
D 切換 date display modes
A 切換 author display modes
X 切換 commit sha
enter 查看 commit 的詳細 diff 變更
q 關閉 diff 畫面。
還有 tig 指令後面接 branch 名稱可以直接查看分支,接著在分支 commit 上按大寫 C 可以 cherry-pick 回目前的 branch,而 tig 後面接檔名的話可以直接查看跟這個檔案有關的 commit,更多的基本功能介紹可以看 git? tig! 這篇文章。
https://devhints.io/tig
http://blog.kidwm.net/388
http://jonas.nitro.dk/tig/manual.html
96年 11月出版
旗標出版
embedded linux 開發實務徹底研究
christopher hallinan
piggy.s
.section .piggydata, #alloc
.globl input_data
input_data:
.incbin "arch/arm/boot/compressed/piggy.gz"
.globl input_data_end
intpu_data_end:
http://news.eeworld.com.cn/mcu/article_2016062227204.html
kernel build no.
.versino ex: #11
scripts/mkversion
makefile
--setup macro
include/linux/init.h
linux 2.6
linker sciprt
do_initcalls(void)
__initcall_start
__initcall_end
print_symbol()
make ARCH=arm CROSS_COMPILE=xscale-be- zImage
-fstack-usage will generate an extra file
that specifies
the maximum amount of stack used, on a per-function basis.
The file has the same
basename as the target object file with a .su extension.
Each line of this file is made up of three fields:
-Wstack-usage will issue a warning for each
subprogram whose stack usage might be larger than the specified amount of
bytes. The wording is in keeping with the qualifier documented above.