Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • lava lava
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 48
    • Merge requests 48
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Merge requests
  • !1937

Open
Created Jan 16, 2023 by Larry Shen@atlineContributor
  • Report abuse
Report abuse

RFC: base-uboot: remove single quote for baseargs.

  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

I'm working on a scenario which will set extra_kernel_args: fsck.mode=skip ${mcore_clk}, then lava will send next command to uboot:

setenv bootargs 'console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200n8 root=/dev/nfs rw nfsroot=192.168.100.102:/rootfs/LF_730_202301121728/imx84_rootfs_r,tcp,hard,v3 fsck.mode=skip ${mcore_clk} ip=dhcp'

Unfortunately, single quote here makes ${mcore_clk} never expand to its real value which already defined in uboot.

This patch remove that single quote in base-uboot.jinja2, then lava send next command to uboot which prove can get mcore_clk expanded.

setenv bootargs console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200n8 root=/dev/nfs rw nfsroot=192.168.100.102:/rootfs/LF_730_202301121728/imx84_rootfs_r,tcp,hard,v3 fsck.mode=skip ${mcore_clk} ip=dhcp


In fact,

  1. What I usually used for single quote in uboot is as next, it could delay the expansion of net_boot here, so it possible expand only when we call run net_boot. But, I think the baseargs in lava is not the same scenario.
u-boot=> setenv net_boot setenv bootargs console ${parameter}
u-boot=> setenv parameter me
u-boot=> run net_boot
u-boot=> print bootargs
bootargs=console
u-boot=> setenv net_boot 'setenv bootargs console ${parameter}'
u-boot=> setenv parameter me
u-boot=> run net_boot
u-boot=> print bootargs
bootargs=console me
  1. Double quote in "setenv bootargs xxx" already makes it a valid string, so yaml won't treat it as a map even it find any colon+space there in xxx.

  2. What you already did for x86.jinja2 is same as what this patch did already, no single quote there:

- "set extraargs root=/dev/nfs rw {{ base_nfsroot_args }} {{ base_kernel_args }} {{ base_ip_args }}"
  1. I don't know what nbd is, but next define which has ${extraargs} in it should already broken as it will never expand ${extraargs}, do you have environment to verify it?
- "setenv bootargs '{{ console_device }}{{ baud_rate }} rw {{ base_nbdroot_args }} {{ base_kernel_args }} {{ base_ip_args }} verbose earlyprintk systemd.log_color=false ${extraargs} rw'"

As this patch looks not break anything of mine, I wonder if I miss any other scenario which you add single quote on purpose?

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: baseargs_fix