Firefly开源社区
标题:
如何挂载已经编译好的kernel.img
[打印本页]
作者:
bacon36
时间:
2015-1-22 18:10
标题:
如何挂载已经编译好的kernel.img
本帖最后由 bacon36 于 2015-1-22 18:19 编辑
新手,编译好的kernel文件。想挂载到目录上查看内容。但是
sudo mount -t ext[234] [-o loop] kernel.img testmount/
mount: wrong fs type, bad option, bad superblock on /dev/loop3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
复制代码
dmesg|tail:
[13035.226684] EXT4-fs (loop3): VFS: Can't find ext4 filesystem
复制代码
fdisk -l kernel.img
Disk kernel.img: 6 MB, 6330880 bytes
255 heads, 63 sectors/track, 0 cylinders, total 12365 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1a000003
Disk kernel.img doesn't contain a valid partition table
复制代码
ubuntu14.4的发行版
按照网上资料,查了下没有没有 /etc/filesystems 和 /etc/vfs
完全不知道怎么办了。
作者:
zhansb
时间:
2015-1-22 18:19
kernel.img只能刷哦,不能想system那样挂载
作者:
bacon36
时间:
2015-1-22 18:46
zhansb 发表于 2015-1-22 18:19
kernel.img只能刷哦,不能想system那样挂载
那请问有没有什么方法查看编译好的目录结构呢?
作者:
zhansb
时间:
2015-1-23 09:40
楼主可以看看这个文件arch/arm/Makefile:
332 kernel.img: zImage
333 $(Q)$(srctree)/mkkrnlimg $(objtree)/arch/arm/boot/zImage $(objtree)/kernel.img >/dev/null
334 @echo ' Image: kernel.img is ready'
335
336 %_kernel.img: %.dtb zImage
337 $(Q)cat $(objtree)/arch/arm/boot/zImage $(objtree)/arch/arm/boot/dts/$*.dtb > $(objtree)/zImage-dtb && \
338 $(srctree)/mkkrnlimg $(objtree)/zImage-dtb $(objtree)/kernel.img >/dev/null && \
339 rm -f $(objtree)/zImage-dtb
340 @echo ' Image: kernel.img (with $*.dtb) is ready'
341
342 LOGO := $(notdir $(wildcard $(srctree)/logo.bmp))
343 %.img: %.dtb kernel.img $(LOGO)
344 $(Q)$(srctree)/resource_tool $(objtree)/arch/arm/boot/dts/$*.dtb $(LOGO)
345 @echo ' Image: resource.img (with $*.dtb $(LOGO)) is ready'
复制代码
了解一下kernel.img和zImage的格式
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1