Kernel arguments

Kernel arguments can be specified in bootargs U-boot environment variable or can be compiled into kernel.

The U-boot variables can be compiled in as default environment, saved in the environment on media or specified in boot.scr

An example of kernel command line arguments:

console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x1024p60 root=/dev/mmcblk0p1 rootwait panic=10


 * console=ttyS0,115200 is for taking over the serial port after u-boot. These are the default settings u-boot uses. You can specify console=ttyS0,115200 console=tty0 for both serial and framebuffer console


 * hdmi.audio=EDID:0 this should presumably turn on HDMI audio only when screen EDID says it supports audio. Omit EDID to just turn on - 1 or off - 0. Currently HDMI audio is enabled even on screen that definitly does not support it - YMMW.


 * disp.screen0_output_mode=EDID:1280x1024p60 screen 0 is the first screen configured in script.bin. EDID instructs the kernel to try to read mode from the screen. Failing that you can pick a mode from a fixed mode list in the driver. Again, omit EDID to override mode manually. You can try to figure out supported modes from files like https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-3.0/drivers/video/sunxi/disp/disp_clk.c cat /sys/class/graphics/fb0/modes might be of some help too.


 * root=/dev/mmcblk0p1 - root on first mmc device first partition. Use /dev/nandc for nand third partition (new partitioning scheme uses /dev/nand3) Some images use label or UUID to identify the root filesystem. /dev/sda1 identifies first SCSI device first partition but as both internal SATA and USB mass storage use SCSI emulation this device name is not assigned deterministically. Use labels or UUIDs for SCSI devices. If you have a seperate boot partition that holds the kernel, boot.scr and script.bin, the root file system would usually be /dev/mmcblk0p2 (use root=/dev/mmcblk0p2).


 * rootwait - this was in the default environment. Not sure what would break if omitted.


 * panic=10 - the amount of time in seconds to wait before rebooting after kernel panic.

It is possible to significantly reduce the amount of reserved memory assigned to various video devices at boot time, resulting in more free system memory, which is especiallly helpful for 512MB devices:


 * sunxi_ve_mem_reserve=0 -- This eliminates the reserved memory for the video acceleration engine, saving 80MB. You can use this if you don't run accelerated video with programs such as VLC or XBMC.


 * sunxi_g2d_mem_reserve=0 -- This eliminates the reserved memory for the 2D acceleration engine. You can use this if you don't have the G2D accelerated driver enabled in your xorg.conf. Even when G2D is enabled, it may not actually use any of this memory, so this setting may be safe (to be verified).


 * sunxi_no_mali_mem_reserve -- This eliminates the reserved memory for the Mali400 3D GPU. If you do not have the Mali binary blob driver installed, it is safe to use this and save another 64MB.


 * sunxi_fb_mem_reserve=16 -- This sets the amount of total reserved memory for the framebuffer to 16MB. The default is 32MB. Because of double buffering Mali may require more than 16MB of framebuffer, so generally only enable this if you don't have Mali installed. 16MB should be sufficient for the largest supported resolution (normally 1920x1080x32bpp).

See also Optimizing system performance.

Feel free to add other relevant arguments. This list is not exhaustive.