<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Initramfs embedded in kernel</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Initramfs-embedded-in-kernel/m-p/1447322#M189558</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been struggling with initramfs last couple of days without success.&lt;/P&gt;&lt;P&gt;My intention is to use initramfs to unlock encrypted rootfs partition before kernel starts to mount that particular partition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using my own&amp;nbsp;image-small-initramfs.bb recipe to generate&amp;nbsp;initramfs.&lt;/P&gt;&lt;P&gt;After bitbake build "image-small-initramfs-imx8mmevk-20220421133958.rootfs.cpio.gz" is created.&lt;/P&gt;&lt;P&gt;I have also added path to that file in linux menuconfig.&lt;/P&gt;&lt;P&gt;That is done in "Initramfs source file" and string/path looks something like this:&lt;/P&gt;&lt;P&gt;/home/user/...../build/tmp/deploy/images/imx8mmevk/image-small-initramfs-imx8mmevk.cpio.gz&lt;/P&gt;&lt;P&gt;local.conf is also updated with flowing information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;INITRAMFS_IMAGE = "image-small-initramfs"&lt;BR /&gt;INITRAMFS_IMAGE_BUNDLE = "1"&lt;/P&gt;&lt;P&gt;Yocto builds fine. No error or warnings.&lt;/P&gt;&lt;P&gt;When i boot my board I change&amp;nbsp;&amp;nbsp;mmcroot to "mmcroot /dev/ram0 rootwait rw"&lt;/P&gt;&lt;P&gt;The kernel starts and kernel panic occurs.&lt;/P&gt;&lt;P&gt;[ 3.714140] Freeing unused kernel memory: 4800K&lt;BR /&gt;[ 3.732554] Run /init as init process&lt;BR /&gt;[ 3.736274] Failed to execute /init (error -13)&lt;BR /&gt;[ 3.740822] Run /sbin/init as init process&lt;BR /&gt;[ 3.744970] Run /etc/init as init process&lt;BR /&gt;[ 3.749006] Run /bin/init as init process&lt;BR /&gt;[ 3.753052] Run /bin/sh as init process&lt;BR /&gt;[ 3.758574] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000&lt;BR /&gt;[ 3.766247] CPU: 3 PID: 1 Comm: sh Not tainted 5.4.70-2.3.2+g8c73bc625c4d #1&lt;BR /&gt;[ 3.773299] Hardware name: FSL i.MX8MM EVK board (DT)&lt;BR /&gt;[ 3.778355] Call trace:&lt;BR /&gt;[ 3.780812] dump_backtrace+0x0/0x140&lt;BR /&gt;[ 3.784478] show_stack+0x14/0x20&lt;BR /&gt;[ 3.787800] dump_stack+0xb4/0x114&lt;BR /&gt;[ 3.791207] panic+0x158/0x324&lt;BR /&gt;[ 3.794268] do_exit+0x95c/0x980&lt;BR /&gt;[ 3.797498] do_group_exit+0x40/0xa0&lt;BR /&gt;[ 3.801080] __arm64_sys_exit_group+0x14/0x18&lt;BR /&gt;[ 3.805443] el0_svc_common.constprop.0+0x68/0x160&lt;BR /&gt;[ 3.810236] el0_svc_handler+0x20/0x80&lt;BR /&gt;[ 3.813990] el0_svc+0x8/0x208&lt;BR /&gt;[ 3.817052] SMP: stopping secondary CPUs&lt;BR /&gt;[ 3.821301] Kernel Offset: disabled&lt;BR /&gt;[ 3.824793] CPU features: 0x0002,2000200c&lt;BR /&gt;[ 3.828805] Memory Limit: none&lt;BR /&gt;[ 3.831868] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 ]---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone understand what I'm doing wrong.&lt;/P&gt;&lt;P&gt;This is image-small-initramfs.bb recipe:&lt;/P&gt;&lt;P&gt;DESCRIPTION = "Minimal console-only initramfs image."&lt;BR /&gt;&lt;BR /&gt;PACKAGE_INSTALL= "\&lt;BR /&gt;base-files \&lt;BR /&gt;base-passwd \&lt;BR /&gt;busybox \&lt;BR /&gt;initscripts \&lt;BR /&gt;${ROOTFS_BOOTSTRAP_INSTALL} \&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;IMAGE_LINGUAS = " "&lt;BR /&gt;&lt;BR /&gt;LICENSE = "MIT"&lt;BR /&gt;&lt;BR /&gt;IMAGE_FEATURES = ""&lt;BR /&gt;&lt;BR /&gt;export IMAGE_BASENAME = "image-small-initramfs"&lt;BR /&gt;&lt;BR /&gt;IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ${INITRAMFS_FSTYPES}.u-boot"&lt;BR /&gt;inherit image&lt;BR /&gt;&lt;BR /&gt;IMAGE_ROOTFS_SIZE = "8192"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Adde&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Apr 2022 14:36:26 GMT</pubDate>
    <dc:creator>adde_ado</dc:creator>
    <dc:date>2022-04-21T14:36:26Z</dc:date>
    <item>
      <title>Initramfs embedded in kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Initramfs-embedded-in-kernel/m-p/1447322#M189558</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been struggling with initramfs last couple of days without success.&lt;/P&gt;&lt;P&gt;My intention is to use initramfs to unlock encrypted rootfs partition before kernel starts to mount that particular partition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using my own&amp;nbsp;image-small-initramfs.bb recipe to generate&amp;nbsp;initramfs.&lt;/P&gt;&lt;P&gt;After bitbake build "image-small-initramfs-imx8mmevk-20220421133958.rootfs.cpio.gz" is created.&lt;/P&gt;&lt;P&gt;I have also added path to that file in linux menuconfig.&lt;/P&gt;&lt;P&gt;That is done in "Initramfs source file" and string/path looks something like this:&lt;/P&gt;&lt;P&gt;/home/user/...../build/tmp/deploy/images/imx8mmevk/image-small-initramfs-imx8mmevk.cpio.gz&lt;/P&gt;&lt;P&gt;local.conf is also updated with flowing information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;INITRAMFS_IMAGE = "image-small-initramfs"&lt;BR /&gt;INITRAMFS_IMAGE_BUNDLE = "1"&lt;/P&gt;&lt;P&gt;Yocto builds fine. No error or warnings.&lt;/P&gt;&lt;P&gt;When i boot my board I change&amp;nbsp;&amp;nbsp;mmcroot to "mmcroot /dev/ram0 rootwait rw"&lt;/P&gt;&lt;P&gt;The kernel starts and kernel panic occurs.&lt;/P&gt;&lt;P&gt;[ 3.714140] Freeing unused kernel memory: 4800K&lt;BR /&gt;[ 3.732554] Run /init as init process&lt;BR /&gt;[ 3.736274] Failed to execute /init (error -13)&lt;BR /&gt;[ 3.740822] Run /sbin/init as init process&lt;BR /&gt;[ 3.744970] Run /etc/init as init process&lt;BR /&gt;[ 3.749006] Run /bin/init as init process&lt;BR /&gt;[ 3.753052] Run /bin/sh as init process&lt;BR /&gt;[ 3.758574] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000&lt;BR /&gt;[ 3.766247] CPU: 3 PID: 1 Comm: sh Not tainted 5.4.70-2.3.2+g8c73bc625c4d #1&lt;BR /&gt;[ 3.773299] Hardware name: FSL i.MX8MM EVK board (DT)&lt;BR /&gt;[ 3.778355] Call trace:&lt;BR /&gt;[ 3.780812] dump_backtrace+0x0/0x140&lt;BR /&gt;[ 3.784478] show_stack+0x14/0x20&lt;BR /&gt;[ 3.787800] dump_stack+0xb4/0x114&lt;BR /&gt;[ 3.791207] panic+0x158/0x324&lt;BR /&gt;[ 3.794268] do_exit+0x95c/0x980&lt;BR /&gt;[ 3.797498] do_group_exit+0x40/0xa0&lt;BR /&gt;[ 3.801080] __arm64_sys_exit_group+0x14/0x18&lt;BR /&gt;[ 3.805443] el0_svc_common.constprop.0+0x68/0x160&lt;BR /&gt;[ 3.810236] el0_svc_handler+0x20/0x80&lt;BR /&gt;[ 3.813990] el0_svc+0x8/0x208&lt;BR /&gt;[ 3.817052] SMP: stopping secondary CPUs&lt;BR /&gt;[ 3.821301] Kernel Offset: disabled&lt;BR /&gt;[ 3.824793] CPU features: 0x0002,2000200c&lt;BR /&gt;[ 3.828805] Memory Limit: none&lt;BR /&gt;[ 3.831868] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 ]---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone understand what I'm doing wrong.&lt;/P&gt;&lt;P&gt;This is image-small-initramfs.bb recipe:&lt;/P&gt;&lt;P&gt;DESCRIPTION = "Minimal console-only initramfs image."&lt;BR /&gt;&lt;BR /&gt;PACKAGE_INSTALL= "\&lt;BR /&gt;base-files \&lt;BR /&gt;base-passwd \&lt;BR /&gt;busybox \&lt;BR /&gt;initscripts \&lt;BR /&gt;${ROOTFS_BOOTSTRAP_INSTALL} \&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;IMAGE_LINGUAS = " "&lt;BR /&gt;&lt;BR /&gt;LICENSE = "MIT"&lt;BR /&gt;&lt;BR /&gt;IMAGE_FEATURES = ""&lt;BR /&gt;&lt;BR /&gt;export IMAGE_BASENAME = "image-small-initramfs"&lt;BR /&gt;&lt;BR /&gt;IMAGE_FSTYPES = "${INITRAMFS_FSTYPES} ${INITRAMFS_FSTYPES}.u-boot"&lt;BR /&gt;inherit image&lt;BR /&gt;&lt;BR /&gt;IMAGE_ROOTFS_SIZE = "8192"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Adde&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 14:36:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Initramfs-embedded-in-kernel/m-p/1447322#M189558</guid>
      <dc:creator>adde_ado</dc:creator>
      <dc:date>2022-04-21T14:36:26Z</dc:date>
    </item>
  </channel>
</rss>

