diff --git a/README.md b/README.md index 5633890..7b1af9e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ First build will take a while (GCC, Linux kernel). QEMU opens up, and you can run: - root insmod /hello.ko insmod /hello2.ko rmmod hello diff --git a/rootfs_overlay/etc/inittab b/rootfs_overlay/etc/inittab new file mode 100644 index 0000000..debf9a4 --- /dev/null +++ b/rootfs_overlay/etc/inittab @@ -0,0 +1,3 @@ +# /etc/inittab +# https://unix.stackexchange.com/questions/299408/how-to-login-automatically-without-typing-root-in-buildroot-x86-64-qemu +console::respawn:/bin/sh diff --git a/run b/run index 941960e..e2fb2c5 100755 --- a/run +++ b/run @@ -5,6 +5,7 @@ make BR2_EXTERNAL="$(pwd)/../kernel_module" qemu_x86_64_defconfig echo ' BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="../kernel-config-frag" BR2_PACKAGE_KERNEL_MODULE=y +BR2_ROOTFS_OVERLAY="../rootfs_overlay" ' >> .config env -u LD_LIBRARY_PATH make BR2_JLEVEL="$(($(nproc) - 2))" kernel_module-rebuild all qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user