public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme
Date: Wed, 6 Apr 2016 10:17:40 -0700	[thread overview]
Message-ID: <570544B4.8050505@nxp.com> (raw)
In-Reply-To: <AM4PR0401MB19063EA01C84FE2BC0200B39F19F0@AM4PR0401MB1906.eurprd04.prod.outlook.com>

On 04/06/2016 12:11 AM, Wenbin Song wrote:
> 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.

I see what you mean. I am trying to reduce the environmental variables.
Do you need the variable "mtdparts"?
Would it be a better idea to set bootargs using the bootcmd?

While you are on it, I suggest you take a look at other variables.
"console=ttyAMA0,38400n8" is wrong here.

We don't have to copy kernel image from NOR flash to DDR if the ramdisk load
address is set properly in its file. So you can remove the copying from bootcmd.

York

  reply	other threads:[~2016-04-06 17:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  9:28 [U-Boot] [PATCH] armv8/ls1043a: Add MTD partition scheme Wenbin Song
2016-04-05 20:32 ` York Sun
2016-04-05 21:02   ` York Sun
2016-04-06  3:24     ` Wenbin Song
2016-04-06  4:20   ` Wenbin Song
2016-04-06  4:39     ` York Sun
2016-04-06  7:11       ` Wenbin Song
2016-04-06 17:17         ` York Sun [this message]
2016-04-07  5:46           ` Wenbin Song
2016-07-19 22:02             ` york sun
2016-07-20  3:02               ` Wenbin Song
2016-07-20 21:27                 ` york sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570544B4.8050505@nxp.com \
    --to=york.sun@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox