rockchip-linux / u-boot

U-Boot tree for pending commits
113 stars 79 forks source link

When a same bootarg exists in both dtb and bootargs env, the one in dtb is selected. #73

Open cy18 opened 2 years ago

cy18 commented 2 years ago

For example,

## U-Boot bootargs: earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 console=ttyFIQ0 rw root=/dev/mmcblk1p8 rootfstype=ext4 rootwait coherent_pool=1m init=/sbin/init
## Kernel bootargs: earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 console=ttyFIQ0 rw root=PARTUUID=614e0000-0000 rootfstype=ext4 rootwait coherent_pool=1m
## Merged bootargs: earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 console=ttyFIQ0 rw root=PARTUUID=614e0000-0000 rootfstype=ext4 rootwait coherent_pool=1m init=/sbin/init

The resulting rootfs is the one defined in dtb "root=PARTUUID=614e0000-0000", instead of the one given in uboot env. This behavior makes it impossible to change arguments already defined in kernel DTB. It also does not conform to the description in the document “Rockchip_Developer_Guid_Uboot_Nextdev_CN" as below:

image