Skip to content

Commit

Permalink
Further reduce RFS size via poky-tiny.conf instead of poky.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
timesys-nathan committed Mar 16, 2023
1 parent aa36d21 commit 540ce48
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
11 changes: 11 additions & 0 deletions meta-adi-adsp-sc5xx/classes/adsp-sc5xx.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,14 @@ PASSWD_ROOT = "\$5\$j9T8zDE13LXUGyc6\$utDvGwFWR.kt/AKwwbHnXC14HJBqbcWwvLoDDLMQrc
EXTRA_USERS_PARAMS = "usermod -p '${PASSWD_ROOT}' root;"

TOOLCHAIN_HOST_TASK:append = " nativesdk-openocd-adi"

IMAGE_FSTYPES:append = " tar.xz jffs2 "

#For some reason on poky-tiny, INIT_MANAGER="systemd" does not appear to work
#For now, let's relink directly to systemd
fakeroot do_set_init(){
rm -rf ${IMAGE_ROOTFS}/sbin/init
ln -s /lib/systemd/systemd ${IMAGE_ROOTFS}/sbin/init
}

addtask do_set_init after do_rootfs before do_image
8 changes: 7 additions & 1 deletion meta-adi-adsp-sc5xx/conf/distro/adi-distro.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
require conf/distro/poky.conf
require conf/distro/poky-tiny.conf

DISTRO = "adi-distro"

DISTRO_FEATURES:remove = "sysvinit"

DISTRO_FEATURES:append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_dev_manager = "udev"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
VIRTUAL-RUNTIME_login_manager = "systemd"

DISTRO_FEATURES_FILTER_NATIVE:append = " systemd"
DISTRO_FEATURES_NATIVE:remove = "sysvinit"
Expand All @@ -16,3 +18,7 @@ DISTRO_FEATURES_NATIVE:append = " systemd"
DISTRO_FEATURES_FILTER_NATIVESDK:append = " systemd"
DISTRO_FEATURES_NATIVESDK:remove = "sysvinit"
DISTRO_FEATURES_NATIVESDK:append = " systemd"

PREFERRED_PROVIDER_virtual/kernel = "linux-adi"

INIT_MANAGER = "systemd"
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ fakeroot do_rootfs_cleanup(){
}

addtask rootfs_cleanup after do_rootfs before do_image

IMAGE_FSTYPES:append = " wic.gz ext4 "
9 changes: 9 additions & 0 deletions meta-adi-adsp-sc5xx/recipes-adi/images/adsp-sc5xx-tiny.bb
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ fakeroot do_rootfs_cleanup(){
}

addtask rootfs_cleanup after do_rootfs before do_image

#For some reason on poky-tiny, INIT_MANAGER="systemd" does not appear to work
#For now, let's relink directly to systemd
fakeroot do_set_init(){
rm -rf ${IMAGE_ROOTFS}/sbin/init
ln -s /lib/systemd/systemd ${IMAGE_ROOTFS}/sbin/init
}

addtask do_set_init after do_rootfs before do_image

0 comments on commit 540ce48

Please sign in to comment.