Skip to contentSkip to conversation

bootm: vxworks: Make do_bootvx_fdt() static

PATCH New Bin Meng 2 participants 7 messages Dec 21, 2018 – Jan 1, 2019 RISC-V

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/3 bootm: vxworks: Make do_bootvx_fdt() static

Change the scope of do_bootvx_fdt() to static since it is only used in common/bootm_os.c.

---

 common/bootm_os.c | 2 +-
 include/vxworks.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
common/bootm_os.c +1 -1
index f302135..da938c5 100644
@@ -260,7 +260,7 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[],
 #if defined(CONFIG_BOOTM_VXWORKS) && \
 	(defined(CONFIG_PPC) || defined(CONFIG_ARM))
 
-void do_bootvx_fdt(bootm_headers_t *images)
+static void do_bootvx_fdt(bootm_headers_t *images)
 {
 #if defined(CONFIG_OF_LIBFDT)
 	int ret;
include/vxworks.h +0 -1
index 60c0efa..1a29509 100644
@@ -83,6 +83,5 @@ struct efi_gop_info {
 int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 void boot_prep_vxworks(bootm_headers_t *images);
 void boot_jump_vxworks(bootm_headers_t *images);
-void do_bootvx_fdt(bootm_headers_t *images);
 
 #endif
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/3 bootm: vxworks: Make do_bootvx_fdt() static

Hi Tom,

Quoted 11 lines · Bin Meng

Change the scope of do_bootvx_fdt() to static since it is only used in common/bootm_os.c.

---

 common/bootm_os.c | 2 +-
 include/vxworks.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

I hope this series can get into v2019.01.

Regards,
Bin

author
#2 lore raw

PATCH 2/3 bootm: vxworks: Make do_bootm_vxworks() non-static

In reply to Bin Meng

For future extension to other architectures, make do_bootm_vxworks() a non-static function.

---

 common/bootm_os.c | 4 ++--
 include/bootm.h   | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)
common/bootm_os.c +2 -2
index da938c5..473b940 100644
@@ -317,8 +317,8 @@ static void do_bootvx_fdt(bootm_headers_t *images)
 	puts("## vxWorks terminated\n");
 }
 
-static int do_bootm_vxworks(int flag, int argc, char * const argv[],
-			     bootm_headers_t *images)
+int do_bootm_vxworks(int flag, int argc, char * const argv[],
+		     bootm_headers_t *images)
 {
 	if (flag != BOOTM_STATE_OS_GO)
 		return 0;
include/bootm.h +2 -0
index 0501414..dbd6f49 100644
@@ -35,6 +35,8 @@ typedef int boot_os_fn(int flag, int argc, char * const argv[],
 			bootm_headers_t *images);
 
 extern boot_os_fn do_bootm_linux;
+extern boot_os_fn do_bootm_vxworks;
+
 int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 void lynxkdi_boot(image_header_t *hdr);
 
Signature · 1 line
2.7.4
#3 lore raw

PATCH 2/3 bootm: vxworks: Make do_bootm_vxworks() non-static

Quoted 4 lines · Bin Meng

For future extension to other architectures, make do_bootm_vxworks() a non-static function.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190101/57f5ed14/attachment.sig>
author
#4 lore raw

PATCH 3/3 riscv: bootm: Support booting VxWorks

In reply to Bin Meng

Register the 'bootm' function for booting VxWorks kernel for RISC-V architecture.

---

 arch/riscv/lib/bootm.c | 8 +++++++-
 common/bootm_os.c      | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
arch/riscv/lib/bootm.c +7 -1
index 60b32cc..f36b870 100644
@@ -86,7 +86,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag)
 
 	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 
-	debug("## Transferring control to Linux (at address %08lx) ...\n",
+	debug("## Transferring control to kernel (at address %08lx) ...\n",
 	      (ulong)kernel);
 
 	announce_and_cleanup(fake);
@@ -118,3 +118,9 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
 	boot_jump_linux(images, flag);
 	return 0;
 }
+
+int do_bootm_vxworks(int flag, int argc, char * const argv[],
+		     bootm_headers_t *images)
+{
+	return do_bootm_linux(flag, argc, argv, images);
+}
common/bootm_os.c +1 -1
index 473b940..855c471 100644
@@ -482,7 +482,7 @@ static boot_os_fn *boot_os[] = {
 	[IH_OS_PLAN9] = do_bootm_plan9,
 #endif
 #if defined(CONFIG_BOOTM_VXWORKS) && \
-	(defined(CONFIG_PPC) || defined(CONFIG_ARM))
+	(defined(CONFIG_PPC) || defined(CONFIG_ARM) || defined(CONFIG_RISCV))
 	[IH_OS_VXWORKS] = do_bootm_vxworks,
 #endif
 #if defined(CONFIG_CMD_ELF)
Signature · 1 line
2.7.4
#5 lore raw

PATCH 3/3 riscv: bootm: Support booting VxWorks

Quoted 4 lines · Bin Meng

Register the 'bootm' function for booting VxWorks kernel for RISC-V architecture.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190101/50a8bb9c/attachment.sig>
#6 lore raw

PATCH 1/3 bootm: vxworks: Make do_bootvx_fdt() static

In reply to Bin Meng
Quoted 4 lines · Bin Meng

Change the scope of do_bootvx_fdt() to static since it is only used in common/bootm_os.c.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190101/c9a404a3/attachment.sig>