mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
board/common: Remove broken "Traditional FIT image"
We have not installed .dtb:s to $O/images/ for quite some time, and nobody cared. That goes to show that this is not really used. The image is still useful at times, so if it needed in the future, then we can resurrect it from the logs and refactor it to an image package.
This commit is contained in:
@@ -20,13 +20,6 @@ board-enable-qemu-uboot:
|
||||
'$$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config' \
|
||||
--enable TARGET_UBOOT_FORMAT_DTB
|
||||
|
||||
.PHONY: board-enable-sparx-fit
|
||||
board-enable-sparx-fit:
|
||||
@$(call IXMSG,"Enabling SparX-5i compatible FIT options")
|
||||
@BR2_PREFIX= ./utils/config --file $(BR2_CONFIG) \
|
||||
--enable FIT_IMAGE \
|
||||
--set-str FIT_KERNEL_LOAD_ADDR "0x7 0x00000000"
|
||||
|
||||
.PHONY: board-sparx-flash-uboot
|
||||
board-sparx-flash-uboot: $(BINARIES_DIR)/u-boot.bin
|
||||
@grep -q 'BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mscc_fireant_pcb135_emmc"' $(BR2_CONFIG) || \
|
||||
|
||||
@@ -48,24 +48,3 @@ config GNS3_APPLIANCE_IFNUM
|
||||
default "1"
|
||||
help
|
||||
Number of Ethernet interfaces to create for an appliance instance.
|
||||
|
||||
menuconfig FIT_IMAGE
|
||||
bool "Traditional FIT image"
|
||||
help
|
||||
Create a "regular" FIT image where the kernel and DTBs are
|
||||
stored in the FIT rather than inside the rootfs (like it
|
||||
normally is in Infix).
|
||||
|
||||
This is useful when trying out Infix on targets whose
|
||||
bootloader might not be capable of booting a raw Squash, but
|
||||
is able to handle an FIT.
|
||||
|
||||
config FIT_ARCH
|
||||
string
|
||||
depends on FIT_IMAGE
|
||||
default "arm64" if BR2_aarch64
|
||||
|
||||
config FIT_KERNEL_LOAD_ADDR
|
||||
string "Kernel load address"
|
||||
depends on FIT_IMAGE
|
||||
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
die()
|
||||
{
|
||||
echo "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
load_cfg()
|
||||
{
|
||||
local tmp=$(mktemp -p /tmp)
|
||||
|
||||
grep ^FIT_ $BR2_CONFIG >$tmp
|
||||
. $tmp
|
||||
rm $tmp
|
||||
}
|
||||
|
||||
load_cfg
|
||||
[ "$FIT_IMAGE" = "y" ] || exit 0
|
||||
|
||||
work=$BUILD_DIR/fit-image-local
|
||||
dtbs=$(find $BINARIES_DIR -name '*.dtb')
|
||||
kernel=$(find $BINARIES_DIR -name '*Image' | head -n1)
|
||||
squash=$BINARIES_DIR/rootfs.squashfs
|
||||
|
||||
mkdir -p $work
|
||||
gzip <$kernel >$work/Image.gz
|
||||
kernel=$work/Image.gz
|
||||
|
||||
rm -rf $work/rootfs
|
||||
unsquashfs -f -d $work/rootfs $squash
|
||||
rm -f $work/rootfs/boot/*Image
|
||||
|
||||
squash=$work/rootfs-no-kernel.squashfs
|
||||
rm -f $squash
|
||||
mksquashfs $work/rootfs $squash
|
||||
|
||||
# mkimage will only align images to 4 bytes, but U-Boot will leave
|
||||
# both DTB and ramdisk in place when starting the kernel. So we pad
|
||||
# all components up to a 4k boundary.
|
||||
truncate -s %4k $kernel $dtbs
|
||||
|
||||
: >$work/dtbs.itsi
|
||||
: >$work/cfgs.itsi
|
||||
for dtb in $dtbs; do
|
||||
name=$(basename $dtb .dtb)
|
||||
|
||||
cat <<EOF >>$work/dtbs.itsi
|
||||
$name-dtb {
|
||||
description = "$name";
|
||||
type = "flat_dt";
|
||||
arch = "$FIT_ARCH";
|
||||
compression = "none";
|
||||
data = /incbin/("$dtb");
|
||||
};
|
||||
EOF
|
||||
cat <<EOF >>$work/cfgs.itsi
|
||||
$name {
|
||||
description = "$name";
|
||||
kernel = "kernel";
|
||||
ramdisk = "ramdisk";
|
||||
fdt = "$name-dtb";
|
||||
};
|
||||
EOF
|
||||
done
|
||||
|
||||
: >$work/kernel-load.itsi
|
||||
if [ "$FIT_KERNEL_LOAD_ADDR" ]; then
|
||||
cat <<EOF >$work/kernel-load.itsi
|
||||
load = <$FIT_KERNEL_LOAD_ADDR>;
|
||||
entry = <$FIT_KERNEL_LOAD_ADDR>;
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat <<EOF >$work/infix.its
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
timestamp = <$(date +%s)>;
|
||||
description = "Infix ($FIT_ARCH)";
|
||||
creator = "infix";
|
||||
#address-cells = <0x1>;
|
||||
|
||||
images {
|
||||
|
||||
kernel {
|
||||
description = "Linux";
|
||||
type = "kernel";
|
||||
arch = "$FIT_ARCH";
|
||||
os = "linux";
|
||||
$(cat $work/kernel-load.itsi)
|
||||
compression = "gzip";
|
||||
data = /incbin/("$kernel");
|
||||
};
|
||||
|
||||
ramdisk {
|
||||
description = "Infix";
|
||||
type = "ramdisk";
|
||||
os = "linux";
|
||||
arch = "$FIT_ARCH";
|
||||
compression = "none";
|
||||
data = /incbin/("$squash");
|
||||
};
|
||||
|
||||
$(cat $work/dtbs.itsi)
|
||||
|
||||
};
|
||||
|
||||
configurations {
|
||||
$(cat $work/cfgs.itsi)
|
||||
};
|
||||
};
|
||||
EOF
|
||||
|
||||
mkimage \
|
||||
-E -p 0x1000 \
|
||||
-f $work/infix.its $BINARIES_DIR/infix.itb \
|
||||
|| die "Unable to create FIT image"
|
||||
@@ -39,12 +39,6 @@ if [ "$GNS3_APPLIANCE" = "y" ]; then
|
||||
$common/mkgns3a.sh $BR2_ARCH $NAME $diskimg $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM
|
||||
fi
|
||||
|
||||
load_cfg FIT_IMAGE
|
||||
if [ "$FIT_IMAGE" = "y" ]; then
|
||||
ixmsg "Creating Traditional FIT Image"
|
||||
$common/mkfit.sh
|
||||
fi
|
||||
|
||||
# Only for regular builds, not bootloader-only builds
|
||||
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" = "y" ]; then
|
||||
rel=$(ver)
|
||||
|
||||
Reference in New Issue
Block a user