diff --git a/Kconfig b/Kconfig index c2217f4938..b210b80e9c 100644 --- a/Kconfig +++ b/Kconfig @@ -235,6 +235,24 @@ config RAW_BINARY different loaders using the GNU objcopy program. This option should not be selected if you are not using the GNU toolchain. +menuconfig UBOOT_UIMAGE + bool "U-Boot uImage" + select RAW_BINARY + depends on !WINDOWS_NATIVE + ---help--- + Create the uImage binary used with U-Boot. + +if UBOOT_UIMAGE + +config UIMAGE_LOAD_ADDRESS + hex "uImage load address" + default 0x0 + +config UIMAGE_ENTRY_POINT + hex "uImage entry point" + default 0x0 + +endif endmenu # Binary Output Formats menu "Customize Header Files" diff --git a/Makefile.unix b/Makefile.unix index 604da4fd7c..1b123bd62e 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -1,7 +1,7 @@ ############################################################################ # Makefile.unix # -# Copyright (C) 2007-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -675,6 +675,14 @@ ifeq ($(CONFIG_RAW_BINARY),y) @echo "CP: $(BIN).bin" $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) $(BIN).bin endif +ifeq ($(CONFIG_UBOOT_UIMAGE),y) + @echo "MKIMAGE: uImage" + $(Q) mkimage -A arm -O linux -C none -T kernel -a $(CONFIG_UIMAGE_LOAD_ADDRESS) \ + -e $(CONFIG_UIMAGE_ENTRY_POINT) -n $(BIN) -d $(BIN).bin uImage + $(Q) if [ -w /tftpboot ] ; then \ + cp -f uImage /tftpboot/uImage; \ + fi +endif # $(BIN) # diff --git a/configs/sama5d3-xplained/README.txt b/configs/sama5d3-xplained/README.txt index 966ffa2a1c..4e05e5feb0 100644 --- a/configs/sama5d3-xplained/README.txt +++ b/configs/sama5d3-xplained/README.txt @@ -501,7 +501,9 @@ Load NuttX with U-Boot on AT91 boards image with header information, CRC32 checksum, etc. mkimage comes in source code with U-Boot distribution and it is built - during U-Boot compilation (u-boot-source-dir/tools/mkimage). + during U-Boot compilation (u-boot-source-dir/tools/mkimage). There + are also sites where you can download pre-built mkimage binaries. For + example: http://www.trimslice.com/wiki/index.php/U-Boot_images See the U-Boot README file for more information. More information is also available in the mkimage man page (for example, @@ -524,6 +526,8 @@ Load NuttX with U-Boot on AT91 boards -n nuttx: Set image name. -d nuttx.bin: Use image data from nuttx.bin. + This will generate a binary called uImage. + Loading through network On a development system, it is useful to get the kernel and root file diff --git a/configs/sama5d3x-ek/README.txt b/configs/sama5d3x-ek/README.txt index 18158b2b64..e1ac624faa 100644 --- a/configs/sama5d3x-ek/README.txt +++ b/configs/sama5d3x-ek/README.txt @@ -622,7 +622,9 @@ Load NuttX with U-Boot on AT91 boards image with header information, CRC32 checksum, etc. mkimage comes in source code with U-Boot distribution and it is built - during U-Boot compilation (u-boot-source-dir/tools/mkimage). + during U-Boot compilation (u-boot-source-dir/tools/mkimage). There + are also sites where you can download pre-built mkimage binaries. For + example: http://www.trimslice.com/wiki/index.php/U-Boot_images See the U-Boot README file for more information. More information is also available in the mkimage man page (for example, @@ -645,6 +647,8 @@ Load NuttX with U-Boot on AT91 boards -n nuttx: Set image name. -d nuttx.bin: Use image data from nuttx.bin. + This will generate a binary called uImage. + Loading through network On a development system, it is useful to get the kernel and root file