简体   繁体   English

使用设备树引导主线Linux内核

[英]Booting mainline Linux kernel using device tree

I followed the following steps to build and flash my kernel on QEMU : 我按照以下步骤在QEMU上构建和刷新内核:

  1. make ARCH=arm distclean
  2. make ARCH=arm versatile_defconfig
  3. make ARCH=arm menuconfig
    here you need to enable below feature. 在这里,您需要启用以下功能。
    Kernel Features ---> [*] Use the ARM EABI to compile the kernel. 内核功能---> [*]使用ARM EABI编译内核。 (enable this). (启用此功能)。
  4. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
  5. qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/uImage -append "console=tty1"
    Here you will get console saying that kernel panic. 在这里,您将获得控制台提示说内核崩溃。 To avoid this pass your rootfs parameter. 为了避免这种情况,请传递您的rootfs参数。
    I guess you built rootfs from busybox if so try below command to boot system completely 我猜你是从busybox构建rootfs的,如果这样,请尝试使用以下命令完全启动系统
  6. qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/uImage -initrd rootfs.img -append "root=/dev/ram mem=128M rdinit=/sbin/init" -serial stdio

On runtime, is kernel using a device tree to load the devices? 在运行时,内核是否使用设备树来加载设备? If yes, how to confirm and where is the device tree located? 如果是,如何确认以及设备树位于何处? (I need to make changes to the device tree file (.dts), but unable to find where is the file located) Please help (我需要对设备树文件(.dts)进行更改,但无法找到该文件的位置)请帮助

设备树位于arch/arm/boot/dts/versatile-pb.dts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM