Skip to content

Instantly share code, notes, and snippets.

@nathanchance
Created October 12, 2018 19:03
Show Gist options
  • Save nathanchance/e331a237f855cf1db632466ba6967a19 to your computer and use it in GitHub Desktop.
Save nathanchance/e331a237f855cf1db632466ba6967a19 to your computer and use it in GitHub Desktop.
BR2_aarch64=y
BR2_cortex_a57=y
BR2_OPTIMIZE_3=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TARGET_GENERIC_ROOT_PASSWD="root"
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
BR2_PACKAGE_BASH=y
BR2_PACKAGE_HTOP=y
BR2_PACKAGE_VIM=y
BR2_TARGET_ROOTFS_CPIO=y
# BR2_TARGET_ROOTFS_TAR is not set
@nickdesaulniers
Copy link

This is the document I was following for buildroot, as per our dynamic tools team:
https://github.com/google/syzkaller/blob/master/docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md

@nickdesaulniers
Copy link

Thanks for the link @nathanchance, that worked.

$ cd buildroot
$ mkdir -p overlays/etc/
$ cp output/target/etc/inittab overlays/etc/.
$ vim overlays/etc/inittab
-console::respawn:/sbin/getty -L console 0 vt100
+::respawn:-/bin/sh
$ make menuconfig

System configuration > Root filesystem overlay directories set to overlays

$ make
$ cd ~/linux
$ qemu-system-aarch64 -kernel arch/arm64/boot/Image.gz -machine virt -cpu cortex-a57 -m 2048 -append "console=ttyAMA0 root=/dev/vda" -nographic -hda ~/buildroot/output/images/rootfs.ext2 -no-reboot

@nickdesaulniers
Copy link

nickdesaulniers commented Oct 30, 2018

$ make savedefconfig

doesn't create a defconfig file for me, though. Am I holding it wrong? 🐈

@nickdesaulniers
Copy link

Am I holding it wrong?

[Yes] 🌵

$ make savedefconfig BR2_DEFCONFIG=path/to/save/defconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment