diff mbox series

[3/8] odroidc2: add post build script.

Message ID 20171203125619.30919-3-daggs@gmx.com
State Superseded
Headers show
Series [1/8] meson-tools: New Package | expand

Commit Message

Dagg Stompler Dec. 3, 2017, 12:56 p.m. UTC
add post-build script to generate uboot's scr file and the kernel's
uImage file.

Signed-off-by: Dagg Stompler <daggs@gmx.com>
---
 board/hardkernel/odroidc2/post-build.sh | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100755 board/hardkernel/odroidc2/post-build.sh

Comments

Thomas Petazzoni Dec. 3, 2017, 1:27 p.m. UTC | #1
Hello,

On Sun,  3 Dec 2017 14:56:14 +0200, Dagg Stompler wrote:

> +# U-Boot script
> +${MKIMAGE} -C none -A arm -T script -d ${BOOT_CMD} ${BOOT_CMD_H}

This should be done using BR2_TARGET_UBOOT_BOOT_SCRIPT and
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE.

Best regards,

Thomas
Dagg Stompler Dec. 3, 2017, 3:59 p.m. UTC | #2
Greetings Thomas,

> Sent: Sunday, December 03, 2017 at 3:27 PM
> From: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> To: "Dagg Stompler" <daggs@gmx.com>
> Cc: buildroot@buildroot.org
> Subject: Re: [Buildroot] [PATCH 3/8] odroidc2: add post build script.
>
> Hello,
> 
> On Sun,  3 Dec 2017 14:56:14 +0200, Dagg Stompler wrote:
> 
> > +# U-Boot script
> > +${MKIMAGE} -C none -A arm -T script -d ${BOOT_CMD} ${BOOT_CMD_H}
> 
> This should be done using BR2_TARGET_UBOOT_BOOT_SCRIPT and
> BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE.
I'll look into it.

> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
>
diff mbox series

Patch

diff --git a/board/hardkernel/odroidc2/post-build.sh b/board/hardkernel/odroidc2/post-build.sh
new file mode 100755
index 0000000000..6e2e71e501
--- /dev/null
+++ b/board/hardkernel/odroidc2/post-build.sh
@@ -0,0 +1,17 @@ 
+#!/bin/sh
+# post-build.sh for Odroid C2 taken from CubieBoard's post-build.sh
+# 2013, Carlo Caione <carlo.caione@gmail.com>
+
+BOARD_DIR="$(dirname $0)"
+MKIMAGE=$HOST_DIR/bin/mkimage
+BOOT_CMD=$BOARD_DIR/boot.cmd
+BOOT_CMD_H=$BINARIES_DIR/boot.scr
+
+# U-Boot script
+${MKIMAGE} -C none -A arm -T script -d ${BOOT_CMD} ${BOOT_CMD_H}
+
+# vendor u-boot uses uImage
+if [ -f "${BINARIES_DIR}/Image" ]; then
+    ${MKIMAGE} -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 \
+	     -n linux -d ${BINARIES_DIR}/Image ${BINARIES_DIR}/uImage
+fi