Browse Source

board: allow building a version that will boot from emmc (mmcblk0)

master
Lukas F. Hartmann 3 months ago
parent
commit
a7156e676d
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      board/boundary/nitrogen8m_som/nitrogen8m_som.c

+ 11
- 3
board/boundary/nitrogen8m_som/nitrogen8m_som.c View File

@@ -323,15 +323,23 @@ void init_usb_clk(int usbno);
static void set_env_vars(void)
{
printf("set_env_vars()");
env_set("board", "MNT Reform 2.0"); // "nitrogen8m_som");
env_set("board", "MNT Reform 2.0");
env_set("soc", "imx8mq");
env_set("imx_cpu", get_imx_type((get_cpu_rev() & 0xFF000) >> 12));
env_set("uboot_defconfig", CONFIG_DEFCONFIG);

// MNT Reform 2
env_set("fdt_addr", "0x50000000");
env_set("bootargs", "noinitrd root=/dev/mmcblk1p1 rootwait rw console=ttymxc0,115200 console=tty1 cma=512M no_console_suspend pci=nomsi");
#ifdef MNTREFORM_BOOT_EMMC
// boot rescue system from eMMC
env_set("bootargs", "noinitrd root=/dev/mmcblk0p1 rootwait rw console=ttymxc0,115200 console=tty1 cma=512M pci=nomsi");
env_set("bootcmd", "ext4load mmc 0 ${loadaddr} /Image; ext4load mmc 0 ${fdt_addr} /imx8mq-mnt-reform2.dtb; booti ${loadaddr} - ${fdt_addr}");
#else
// boot normal system from SD card and start /sbin/reform-init
env_set("bootargs", "noinitrd root=/dev/mmcblk1p1 rootwait rw console=ttymxc0,115200 console=tty1 cma=512M pci=nomsi init=/sbin/reform-init");
env_set("bootcmd", "ext4load mmc 1 ${loadaddr} /Image; ext4load mmc 1 ${fdt_addr} /imx8mq-mnt-reform2.dtb; booti ${loadaddr} - ${fdt_addr}");
#endif

env_set("bootdelay", "1");
}

@@ -355,7 +363,7 @@ int board_late_init(void)
gpio_set_value(IMX_GPIO_NR(1, 14), 0);
mdelay(10);
gpio_set_value(IMX_GPIO_NR(1, 14), 1);
#if defined(CONFIG_USB_FUNCTION_FASTBOOT) || defined(CONFIG_CMD_DFU)
addserial_env("serial#");
if (fastboot_key_pressed()) {