[#5575] make vmImage would include rootfs
Submitted By: Mingquan Pan
Open Date
2009-09-29 00:08:43 Close Date
2009-10-09 02:33:48
Priority:
Medium Assignee:
Mike Frysinger
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
09r1-rc9
App binary format:
N/A
Summary: make vmImage would include rootfs
Details:
make vmImage would include rootfs on bf526 ezbrd.
when make normal images, I get:
test@linux-nand:~/work/cruise/checkouts/uclinux-dist> ll images/
...
rwxrwxrwx 1 test users 19 2009-09-29 11:50 uImage -> uImage.gz.initramfs
-rw-r--r-- 1 test users 4546286 2009-09-29 11:50 uImage.gz.initramfs
-rw-r--r-- 1 test users 1216023 2009-09-29 11:49 vmImage
then I do cp images/rootfs.ubifs romfs/ and make image, I get:
test@linux-nand:~/work/cruise/checkouts/uclinux-dist> ll images/
total 66684
...
lrwxrwxrwx 1 test users 19 2009-09-29 11:55 uImage -> uImage.gz.initramfs
-rw-r--r-- 1 test users 8172071 2009-09-29 11:55 uImage.gz.initramfs
-rw-r--r-- 1 test users 4546286 2009-09-29 11:55 vmImage
-rwxr-xr-x 1 test users 9397270 2009-09-29 11:55 vmlinux
And this vmImage can boot up with ubifs as rootfs(but actually this device doesn't be found,because conflict with eth and switch doesn't be changed). Should it be failing for not finding rootfs ?
CPU: ADSP bf526-0.0 (Detected Rev: 0.0) (parallel flash boot)
Board: ADI BF526 EZ-Board board
Support: http://blackfin.uclinux.org/
Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz
RAM: 64 MB
Flash: 4 MB
In: serial
Out: serial
Err: serial
Net: Blackfin EMAC
MAC: 00:E0:22:FE:63:4D
Hit any key to stop autoboot: 0
bfin> print
bootcmd=run ramboot
bootdelay=5
baudrate=57600
loads_echo=1
autoload=no
rootpath=/romfs
hostname=bf526-ezbrd
loadaddr=0x1000000
ubootfile=u-boot.ldr
update=tftp $(loadaddr) $(ubootfile);protect off 0x20000000 0x2003FFFF;erase 0x20000000 0x2003FFFF;cp.b $(loadaddr) 0x20000000 $(filesize)
addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off
ramargs=set bootargs root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart1,57600 console=ttyBF0,57600
ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm
nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3
nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm
flashboot=bootm 0x20100000
ethact=Blackfin EMAC
filesize=2D0D8
fileaddr=1000000
netmask=255.255.255.0
ethaddr=00:E0:22:FE:63:4D
gatewayip=10.99.29.1
serverip=10.100.4.174
ipaddr=10.100.4.50
bootargs=ubi.mtd=4 root=ubi0:ubifs1 rw rootfstype=ubifs earlyprintk=serial,uart1,57600 console=ttyBF1,57600
stdin=serial
stdout=serial
stderr=serial
Environment size: 1047/8188 bytes
bfin> tftp 0x2000000 vmImage
Using Blackfin EMAC device
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'vmImage'.
Load address: 0x2000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
##################################################
done
Bytes transferred = 4546286 (455eee hex)
bfin> bootm
## Booting kernel from Legacy Image at 02000000 ...
Image Name: bf527-2.6.31.1-ADI-2010R1-pre-sv
Created: 2009-09-29 3:50:04 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 4546222 Bytes = 4.3 MB
Load Address: 00001000
Entry Point: 0021c93c
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 0021c93c
Linux version 2.6.31.1-ADI-2010R1-pre-svn7475 (test@linux-nand) (gcc version 4.1.2 (ADI svn)) #68 Tue Sep 29 11:49:56 CST 2009
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart1] enabled
early printk enabled on early_BFuart1
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0016e010
rodata = 0x0016e010-0x001e4c74
bss = 0x001e5000-0x001f9304
data = 0x001f9304-0x00212000
stack = 0x00210000-0x00212000
init = 0x00212000-0x0084b000
available = 0x0084b000-0x03eff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 1
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF526 Rev 0.0
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 400 MHz core clock and 80 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16001
Kernel command line: ubi.mtd=4 root=ubi0:ubifs1 rw rootfstype=ubifs earlyprintk=serial,uart1,57600 console=ttyBF1,57600
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 55448k/65536k RAM, (6372k init code, 1460k kernel code, 656k data, 1024k dma, 572k reserved)
NR_IRQS:119
Configuring Blackfin Priority Driven Interrupts
Console: colour dummy device 80x25
console [ttyBF1] enabled, bootconsole disabled
console [ttyBF1] enabled, bootconsole disabled
Calibrating delay loop... 796.67 BogoMIPS (lpj=1593344)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezbrd_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
musb_hdrc: version 6.0, musb-dma, host, debug=0
musb_hdrc: USB Host mode controller at ffc03800 using DMA, IRQ 59
musb_hdrc musb_hdrc.0: MUSB HDRC host driver
musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
dma_alloc_init: dma_page @ 0x02081000 - 256 pages at 0x03f00000
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 108
io scheduler noop registered (default)
bfin-otp: initialized
Serial: Blackfin serial driver
bfin-uart.1: ttyBF1 at MMIO 0x0 (irq = 31) is a BFIN-UART
brd: module loaded
physmap platform flash device: 00400000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x0039
Intel/Sharp Extended Query Table at 0x0039
Intel/Sharp Extended Query Table at 0x0039
Intel/Sharp Extended Query Table at 0x0039
Intel/Sharp Extended Query Table at 0x0039
cfi_cmdset_0001: Erase suspend on write enabled
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : "bootloader(nor)"
0x000000040000-0x000000200000 : "linux kernel(nor)"
0x000000200000-0x000000400000 : "file system(nor)"
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
NAND device: Manufacturer ID: 0x20, Chip ID: 0xaa (ST Micro NAND 256MiB 1,8V 8-bit)
Creating 2 MTD partitions on "NAND 256MiB 1,8V 8-bit":
0x000000000000-0x000000400000 : "linux kernel(nand)"
0x000000400000-0x000010000000 : "file system(nand)"
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 129024 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 512 (aligned 512)
UBI: data offset: 2048
UBI: empty MTD device detected
UBI: create volume table (copy #1)
UBI error: ubi_scan_get_free_peb: no eraseblocks found
UBI error: ubi_init: cannot attach mtd4
UBI error: ubi_init: UBI error: cannot initialize UBI, error -28
m25p80 spi0.1: sst25wf040 (512 Kbytes)
Creating 2 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
0x000000040000-0x000000080000 : "linux kernel(spi)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1977-07-04 16:20:33 UTC (236881233)
Freeing unused kernel memory: 6372k freed
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.15.1 (2009-09-28 15:32:26 CST) hush - the humble shell
Follow-ups
--- Mike Frysinger 2009-09-29 16:13:39
this is done currently on purpose as an optimization. the assumption is that
the default make first creates a bare vmImage via the linux target (that is
where the .cpio is cleaned) and then the image target copies that vmImage away
before appending the rootfs. this avoids a redundant make in the kernel source
in the majority of cases. same thing happens with the vmlinux.
--- Mike Frysinger 2009-09-29 16:16:08
this isnt specific to any board. it happens in common code for all platforms.
--- Sonic Zhang 2009-09-29 23:35:34
What do you mean "done currently on purpose as an optimization". The
vmImage without rootfs attached is necessary to boot kernel on NOR flash. So,
jthis optimization is not proper.
--- Mike Frysinger 2009-09-30 00:09:49
run `make` and it works fine. the breakage only occurs when people start
running sub-targets themselves.
--- Mike Frysinger 2009-09-30 01:51:27
should be fixed now
--- Mingquan Pan 2009-10-09 02:33:48
Yes, fixed. thanks,close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found