Adding a new user, setting a password for new user and changing root password for Yocto

Created a new image recipe like below and named it as, recipes-images/images/lynxbee-core-image-minimal.bb

————————————————————-

inherit extrausers
SUMMARY = “A small image just capable of allowing a device to boot.”

IMAGE_INSTALL = “packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${CORE_IMAGE_EXTRA_INSTALL}”

IMAGE_LINGUAS = ” ”

LICENSE = “MIT”

inherit core-image

IMAGE_ROOTFS_SIZE ?= “8192”

EXTRA_USERS_PARAMS = “\
        useradd -P password124 lynxbee; \
        usermod -P password124 root; \

READ  How to add locale into embedded yocto root filesystem

——————————————————–

Compile the image as,

$ bitbake lynxbee-core-image-minimal

and run as,

$  runqemu qemuarm

On, login menu you should be able to use the user & passwords as defined above.

Reference : Yocto manual

Leave a Reply

Your email address will not be published. Required fields are marked *