Generation of uboot

From Release_ to_ customer.sh As you can see, when the flash is NAND, the following steps are executed in the “uboot” directory

# make infinity2m_spinand_defconfig

The Release_to_customer.sh script content of uboot in is as follows:

# build uboot
cd ${RELEASEDIR}/u-boot-2015.01
declare -x ARCH="arm"
declare -x CROSS_COMPILE="arm-linux-gnueabihf-"
if [ "${flashtype}" = "nor" ]; then
    make infinity2m_defconfig
else
    make infinity2m_spinand_defconfig
fi
#make clean
make -j16
if [ "${flashtype}" = "nor" ]; then
    if [ -d ../project/board/i2m/boot/nor/uboot ]; then
        cp u-boot.xz.img.bin ../project/board/i2m/boot/nor/uboot
    fi
else
    if [ -d ../project/board/i2m/boot/spinand/uboot ]; then
        cp u-boot_spinand.xz.img.bin ../project/board/i2m/boot/spinand/uboot/
    fi
fi
vi boot/configs/infinity2m_spinand_defconfig

The infinity2m_spinand_defconfig configuration is as follows:

CONFIG_SYS_ARCH="arm"
CONFIG_SYS_CPU="armv7"
CONFIG_SYS_SOC="infinity2m"
CONFIG_SYS_CONFIG_NAME="infinity2m"

The CONFIG_SYS_SOC is infinity2m, so the corresponding uboot configuration file name is:

# boot/include/configs/infinity2m.h

CONFIG_MS_SAVE_ENV_IN_NAND_FLASH=y
# CONFIG_MS_USB is not set
CONFIG_MS_EMAC=y
CONFIG_ETHERNET_ALBANY=y
# CONFIG_MS_AESDMA is not set
CONFIG_MS_SPINAND=y
CONFIG_IMAGE_POSTFIX="_spinand"
# vi boot/include/configs/infinity2m.h

#ifdef CONFIG_MS_SPINAND
#if defined(CONFIG_MS_SAVE_ENV_IN_NAND_FLASH)
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET       CONFIG_MSTAR_ENV_NAND_OFFSET
#define CONFIG_MSTAR_ENV_NAND_OFFSET ms_nand_env_offset
/*#define CONFIG_MSTAR_ENV_NAND_OFFSET 0x440000*/
#define CONFIG_ENV_SIZE         0x00020000
#endif

#define CONFIG_CMD_SPINAND_CIS
#define CONFIG_CMD_UBI
/* #define CONFIG_CMD_UBIFS */
#define CONFIG_UBI_MWRITE
#define MTDIDS_DEFAULT            "nand0=nand0"    /* "nor0=physmap-flash.0,nand0=nand" */
/*    must be different from real partition to test NAND partition function */
#define MTDPARTS_DEFAULT        "mtdparts=nand0:0xC0000@0x140000(NPT),-(UBI)"
/*    #define MTDPARTS_DEFAULT    "mtdparts=nand0:0x60000@0x140000(IPL0),0x60000(IPL1),0x60000(IPL_CUST0),0x60000(IPL_CUST1),0xC0000(UBOOT0),0xC0000(UBOOT1),0x60000(ENV),0x340000(KERNEL),0x340000(RECOVERY),-(UBI)"*/
文档更新时间: 2021-03-22 13:52   作者:Aeeditor