简体   繁体   中英

Booting mainline Linux kernel using device tree

I followed the following steps to build and flash my kernel on 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. (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.
    I guess you built rootfs from busybox if so try below command to boot system completely
  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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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