From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH v2 07/13] u-boot-script: Account for variations of kernel files and boot commands
Date: Mon, 13 Jan 2020 09:28:12 +0100 [thread overview]
Message-ID: <06254df51dbff8393b01ac48b73da7a88a599f40.1578904098.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1578904098.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1578904098.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
The addition RISC-V revealed that we already had an issue with mipsel
regarding vmlinuz vs. vmlinux, it was just not stressed so far.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../u-boot-script/files/update-u-boot-script | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
index d006a23e..a18e59bc 100755
--- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
+++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script
@@ -17,6 +17,21 @@ BOOT_CMD=$(mktemp)
KERNEL_VERSION=$(linux-version list | linux-version sort --reverse | head -1)
+case $(uname -m) in
+ aarch64)
+ KERNEL_FILE="vmlinuz"
+ BOOT="booti"
+ ;;
+ mips|riscv64)
+ KERNEL_FILE="vmlinux"
+ BOOT="booti"
+ ;;
+ *)
+ KERNEL_FILE="vmlinuz"
+ BOOT="bootz"
+ ;;
+esac
+
echo "${SCRIPT_PREPEND}" >> ${BOOT_CMD}
echo "setenv bootargs ${KERNEL_ARGS}" >> ${BOOT_CMD}
@@ -24,7 +39,7 @@ echo "setenv bootargs ${KERNEL_ARGS}" >> ${BOOT_CMD}
echo "load \${devtype} \${devnum}:${ROOT_PARTITION} \${fdt_addr_r}" \
"/usr/lib/linux-image-${KERNEL_VERSION}/\${fdtfile}" >> ${BOOT_CMD}
echo "load \${devtype} \${devnum}:\${distro_bootpart} \${kernel_addr_r}" \
- "/boot/vmlinuz-${KERNEL_VERSION}" >> ${BOOT_CMD}
+ "/boot/${KERNEL_FILE}-${KERNEL_VERSION}" >> ${BOOT_CMD}
case "${NO_INITRD}" in
yes|1)
@@ -53,11 +68,6 @@ if [ -n "${OVERLAYS}" ]; then
done
fi
-BOOT="bootz"
-if [ "$(uname -m)" = "aarch64" ]; then
- BOOT="booti"
-fi
-
echo "${BOOT} \${kernel_addr_r} ${INITRD_ADDR} \${fdt_addr_r}" >> ${BOOT_CMD}
mkimage -T script -A invalid -C none -d ${BOOT_CMD} /boot/boot.scr > /dev/null
--
2.16.4
next prev parent reply other threads:[~2020-01-13 8:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 8:28 [PATCH v2 00/13] RISC-V support Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 01/13] meta: Add debian-sid-ports distro config Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 02/13] meta: Add RISC-V architecture Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 03/13] meta: Allow cross-compilation for RISC-V Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 04/13] start_vm: Add RISC-V 64-bit support Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 05/13] meta-isar: Add qemuriscv64 virtual target Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 06/13] meta-isar: Clean up qemu multiconfigs Jan Kiszka
2020-01-28 21:51 ` Henning Schild
2020-01-28 22:06 ` Jan Kiszka
2020-01-13 8:28 ` Jan Kiszka [this message]
2020-01-13 8:28 ` [PATCH v2 08/13] linux-custom: Tune strip rule to cover vmlinux images as well Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 09/13] linux-custom: Add support for RISC-V Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 10/13] linux-modules: " Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 11/13] linux-mainline: Avoid failing UBIFS test when defconfig does not support it Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 12/13] linux-mainline: Update to 5.4.10 Jan Kiszka
2020-01-13 8:28 ` [PATCH v2 13/13] meta-isar: Add HiFive Unleashed board as physical RISC-V target Jan Kiszka
2020-01-28 11:31 ` [PATCH v2 00/13] RISC-V support Jan Kiszka
2020-01-28 15:51 ` vijai kumar
2020-01-28 16:02 ` Jan Kiszka
2020-01-28 16:09 ` vijai kumar
2020-01-28 19:23 ` vijai kumar
2020-01-28 22:06 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06254df51dbff8393b01ac48b73da7a88a599f40.1578904098.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox