Hi Simon,

thanks a lot for your patch. I have just applied and tested it with the NanoPC-T2 board (is similar to the NanoPi2-board and therefore s5p4418_nanopi2_defconfig can be used). Unfortunately the bootl-cmd is not working out of the box:
  nanopi2# bootl
  FDT and ATAGS support not compiled in - hanging
  ### ERROR ### Please RESET the board ###

Therefore my suggestion is to remove cmd_boot_linux.c since the bootl-cmd is not required (friendlyARM's LUbuntu is booted by the bootz-cmd).

Regards
Stefan


On 16.01.21 22:54, Simon Glass wrote:
This code is still using the old command typedef. It was not noticed since
this file is not currently built. It is using a non-existent option in the
Makefile.

Fix it up and add it to the build.

(This is offered as an act of service in the hope of receiving a free
beer at some point.)

Signed-off-by: Simon Glass <s...@chromium.org>
---

  arch/arm/mach-nexell/Makefile         |  2 +-
  arch/arm/mach-nexell/cmd_boot_linux.c | 14 ++++++++------
  2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-nexell/Makefile b/arch/arm/mach-nexell/Makefile
index 10b3963ed10..8113624cac3 100644
--- a/arch/arm/mach-nexell/Makefile
+++ b/arch/arm/mach-nexell/Makefile
@@ -10,4 +10,4 @@ obj-y                         += nx_gpio.o
  obj-y                         += tieoff.o
  obj-$(CONFIG_ARCH_S5P4418)    += reg-call.o
  obj-$(CONFIG_ARCH_S5P4418)    += nx_sec_reg.o
-obj-$(CONFIG_CMD_BOOTL)                += cmd_boot_linux.o
+obj-y                          += cmd_boot_linux.o
diff --git a/arch/arm/mach-nexell/cmd_boot_linux.c 
b/arch/arm/mach-nexell/cmd_boot_linux.c
index f2dedfe1625..730550cd389 100644
--- a/arch/arm/mach-nexell/cmd_boot_linux.c
+++ b/arch/arm/mach-nexell/cmd_boot_linux.c
@@ -5,11 +5,13 @@
   */
#include <common.h>
+#include <bootstage.h>
  #include <bootm.h>
  #include <command.h>
-#include <environment.h>
+#include <env.h>
  #include <errno.h>
  #include <image.h>
+#include <log.h>
  #include <fdt_support.h>
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_CLI_FRAMEWORK)
@@ -18,7 +20,7 @@ DECLARE_GLOBAL_DATA_PTR;
static bootm_headers_t linux_images; -static void boot_go_set_os(cmd_tbl_t *cmdtp, int flag, int argc,
+static void boot_go_set_os(struct cmd_tbl *cmdtp, int flag, int argc,
                           char * const argv[],
                           bootm_headers_t *images)
  {
@@ -66,8 +68,8 @@ static void boot_start_lmb(bootm_headers_t *images)
lmb_init(&images->lmb); - mem_start = getenv_bootm_low();
-       mem_size = getenv_bootm_size();
+       mem_start = env_get_bootm_low();
+       mem_size = env_get_bootm_size();
lmb_add(&images->lmb, (phys_addr_t)mem_start, mem_size); @@ -79,7 +81,7 @@ static void boot_start_lmb(bootm_headers_t *images)
  static inline void boot_start_lmb(bootm_headers_t *images) { }
  #endif
-int do_boot_linux(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_boot_linux(struct cmd_tbl *cmdtp, int flag, int argc, char * const 
argv[])
  {
        boot_os_fn *boot_fn;
        bootm_headers_t *images = &linux_images;
@@ -126,7 +128,7 @@ U_BOOT_CMD(bootl, CONFIG_SYS_MAXARGS, 1, do_boot_linux,
  #endif
#if defined(CONFIG_CMD_BOOTD) && !defined(CONFIG_CMD_BOOTM)
-int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootd(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
  {
        return run_command(env_get("bootcmd"), flag);
  }

Reply via email to