diff --git a/buildroot_config_fragment b/buildroot_config_fragment index d4139fb..a2e0ed7 100644 --- a/buildroot_config_fragment +++ b/buildroot_config_fragment @@ -6,6 +6,8 @@ BR2_PACKAGE_STRACE=y BR2_ROOTFS_OVERLAY="../rootfs_overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="../rootfs_post_build_script" BR2_ROOTFS_USERS_TABLES="../user_table" +# Generate output/images/rootfs.cpio +BR2_TARGET_ROOTFS_CPIO=y # Host GDB BR2_GDB_VERSION="7.11.1" diff --git a/kernel_config_fragment b/kernel_config_fragment index 1a0ada4..0b968a5 100644 --- a/kernel_config_fragment +++ b/kernel_config_fragment @@ -8,6 +8,8 @@ CONFIG_DEBUG_FS=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y CONFIG_GDB_SCRIPTS=y +# Allow kernel to understand -initrd +CONFIG_BLK_DEV_INITRD=y # Non-static variables show up on /proc/kallsyms # https://stackoverflow.com/questions/20196636/does-kallsyms-have-all-the-symbol-of-kernel-functions/44614878#44614878 diff --git a/run b/run index c9b2df2..7fa9ead 100755 --- a/run +++ b/run @@ -62,14 +62,15 @@ case "$arch" in fi cmd="$qemu_common \ -M pc \ --append 'root=/dev/vda nopat $extra_append' \ +-append 'nopat $extra_append' \ -device edu \ -device lkmc_pci_min \ -device virtio-net-pci,netdev=net0 \ --drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \ +-initrd ${images_dir}/rootfs.cpio \ -kernel ${images_dir}/bzImage \ $extra_flags \ " +#-drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \ ;; arm) if $kgdb; then