Linux Tips

1. 当断网时,注意MAC地址是否和别的板子冲突。

2. 将"no_console_suspend"加入bootloader command可以打印出更多调试信息

3. 编内核时取得所有的modules:

export INSTALL_MOD_PATH=~/xxxx_modules

4. 保持用户组id号不变:

tar --numeric-owner zxf

 

5. 嵌入式开发时rootfs出现不能mount错误,除了rootfs的分区确实没有对之外,还有可能是SD卡处于写保护状态。

pmic_rtc pmic_rtc.1: setting system clock to 2010-03-24 06:17:02 UTC (1269411422)
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2)
Please append a correct "root=" boot option; here are the available partitions:
b300         3872256 mmcblk0 driver: mmcblk
  b301          968192 mmcblk0p1
  b302         2828936 mmcblk0p2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

 

6. X-win startup log:

/var/log/Xorg.0.log

 

7. apt-get install fbset

 

8.  device /dev/ttyS0 be locked

Delete /var/lock/LCK..ttyS0

 

9. 第一次烧数据到NOR里,关闭并重启板子

U-Boot > sf write 0x70800000 0x0 0x25510
Writing SPI NOR flash 0x0 [0x25510 bytes] <- ram 0x70800000
Unsupported Page Size of 528 bytes
Reprogrammed the Page Size to 512 bytes
Please Power Cycle the board for the change to take effect
SPI flash write failed

 

10. kernel panic -- init force killed或rootfs不能mount,mount后不能进入shell提示符 原因汇总:

1. Wrong mounted partition
2. No-format partition
3. No rootfs in the partition root
4. SD card is locked.
5. /etc/fstab corrupted
检查方法:去掉console=tty0,让所有debug信息都输出到串口

11. 查看io
# iostat -h
----------

12. gksu

sudo 是当前用户的home目录,gksu 是root 用户的home目录

sudo gvim 和 gksu gvim 明显不同,
sudo gvim 读取当前用户下的 ~/.gvim 配置文件,
gksu 读取 root 用户的配置文件,因为当前用户配置文件里设置字体没起作用,:cd 后 :pwd 结果是 /root

 

所以在系统或程序启动时,没有运行终端CLI,可以用gksu来实行root权限。

 

13. linux return code 32512

其实是类似system()产生的ret code,需要右移8位,即32512>>8=127

Exit code 127: Something wrong with the machine?

http://www.slac.stanford.edu/BFROOT/www/Computing/Environment/Tools/Batch/exitcode.html

 

 

14. 使用execvp(argv[0], argv)时,注意它可能会出错返回。

最常见的情况是argv[0]程序没找到,这个时候execvp()会出错返回,exec()替换fork的进程不成功,不处理会有稀奇古怪的SEGFault错误。

 

15. Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/libs/libsexy/libsexy2_0.1.11-2build2_i386.deb  407  Proxy Authentication Required
If you ever set Global proxy in Preference, edit /etc/apt/apt.conf to right one.


16. wget return 403 Forbidden

Ensure /var/www/xxx are with www-data group and R permission

HTTP request sent, awaiting response... 403 Forbidden
1970-01-01 04:56:35 ERROR 403: Forbidden.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值