Build for vbox fellow below steps:
1, In you kernel code root path:
- $ make ARCH=x86 vbox_defconfig
- $ make ARCH=x86 menuconfig
- $ make -j4 ARCH=x86 bzImage
2, After step 1 you can get two files, one is vmlinux, the other is arch/x86/boot/bzImage
- $ cp arch/x86/boot/bzImage $YOURAOSP/prebuilts/qemu-kernel/x86/kernel-vbox
- $ cp vmlinux $YOURAOSP/prebuilts/qemu-kernel/x86/vmlinux-vbox
3, Go to your AOSP code, maybe some code should be change for kgdb debug:
- /* external/grub/stage2/preset_menu.c */
- /* add below code in end */
- "\n"
- " title Android KGDB Startup from /dev/sda v0.x\n"
- " kernel (hd0,2)/kernel qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemu=ttyS1 kgdboc=ttyS0,115200 kgdbwait\n"
- " initrd (hd0,2)/rmdisk\n"
4, build vdi
- $ source build/envsetup.sh
- $ lunch
- choose vbox_x86-eng option here
- $ make -j4
- $ make -j4 android_disk_vdi
5, Two vdi file is in out/target/product/xbox_x86 by default. Set android_system_disk.vdi as IDE Primary Master and android_data_disk.vdi as IDE Primary Slave. Then it works.
6,if promoted storage space running out, please edit BOARD_USERDATAIMAGE_PARTITION_SIZE value in source/build/target/board/vbox_x86/BoardConfig.mk. Attention do not change the value to big, default is 50M, I change to 70M, it is work, but not with 500M -- it will pop "config invalid" error when build vdi file.
After modification, please remove original *.img and *.vdi in out/target/product/vbox_x86/, and repeat step 4.
阅读(3778) | 评论(0) | 转发(0) |