
embedded system
菩提本無樹-永不放棄
这个作者很懒,什么都没留下…
展开
-
列出所有使用bss段的變數與使用的空間大小
objdump -t XXX.elf | grep ".bss"原创 2020-11-10 22:36:34 · 248 阅读 · 0 评论 -
Linux: Find Out How Many File Descriptors Are Being Used
轉載自 https://www.cyberciti.biz/tips/linux-procfs-file-descriptors.htmlWhile administrating a box, you may wanted to find out what a processes is doing and find out how many file descriptors (fd) are ...转载 2018-09-14 12:56:16 · 250 阅读 · 0 评论 -
sysrq-trigger
ref https://www.ibm.com/developerworks/cn/linux/l-cn-sysrq/index.html轉載# 立即重新启动计算机 echo "b" > /proc/sysrq-trigger# 立即关闭计算机 echo "o" > /proc/sysrq-trigger# 导出内存分配的信息 (可以用/var/log/messag...转载 2018-09-19 15:04:58 · 190 阅读 · 0 评论 -
ubiformat partition(The partition has data in it)
umount /configs/ubidetach -p /dev/mtd12#ubidetach -m 12ubiformat /dev/mtd12 -yubiattach /dev/ubi_ctrl -m 12ubimkvol /dev/ubi1 -s 14MiB -N my_ubi_volmount -t ubifs -o sync /dev/ubi1_0 /configs/转载 2018-09-25 15:48:55 · 639 阅读 · 0 评论 -
在Linux下使用兩張網卡的設定(gateway)
轉載自http://astone-working.blogspot.com/2012/05/linux.html參考資料1. 鳥哥的Linux私房菜--第八章、路由觀念與路由器設定2. 兩張網卡,不能2個gateway嗎?在一些場合,需要讓同一台電腦,用兩張不同的網卡,來做不同的事情,今天要說的就是這個。最常應用的狀況就是:一個網卡用於對內網路,一個網卡用於對外網路。 設定...转载 2018-10-03 16:55:16 · 7711 阅读 · 0 评论 -
How to list the open file descriptors (and the files they refer to) in my current bash session
轉載 自https://unix.stackexchange.com/questions/333186/how-to-list-the-open-file-descriptors-and-the-files-they-refer-to-in-my-currenYes, this will list all open file descriptors:$ ls -la /proc/$$/f...转载 2018-10-09 15:36:43 · 134 阅读 · 0 评论 -
strace
轉載自 https://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/strace.html6. strace 跟踪进程中的系统调用strace常用来跟踪进程执行时的系统调用和所接收的信号。 在Linux世界,进程不能直接访问硬件设备,当进程需要访问硬件设备(比如读取磁盘文件,接收网络数据等等)时,必须由用户态模式切换至内核态模式,通过系统...转载 2018-11-14 15:16:20 · 255 阅读 · 0 评论 -
debug tools
工具参考篇1. gdb 调试利器 2. ldd 查看程序依赖库 3. lsof 一切皆文件 4. ps 进程查看器 5. pstack 跟踪进程栈 6. strace 跟踪进程中的系统调用 7. ipcs 查询进程间通信状态 8. top linux下的任务管理器 9. free 查询可用内存 10. vmstat 监视内存使用情况 11. iostat 监视I/O子系统...转载 2018-11-14 15:27:15 · 2391 阅读 · 0 评论 -
How to determine the filesystem of an unmounted device?
轉載自 https://unix.stackexchange.com/questions/53542/how-to-determine-the-filesystem-of-an-unmounted-deviceThere are multiple ways to get this information. Most of them require you to parse the output...转载 2018-11-16 16:27:33 · 301 阅读 · 0 评论 -
killall doesn't kill all and rarely kills, what is the command for then?
轉載自https://askubuntu.com/questions/271028/killall-doesnt-kill-all-and-rarely-kills-what-is-the-command-for-thenQ:I occasionally use the killall command to kill processes. The reason why I say ocas...转载 2018-11-15 12:40:20 · 286 阅读 · 0 评论 -
nc command
轉載自 https://blog.gtwang.org/linux/linux-utility-netcat-examples/https://blog.gtwang.org/linux/linux-netstat-command-examples/https://blog.longwin.com.tw/2012/02/nc-data-send-socket-server-2012/...转载 2018-12-03 14:09:40 · 297 阅读 · 0 评论 -
Data loss in embedded file system UBIFS after shutdown of system
轉載自 https://stackoverflow.com/questions/34409726/data-loss-in-embedded-file-system-ubifs-after-shutdown-of-system Q:Whenever I run my application on UBIFS file system and do a write operation...转载 2018-08-29 15:11:50 · 160 阅读 · 0 评论 -
udhcpc
udhcpc在更新租約時,會發出下面指令(在租約時間剩餘一半時,會發出)arping -U my_ip -c 3转载 2018-08-27 18:59:23 · 790 阅读 · 0 评论 -
how to monitor Internet connection status
ref:https://unix.stackexchange.com/questions/251625/how-to-log-internet-connection-drops while :do for interface in $(ls /sys/class/net/ | grep -v lo | grep -v p2p0| grep -v wla...转载 2018-08-20 16:46:42 · 177 阅读 · 0 评论 -
u-boot在命令列中參數
http://www.61ic.com/Article/integraDSPARM/OMAPL1x/201111/39235.html转载 2013-12-18 17:18:56 · 689 阅读 · 0 评论 -
write gpio reg
FILENAME:setreg.c-------------------------------------------------------------------------------- 1 /* 2 * Configure GPIO 3 */ 4 5 #include 6 #include 7 #include 8 #转载 2014-09-04 10:54:00 · 1269 阅读 · 0 评论 -
NAND BBT code
FILENAME:drivers/mtd/nand/nand_bbt.c/** * search_bbt - [GENERIC] scan the device for a specific bad block table * @mtd: MTD device structure * @buf: temporary buffer * @td: descriptor for the bad转载 2015-01-30 14:26:33 · 616 阅读 · 0 评论 -
MTD bad Block issue
轉載自http://www.stlinux.com/howto/NAND/BadBlocksSometimes, an attempt to erase a bad block may appear to work. However, this does not mean that the block is usable. Even if subsequent write operatio转载 2015-01-14 13:53:56 · 2148 阅读 · 0 评论 -
ubifs and ubi and mtd
ubi介紹http://www.linux-mtd.infradead.org/doc/ubifs.html#L_raw_vs_ftlhttp://www.linux-mtd.infradead.org/doc/ubi.html mtd首頁 有很多資料http://www.linux-mtd.infradead.org/index.html转载 2015-01-16 19:04:38 · 459 阅读 · 0 评论 -
sata3 devices如何偵測
sata3 devices如何偵測沒插上裝置# cat /proc/scsi/scsi Attached devices: 有插上裝置# cat /proc/scsi/scsi Attached devices:Host: scsi0 Channel: 00 Id: 00 Lun: 00Vendor: ATA Model: INTEL SSD转载 2015-07-24 11:04:23 · 526 阅读 · 0 评论 -
ubiformat and nandwrite
轉載自http://www.linux-mtd.infradead.org/faq/ubifs.html Why do I have to use ubiformat?The first obvious reason is that ubiformat preserves erase counters, so you do not lose your wear-leveli转载 2015-11-10 20:24:20 · 1112 阅读 · 0 评论 -
smartmontools可以用來監控HD的溫度
https://www.smartmontools.org/wiki/Download转载 2016-02-18 18:52:05 · 362 阅读 · 0 评论 -
UBIFS image 用燒錄機燒後mount起來寫入會失敗
解決方法:在生成UBIFS image時加個-F參數即可 What is the the purpose of the -F (--space-fixup) mkfs.ubifs option? Because of subtle ECC errors that can arise when programming NAND flash (see here), ubiformat is the r...转载 2018-02-27 10:36:50 · 470 阅读 · 0 评论 -
GPIO to control led by sysfs
轉載自 https://coldnew.github.io/f7349436/轉載自 http://blog.youkuaiyun.com/Fred_Wu/article/details/51149987转载 2018-02-27 15:43:24 · 227 阅读 · 0 评论 -
ubifs相關
轉載自 https://www.toradex.com/community/questions/7077/how-to-make-partitions-on-slc-nand-flash-which-use.html ubifs size問題討論https://e2e.ti.com/support/arm/sitara_arm/f/791/t/409157?UBIFS-consumes...转载 2018-07-19 15:39:54 · 207 阅读 · 0 评论 -
計算vmalloc and lsmod總共用掉的size
# grep vmalloc /proc/vmallocinfo | awk '{total+=$2}; END {print total}'13602816# lsmod | awk '{total+=$2}; END {print total}'10975894转载 2018-07-31 15:20:05 · 299 阅读 · 0 评论 -
make jffs2
http://rpm.pbone.net/index.php3/stat/45/idpl/16715764/numer/1/nazwa/mkfs.jffs2 http://blog.youkuaiyun.com/itismine/article/details/4775824转载 2013-12-18 17:18:48 · 537 阅读 · 0 评论