1. 程式人生 > 其它 >在Qemu+ARM上執行Minix3核心

在Qemu+ARM上執行Minix3核心

參考

https://www.minix3.org/
https://github.com/Stichting-MINIX-Research-Foundation/minix
https://wiki.minix3.org/doku.php?id=developersguide:minixonarm

交叉編譯

./releasetools/arm_sdimage.sh

執行

qemu-system-arm -M beaglexm -serial stdio -drive if=sd,cache=writeback,file=/home/pengdonglin/data0/minix3/minix/minix_arm_sd.img

qemu-system-arm

目前主線的Qemu不支援beaglexm,需要使用linaro的qemu:git clone git://git.linaro.org/qemu/qemu-linaro.git
下面是我靜態編譯好的qemu-system-arm:
連結: https://pan.baidu.com/s/1fs1xVOtGkOSEJFtR7ShEFw
提取碼: akwc

啟動log:

U-Boot 2013.04-gad65202-dirty (Dec 13 2013 - 11:28:24)

OMAP36XX/37XX-GP ES1.1, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
OMAP3 Beagle board + LPDDR/NAND
I2C: ready
DRAM: 512 MiB
NAND: 256 MiB
MMC: OMAP SD/MMC: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Beagle xM Rev A
No EEPROM on expansion board
Die ID #51454d5551454d555400000051454d55
musb-hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn)
musb-hdrc: MHDRC RTL version 1.400
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
USB Peripheral mode controller at 480ab000 using PIO, IRQ 0
Net: usb_ether
Hit any key to stop autoboot: 0
mmc0 is current device
gpio: pin 173 (gpio 173) value is 0
gpio: pin 4 (gpio 4) value is 0
SD/MMC found on device 0
reading uEnv.txt
1274 bytes read in 1 ms (1.2 MiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
Running uenvcmd ...
starting from MMC
mmc - MMC sub system

Usage:
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
reading kernel.bin
265368 bytes read in 7 ms (36.2 MiB/s)
reading ds.elf
79848 bytes read in 3 ms (25.4 MiB/s)
reading rs.elf
113152 bytes read in 3 ms (36 MiB/s)
reading pm.elf
81024 bytes read in 3 ms (25.8 MiB/s)
reading sched.elf
44692 bytes read in 1 ms (42.6 MiB/s)
reading vfs.elf
182184 bytes read in 5 ms (34.7 MiB/s)
reading memory.elf
2771328 bytes read in 72 ms (36.7 MiB/s)
reading tty.elf
63620 bytes read in 2 ms (30.3 MiB/s)
reading mib.elf
82600 bytes read in 2 ms (39.4 MiB/s)
reading vm.elf
182168 bytes read in 5 ms (34.7 MiB/s)
reading pfs.elf
56532 bytes read in 2 ms (27 MiB/s)
reading mfs.elf
108684 bytes read in 3 ms (34.5 MiB/s)
reading init.elf
317620 bytes read in 9 ms (33.7 MiB/s)
console=tty02 rootdevname=c0d0p1 verbose=0 hz=1000 board_name=BBXM

Starting application at 0x80200000 ...

MINIX 3.4.0. Copyright 2016, Vrije Universiteit, Amsterdam, The Netherlands
MINIX is open source software, see http://www.minix3.org
omap_gp_timer_write: Bad register 0x000048
omap_gp_timer_write: Bad register 0x00004c
Started VFS: 9 worker thread(s)
Starting the mmc driver
mmc_block(info)Initializing the MMC block device
mmc_host_mmchs(info)Using instance number 0
mmc_block(info)System event framework fresh start
Root device name is /dev/c0d0p1
mmc_host_mmchs(info)Enabling high speed mode
/dev/c0d0p1: clean
mmc_host_mmchs(info)Enabling high speed mode
mmc_host_mmchs(info)Enabling high speed mode
/dev/c0d0p1 is mounted on /
none is mounted on /proc
date: timed: No such file or directory
Tue Jan 1 00:00:00 GMT 2013
/dev/c0d0p2: clean
/dev/c0d0p3: clean
size on /dev/imgrd set to 0kB
Multiuser startup in progress ...
Starting hotplugging infrastructure... done.
Starting services: random pty lwip uds ipc log.
Starting daemons: update cron.
Starting i2c subsystem: i2c i2c i2c.
Running on a BeagleBoard-xM
Starting i2c device drivers: tps65950
Sun Aug 19 07:55:21 GMT 2001
framebuffer fresh: pid 239
cat24c256 fb.
Starting network.
IPv6 mode: host
Configuring network interfaces:.
Adding interface aliases:.
Waiting for DAD to complete for statically configured addresses...
Building databases: dev, dev, services.
Starting syslogd.
Starting inetd.
Sun Aug 19 07:55:41 GMT 2001

Minix/evbarm (minix) (console)

login: root
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

For post-installation usage tips such as installing binary
packages, please see:
https://wiki.minix3.org/doku.php?id=usersguide:postinstallation

For more information on how to use MINIX 3, see the wiki:
https://wiki.minix3.org

We'd like your feedback: https://minix3.org/community/

minix# ls
.cshrc .klogin .login .profile .shrc