
Hi: York
I set bootargs as the following steps:
=> env default mtdparts => printenv mtdparts mtdparts=mtdparts=60000000.nor:1m(nor_bank0_rcw),1m(nor_bank0_uboot),1m(nor_bank0_uboot_env),1m(nor_bank0_fman_uconde),40m(nor_bank0_fit),1m(nor_bank4_rcw),1m(nor_bank4_uboot),1m(nor_bank4_uboot_env),1m(nor_bank4_fman_ucode),40m(nor_bank4_fit);7e800000.flash:1m(nand_uboot),1m(nand_uboot_env),20m(nand_fit);spi0.0:1m(uboot),5m(kernel),1m(dtb),9m(file_system) => env default bootargs => printenv bootargs bootargs=console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
The macro CONFIG_BOOTARGS only be extern as an char-string, and it will be spliced into default_environment array .
const uchar default_environment[] = { #ifdef CONFIG_BOOTARGS "bootargs=" CONFIG_BOOTARGS "\0" #endif
The variable we use to have $consoledev, $othbootargs was used in the following cases:
858 #define CONFIG_BOOTCOMMAND \ 859 "setenv bootargs root=/dev/ram rw " \ 860 "console=$consoledev,$baudrate $othbootargs;" \ 861 "setenv ramdiskaddr 0x02000000;" \ 862 "setenv fdtaddr 0x00c00000;" \ 863 "setenv loadaddr 0x1000000;" \ 864 "bootm $loadaddr $ramdiskaddr $fdtaddr"
Because the "setenv" will be executed , So the variable could be extended.
What do you suggest?
Best Regards Wenbin Song
-----Original Message----- From: York Sun [mailto:york.sun@nxp.com] Sent: Wednesday, April 06, 2016 12:39 PM To: Wenbin Song wenbin.song@nxp.com; Mingkai Hu mingkai.hu@nxp.com; u-boot@lists.denx.de Cc: Qianyu Gong qianyu.gong@nxp.com; Shaohui Xie shaohui.xie@nxp.com; Zhiqiang Hou zhiqiang.hou@nxp.com Subject: Re: [PATCH] armv8/ls1043a: Add MTD partition scheme
On 04/05/2016 09:20 PM, Wenbin Song wrote:
Hi: York
Do you mean that I should use $mtdpart to instead of
"MTDPARTS_DEFAULT" ?
As follows: #define CONFIG_BOOTARGS "console=ttyS0,115200
root=/dev/ram0 " \
"earlycon=uart8250,mmio,0x21c0500 " \ "$mtdparts"
If so, the variable $mtdparts can't be extend ,like that:
root@ls1043aqds:~# cat /proc/cmdline console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 ${mtdparts}
What do you see "print bootargs" under U-Boot? I thought the variable can be extended when U-Boot runs the command. Like we used to have $consoledev, $othbootargs, etc.
York