最新消息:VPS服务器又从fzhost.net换回Linode了,主题仍用朋友推荐的大前端D8

how to add make yaffs2 rootfs into buildroot

Yaffs2 crifan 577浏览 0评论

how to add make yaffs2 rootfs into buildroot

1.add:

source "target/yaffs2/Config.in"

into buildroot\buildroot\target\Config.in

2. create the yaffs2 dir under  buildroot\buildroot\target
and add Config.in and yaffs2root.mk into it.

3. for Config.in:
add the configure options:

/* add option to generate rootfs for 2K or 4K pagesize nand */
choice
 prompt "Nand Flash Pagesize"
 default BR2_TARGET_ROOTFS_YAFFS2_PAGESIZE_2K
 depends on BR2_TARGET_ROOTFS_YAFFS2
 
config BR2_TARGET_ROOTFS_YAFFS2_PAGESIZE_2K
 bool "2KB pagesize nand flash"
 depends on BR2_TARGET_ROOTFS_YAFFS2
 
config BR2_TARGET_ROOTFS_YAFFS2_PAGESIZE_4K
 bool "4KB pagesize nand flash"
 depends on BR2_TARGET_ROOTFS_YAFFS2
 
endchoice

4.for yaffs2root.mk:

/* to remove the " for the string */
YAFFS2_TARGET := $(strip $(subst ",,$(BR2_TARGET_ROOTFS_YAFFS2_OUTPUT)))
 
/* set yaffs2 name */
ifeq ($(BR2_TARGET_ROOTFS_YAFFS2_PAGESIZE_2K),y)
YAFFS2_OPTS += 2k
#YAFFS2_TARGET := $(YAFFS2_TARGET).2k
YAFFS2_TARGET :=rootfs.2k.arm.yaffs2
endif
 
ifeq ($(BR2_TARGET_ROOTFS_YAFFS2_PAGESIZE_4K),y)
YAFFS2_OPTS += 4k
#YAFFS2_TARGET := $(YAFFS2_TARGET).4k
YAFFS2_TARGET :=rootfs.4k.arm.yaffs2
endif
 
/* the following line is the actual action to use mkyaffs2image generate the rootfs. */
 # Use fakeroot so mkyaffs2image believes the previous fakery
 echo "$(MKFS_YAFFS2) $(TARGET_DIR) $(YAFFS2_TARGET) $(YAFFS2_OPTS)" 
   >> $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(YAFFS2_TARGET))

5.
in buildroot/package/mtd/mtd.mk :

ifeq ($(strip $(BR2_PACKAGE_MTD_UTILS)),y)
include package/mtd/mtd-utils/mtd.mk
endif

for we now use BR2_PACKAGE_MTD_UTILS, so we must goto :
buildroot\buildroot\package\mtd\mtd-utils\mtd.mk

add :

MKFS_YAFFS2 := $(MTD_HOST_DIR)/yaffs2/mkyaffs2image

into it, where is the loacation of our make image tool locate.

转载请注明:在路上 » how to add make yaffs2 rootfs into buildroot

与本文相关的文章

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
13 queries in 0.273 seconds, using 11.21MB memory