In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Development Strategy of DM8127 for Image recognition-- description of Migration of UBOOT
According to the introduction of previous articles, we must have an overall understanding of the DM8127 software architecture, below we cut and transplant the most basic BOOT software package from a development point of view, embedded developers get a new board, that is, how to make the board can afford to compile and transplant their own procedures, which is valuable, otherwise it is meaningless to directly take other people's BIN files and burn them to the board.
I. DM8127 UBOOT compilation instructions
The UBOOT version of DM8127 is u-boot-2010.06, the UBOOT code is slightly different from the previous DM6446-DM368-DM3730 platform, the previous DM6446-DM368 separated UBL and UBOOT software packages, DM3730 separated XLOADR and UBOOT software packages, and now DM8127 is a UBOOT package, which contains UBOOTMIN and UBOOT, compiling different BIN files through macros, here are three large macros to distinguish different compilation modes. Compile UBOOTMIN and UBOOT commands and scripts in the "Image recognition DM8127 Development Strategy-RDK Software Architecture Analysis and compilation" mentioned in the total Makefile and U-BOOT folder corresponding to the u-boot\ Makefile file line 3320 start to see ti8148_ipnc_config, but also look at include/configs/ti8148_ipnc.h.
A 、 # define CONFIG_TI814X_MIN_CONFIG
Compile to UBOOTMIN (u-boot.min.nand or MLO)
The total Makefile compilation script corresponding to RDK:
Ubootmin:
$(MAKE) ubootclean
$(MAKE) ubootbuild MAKE_TARGET=$ (PLATFORMCFG) $(SYSTEM_CFG) min$ (BINARY_MODE)
$(MAKE) ubootbuild MAKE_TARGET=u-boot.ti
Ifeq ($(BINARY_MODE) sd)
Cp $(UBOOTDIR) / umurboot.min.$ (BINARY_MODE) $(TFTP_HOME) / MLO
Cp $(UBOOTDIR) / umurboot.min.$ (BINARY_MODE) $(UBOOTDIR) / MLO
Else
Cp-f $(UBOOTDIR) / umurboot.min.$ (BINARY_MODE) $(TFTP_HOME) / umurboot.min.$ (BINARY_MODE)
Cp-f $(UBOOTDIR) / umurboot.min.$ (BINARY_MODE) $(UBOOTDIR) / umurboot.min.$ (BINARY_MODE) .bk
Cp-f $(UBOOTDIR) / umurboot.min.$ (BINARY_MODE) / tftpboot/dm8127_min.bin
Endif
Our build_1_uboot-min-nand.sh is to call the above script to execute the else mode to get u-boot.min.nand (dm8127_min.bin), which is for nand FLASH and is to be written on the board NAND FLASH.
And our build_1_uboot-min-sd.sh is to call the above script to execute ifeq ($(BINARY_MODE), sd) to get MLO, factory production, software debugging, the most need this file, because just made out of the board NAND is no program, need to put this MLO file and later compiled the total U-BOOT u-boot.bin together to COPY to the SD card (TF card).
B 、 # define CONFIG_TI814X_OPTI_CONFIG
Compile u-boot.opti.nand this is also similar to UBOOTMIN macro compilation, but the compiled BIN file is downloaded to the board through the serial port to start.
The total Makefile compilation script corresponding to RDK:
Ubootopti:
$(MAKE) ubootclean
$(MAKE) ubootbuild MAKE_TARGET=$ (PLATFORM_CFG) _ ipnc_opti_nand
$(MAKE) ubootbuild MAKE_TARGET=u-boot.ti
Cp $(UBOOTDIR) / u-boot.opti.nand $(TFTP_HOME) / u-boot.opti.nand
Our build_1_uboot-min-opt.sh is called to execute this script to get u-boot.opti.nand, which is downloaded to the board through the serial port software on the PC. When some products are designed, there is no SD card due to special reasons, so you can use this mode to debug the newly produced board. To compile this mode, you should pay attention to modifying the u-boot/Include/configs/ti8148_ipnc.h file to block out many useless functions, such as:
# undef CONFIG_CMD_BDI
# undef CONFIG_GZIP
# undef CONFIG_ZLIB
# undef CONFIG_CMD_LOADB
# undef CONFIG_CMD_LOADS
# undef CONFIG_CMD_NFS
# undef CONFIG_CMD_SETGETDCR
# undef CONFIG_CMD_XIMG
# undef CONFIG_CMD_MISC
# undef CONFIG_CMD_ITEST
# undef CONFIG_CMD_FPGA
# undef CONFIG_CMD_EDITENV
# undef CONFIG_BOOTM_NETBSD
# undef CONFIG_BOOTM_RTEMS
# undef CONFIG_CMD_MISC
# undef CONFIG_CMD_IMI
# undef CONFIG_CMD_ITEST
# undef CONFIG_CMD_SOURCE
# undef CONFIG_CMD_IMLS
# undef CONFIG_CMD_ECHO
Use the function of # undef to cut u-boot and retain the network function and NAND function. If it is not cut, the resulting u-boot.opti.nand is too large to run in the RAM in the DM8127 chip. U-boot.opti.nand and the MLO mentioned above are run in the RAM in the DM8127 chip, because the external memory DDR3 has not been initialized!
Then when the software debugs the newly produced board, select the serial port BOOT mode for the board (if NAND has no program, it automatically defaults to other BOOT modes), power on, use serial port tools such as SecureCRT as shown below, and select the compiled u-boot.opti.nand. If the serial port is stable, the download is generally 100% normal, enter to enter the familiar u-boot command line mode.
The above image sometimes uses X modem to transfer files unsuccessfully, so you can use Ymodem mode again, with a baud rate of 115200.
C, if neither CONFIG_TI814X_MIN_CONFIG nor CONFIG_TI814X_OPTI_CONFIG is selected, then compile the normal UBOOT and get u-boot.bin (dm8127_uboot.bin)
The total Makefile compilation script corresponding to RDK:
Ubootbin:
$(MAKE) ubootclean
$(MAKE) ubootbuild MAKE_TARGET=$ (PLATFORMCFG) $(SYSTEM_CFG) config$ (BINARY_MODE)
$(MAKE) ubootbuild MAKE_TARGET=u-boot.ti
Cp-f $(UBOOTDIR) / u-boot.bin $(TFTP_HOME) / u-boot.bin
Cp-f $(UBOOTDIR) / u-boot.bin $(UBOOTDIR) / dm8127_uboot.bin.bk
Cp-f $(UBOOTDIR) / u-boot.bin / tftpboot/dm8127_uboot.bin
Our build_2_uboot-all.sh is to call the above script, the first time to compile the normal UBOOT must use ubootclean, and our build_2_uboot-tmp.sh is the above script to remove the $(MAKE) ubootclean, after the first compilation of build_2_uboot-all.sh, then modify the source code of a file, we do not need to call ubootclean every time, and then re-compile all the files, which is a waste of time.
Tip: the above three large macro compilation modes must be understood in combination with the contents of line 3320 of the u-boot\ Makefile file corresponding to the RDK total Makefile and the U-BOOT folder.
II. Cutting and transplanting of UBOOT
1. Modify u-boot\ Makefile
Other DAVINCI platform development strategies written before have said that the first step is to delete irrelevant files so that you can understand which files and folders are related to the DM8127 platform and which are irrelevant at a glance.
SUBDIRS = tools\
# examples/standalone\ (block, don't)
# examples/api (masking, don't)
…… .
# LIBS + = api/libapi.a (masking)
2. Go back to the u-boot directory and remove the nand_spl and onenand_ipl folders.
3. Only ti8148_ipnc.h is retained in Include/configs/, and all others are deleted.
4. Arch retains only arm files.
Only arm_cortexa8 is retained in the arm/cpu file.
Only retained in the arm_cortexa8 file
The screenshot of arch/arm/ Include/asm cropping is shown below:
5. Only mention ti folder is retained in board folder, and only ti8148_ipnc is kept under ti.
After the violent deletion of the above steps, the UBOOT of the DM8127 platform is much simpler, and it is very convenient to save backups.
6. Key modifications to u-boot/include/configs/ti8148_ipnc.h
For beginners to play with a DEMO board, to run the board program, in fact, a large part of the migration work in this file to modify, other peripheral drivers initialization, it is not so urgent. Wait until you are familiar with the DEMO board, and then develop your own board, such as using the new DDR3, NAND FLASH, network port chip and so on.
The following I directly put the company's development board u-boot source code for the / include/configs/ti8148_ipnc.h to gradually analyze.
# ifndef _ _ CONFIG_TI8148_IPNC_H
# define _ _ CONFIG_TI8148_IPNC_H
/
# define CONFIG_TI814X_NO_RUNTIME_PG_DETECT
/
/ Display CPU info /
# define CONFIG_DISPLAY_CPUINFO 1 (allows serial port to print CPU information)
/ In the 1st stage we have just 110K, so cut down wherever possible * /
# ifdef CONFIG_TI814X_MIN_CONFIG (using make ubootmin, just compile the definition)
/ enable d-cache only on 2nd stage /
# define CONFIG_SYS_DCACHE_OFF
# define CONFIG_CMD_MEMORY / for mtest /
# define CONFIG_CMD_MISC / Misc functions like sleep etc/ (script commands such as sleep 1 are supported)
# undef CONFIG_GZIP (ubootmin does not require too many other features, using # undef processing)
# undef CONFIG_ZLIB
# undef CONFIG_SYS_HUSH_PARSER
# define CONFIG_CMD_LOADB / loadb /
# define CONFIG_CMD_LOADY / loady /
# define CONFIG_SETUP_PLL
# define CONFIG_TI814X_CONFIG_DDR (DDR3 must be initialized in ubootmin, otherwise uboot cannot be run)
# define CONFIG_TI814X_EVM_DDR3
# define CONFIG_ENV_SIZE 0x400 (ubootmin also has its own boot parameter, with very few bytes)
# define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 * 1024))
# define CONFIG_SYS_PROMPT "TI-MIN#" (ubootmin command line, but generally only for development and debugging) *
/ set to negative value for no autoboot /
# define CONFIG_BOOTDELAY 0 (ubootmin becomes 0 after development and debugging can be stabilized for 1m ubootmin)
# if defined (CONFIG_SPI_BOOT) / Autoload the 2nd stage from SPI /
# error 1 (if ubootmin does not need SPI BOOT, it will not be compiled)
# define CONFIG_SPI 1
# if defined (CONFIG_TI81XX_PCIE_BOOT)
# define CONFIG_CMDLINE_TAG 1 / enable passing of ATAGs /
# define CONFIG_SETUP_MEMORY_TAGS 1
# define CONFIG_INITRD_TAG 1 / Required for ramdisk support /
# define CONFIG_CMD_SOURCE
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootcmd=source 0x80400000\ 0"\
"
/ user can override default size configuration here.
It will only come in effect if TI81xx_NO_PIN_GPMCis defined in include/asm/arch/pcie.h
, /
# define CONFIG_BAR1_32 (0x1000000ULL)
# define CONFIG_BAR2_32 (0x800000ULL)
# define CONFIG_BAR3_32 (0xfffULL)
# define CONFIG_BAR4_32 (0x1001ULL)
# define CONFIG_REG2_64 (0x1000000ULL)
# define CONFIG_REG4_64 (0x2000000ULL)
# else / / (CONFIG_TI81XX_PCIE_BOOT) (if ubootmin does not need PCIE BOOT, it will not be compiled)
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootcmd=sf probe 0; sf read 0x81000000 0x20000 0x40000; go 0x81000000\ 0"\
# endif / / (CONFIG_TI81XX_PCIE_BOOT)
# elif defined (CONFIG_NAND_BOOT) / Autoload the 2nd stage from NAND /
/ / # error 2 / / built: build_1_uboot-min-nand.sh sleep 1 (ubootmin requires NAND BOOT, be sure to compile)
# define CONFIG_NAND 1
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootcmd=mw.b 0x81000000 0x00 0x20000 nand read 0x81000000 0x20000 0x40000X go 0x81000000\ 0"\
(ubootmin is stored in 0x0-0x20000 space, uboot is stored in 0x20000---0x180000, where ubootmin runs uboot, reads NAND FLASH's UBOOT and puts it in DDR3 address 0x81000000, then go commands BOOT.)
# elif defined (CONFIG_SD_BOOT) / Autoload the 2nd stage from SD /
/ / # error 3 / / built: build_1_uboot-min-sd (if SD BOOT is required for ubootmin, debug mode and production mode, to compile)
# define CONFIG_MMC 1
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootcmd=mmc rescan 0; fatload mmc 0 0x80800000 umurboot.bin; go 0x80800000\ 0"\
(ubootmin reads u-boot.bin from SD card and then runs)
# elif defined (CONFIG_UART_BOOT) / stop in the min prompt /
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootcmd=\ 0"\
# elif defined (CONFIG_ETH_BOOT) / Auto load 2nd stage from server /
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootcmd=setenv autoload no;dhcp; tftp 0x81000000 umurboot.bin; go 0x81000000\ 0"
# endif / / defined (CONFIG_SPI_BOOT)
# elif defined (CONFIG_TI814X_OPTI_CONFIG) / Optimized code / (corresponding to the OPTI serial port download mode described earlier in this article, this kind of compiled macro is required, corresponding to make ubootopti)
# include (some macro definitions in this .h can also be masked)
# define CONFIG_ZERO_BOOTDELAY_CHECK
# define CONFIG_ENV_SIZE 0x2000
# define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (32 1024))
# define CONFIG_ENV_OVERWRITE
# define CONFIG_SYS_LONGHELP
# define CONFIG_SYS_PROMPT "TI8127_OPTI#"
# define CONFIG_CMDLINE_TAG 1 / enable passing of ATAGs /
# define CONFIG_SETUP_MEMORY_TAGS 1
# define CONFIG_INITRD_TAG 1 / Required for ramdisk support /
# define CONFIG_BOOTDELAY 3 / set to negative value for no autoboot * /
# define CONFIG_NAND 1
# define CONFIG_SETUP_PLL
# define CONFIG_TI814X_CONFIG_DDR
# define CONFIG_TI814X_EVM_DDR3
# define CONFIG_SYS_DCACHE_OFF
# define CONFIG_SYS_ICACHE_OFF
# define CONFIG_CMD_BDI / bdinfo /
# define CONFIG_CMD_BOOTD / bootd /
# define CONFIG_CMD_CONSOLE / coninfo /
# define CONFIG_CMD_ECHO / echo arguments /
# define CONFIG_CMD_EDITENV / editenv /
# define CONFIG_CMD_FPGA / FPGA configuration Support /
# define CONFIG_CMD_IMI / iminfo /
# define CONFIG_CMD_ITEST / Integer (and string) test /
# ifndef CONFIG_SYS_NO_FLASH
# define CONFIG_CMD_FLASH / flinfo, erase, protect /
# define CONFIG_CMD_IMLS / List all found images /
# endif
# define CONFIG_CMD_LOADB / loadb /
# define CONFIG_CMD_LOADS / loads /
# define CONFIG_CMD_MEMORY / md mm nm mw cp cmp crc base loop mtest /
# define CONFIG_CMD_MISC / Misc functions like sleep etc/
# define CONFIG_CMD_NET / bootp, tftpboot, rarpboot /
# define CONFIG_CMD_NFS / NFS support /
# define CONFIG_CMD_RUN / run command in env variable /
# define CONFIG_CMD_SAVEENV / saveenv /
# define CONFIG_CMD_SETGETDCR / DCR support on 4xx /
# define CONFIG_CMD_SOURCE / "source" command support /
# define CONFIG_CMD_XIMG / Load part of Multi Image /
# undef CONFIG_CMD_BDI
# undef CONFIG_GZIP
# undef CONFIG_ZLIB
# undef CONFIG_CMD_LOADB
# undef CONFIG_CMD_LOADS
# undef CONFIG_CMD_NFS
# undef CONFIG_CMD_SETGETDCR
# undef CONFIG_CMD_XIMG
# undef CONFIG_CMD_MISC
# undef CONFIG_CMD_ITEST
# undef CONFIG_CMD_FPGA
# undef CONFIG_CMD_EDITENV
# undef CONFIG_BOOTM_NETBSD
# undef CONFIG_BOOTM_RTEMS
# undef CONFIG_CMD_MISC
# undef CONFIG_CMD_IMI
# undef CONFIG_CMD_ITEST
# undef CONFIG_CMD_SOURCE
# undef CONFIG_CMD_IMLS
# undef CONFIG_CMD_ECHO
In fact, some of the above code is superfluous, because the later # undef cancels the previously defined macros. I don't want to destroy the architecture of TI RDK and let everyone understand this process. Since the BIN compiled in OPTI mode also runs in the internal RAM, the unwanted UBOOT function must be tailored, leaving only the function of burning NAND FLASH on the TFTP network to OK)
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=no\ 0"\
"bootdelay=0\ 0"\
"bootfile=uImage\ 0"\
"loadaddr=0x81000000\ 0"\
"bootargs=console=ttyO0,115200n8 mem=256M notifyk.vpssm3_sva=0xBF900000 vram=50M ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs rw rootwait=1 rw lpj=4997120 ip=$ {ipaddr}: ${serverip}: ${gateway}: ${subnet}:: eth0:off\ 0"\
"eraseall=nand erase\ 0"\
"uboot_tftp=tftp 0x81000000 dm8127_uboot.bin; go 0x81000000\ 0"\
# define CONFIG_BOOTCOMMAND\
"nboot 80007FC0 0 0x280000 witch bootm 80007FC0"
(I only use the network TFTP to download and run UBOOT here, and the task of burning and writing is assigned to the newly running dm8127_uboot.bin, rather than the UBOOT using this OPTI mode.)
# else / / CONFIG_TI814X_MIN_CONFIG (the following definitions are used to compile normal UBOOT macros, a lot of work is done below)
# include
# define CONFIG_SERIAL_TAG 1
# define CONFIG_REVISION_TAG 1
# define CONFIG_SKIP_LOWLEVEL_INIT / 1st stage would have done the basic init /
# define CONFIG_ENV_SIZE 0x20000 (save the UBOOT parameter with a BLOCK: bootargs)
# define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (32 1024))
# define CONFIG_ENV_OVERWRITE
# define CONFIG_SYS_LONGHELP
# define CONFIG_SYS_PROMPT "TI8127_IPNC#"
# define CONFIG_SYS_HUSH_PARSER / Use HUSH parser to allow command parsing /
# define CONFIG_SYS_PROMPT_HUSH_PS2 ">"
# define CONFIG_CMDLINE_TAG 1 / enable passing of ATAGs / (support passing parameters from UBOOT to kernel)
# define CONFIG_SETUP_MEMORY_TAGS 1
# define CONFIG_INITRD_TAG 1 / Required for ramdisk support /
# define CONFIG_BOOTDELAY 1 / set to negative value for no autoboot /
# define CONFIG_CMD_AUTOTEST / for autotest /
/ By default, 2nd stage will have MMC, NAND, SPI and I2C support * /
# define CONFIG_MMC 1
# define CONFIG_NAND 1
# define CONFIG_SPI 1
# define CONFIG_I2C 1
# define CONFIG_EXTRA_ENV_SETTINGS\
"verify=yes\ 0"\
"bootfile=uImage\ 0"\
"ramdisk_file=ramdisk.gz\ 0"\
"loadaddr=0x81000000\ 0"\
"script_addr=0x80900000\ 0"\
"loadbootscript=fatload mmc 0 ${script_addr} boot.scr\ 0"\
"bootscript= echo Running bootscript from MMC/SD to set the ENV...;"\
"source ${script_addr}\ 0"\
"ubifsargs=setenv bootargs console=ttyO0,115200n8 mem=80M notifyk.vpssm3_sva=0xBFD00000 vram=4M"\
"cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk"\
"ip=$ {ipaddr}"\
"rootfstype=ubifs root=ubi0:rootfs init=/init ubi.mtd=5,2048"\
"rootwait=1 rw lpj=4997120\ 0"\
"nfsargs=setenv bootargs console=ttyO0,115200n8 mem=80M notifyk.vpssm3_sva=0xBFD00000 vram=4M cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk lpj=4997120"\
"ip=$ {ipaddr}"\
"root=/dev/nfs rw nfsroot=$ {serverip}: / home/davinci/dm8127/v3.8.0/Source/ipnc_rdk/target/filesys,nolock\ 0"\
"squashfsargs=setenv bootargs console=ttyO0,115200n8 mem=80M notifyk.vpssm3_sva=0xBFD00000 vram=4M cmemk.phys_start=0x85000000 cmemk.phys_end=0x89000000 cmemk.allowOverlap=1 earlyprintk lpj=4997120"\
"ip=$ {ipaddr}"\
"noinitrd rootfstype=squashfs root=/dev/mtdblock4\ 0"\
"eraseall=nand erase\ 0"\
"erase_env=nand erase 180000 40000\ 0"\
"tftp_boot=ipnc_ff_init 1 t ftpboot 0x81000000 dm8127_kernel.bin;bootm\ 0"\
"nfsboot=ipnc_ff_init 1countries run nfsargs;nand read ${loadaddr} 1C0000 400000 switch bootm ${loadaddr}\ 0"\
"userboot=ipnc_ff_init 1 loadaddr read ${loadaddr} 1C0000 400000 domestic bootm ${loadaddr}\ 0"\
"squashfsboot=run squashfsargs;ipnc_ff_init 1 loadaddr read ${loadaddr} 1C0000 400000; bootm ${loadaddr}\ 0"\
"ubifsboot=ipnc_ff_init 1countries run ubifsargs;nand read ${loadaddr} 1C0000 400000 switch bootm ${loadaddr}\ 0"\
"uboot_tftp=ipnc_ff_init 1 TFTP 0x81000000 dm8127_uboot.bin; go 0x81000000\ 0"\
"updatemin=mw.b 0x81000000 0xFF 0x20000 Taiwan TFTP 0x81000000 dm8127_min.bin;nand erase 0x0 0x20000nand write.i 0x81000000 0x0 20000"\
"updateuboot=mw.b 0x81000000 0xFF 0x40000 TFTP 0x81000000 dm8127_uboot.bin;nand erase 20000 160000transfernand write.i 0x81000000 20000 ${filesize}\ 0"\
"updatekernel=tftp 0x81000000 dm8127_kernel.bin;nand erase 1C0000 640000 n and write.i 0x81000000 1C0000 ${filesize}\ 0"\
"updatebasefs=tftp 0x81000000 dm8127_basefs.bin;nand erase 800000 2300000 nand write.i 0x81000000 800000 ${filesize}\ 0"\
"updateubifs=tftp 0x81000000 dm8127_ubifs.bin;nand erase 2B00000 6E00000 nand write.i 0x81000000 2B00000 ${filesize}\ 0"\
"
# define CONFIG_BOOTCOMMAND "run squashfsboot" / or run ubifsboot /
(the power-on UBOOT is defined here to use run ubifsboot or run nfsboot or run userboot, which can be used on the command line:
Setenv bootcmd 'run userboot';saveenv to select the default power-on file system mode)
# define CONFIG_BOOTARGS\
"console=ttyO0,115200n8 mem=80M notifyk.vpssm3_sva=0xBF900000 vram=4M ubi.mtd=5 root=ubi0:rootfs rootfstype=ubifs rw rootwait=1 lpj=4997120 ip=$ {ipaddr}\ 0"\
# endif
(
The above UBOOT parameters are suitable for 512m-byte systems with DDR3. To facilitate NFS debugging, we define nfsargs. If the primary file system uses the squashfs file system, we use squashfsargs. If the primary file system uses ubifs, we use ubifsargs. If you set the new parameters yourself, you can setenv bootargs XXXXXXXX, and then use the run userboot above.
The company's DM8127 development board NAND FLASH partition information:
0x000000000000-0x000000020000: "U-Boot-min"
0x000000020000-0x000000180000: "U-Boot"
0x000000180000-0x0000001c0000: "U-Boot Env"
0x0000001c0000-0x000000800000: "Kernel"
0x000000800000-0x000002b00000: "Squash"
0x000002b00000-0x000009900000: "ubifs"
0x000009900000-0x00000e900000: "userapp"
0x00000e900000-0x000020000000: "user data"
Based on this information, let's take a look at the previous run updatemin; run updateuboot; run updatekernel;run updateubifs
These command scripts are written by our company.
Run updatemin downloads dm8127_min.bin through TFTPSERVER and writes to NAND FLASH
Run updateuboot downloads dm8127_uboot.bin and writes to NAND
Run updatekernel downloads dm8127_kernel.bin and writes to NAND
Run updateubifs downloads dm8127_ubifs.bin and writes to NAND.
Some of the above parameters are the definition of cmem shared memory. Just refer to the definition of APPRO. Our DM8127 uses full speed mode, not low power consumption mode, nor memory DDR3 with only 256m memory.
)
# define CONFIG_IPADDR 192.168.1.188 (we define the ipaddr of the development environment here)
# define CONFIG_SERVERIP 192.168.1.252 (here we define the serverip of the development environment, such as the host IP of tftp,NFS)
# define CONFIG_GATEWAYIP 192.168.1.1
# define CONFIG_NETMASK 255.255.255.0
# define CONFIG_ETHADDR 00:11:22:33:44:55
(we define the MAC address of the board here, and then add the code in bootm.c and pass it to kernel, as shown in:
Arch/arm/lib/Bootm.c
Add the following in do_bootm_linux ():
# if 1 / / added by jingbo
Char buf1 = malloc (1024)
Char buf2 = malloc (32)
Sprintf (buf2, "eth=%s", getenv ("ethaddr")); sprintf (buf1, "s% s", getenv ("bootargs"), buf2); setup_commandline_tag (bd, buf1)
# endif
This code is how to pass the MAC address to the kernel through bootargs)
# ifndef CONFIG_TI814X_OPTI_CONFIG
# define CONFIG_AUTO_COMPLETE (UBOOT command completion must be turned on, otherwise the tab key completion command cannot be used on the uboot command line)
# define CONFIG_CMDLINE_EDITING (this command line cursor key query history command that supports UBOOT, which is usually used in combination with CONFIG_AUTO_COMPLETE, must be added)
# endif
# define CONFIG_SYS_GBL_DATA_SIZE 128 / size in bytes reserved for
Initial data /
# define CONFIG_MISC_INIT_R 1
# ifndef CONFIG_TI814X_MIN_CONFIG
# define CONFIG_TI814X_ASCIIART 1 / The centaur /
# endif
# define CONFIG_SYS_AUTOLOAD "yes"
# ifndef CONFIG_TI814X_OPTI_CONFIG
# define CONFIG_CMD_CACHE
# define CONFIG_CMD_ECHO
# endif
/ *
Miscellaneous configurable options
, /
/ max number of command args /
# define CONFIG_SYS_MAXARGS 32
/ Console I/O Buffer Size /
# define CONFIG_SYS_CBSIZE 512
/ Print Buffer Size /
# define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE\
Sizeof (CONFIG_SYS_PROMPT) + 16)
/ Boot Argument Buffer Size /
# define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
/ memtest works on 8 MB in DRAM after skipping 32MB from start addr of ram disk/
# define CONFIG_SYS_MEMTEST_START (PHYS_DRAM_1 + (64 1024 1024))
# define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START\ (8 1024 1024))
# if defined (CONFIG_CMD_AUTOTEST)
# define CONFIG_SYS_MEMTEST_SIZE 0x10000000 / autotest memory size/
# endif
# undef CONFIG_SYS_CLKS_IN_HZ / everything, incl board info, in Hz /
# define CONFIG_SYS_LOAD_ADDR 0x81000000 / Default load address /
# define CONFIG_SYS_HZ 1000 / 1ms clock /
/ Hardware related /
/ * *
Physical Memory Map (here define 2 sets of chip selected addresses for DDR3, 256m each, for a total of 512m bytes)
/
# define CONFIG_NR_DRAM_BANKS 2 / we have 2 banks of DRAM /
# define PHYS_DRAM_1 0x80000000 / DRAM Bank # 1 /
# define PHYS_DRAM_1_SIZE 0x10000000 / 256 MB /
# define PHYS_DRAM_2 0xB0000000 / DRAM Bank # 2 /
# define PHYS_DRAM_2_SIZE 0x10000000 / 256 MB * /
/ * *
Platform/Board specific defs
, /
# define CONFIG_SYS_CLK_FREQ 20000000
# define CONFIG_SYS_TIMERBASE 0x4802E000
/ *
NS16550 Configuration (defines the clock of the serial port, etc.)
/
# define CONFIG_SERIAL_MULTI 1
# define CONFIG_SYS_NS16550
# define CONFIG_SYS_NS16550_SERIAL
# define CONFIG_SYS_NS16550_REG_SIZE (- 4)
# define CONFIG_SYS_NS16550_CLK (48000000)
# define CONFIG_SYS_NS16550_COM1 0x48020000 / Base EVM has UART0 * /
# define CONFIG_SYS_NS16550_COM2 0x48022000
# define CONFIG_BAUDRATE 115200
# define CONFIG_SYS_BAUDRATE_TABLE {110,300,600, 1200, 2400,\
4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200}
/ *
Select serial console configuration
, /
# define CONFIG_SERIAL1 1
# define CONFIG_CONS_INDEX 1
# define CONFIG_SYS_CONSOLE_INFO_QUIET
# if defined (CONFIG_NO_ETH)
# undef CONFIG_CMD_NET
# else
# define CONFIG_CMD_NET
# define CONFIG_CMD_DHCP
# define CONFIG_CMD_PING
# endif
# if defined (CONFIG_CMD_NET)
# define CONFIG_DRIVER_TI_CPSW
# define CONFIG_MII
# define CONFIG_BOOTP_DEFAULT
# define CONFIG_BOOTP_DNS
# define CONFIG_BOOTP_DNS2
# define CONFIG_BOOTP_SEND_HOSTNAME
# define CONFIG_BOOTP_GATEWAY
# define CONFIG_BOOTP_SUBNETMASK
# define CONFIG_NET_RETRY_COUNT 10
# define CONFIG_NET_MULTI
# define CONFIG_PHY_GIGE
/ increase network receive packet buffer count for reliable TFTP /
# define CONFIG_SYS_RX_ETH_BUFFER 16
# endif
# if defined (CONFIG_SYS_NO_FLASH)
# define CONFIG_ENV_IS_NOWHERE
# endif
/ NAND support /
# ifdef CONFIG_NAND
# define CONFIG_CMD_NAND
# define CONFIG_NAND_TI81XX
/ / # define GPMC_NAND_ECC_LP_x16_LAYOUT 1 / / Jingbo: for 16BIT NAND
# define GPMC_NAND_ECC_LP_x8_LAYOUT 1 / / Jingbo: for 8bit NAND
# define NAND_BASE (0x08000000) (the selected address of the NAND FLASH chip)
# define CONFIG_SYS_NAND_ADDR NAND_BASE / physical address /
/ to access nand /
# define CONFIG_SYS_NAND_BASE NAND_BASE / physical address /
/ to access nand at /
/ CS0 /
# define CONFIG_SYS_MAX_NAND_DEVICE 1 / Max number of NAND /
# endif / devices /
/ ENV in NAND /
# if defined (CONFIG_NAND_ENV)
# undef CONFIG_ENV_IS_NOWHERE
# define CONFIG_ENV_IS_IN_NAND 1
# ifdef CONFIG_ENV_IS_IN_NAND
# define CONFIG_SYS_MAX_FLASH_SECT 520 / max number of sectors in a chip /
# define CONFIG_SYS_MAX_FLASH_BANKS 2 / max number of flash banks /
# define CONFIG_SYS_MONITOR_LEN (256
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.