nmhw: make NM packed bootloader configurable
- define CONFIG_NM_BOOTLOADER_FORMAT to support NM packed u-boot
This commit is contained in:
parent
4d9788bdc8
commit
da716b9200
|
|
@ -23,6 +23,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
#define UBOOT_MIN_SIZE_BYTES (128*1024)
|
||||
#define UBOOT_MAX_SIZE_BYTES (2500*1024)
|
||||
|
||||
#if defined(CONFIG_NM_BOOTLOADER_FORMAT)
|
||||
|
||||
static int image_nm_header_ok(const struct nm_header *header)
|
||||
{
|
||||
|
|
@ -133,6 +134,8 @@ end:
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NM_BOOTLOADER_FORMAT) */
|
||||
|
||||
static int mmc_load_legacy(struct mmc *mmc, ulong sector,
|
||||
struct image_header *header)
|
||||
{
|
||||
|
|
@ -485,23 +488,27 @@ int spl_mmc_load_image(u32 boot_device)
|
|||
return err;
|
||||
|
||||
#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR)
|
||||
|
||||
#if defined(CONFIG_NM_BOOTLOADER_FORMAT)
|
||||
/* Try to load NetModule packed bootloader from main location */
|
||||
err = mmc_load_image_raw_sector_netmodule(mmc,
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
|
||||
if (!err)
|
||||
return err; /* found -> ok */
|
||||
|
||||
#endif
|
||||
/* Try to load bootloader from main location */
|
||||
err = mmc_load_image_raw_sector(mmc,
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
|
||||
if (!err)
|
||||
return err; /* found -> ok */
|
||||
|
||||
#if defined(CONFIG_NM_BOOTLOADER_FORMAT)
|
||||
/* Try to load NetModule packed bootloader from alternate location */
|
||||
err = mmc_load_image_raw_sector_netmodule(mmc,
|
||||
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR_ALTERNATE);
|
||||
if (!err)
|
||||
return err; /* found -> ok */
|
||||
#endif
|
||||
|
||||
/* Try to load regular bootloader from alternate location */
|
||||
err = mmc_load_image_raw_sector(mmc,
|
||||
|
|
|
|||
|
|
@ -281,6 +281,9 @@ int eth_phy_timeout(void);
|
|||
|
||||
|
||||
#ifdef CONFIG_NRSW
|
||||
/* support for NM packed bootloader */
|
||||
#define CONFIG_NM_BOOTLOADER_FORMAT
|
||||
|
||||
/* password protected login */
|
||||
#define CONFIG_CRYPT
|
||||
#define CONFIG_NM_LOGIN
|
||||
|
|
|
|||
Loading…
Reference in New Issue