[Buildroot] grub/grub2 support on AARCH64 native compilation

Baruch Siach baruch at tkos.co.il
Wed Jan 24 15:51:44 UTC 2018


Hi Nitin,

On Wed, Jan 24, 2018 at 03:05:04PM +0000, Saxena, Nitin wrote:
> Thanks baruch.
> 
> I need a way to get VM image for aarch64 via buildroot (native compilation) 
> so that I can launch it via qemu-system-aarch64.
> I tried compiling buildroot-2017.05.2 and got rootfs.tar and kernel "Image". 
> I created ext4 file system from rootfs.tar and tried to launch QEMU using 
> following command
> 
> =============
> T=/home/dut/launch/br
> qemu-system-aarch64 -enable-kvm -m 2048 -smp 4 -cpu host \
>     -M virt,gic_version=3 -nographic \
>     -kernel $T/Image --append "console=ttyAMA0 root=/dev/vda rw"  \
>     -drive file=$T/rootfs.img,if=virtio,aio=threads \
>     -netdev user,id=user0 -device virtio-net,netdev=user0
> =============
> 
> Is this possible with buildroot package? I can try latest buildroot package.

That fact that your target architecture is the same as the host does not 
matter much for Buildroot. The grub2 package is only available for x86 
targets, regardless of you development host architecture. This is determined 
in the definition of the BR2_TARGET_GRUB2_ARCH_SUPPORTS Kconfig symbol in 
boot/grub2/Config.in.

Patches for adding aarch64 target support to grub2 in Buildroot are welcome.

baruch

> ________________________________________
> From: Baruch Siach <baruch at tkos.co.il>
> Sent: Wednesday, January 24, 2018 5:47 PM
> To: Saxena, Nitin
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] grub/grub2 support on AARCH64 native compilation
> 
> Hi Nitin,
> 
> On Wed, Jan 24, 2018 at 11:40:36AM +0000, Saxena, Nitin wrote:
> > I want to create VM image for aarch64 using rootfs and grub created by
> > buildroot-2017.11.2 tag. I am doing native compilation on AARCH64.
> >
> > So during compilation I am not able to find grub or grub2 option in make
> > menuconfig. Can somebody help me in creating grub for AARCH64
> 
> The grub/grub2 packages in Buildroot only support x86 targets at the moment.
> 
> baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



More information about the buildroot mailing list