71c255f594
This commit adds supports for building buildroot kernel + rootfs for MT8173 Elm board, also known as Chromebook Elm (https://www.acer.com/ac/en/US/content/series/acerchromebookr13). Though Chrome-OS is officially supproted on this board, the mainline kernel works as well (benchmarks + conformance), and so the 5.9 kernel is used. As the 5.9 kernel isn't yet released, we use the 5.9-rc5 for now, which will be up-revd to 5.9 once its released. Using the mainline kernel means that we have to apply certain patches to get the HDMI screen working. These patches are lying in the "drm-misc-next" list and will make it to the kernel after 5.9. At that time, we will remove the patches and point Buildroot to use the latest kernel (hopefully, 5.10). This commit also adds an ITS file (for creating FIT images), an ARGS file (for providing kernel args) and a "sign.sh" script to generate signed kernel images. Though the "sign.sh" is very similar to the coresponding file under board/chromebook/snow, it cannot be shared between both boards, as the script requires access to the board specific its / args file. Additionally a readme & defconfig is added to help the user get started. Signed-off-by: Bilal Wasim <bilalwasim676@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
42 lines
1.4 KiB
Bash
Executable File
42 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script creates u-boot FIT image containing the kernel and the DT,
|
|
# then signs it using futility from vboot-utils.
|
|
# The resulting file is called uImage.kpart.
|
|
|
|
BOARD_DIR=$(dirname $0)/${BOARD_NAME}
|
|
mkimage=$HOST_DIR/bin/mkimage
|
|
futility=$HOST_DIR/bin/futility
|
|
devkeys=$HOST_DIR/share/vboot/devkeys
|
|
|
|
run() { echo "$@"; "$@"; }
|
|
die() { echo "$@" >&2; exit 1; }
|
|
test -f $BINARIES_DIR/Image || \
|
|
die "No kernel image found"
|
|
test -x $mkimage || \
|
|
die "No mkimage found (host-uboot-tools has not been built?)"
|
|
test -x $futility || \
|
|
die "No futility found (host-vboot-utils has not been built?)"
|
|
|
|
# kernel.its references Image and mt8173-elm.dtb, and all three
|
|
# files must be in current directory for mkimage.
|
|
run cp $BOARD_DIR/kernel.its $BINARIES_DIR/kernel.its || exit 1
|
|
echo "# entering $BINARIES_DIR for the next command"
|
|
(cd $BINARIES_DIR && run $mkimage -f kernel.its uImage.itb) || exit 1
|
|
|
|
# futility requires non-empty file to be supplied with --bootloader
|
|
# even if it does not make sense for the target platform.
|
|
echo > $BINARIES_DIR/dummy.txt
|
|
|
|
run $futility vbutil_kernel \
|
|
--keyblock $devkeys/kernel.keyblock \
|
|
--signprivate $devkeys/kernel_data_key.vbprivk \
|
|
--arch aarch64 \
|
|
--version 1 \
|
|
--config $BOARD_DIR/kernel.args \
|
|
--vmlinuz $BINARIES_DIR/uImage.itb \
|
|
--bootloader $BINARIES_DIR/dummy.txt \
|
|
--pack $BINARIES_DIR/uImage.kpart || exit 1
|
|
|
|
rm -f $BINARIES_DIR/kernel.its $BINARIES_DIR/dummy.txt
|