- 论坛徽章:
- 0
|
(实验环境是64位的ubuntu10.10,编译的是2.6.38的内核)
我是这样子做的:
一、
make ARCH=um defconfig
make ARCH=um menuconfig
然后选择了kernel hacking 中的:
1)complie the kernel with debug info
2)complie the kernel with frame pointers
保存.config
二、
make ARCH=um
make modules_install INSTALL_MOD_PATH=mods ARCH=um
三、
1)到官网下载了64ubuntu10.10的根文件系统,root_fs
2)将root_fs挂载到 /mnt,然后将源码下 /mods/lib/modules/2.6.38全部拷贝到根文件系统/lib/modules下,然后卸载该文件
3) 制作交换分区文件系统swap_fs
四、
1)运行 ./linux ubda=./root_fs ubdb=./swap_fs con=pts con0=fd:0,fd:1
可是执行的过程下却一直卡在那边。不知道是怎么回事,麻烦大哥大姐指点下,谢谢了。- lys@lys:~/桌面/linux-2.6.38$ ./linux ubda=./root_fs ubdb=./swap_fs con=pts con0=fd:0,fd:1
- Core dump limits :
- soft - 0
- hard - NONE
- Checking that ptrace can change system call numbers...OK
- Checking syscall emulation patch for ptrace...OK
- Checking advanced syscall emulation patch for ptrace...OK
- Checking for tmpfs mount on /dev/shm...OK
- Checking PROT_EXEC mmap in /dev/shm/...OK
- Checking for the skas3 patch in the host:
- - /proc/mm...not found: No such file or directory
- - PTRACE_FAULTINFO...not found
- - PTRACE_LDT...not found
- UML running in SKAS0 mode
- Adding 12951552 bytes to physical memory to account for exec-shield gap
- Linux version 2.6.38 (root@lys) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) ) #1 Thu Aug 25 17:14:58 CST 2011
- Built 1 zonelists in Zone order, mobility grouping on. Total pages: 11198
- Kernel command line: ubda=./root_fs ubdb=./swap_fs con=pts con0=fd:0,fd:1 root=98:0
- PID hash table entries: 256 (order: -1, 2048 bytes)
- Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
- Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
- Memory: 28176k available
- NR_IRQS:15
- Calibrating delay loop... 576.71 BogoMIPS (lpj=2883584)
- pid_max: default: 32768 minimum: 301
- Mount-cache hash table entries: 256
- Checking that host ptys support output SIGIO...Yes
- Checking that host ptys support SIGIO on close...No, enabling workaround
- Using 2.6 host AIO
- NET: Registered protocol family 16
- bio: create slab <bio-0> at 0
- Switching to clocksource itimer
- NET: Registered protocol family 2
- IP route cache hash table entries: 512 (order: 0, 4096 bytes)
- TCP established hash table entries: 2048 (order: 3, 32768 bytes)
- TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
- TCP: Hash tables configured (established 2048 bind 2048)
- TCP reno registered
- UDP hash table entries: 128 (order: 0, 4096 bytes)
- UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
- NET: Registered protocol family 1
- mconsole (version 2) initialized on /home/lys/.uml/TIHQ33/mconsole
- Checking host MADV_REMOVE support...OK
- VFS: Disk quotas dquot_6.5.2
- Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
- msgmni has been set to 55
- io scheduler noop registered
- io scheduler deadline registered
- io scheduler cfq registered (default)
- TCP cubic registered
- NET: Registered protocol family 17
- Initialized stdio console driver
- Console initialized on /dev/tty0
- console [tty0] enabled
- Initializing software serial port version 1
- console [mc-1] enabled
- ubda: unknown partition table
- ubdb: unknown partition table
- Switched to NOHz mode on CPU #0
- EXT3-fs (ubda): error: couldn't mount because of unsupported optional features (240)
- EXT2-fs (ubda): error: couldn't mount because of unsupported optional features (240)
- EXT4-fs (ubda): mounted filesystem with ordered data mode. Opts: (null)
- VFS: Mounted root (ext4 filesystem) readonly on device 98:0.
- Virtual console 7 assigned device '/dev/pts/7'
- init: ureadahead main process (218) terminated with status 5
- Virtual console 1 assigned device '/dev/pts/8'
- Virtual console 2 assigned device '/dev/pts/9'
- Virtual console 3 assigned device '/dev/pts/10'
- Virtual console 4 assigned device '/dev/pts/11'
- Virtual console 5 assigned device '/dev/pts/12'
- Virtual console 6 assigned device '/dev/pts/13'
- Virtual console 8 assigned device '/dev/pts/14'
- Virtual console 9 assigned device '/dev/pts/15'
- Virtual console 10 assigned device '/dev/pts/16'
- Virtual console 11 assigned device '/dev/pts/17'
- Virtual console 12 assigned device '/dev/pts/18'
- init: console-setup main process (238) terminated with status 1
- udevd[247]: failed to create queue file: No such file or directory
- udevd[247]: error creating queue file
- init: udev main process (247) terminated with status 1
- init: udev main process ended, respawning
- init: udevmonitor main process (250) terminated with status 2
- udevadm[420]: error sending message: Connection refused
- line_ioctl: tty7: unknown ioctl: 0x4b70
- line_ioctl: tty7: unknown ioctl: 0x5602
- line_ioctl: tty7: unknown ioctl: 0x5603
- line_ioctl: tty7: unknown ioctl: 0x4b3a
- line_ioctl: tty7: unknown ioctl: 0x5606
- line_ioctl: tty1: unknown ioctl: 0x4b3a
- mountall: Disconnected from Plymouth
- init: plymouth main process (219) killed by SEGV signal
- init: plymouth-splash main process (421) terminated with status 2
复制代码 |
|