genimage.cfg.template hacking

#*********************************************************************************
#*                     genimage.cfg.template hacking
#* 说明:
#*     分析i.MX6 genimage.cfg.template模板配置原理。
#*
#*                                              2018-1-23 深圳 宝安西乡 曾剑锋
#********************************************************************************/

# 一、参考文档:
#    1. Genimage - The Image Creation Tool
#        https://github.com/pengutronix/genimage

# Minimal SD card image for the Freescale boards Template
#
# We mimic the .sdcard Freescale's image format:
# * the SD card must have 1 kB free space at the beginning,
# * U-Boot is dumped as is,
# * a FAT partition at offset 8 MB is containing zImage/uImage and DTB files
# * a single root filesystem partition is required (ext2, ext3 or ext4)
#

# boot分区,vfat格式
image boot.vfat {
  vfat {
    files = {
      %FILES%   # 需要拷贝的文件名称
    }
  }
  size = 16M    # 分区大小
}

image sdcard.img {
  hdimage {
  }

  # 直接拷贝的u-boot文件
  partition u-boot {
    in-partition-table = "no"   # Boolean specifying whether to include this partition in the partition table.
    image = "u-boot.imx"
    offset = 1024
  }

  # 指定分区类型,引用前面定义的boot.vfat分区
  partition boot {
    partition-type = 0xC
    bootable = "true"
    image = "boot.vfat"
    offset = 8M
  }

  # 文件系统分区
  partition rootfs {
    partition-type = 0x83
    image = "rootfs.ext2"
  }
}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值