1
votes

i am new to embedded linux development environment. I am trying to generate the device tree file for Zedboard(Zync Series SoC from Xilinx) and encountered the following line in the .dts file:

chosen {
    bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext2 rootwait devtmpfs.mount=0 consoleblank=0";
    linux,stdout-path = "/amba@0/serial@e0001000";
} ;

What is each parameter doing here?

1
Consider having a look though the spec, although admittedly it's not particularly beginner-friendly.Notlikethat

1 Answers

1
votes

If you are new to device tree use in Linux, then a good place to start learning is the Booting the Linux-ppc kernel without Open Firmware (named so for legacy reasons, device tree is now used across several architectures).

The chosen node (documented formally here) is "special" and carries information to be passed from firmware/bootloader to the kernel. Or in this case, hard-wired into a static device tree beforehand.

bootargs holds the kernel command line, and linux,stdout-path (or these days just stdout-path) specifies which device the kernel should use as its default console. (Interestingly, the example you provide then overrides this on the command line...)