linuxboot/mainboards/bytedance/g220a/Makefile
Nill Ge ecf1934cfa Add ByteDance System G220A Mainboard
Add g220a's Makefile and config.

Signed-off-by: Nill Ge <geshijian@bytedance.com>
2021-09-14 13:14:18 -07:00

56 lines
1.8 KiB
Makefile

default: build
build:
echo fetch, flashkernel, testflashkernel and housekeeping
flashkernel: config_g220a.config flashinitramfs.cpio.lzma Makefile
cp $< linux/.config
cp flashinitramfs.cpio.lzma linux/
# echo CONFIG_CMDLINE_BOOL=y >> linux/.config
# echo CONFIG_CMDLINE_OVERRIDE=y >> linux/.config
# stat -c 'CONFIG_CMDLINE="noefi ip=dhcp earlyprintk=ttyS0,115200,keep console=ttyS0,115200"' flashinitramfs.cpio.lzma >> linux/.config
(cd linux && make oldconfig && make -j32)
cp linux/arch/x86/boot/bzImage $@
flashinitramfs.cpio.lzma: flashinitramfs.cpio
lzma -f -k $<
flashinitramfs.cpio: Makefile
go run github.com/u-root/u-root -o $@ -build=bb \
-uinitcmd=/bbin/console \
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 \
github.com/u-root/u-root/cmds/exp/console \
fetch: getkernel geturoot getfiano
getkernel:
rm -rf linux
git clone --depth=1 -b working_hack --single-branch https://github.com/linuxboot/linux
getfiano:
go get -u github.com/linuxboot/fiano/cmds/utk
go install github.com/linuxboot/fiano/cmds/utk
go install github.com/linuxboot/fiano/cmds/guid2english
geturoot:
go get -u github.com/u-root/u-root
go get -u github.com/u-root/cpu/...
testflashkernel: flashkernel
echo ^C will exit qemu! be careful!
qemu-system-x86_64 -kernel flashkernel -nographic -serial /dev/tty -initrd flashinitramfs.cpio.lzma -monitor /dev/null
housekeeping:
rm -rf flashinitramfs.cpio \
flashinitramfs.cpio.lzma \
flashkernel \