From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Sat, 3 Mar 2018 16:47:06 +0100 Subject: [Buildroot] [PATCH v4 1/4] imx-mkimage: new package In-Reply-To: <1520065060-20046-2-git-send-email-karl.erik.larsson@gmail.com> References: <1520065060-20046-1-git-send-email-karl.erik.larsson@gmail.com> <1520065060-20046-2-git-send-email-karl.erik.larsson@gmail.com> Message-ID: <20180303164706.0084b2ec@windsurf.home> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello, On Sat, 3 Mar 2018 09:17:37 +0100, Erik Larsson wrote: > diff --git a/package/imx-mkimage/imx-mkimage.mk b/package/imx-mkimage/imx-mkimage.mk > new file mode 100644 > index 0000000..506ae75 > --- /dev/null > +++ b/package/imx-mkimage/imx-mkimage.mk > @@ -0,0 +1,39 @@ > +################################################################################ > +# > +# imx-mkimage > +# > +################################################################################ > + > +IMX_MKIMAGE_VERSION = imx_4.9.51_imx8m_beta > +IMX_MKIMAGE_SITE = https://source.codeaurora.org/external/imx/imx-mkimage > +IMX_MKIMAGE_SITE_METHOD = git > +IMX_MKIMAGE_LICENSE = GPL-2.0+ > +IMX_MKIMAGE_LICENSE_FILES = iMX8dv/COPYING > +HOST_IMX_MKIMAGE_DEPENDENCIES = uboot linux firmware-imx arm-trusted-firmware > + > +define HOST_IMX_MKIMAGE_BUILD_CMDS > + # These files are generated by firmware-imx, uboot and arm-trusted-firmware > + # Copy the files into the iMX8M folder to make building of this package simple > + # The NXP engineers has constructed to buildprocess with a bunch of hardcoded > + # file names and pathes. > + > + # Currently this only supports iMX8M. When more hardware is available > + # this needs to be selectable based on iMX8-version (iMX8M,iMXQ etc). > + cp $(BINARIES_DIR)/u-boot-spl.bin $(@D)/iMX8M > + cp $(BINARIES_DIR)/lpddr4_pmu_train* $(@D)/iMX8M > + cp $(BINARIES_DIR)/fsl-imx8mq-evk.dtb $(@D)/iMX8M > + cp $(BINARIES_DIR)/bl31.bin $(@D)/iMX8M > + cp ${BINARIES_DIR}/u-boot-nodtb.bin $(@D)/iMX8M > + > + # In soc.mk it's hardcoded that the mkimage tool is named mkimage_uboot > + # and that it's located in the iMX8M folder. > + cp $(HOST_DIR)/bin/mkimage $(@D)/iMX8M/mkimage_uboot > + > + $(MAKE) -C $(@D) SOC=iMX8M flash_spl_uboot > +endef > + > +define HOST_IMX_MKIMAGE_INSTALL_CMDS > + $(INSTALL) -D -m 755 $(@D)/iMX8M/flash.bin $(BINARIES_DIR)/imx-boot-imx8mqevk-sd.bin I'm not a big fan of the fact that this host package not does not install any host tool, but instead post-processes images created by other packages. Would it be possible for this package to just install host tools, and then have a post-image script that uses these host tools to provide the final flash.bin image ? Thomas -- Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com