linuxboot/mainboards/qemu/x86_64/Makefile
Ryan O'Leary 382b9143aa Add qemu/x86_64 mainboard
This kernel has VIRT options enabled.

Signed-off-by: Ryan O'Leary <ryanoleary@google.com>
2021-09-14 13:15:44 -07:00

32 lines
1.0 KiB
Makefile

flashinitramfs.cpio:
u-root -o $@ \
github.com/u-root/u-root/cmds/boot/pxeboot \
github.com/u-root/u-root/cmds/core/cat \
github.com/u-root/u-root/cmds/core/elvish \
github.com/u-root/u-root/cmds/core/init \
github.com/u-root/u-root/cmds/core/ip \
github.com/u-root/u-root/cmds/core/ls \
github.com/u-root/u-root/cmds/core/kexec \
github.com/u-root/u-root/cmds/core/pci \
github.com/u-root/u-root/cmds/core/wget
flashkernel: flash.config
cp $< linux/.config
echo CONFIG_CMDLINE_BOOL=y >> linux/.config
echo CONFIG_CMDLINE_OVERRIDE=y >> linux/.config
echo 'CONFIG_CMDLINE="noefi ip=dhcp earlyprintk=ttyS0,115200,keep console=ttyS0,115200"' >> linux/.config
(cd linux && make olddefconfig && make -j32)
cp linux/arch/x86/boot/bzImage $@
testflashkernel: flashkernel flashinitramfs.cpio
qemu-system-x86_64 -kernel flashkernel -nographic -initrd flashinitramfs.cpio
fetch: getkernel geturoot
getkernel:
rm -rf linux
git clone --depth=1 -b v5.10 https://github.com/torvalds/linux
geturoot:
go get -u github.com/u-root/u-root