summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-01 11:56:58 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-01 11:56:58 -0600
commit87eb0b028fd939edca5d92c58b987926f6dcf7e5 (patch)
tree33ffd62b2f4a056cf2c19269fba8f41496471fc1
parent610e2aa0c224e2936fe8009ef4a2351ce607067a (diff)
downloadnuttx-87eb0b028fd939edca5d92c58b987926f6dcf7e5.tar.gz
nuttx-87eb0b028fd939edca5d92c58b987926f6dcf7e5.tar.bz2
nuttx-87eb0b028fd939edca5d92c58b987926f6dcf7e5.zip
Top level make will now generate a U-Boot uImage file
-rw-r--r--nuttx/Kconfig18
-rw-r--r--nuttx/Makefile.unix10
-rw-r--r--nuttx/configs/sama5d3-xplained/README.txt6
-rw-r--r--nuttx/configs/sama5d3x-ek/README.txt6
4 files changed, 37 insertions, 3 deletions
diff --git a/nuttx/Kconfig b/nuttx/Kconfig
index c2217f493..b210b80e9 100644
--- a/nuttx/Kconfig
+++ b/nuttx/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/nuttx/Makefile.unix b/nuttx/Makefile.unix
index 604da4fd7..1b123bd62 100644
--- a/nuttx/Makefile.unix
+++ b/nuttx/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 <gnutt@nuttx.org>
#
# 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/nuttx/configs/sama5d3-xplained/README.txt b/nuttx/configs/sama5d3-xplained/README.txt
index 966ffa2a1..4e05e5feb 100644
--- a/nuttx/configs/sama5d3-xplained/README.txt
+++ b/nuttx/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/nuttx/configs/sama5d3x-ek/README.txt b/nuttx/configs/sama5d3x-ek/README.txt
index 18158b2b6..e1ac624fa 100644
--- a/nuttx/configs/sama5d3x-ek/README.txt
+++ b/nuttx/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