mirror of
git://git.yoctoproject.org/meta-rockchip.git
synced 2025-07-05 05:04:47 +02:00
Add configuration parameter to set boot device for the image
wic modifies /etc/fstab on the root file system during image generation, without the --ondisk parameter it assumes some default device name which leads to an /etc/fstab file populated with /dev/sda entries. This is not correct for the machines in the rockchip layer which use mmcblkX. This patch introduces an RK_BOOT_DEVICE option which is being set in the machine configuratoin and which is being used in the wks files. The variable expansion in the wks is handled by propagating the variable to the wic environment. This results in correct /etc/fstab entries and in a correct kernel bootargs root= parameter. Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
This commit is contained in:
parent
6e0ce163b0
commit
1aea373d88
|
@ -21,3 +21,8 @@ XSERVER = " \
|
|||
|
||||
# misc
|
||||
IMAGE_FSTYPES += "ext4"
|
||||
|
||||
# boot device (sd-card/emmc)
|
||||
RK_BOOT_DEVICE ??= "mmcblk0"
|
||||
WICVARS_append = " RK_BOOT_DEVICE"
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ require conf/machine/include/rk3399.inc
|
|||
KERNEL_DEVICETREE = "rockchip/rk3399-rock-pi-4.dtb"
|
||||
UBOOT_MACHINE = "rock-pi-4-rk3399_defconfig"
|
||||
|
||||
RK_BOOT_DEVICE = "mmcblk1"
|
||||
WKS_FILE ?= "rock-pi-4.wks"
|
||||
IMAGE_FSTYPES += "wic wic.bmap"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ KERNEL_EXTRA_ARGS += "LOADADDR=0x02000000"
|
|||
|
||||
UBOOT_MACHINE = "vyasa-rk3288_defconfig"
|
||||
|
||||
RK_BOOT_DEVICE = "mmcblk2"
|
||||
WKS_FILE = "vyasa-rk3288.wks"
|
||||
IMAGE_FSTYPES += "wic wic.bmap"
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
include rk3288-boot.wks
|
||||
part / --align 131072 --source rootfs --fstype=ext4 --label root
|
||||
part / --align 131072 --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root
|
||||
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
# root 262144 -
|
||||
#
|
||||
|
||||
part loader1 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
|
||||
part reserved1 --align 4032 --size 64K
|
||||
part reserved2 --align 4096 --size 4096K
|
||||
part loader2 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.bin"
|
||||
part atf --align 12288 --size 4096K
|
||||
part /boot --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
|
||||
part loader1 --align 32 --size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img"
|
||||
part reserved1 --align 4032 --size 64K --ondisk ${RK_BOOT_DEVICE}
|
||||
part reserved2 --align 4096 --size 4096K --ondisk ${RK_BOOT_DEVICE}
|
||||
part loader2 --align 8192 --size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.bin"
|
||||
part atf --align 12288 --size 4096K --ondisk ${RK_BOOT_DEVICE}
|
||||
part /boot --align 16384 --size=114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
# root 262144 -
|
||||
#
|
||||
|
||||
part loader1 --align 32 --size 4000K --source rawcopy --sourceparams="file=idbloader.img"
|
||||
part reserved1 --align 4032 --size 64K
|
||||
part reserved2 --align 4096 --size 4096K
|
||||
part loader2 --align 8192 --size 4096K --source rawcopy --sourceparams="file=u-boot.itb"
|
||||
part atf --align 12288 --size 4096K
|
||||
part /boot --align 16384 --size=114688K --active --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
|
||||
part loader1 --align 32 --size 4000K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img"
|
||||
part reserved1 --align 4032 --size 64K --ondisk ${RK_BOOT_DEVICE}
|
||||
part reserved2 --align 4096 --size 4096K --ondisk ${RK_BOOT_DEVICE}
|
||||
part loader2 --align 8192 --size 4096K --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.itb"
|
||||
part atf --align 12288 --size 4096K --ondisk ${RK_BOOT_DEVICE}
|
||||
part /boot --align 16384 --size=114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
|
||||
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
include rk3399-boot.wks
|
||||
part / --align 131072 --source rootfs --fstype=ext4 --label root
|
||||
part / --align 131072 --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root
|
||||
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,1500000n8 rw root=/dev/mmcblk1p7 rootfstype=ext4 init=/sbin/init"
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,1500000n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
include rk3288-boot.wks
|
||||
part / --align 131072 --source rootfs --fstype=ext4 --label root
|
||||
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk0p7 rootfstype=ext4 init=/sbin/init"
|
||||
part / --align 131072 --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root
|
||||
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Released under the MIT license (see COPYING.MIT for the terms)
|
||||
|
||||
include rk3288-boot.wks
|
||||
part / --align 131072 --source rootfs --fstype=ext4 --label root
|
||||
part / --align 131072 --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root
|
||||
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/mmcblk2p7 rootfstype=ext4 init=/sbin/init"
|
||||
bootloader --ptable gpt --append="console=tty1 console=ttyS2,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user