Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9995
  • 博文数量: 5
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 42
  • 用 户 组: 普通用户
  • 注册时间: 2014-03-06 13:55
个人简介

专注嵌入式系统移植20年~

文章分类

全部博文(5)

文章存档

2015年(4)

2014年(1)

我的朋友

分类: LINUX

2015-12-04 10:37:34

  1. Ubuntu中visudo文件经编辑后文件头损坏,导致sudo su – 不能使用,拿不到root权限。
    解决方法:
     pkexec bash
  2. demsg 命令:显示开机信息。当进行字符驱动设备开发,需要查看嵌入式cpu的完整信息时,可以不必每次都重启看开机信息,省时省力的好帮手。
  3. Linux中 static u8 *buf;
    u8 == unsigned char;  u16 == unsigned short int;   u32 == unsigned long int; 
  4. Ubuntu recovery mode 下显示文件只读,不可修改时:
    mount -o remount,rw /
  5. Gentoo
    http://dev.gentoo.org/~armin76/arm/pandaboard/install.xml
     

    应改为

    
    	
  6. Gentoo 有些移植好的系统开机时显示超时,原因在于SD卡中的时间配置文件没有配置正确,修改即可。
  7. Gentoo 中配置lxc时,只有一个网卡eth0,怎么办?
      • 打开文件 /etc/conf.d/net,将里面所有的 config_eth0 重命名为 config_br0
      • 增加 config_eth0=”null”   bridge_br0=”eth0″
      • 终端下执行   ln -s net.lo /etc/init.d/net.br0
      • 重启网络 eth0 和br0;
      • lxc的配置文件中增加  lxc.network.type = veth    lxc.network.link = br0

    lxc配置文件
    网络配置

  8. 虚拟机安装gentoo,首次配置网络,显示不存在eth0和eth1,原因:配置的是eth0和eth1,输入命令
     ls -la /sys/class/net 

    可以看到网卡原先的名称,可以看到是enp0s3和enp0s8,再对这两个网卡配置即可。

  9. # emerge packagename 显示 *.tar.bz2 is already locked by another fetcher,解决方法:
    # rm -rf /var/tmp/portage # rm /usr/portage/distfile/.*_lockfile 
  10. linux 下设置开机启动本地程序,如send.sh,做法是在/etc/rc.d/rc.local文件尾添加命令./send.sh。
  11.  如何一劳永逸解决udev和systemd的冲突问题?

    QQ截图20150712160808
    经尝试,可行。
  12. 在gentoo上安装lxc,需要安装3个软件:app-emulation/lxc, bridge-utils和 debootstrape.


阅读(510) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~