U-boot cmdline: Difference between revisions

From embeddedTS Manuals
(Created page with "The Linux kernel cmdline can be customized by modifying the cmdline_append variable. Keeping the default options here is recommended, but additional arguments can be appended...")
 
(Clarified)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The Linux kernel cmdline can be customized by modifying the cmdline_append variable.  Keeping the default options here is recommended, but additional arguments can be appended to this variable.
The Linux kernel cmdline can be customized by modifying the cmdline_append variable.  The variable contents are clobbered when set, so be sure to specify the full desired cmdline string.
<source lang=bash>
<source lang=bash>
env set cmdline_append console=ttymxc0,115200 init=/sbin/init
env set cmdline_append console=ttymxc0,115200 init=/sbin/init quiet
env save
env save
</source>
</source>
The kernel command line can also be modified from from the on-board Linux.  Debian (and other distributions) provide a U-Boot utilities package that contains the tools necessary to create a U-Boot script:
<source lang=bash>
apt-get update && apt-get install u-boot-tools -y
echo "env set cmdline_append console=ttymxc0,115200 init=/sbin/init quiet" > /boot/boot.scr
mkimage -A arm -T script -C none -n 'tsimx6 boot script' -d /boot/boot.scr /boot/boot.ub
</source>
The boot.scr includes the plain text commands to be run in U-Boot on startup.  The mkimage tool adds a checksum and header to this file which can be loaded by U-Boot.  The .ub file should not be edited directly.

Latest revision as of 14:01, 27 September 2018

The Linux kernel cmdline can be customized by modifying the cmdline_append variable. The variable contents are clobbered when set, so be sure to specify the full desired cmdline string.

env set cmdline_append console=ttymxc0,115200 init=/sbin/init quiet
env save

The kernel command line can also be modified from from the on-board Linux. Debian (and other distributions) provide a U-Boot utilities package that contains the tools necessary to create a U-Boot script:

apt-get update && apt-get install u-boot-tools -y
echo "env set cmdline_append console=ttymxc0,115200 init=/sbin/init quiet" > /boot/boot.scr
mkimage -A arm -T script -C none -n 'tsimx6 boot script' -d /boot/boot.scr /boot/boot.ub

The boot.scr includes the plain text commands to be run in U-Boot on startup. The mkimage tool adds a checksum and header to this file which can be loaded by U-Boot. The .ub file should not be edited directly.