Stephan Linz wrote:
> x-load is a first level bootloader for Texas Intruments OMAP
> microprocessors (similar to the AT91Bootstrap application).
> 
> This bootstrap package is required on TI OMAP boards where
> dataflash/nandflash or USB/RS232 is used to boot from. In
> any of these cases the internal bootROM of the OMAP core is
> used to boot the board with.

tnx, pushed to master.

but, crap, it doesn't work :(...see inline comments:

> Signed-off-by: Stephan Linz <l...@li-pro.net>
> ---
>  platforms/x-load.in |   51 ++++++++++++++++++++++++++++++
>  rules/x-load.make   |   85 
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 136 insertions(+), 0 deletions(-)
>  create mode 100644 platforms/x-load.in
>  create mode 100644 rules/x-load.make
> 
> diff --git a/platforms/x-load.in b/platforms/x-load.in
> new file mode 100644
> index 0000000..b6840a1
> --- /dev/null
> +++ b/platforms/x-load.in
> @@ -0,0 +1,51 @@
> +## SECTION=bootloader
> +
> +menuconfig X_LOAD
> +     bool
> +     depends on ARCH_ARM_OMAP
> +     prompt "x-loader                      "
> +     help
> +       The X-Loader is a first level bootloader for Texas Intruments OMAP
> +       microprocessors (similar to the AT91Bootstrap application). It is
> +       used for booting these microprocessors from NAND-flash, MMC/SD-card,
> +       USB or serial interfaces.
> +
> +if X_LOAD
> +
> +config X_LOAD_VERSION
> +     string
> +     default f243938
> +     prompt "x-loader version"
> +     help
> +       Enter the X-Loader version you want to build. Usally something like 
> "1.4.2"
> +
> +       NOTICE: The X-Loader source tree was never released as download 
> archive.
> +       As long as that fact exists you can use the archived tarballs at:
> +
> +         http://www.ptxdist.org/software/ptxdist/temporary-src/
> +
> +       or have to store a local tarball inside your ptxdist project root at:
> +
> +         ${PTXDIST_WORKSPACE}/local_src/
> +
> +config X_LOAD_CONFIG
> +     string
> +     prompt "x-loader config target"
> +     help
> +       The X-Loader make config target. Usually something like
> +       "yourbox_config". See X-Loader's main Makefile for possible
> +       configuration targets.
> +
> +config X_LOAD_MAKE_IFT
> +     bool
> +     prompt "generate signed ift file"
> +     help
> +       When this option is enabled, a so-called IFT file is generated. You
> +       need a X-Loader source tree that supports this. This must know about
> +       the make target 'ift' so ptxdist can do the following: "make ift".
> +
> +       In details you will need the tool signGP from
> +       http://beagleboard.googlecode.com/files/signGP.c
> +
> +endif
> +
> diff --git a/rules/x-load.make b/rules/x-load.make
> new file mode 100644
> index 0000000..7ec445d
> --- /dev/null
> +++ b/rules/x-load.make
> @@ -0,0 +1,85 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2010 by Stephan Linz
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_X_LOAD) += x-load
> +
> +#
> +# Paths and names
> +#
> +X_LOAD_VERSION       := $(call remove_quotes,$(PTXCONF_X_LOAD_VERSION))
> +X_LOAD               := x-load-$(X_LOAD_VERSION)
> +X_LOAD_SUFFIX        := tar.bz2
> +X_LOAD_URL   := 
> http://www.ptxdist.org/software/ptxdist/temporary-src/$(X_LOAD).$(X_LOAD_SUFFIX)
> +X_LOAD_SOURCE        := $(SRCDIR)/$(X_LOAD).$(X_LOAD_SUFFIX)
> +X_LOAD_DIR   := $(BUILDDIR)/$(X_LOAD)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Prepare
> +# 
> ----------------------------------------------------------------------------
> +
> +X_LOAD_MAKE_OPT      := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) 
> HOSTCC=$(HOSTCC)
> +X_LOAD_MAKE_PAR      := NO
> +
> +$(STATEDIR)/x-load.prepare:
> +     @$(call targetinfo)
> +     @$(call compile, X_LOAD, $(PTXCONF_X_LOAD_CONFIG))
                                 ^^^^^^^^^^^^^^^^^^^^^^^^

I think the second parameter overwrites _MAKE_OPT. I'm not sure why it
does this, looks like a bug. It should be fixed, but that requires some
time and testing...

However I can work around this limitation by changing _MAKE_OPT to
_MAKE_ENV.

I'll push this fix.

> +     @$(call touch)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Compile
> +# 
> ----------------------------------------------------------------------------
> +
> +ifdef PTXCONF_X_LOAD_MAKE_IFT
> +X_LOAD_BUILD_TARGETS += ift
> +endif
> +
> +X_LOAD_BUILD_TARGETS += all
> +
> +$(STATEDIR)/x-load.compile:
> +     @$(call targetinfo)
> +ifneq ($(strip $(X_LOAD_BUILD_TARGETS)), )
> +     @$(call compile, X_LOAD, $(X_LOAD_BUILD_TARGETS))
> +endif
> +     @$(call touch)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/x-load.install:
> +     @$(call targetinfo)
> +     @$(call touch)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Target-Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/x-load.targetinstall:
> +     @$(call targetinfo)
> +     @install -D -m644 $(X_LOAD_DIR)/x-load.bin $(IMAGEDIR)/x-load.bin
> +ifdef PTXCONF_X_LOAD_MAKE_IFT
> +     @install -D -m644 $(X_LOAD_DIR)/x-load.bin.ift 
> $(IMAGEDIR)/x-load.bin.ift
> +     @install -D -m644 $(X_LOAD_DIR)/x-load.bin.ift $(IMAGEDIR)/MLO
> +endif
> +     @$(call touch)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Clean
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/x-load.clean:
> +     @$(call targetinfo)
> +     @$(call clean_pkg, X_LOAD)
> +     @rm -f $(IMAGEDIR)/x-load.bin $(IMAGEDIR)/x-load.bin.ift $(IMAGEDIR)/MLO
> +
> +# vim: syntax=make

cheers, Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to