1409d4b0c4
The kernel is from upstream and U-Boot is from the OpenBMC branch because mainline doesn't have the required support for HW, yet. The main resulting file from the build is a flash image. The partition layout matches the OpenBMC one for 64M chips. It makes it easier to update the different partitions from Linux. Intermediate files can be used to boot from U-boot over the network or to boot QEMU using -kernel/-initrd/-dtb. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
28 lines
685 B
Bash
Executable File
28 lines
685 B
Bash
Executable File
#!/bin/bash
|
|
|
|
BOARD_DIR="$(dirname $0)"
|
|
mkimage=$HOST_DIR/bin/mkimage
|
|
|
|
BOARD_DT=$(sed -n \
|
|
's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \
|
|
${BR2_CONFIG})
|
|
|
|
sed -e "s/%BOARD_DTB%/${BOARD_DT}.dtb/" \
|
|
$BOARD_DIR/image.its.template > $BINARIES_DIR/image.its
|
|
|
|
(cd $BINARIES_DIR && $mkimage -f image.its image.itb)
|
|
|
|
GENIMAGE_CFG="board/aspeed/${BOARD_DT#aspeed-*}/genimage.cfg"
|
|
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
|
|
|
rm -rf "${GENIMAGE_TMP}"
|
|
|
|
genimage \
|
|
--rootpath "${TARGET_DIR}" \
|
|
--tmppath "${GENIMAGE_TMP}" \
|
|
--inputpath "${BINARIES_DIR}" \
|
|
--outputpath "${BINARIES_DIR}" \
|
|
--config "${GENIMAGE_CFG}"
|
|
|
|
rm -f $BINARIES_DIR/image.its
|