Build your own Linux 3 Preliminary improvement (providing network functions) 1 add profile file
# Ash profile # VIM: syntax = sh # No core files by default # ulimit-s-c 0>/dev/null 2> & 1 # user = "'id-UN'" // not supported yet user Login function, user = "root" LOGNAME = $ userps1 = '[$ user @ $ hostname $ PWD] #' // prompt Path = $ PATH hostname = '/ bin/hostname' // host name Export user LOGNAME PS1 path // export the environment variable
2. Enrich the RFM File
#! /Bin/sh Path =/sbin:/bin:/usr/sbin:/usr/bin:/lib:/usr/local/trolltech/QtEmbedded-x86/lib: /usr/librunlevel = sprevlevel = numask 022 export path runlevel prevlevel # trap CTRL-C & C only in this shell so we can interrupt subprocesse. for more information about the Mount-amkdir/dev/ptsmount-T devpts/dev/PTS // code, see the previous article (mdev principles ). Echo/sbin/mdev>/proc/sys/kernel/hotplugmdev-smkdir-P/var/lock/bin/hostname-F/etc/sysconfig/hostname insmod/lib/MII. ko // The two kernel modules required for inserting the NIC, insmod/lib/pcnet32.koifconfig eth0 up // enable the DHCP function of the NIC udhcpc // busybox, obtain the IP address echo-e "\ t \ twelcome to \ 033 [31membeddedce123 \ 033 [0 m Linux"
The effect is as follows:
3. Additional knowledge
Modinfo: view the detailed information, "dependency information", and "path" of the module.
All modules loaded when the/etc/modprobe. conf system is started, and parameter information is transmitted to the module. You can edit it to learn how to transmit information to the module when it is started.
Alias alias
Options Parameters
Modprobe-r // Uninstall a module. You only need to specify the module name and load a removed module without adding R.
Modprobe-r floppy // remove a floppy disk
Ls/lib/modules/'uname-R' // modproce find the module here
Insmod insert Module
Insmod/path/to/module_file it must specify the full path of the module
Lsmod displays all modules
Rmmod removes the module and does not need to specify the path
Depmod is used to automatically generate dependency files and ing files for all modules.
Modules. Dep map. Dep