From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mediacenter.hi.pengutronix.de ([2001:6f8:1178:2::65]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1RsVyM-0005Y0-9v for ptxdist@pengutronix.de; Wed, 01 Feb 2012 09:55:22 +0100 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1RsVyM-00086W-8l for ptxdist@pengutronix.de; Wed, 01 Feb 2012 09:55:22 +0100 Date: Wed, 1 Feb 2012 09:55:22 +0100 From: Michael Olbrich Message-ID: <20120201085522.GG32382@pengutronix.de> References: <1327165141-8606-1-git-send-email-andreas@biessmann.de> <1328050145-14510-1-git-send-email-andreas@biessmann.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1328050145-14510-1-git-send-email-andreas@biessmann.de> Subject: Re: [ptxdist] [PATCH v4] replace umkimage by u-boot sources Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Tue, Jan 31, 2012 at 11:49:05PM +0100, Andreas Bie=DFmann wrote: > This patch removes the forked mkimage u-boot tool and uses the mainline > u-boot code to build this tool. Looks good now. I'll apply it once the 2012.02 release is out. Michael > Signed-off-by: Andreas Bie=DFmann > --- > Changes since v1: > * add ROOTFS_FW_ENV_CONFIG parameter which installes /etc/fw_env.config > * changes requested by Michael > = > Changes since v2: > * fix wrong 'fw_saveenv' command -> use correct 'fw_setenv' > = > Changes since v3: > * install host-u-boot-tools into $(HOST_U_BOOT_TOOLS_PKGDIR) rather than > into $(PTXCONF_SYSROOT_HOST) > * remove /etc/fw_env.config from rootfs.{in|make} and install with > u-boot-tools > * remove get for u-boot-tools > * install u-boot-tools into $(U_BOOT_TOOLS_PKGDIR) before packaging > .. but use /usr/bin/mkimage and /usr/sbin/fw_printenv cause mkimage > may be used by normal users (Michael requested to install both into > /usr/sbin, but most distros use /usr/bin for mkimage) > * add a generic/etc/fw_env.config with all comments but no function > additionally give some hints in help text for CONFIG_U_BOOT_TOOLS_TOOL= _ENV > = > generic/etc/fw_env.config | 19 +++++ > ...f8dcdbe5c690c-compiler.h-add-uint-typedef.patch | 26 ------ > patches/u-boot-mkimage-2010.03-1/series | 1 - > platforms/hosttools.in | 2 +- > platforms/image_uimage.in | 8 +- > platforms/kernel.in | 2 +- > rules/host-u-boot-tools.in | 5 + > rules/host-u-boot-tools.make | 35 ++++++++ > rules/host-umkimage.in | 8 -- > rules/host-umkimage.make | 37 --------- > rules/templates/template-kernel-in | 2 +- > rules/u-boot-tools.in | 36 +++++++++ > rules/u-boot-tools.make | 82 ++++++++++++++= ++++++ > rules/umkimage.in | 8 -- > rules/umkimage.make | 66 --------------= -- > 15 files changed, 184 insertions(+), 153 deletions(-) > create mode 100644 generic/etc/fw_env.config > delete mode 100644 patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b97= 8ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.patch > delete mode 100644 patches/u-boot-mkimage-2010.03-1/series > create mode 100644 rules/host-u-boot-tools.in > create mode 100644 rules/host-u-boot-tools.make > delete mode 100644 rules/host-umkimage.in > delete mode 100644 rules/host-umkimage.make > create mode 100644 rules/u-boot-tools.in > create mode 100644 rules/u-boot-tools.make > delete mode 100644 rules/umkimage.in > delete mode 100644 rules/umkimage.make > = > diff --git a/generic/etc/fw_env.config b/generic/etc/fw_env.config > new file mode 100644 > index 0000000..bc6890d > --- /dev/null > +++ b/generic/etc/fw_env.config > @@ -0,0 +1,19 @@ > +# Configuration file for fw_(printenv/saveenv) utility. > +# Up to two entries are valid, in this case the redundant > +# environment sector is assumed present. > +# Notice, that the "Number of sectors" is ignored on NOR and SPI-datafla= sh. > +# Futhermore, if the Flash sector size is ommitted, this value is assume= d to > +# be the same as the Environment size, which is valid for NOR and SPI-da= taflash > + > +# NOR example > +# MTD device name Device offset Env. size Flash sector size Number of se= ctors > +#/dev/mtd1 0x0000 0x4000 0x4000 > +#/dev/mtd2 0x0000 0x4000 0x4000 > + > +# MTD SPI-dataflash example > +# MTD device name Device offset Env. size Flash sector size Number of se= ctors > +#/dev/mtd5 0x4200 0x4200 > +#/dev/mtd6 0x4200 0x4200 > + > +# NAND example > +#/dev/mtd0 0x4000 0x4000 0x20000 2 > diff --git a/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758= f8dcdbe5c690c-compiler.h-add-uint-typedef.patch b/patches/u-boot-mkimage-20= 10.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typede= f.patch > deleted file mode 100644 > index f20a663..0000000 > --- a/patches/u-boot-mkimage-2010.03-1/b050c72d52c4e30d5b978ab6758f8dcdbe= 5c690c-compiler.h-add-uint-typedef.patch > +++ /dev/null > @@ -1,26 +0,0 @@ > -commit b050c72d52c4e30d5b978ab6758f8dcdbe5c690c > -Author: Mike Frysinger > -Date: Tue Apr 20 05:49:30 2010 -0400 > - > - compiler.h: add uint typedef > - = > - Recent crc changes started using the "uint" type in headers that are= used > - on the build system. This subsequently broke mingw targets as they = do not > - provide such a type. So add this basic typedef to compiler.h so tha= t we > - do not have to worry about this breaking again in the future. > - = > - Signed-off-by: Mike Frysinger > - Signed-off-by: Remy Bohmer > - > -diff --git a/include/compiler.h b/include/compiler.h > -index 332618e..8030bf6 100644 > ---- a/include/compiler.h > -+++ b/include/compiler.h > -@@ -55,6 +55,7 @@ typedef unsigned int uint; > - typedef uint8_t __u8; > - typedef uint16_t __u16; > - typedef uint32_t __u32; > -+typedef unsigned int uint; > - = > - #define uswap_16(x) \ > - ((((x) & 0xff00) >> 8) | \ > diff --git a/patches/u-boot-mkimage-2010.03-1/series b/patches/u-boot-mki= mage-2010.03-1/series > deleted file mode 100644 > index dbf4bb4..0000000 > --- a/patches/u-boot-mkimage-2010.03-1/series > +++ /dev/null > @@ -1 +0,0 @@ > -b050c72d52c4e30d5b978ab6758f8dcdbe5c690c-compiler.h-add-uint-typedef.pat= ch > diff --git a/platforms/hosttools.in b/platforms/hosttools.in > index 155b30b..e9ce0fc 100644 > --- a/platforms/hosttools.in > +++ b/platforms/hosttools.in > @@ -19,7 +19,7 @@ source "rules/host-mtd-utils.in" > source "rules/host-mtools.in" > source "rules/host-openssl.in" > source "rules/host-squashfs-tools.in" > -source "rules/host-umkimage.in" > +source "rules/host-u-boot-tools.in" > source "rules/host-util-linux-ng.in" > source "rules/host-xl-tools.in" > source "rules/host-xz.in" > diff --git a/platforms/image_uimage.in b/platforms/image_uimage.in > index 62119c4..719793d 100644 > --- a/platforms/image_uimage.in > +++ b/platforms/image_uimage.in > @@ -3,7 +3,7 @@ > menuconfig IMAGE_UIMAGE > bool > prompt "Generate images/uRamdisk " > - select HOST_UMKIMAGE > + select HOST_U_BOOT_TOOLS > select IMAGE_EXT2 > select IMAGE_EXT2_GZIP > help > @@ -21,16 +21,16 @@ config IMAGE_UIMAGE_NAME > config IMAGE_UIMAGE_EXTRA_ARGS > string > default "" > - prompt "extra arguments passed to umkimage" > + prompt "extra arguments passed to mkimage" > help > - If needed you can add extra arguments for umkimage here > + If needed you can add extra arguments for mkimage here > (e.g. -a 0xaa00000 -e 0xaa00000 ) > = > # TODO: See comment in rules/post/images.make for this topic > #config IMAGE_UIMAGE_MULTI > # bool > # prompt "Generate a multi image images/muimage" > -# select HOST_UMKIMAGE > +# select HOST_U_BOOT_TOOLS > # select KERNEL > # select IMAGE_CPIO > # help > diff --git a/platforms/kernel.in b/platforms/kernel.in > index b601284..01b31d3 100644 > --- a/platforms/kernel.in > +++ b/platforms/kernel.in > @@ -2,7 +2,7 @@ menuconfig KERNEL > bool > default y > select IMAGE_KERNEL > - select HOST_UMKIMAGE if KERNEL_IMAGE_U > + select HOST_U_BOOT_TOOLS if KERNEL_IMAGE_U > select HOST_XZ if KERNEL_XZ > select HOST_LZOP if KERNEL_LZOP > select CROSS_MODULE_INIT_TOOLS if KERNEL_MODULES > diff --git a/rules/host-u-boot-tools.in b/rules/host-u-boot-tools.in > new file mode 100644 > index 0000000..c89c04d > --- /dev/null > +++ b/rules/host-u-boot-tools.in > @@ -0,0 +1,5 @@ > +## SECTION=3Dhosttools_noprompt > + > +config HOST_U_BOOT_TOOLS > + tristate > + default ALLYES > diff --git a/rules/host-u-boot-tools.make b/rules/host-u-boot-tools.make > new file mode 100644 > index 0000000..27543f9 > --- /dev/null > +++ b/rules/host-u-boot-tools.make > @@ -0,0 +1,35 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2012 by Andreas Bie=DFmann > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditio= ns > +# see the README file. > +# > + > +# > +# We provide this package > +# > +HOST_PACKAGES-$(PTXCONF_HOST_U_BOOT_TOOLS) +=3D host-u-boot-tools > + > + > +# ----------------------------------------------------------------------= ------ > +# Prepare > +# ----------------------------------------------------------------------= ------ > + > +HOST_U_BOOT_TOOLS_CONF_TOOL :=3D NO > +HOST_U_BOOT_TOOLS_MAKE_OPT :=3D tools > + > +# ----------------------------------------------------------------------= ------ > +# Install > +# ----------------------------------------------------------------------= ------ > + > +$(STATEDIR)/host-u-boot-tools.install: > + @$(call targetinfo) > + install -D $(HOST_U_BOOT_TOOLS_DIR)/tools/mkimage \ > + $(HOST_U_BOOT_TOOLS_PKGDIR)/bin/mkimage > + > + @$(call touch) > + > +# vim: syntax=3Dmake > diff --git a/rules/host-umkimage.in b/rules/host-umkimage.in > deleted file mode 100644 > index b2990b8..0000000 > --- a/rules/host-umkimage.in > +++ /dev/null > @@ -1,8 +0,0 @@ > -## SECTION=3Dhosttools_noprompt > - > -config HOST_UMKIMAGE > - tristate > - default ALLYES > - help > - umkimage is the U-Boot mkimage command. It is used to create > - boot images for the U-Boot bootloader. > diff --git a/rules/host-umkimage.make b/rules/host-umkimage.make > deleted file mode 100644 > index 6b66e18..0000000 > --- a/rules/host-umkimage.make > +++ /dev/null > @@ -1,37 +0,0 @@ > -# -*-makefile-*- > -# > -# Copyright (C) 2003-2006 by Pengutronix e.K., Hildesheim, Germany > -# (C) 2010 by Michael Olbrich > -# > -# See CREDITS for details about who has contributed to this project. > -# > -# For further information about the PTXdist project and license conditio= ns > -# see the README file. > -# > - > -# > -# We provide this package > -# > -HOST_PACKAGES-$(PTXCONF_HOST_UMKIMAGE) +=3D host-umkimage > - > - > -# ----------------------------------------------------------------------= ------ > -# Prepare > -# ----------------------------------------------------------------------= ------ > - > -HOST_UMKIMAGE_CONF_TOOL :=3D NO > -HOST_UMKIMAGE_MAKE_OPT :=3D \ > - $(HOST_ENV_CPPFLAGS) \ > - $(HOST_ENV_LDFLAGS) \ > - $(HOST_ENV_CC) > - > -# ----------------------------------------------------------------------= ------ > -# Install > -# ----------------------------------------------------------------------= ------ > - > -$(STATEDIR)/host-umkimage.install: > - @$(call targetinfo) > - install $(HOST_UMKIMAGE_DIR)/mkimage $(PTXCONF_SYSROOT_HOST)/bin/mkimage > - @$(call touch) > - > -# vim: syntax=3Dmake > diff --git a/rules/templates/template-kernel-in b/rules/templates/templat= e-kernel-in > index ae1095b..5019c88 100644 > --- a/rules/templates/template-kernel-in > +++ b/rules/templates/template-kernel-in > @@ -4,6 +4,6 @@ config KERNEL_@PACKAGE@ > tristate > prompt "Linux kernel (@package@)" > select CROSS_MODULE_INIT_TOOLS > - #select HOST_UMKIMAGE > + #select HOST_U_BOOT_TOOLS > help > FIXME > diff --git a/rules/u-boot-tools.in b/rules/u-boot-tools.in > new file mode 100644 > index 0000000..b02ded5 > --- /dev/null > +++ b/rules/u-boot-tools.in > @@ -0,0 +1,36 @@ > +## SECTION=3Dshell_and_console > + > +menuconfig U_BOOT_TOOLS > + tristate > + prompt "u-boot-tools " > + help > + some helpful tools from U-Boot project. Most important tool in > + this section is mkimage to generate U-Boot boot images. > + > +if U_BOOT_TOOLS > + > +config U_BOOT_TOOLS_TOOL_MKIMAGE > + tristate > + default y > + prompt "mkimage" > + help > + the U-Boot mkimage command is used to create boot images for > + the U-Boot bootloader. > + > +config U_BOOT_TOOLS_TOOL_ENV > + tristate > + default n > + prompt "fw_printenv/fw_setenv" > + help > + the U-Boot fw_printenv and fw_setenv commands are used to > + read and write U-Boot environment /dev/mtdX partitions on > + target through linux. > + The tool will require a configuration on target named > + /etc/fw_env.config. See U-Boot source directory tools/env > + for detailed description. > + Choosing this option will install a /etc/fw_env.config to > + target-fs either from your BSP or a generic one which is > + likely to not work with your board. Please read the > + comments in that generic configuration. > + > +endif > diff --git a/rules/u-boot-tools.make b/rules/u-boot-tools.make > new file mode 100644 > index 0000000..937a49d > --- /dev/null > +++ b/rules/u-boot-tools.make > @@ -0,0 +1,82 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2012 by Andreas Bie=DFmann > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditio= ns > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_U_BOOT_TOOLS) +=3D u-boot-tools > + > +# > +# Paths and names > +# > +U_BOOT_TOOLS_VERSION :=3D 2011.12 > +U_BOOT_TOOLS_MD5 :=3D 7f29b9f6da44d6e46e988e7561fd1d5f > +U_BOOT_TOOLS :=3D u-boot-$(U_BOOT_TOOLS_VERSION) > +U_BOOT_TOOLS_SUFFIX :=3D tar.bz2 > +U_BOOT_TOOLS_URL :=3D http://ftp.denx.de/pub/u-boot/$(U_BOOT_TOOLS).$(U_= BOOT_TOOLS_SUFFIX) > +U_BOOT_TOOLS_SOURCE :=3D $(SRCDIR)/$(U_BOOT_TOOLS).$(U_BOOT_TOOLS_SUFFIX) > +U_BOOT_TOOLS_DIR :=3D $(BUILDDIR)/$(U_BOOT_TOOLS) > +U_BOOT_TOOLS_LICENSE :=3D GPLv2 > + > +# ----------------------------------------------------------------------= ------ > +# Prepare > +# ----------------------------------------------------------------------= ------ > + > +U_BOOT_TOOLS_CONF_TOOL :=3D NO > +U_BOOT_TOOLS_MAKE_OPT :=3D \ > + HOSTCC=3D"$(CROSS_CC)" \ > + HOSTSTRIP=3D"$(CROSS_STRIP)" \ > + tools > + > +ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV > +U_BOOT_TOOLS_MAKE_OPT +=3D env > +endif > + > +# ----------------------------------------------------------------------= ------ > +# Install > +# ----------------------------------------------------------------------= ------ > + > +$(STATEDIR)/u-boot-tools.install: > + @$(call targetinfo) > + install -D $(U_BOOT_TOOLS_DIR)/tools/mkimage \ > + $(U_BOOT_TOOLS_PKGDIR)/usr/bin/mkimage > + install -D $(U_BOOT_TOOLS_DIR)/tools/env/fw_printenv \ > + $(U_BOOT_TOOLS_PKGDIR)/usr/sbin/fw_printenv > + @$(call touch) > + > +# ----------------------------------------------------------------------= ------ > +# Target-Install > +# ----------------------------------------------------------------------= ------ > + > +$(STATEDIR)/u-boot-tools.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, u-boot-tools) > + @$(call install_fixup, u-boot-tools,PRIORITY,optional) > + @$(call install_fixup, u-boot-tools,SECTION,base) > + @$(call install_fixup, u-boot-tools,AUTHOR,\ > + "Andreas Bie=DFmann ") > + @$(call install_fixup, u-boot-tools,DESCRIPTION,missing) > + > +ifdef PTXCONF_U_BOOT_TOOLS_TOOL_MKIMAGE > + @$(call install_copy, u-boot-tools, 0, 0, 0755, -, /usr/bin/mkimage) > +endif > + > +ifdef PTXCONF_U_BOOT_TOOLS_TOOL_ENV > + @$(call install_copy, u-boot-tools, 0, 0, 0755, -, /usr/sbin/fw_printen= v) > + @$(call install_link, u-boot-tools, fw_printenv, /usr/sbin/fw_setenv) > + @$(call install_alternative, u-boot-tools, 0, 0, 0644, /etc/fw_env.conf= ig) > +endif > + > + @$(call install_finish, u-boot-tools) > + > + @$(call touch) > + > +# vim: syntax=3Dmake > diff --git a/rules/umkimage.in b/rules/umkimage.in > deleted file mode 100644 > index ffff541..0000000 > --- a/rules/umkimage.in > +++ /dev/null > @@ -1,8 +0,0 @@ > -## SECTION=3Dshell_and_console > - > -config UMKIMAGE > - tristate > - prompt "umkimage" > - help > - umkimage is the U-Boot mkimage command. It is used to create > - boot images for the U-Boot bootloader. > diff --git a/rules/umkimage.make b/rules/umkimage.make > deleted file mode 100644 > index ae5f316..0000000 > --- a/rules/umkimage.make > +++ /dev/null > @@ -1,66 +0,0 @@ > -# -*-makefile-*- > -# > -# Copyright (C) 2010 by Remy Bohmer > -# > -# See CREDITS for details about who has contributed to this project. > -# > -# For further information about the PTXdist project and license conditio= ns > -# see the README file. > -# > - > -# > -# We provide this package > -# > -PACKAGES-$(PTXCONF_UMKIMAGE) +=3D umkimage > - > -# > -# Paths and names > -# > -UMKIMAGE_VERSION :=3D 2010.03-1 > -UMKIMAGE_MD5 :=3D 5e7b4ed03e855a4824317fc4e3917dba > -UMKIMAGE :=3D u-boot-mkimage-$(UMKIMAGE_VERSION) > -UMKIMAGE_SUFFIX :=3D tar.gz > -UMKIMAGE_URL :=3D http://www.pengutronix.de/software/ptxdist/temporary-= src/$(UMKIMAGE).$(UMKIMAGE_SUFFIX) > -UMKIMAGE_SOURCE :=3D $(SRCDIR)/$(UMKIMAGE).$(UMKIMAGE_SUFFIX) > -UMKIMAGE_DIR :=3D $(BUILDDIR)/$(UMKIMAGE) > -UMKIMAGE_LICENSE :=3D GPLv2 > - > -# ----------------------------------------------------------------------= ------ > -# Get > -# ----------------------------------------------------------------------= ------ > - > -$(UMKIMAGE_SOURCE): > - @$(call targetinfo) > - @$(call get, UMKIMAGE) > - > -# ----------------------------------------------------------------------= ------ > -# Prepare > -# ----------------------------------------------------------------------= ------ > - > -UMKIMAGE_CONF_TOOL :=3D NO > -UMKIMAGE_MAKE_OPT :=3D \ > - $(CROSS_ENV_CFLAGS) \ > - $(CROSS_ENV_CPPFLAGS) \ > - $(CROSS_ENV_LDFLAGS) \ > - $(CROSS_ENV_CC) > - > -# ----------------------------------------------------------------------= ------ > -# Target-Install > -# ----------------------------------------------------------------------= ------ > - > -$(STATEDIR)/umkimage.targetinstall: > - @$(call targetinfo) > - > - @$(call install_init, umkimage) > - @$(call install_fixup, umkimage,PRIORITY,optional) > - @$(call install_fixup, umkimage,SECTION,base) > - @$(call install_fixup, umkimage,AUTHOR,"Remy Bohmer ") > - @$(call install_fixup, umkimage,DESCRIPTION,missing) > - > - @$(call install_copy, umkimage, 0, 0, 0755, -, /usr/bin/mkimage) > - > - @$(call install_finish, umkimage) > - > - @$(call touch) > - > -# vim: syntax=3Dmake > -- = > 1.7.8.4 > = > = > -- = > ptxdist mailing list > ptxdist@pengutronix.de -- = Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- = ptxdist mailing list ptxdist@pengutronix.de