易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : linux

LINUX使用记录

-------------------------------------------------------------------------------------------------------
By:yuyongbao
QQ:673360056
1、  linux下共享文件。安装smbserver。然后在《系统设置》中打开《服务器设置》的《smb server》服务器,输入相关路径即可。然后在window中,使用网络邻居查找linux。(注意:linux下的work group要与window一致.选择share .不要密码选项).最后,重启smb… 
2、  重启服务的命令为:/etc/init.d/smb restart
3、  linux下上网设置。将window下的两个vmware虚拟网卡设置成自动获取IP,然后,在linux下的网络设置里,设置IP为与window同一个网段,然后设置DNS与window相同即可。现在设置的linux IP为10.10.70.111。
4、  tar –jxvf 用来解.tar.bz2后缀的文件。而zxvf则用来解.tar.gz后缀的文件。
5、 解包:tar xvf FileName.tar
打包:tar cvf FileName.tar DirName打包目录。还可以加上zcvf或是jcvf选项变成.tar.gz或.tar.bz2的格式
6、  .压缩一组文件为tar.gz后缀。
# tar cvf backup.tar /etc
#gzip -q backup.tar

# tar cvfz backup.tar.gz /etc/
2.释放一 ......

从硬盘启动linux系统

 -------------------------------------------------------------------------------------------------------
//By:yuyongbao
//QQ:673360056
//平台powerpc mpc8379e linux 2.6.22
1、先用fdisk 给硬盘分一个区,用作文件系统。参照u-boot-ppc编译说明一文。
2、用mke2fs格式化硬盘的一个分区mke2fs /dev/sda2 (比如分区2)
3、设置u-boot参数。bootargs=root=/dev/sda2 rw console=ttyS0,115200 rootfstype=ext2
4、将ramdisk拷贝到硬盘的ext2分区。(可以将ramdisk挂到一个目录下,然后将其中的除dev目录之外的其余目录都拷贝过来。)
5、Usage: makedevs [-d device_table] rootdir
6、makedevs –d /device_table.txt /mnt/cdrom
7、其中-d device_table 为table文件的目录。它会在/mnt/cdrom目录下建立dev目录,并建立相应的nod点(根据device_table.txt来建立)
8、             启动信息见《从硬盘启动完整信息》
9、将setenv bootargs root=0810  rw console=ttyS0,115200 rootdelay=5将可以实现从u盘启动。setenv bootargs root=/dev/sdb1 rw console=ttyS0,11 ......

从SD卡启动linux系统

  -------------------------------------------------------------------------------------------------------
//By:yuyongbao
//QQ:673360056
//平台powerpc mpc8379e linux 2.6.22
1、先用fdisk 给SD卡分区,用作文件系统。
将读卡器插入PC机虚拟机,在PC机上执行fdisk /dev/sdb
选择n 。。。。。。。。步骤与硬盘分区一致。
2、用mkfs.ext3格式化SD卡的一个分区mke2fs /dev/sdb1 (比如分区1)
3、将SD卡挂载mount –t ext3 /dev/sdb1 /home/nfs ,然后将文件系统拷贝进去。
4、             设置u-boot参数。bootargs=root=b301 rw console=ttyS0,115200 rootdelay=5(或setenv bootargs root=/dev/mmcblk0p1 rw console=ttyS0,115200 rootdelay=5)
启动信息见《从SD启动完整信息》
启动信息(可能还有一小部分错误)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 
U-Boot 1.3.0-rc2 (Apr 24 2008 - 01:32:37) MPC83XX
 
Reset Status:
 
CPU:&n ......

Linux执行以及虚拟内存之用

Linux Execution and Virtual Memory Utilization 
Linux执行以及虚拟内存之用
When Linux boots, it starts with the MMU disabled, so initially it deals only with physical 
memory. The kernel image is copied to physical address 0x8000 in DRAM and executed. First a master page table is created and placed just before the kernel, which describes all available DRAM. The MMU is then switched on, mapping all of DRAM to virtual address 0xC0000000. The kernel reserves 64K of virtual memory for the interrupt handler code (usually at the very top of virtual memory), and sets up all the mappings for the hardware registers (UART, USB, LCD, GPIO, etc). Once kernel space is established and all drivers are initialized, the linux kernel moves on to establishing user space. This involves reading in the file system and actually executing processes. 
当Linux启动时,是以MMU禁用来开启它的旅途的,因此,它起初只关注物理内存。内核映像(kernel image)被拷贝到DRAM的物理地址 0x8000处,并得到执行权。 ......

Linux下用Busy Box制作Ramdisk全过程

  -------------------------------------------------------------------------------------------------------
//By:yuyongbao
//QQ:673360056
Linux下用Busy Box制作Ramdisk全过程
1 建立根文件系统结构
#mkdir rootfs
#cd rootfs
#mkdir bin dev etc lib proc sbin tmp usr var
#chmod 1777 tmp
#mkdir usr/bin usr/lib usr/sbin
#mkdir var/lib var/lock var/log var/run var/tmp
#chmod 1777 var/tmp
2 准备链接库
#cd ${OBJ_LIB}/lib (${OBJ_LIB}是交叉编译环境的目录)
#for file in libc libcrypt libdl libm \
>libpthread libresolv libutil
>do
>cp $file-*.so /home/fortis/rootfs/lib
>cp -d $file.so.[*0-9] /home/fortis/rootfs/lib
>done
#cp -d ld*.so* /home/fortis/rootfs/lib
3 使用busybox制作系统应用程序
3.1 下载busybox(http://www.busybox.net/)并解压。
3.2 进入解压后的目录,配置Busybox
$make menuconfig
Busybox Settings >
General Configuration >
[*] Support for devfs
Build Options >
[*] Build BusyBox as a static binary (no shared libs)
......

linux内核结构体

 -------------------------------------------------------------------------------------------------------
//By:yuyongbao
//QQ:673360056
LINUX 内核结构体
struct attribute
{
    const char    * name;
    struct module        * owner;
    mode_t        mode;
};
struct attribute_group
{
    const char    * name;
    struct attribute  ** attrs;
};
struct blocking_notifier_head
{
    struct rw_semaphore rwsem;
    struct notifier_block *head;
};
struct bus_attribute
{
    struct attribute  attr;
    ssize_t (*show)(struct bus_type *, char * buf);
    ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
};
struct bus_type
{
    const char    * name;
   ......
总记录数:5772; 总页数:962; 每页6 条; 首页 上一页 [932] [933] [934] [935] 936 [937] [938] [939] [940] [941]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号