mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Merge pull request #1267 from kernelkit/post-post-image
Move to a post post-image world Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/*/*.mk))
|
||||||
|
|
||||||
.PHONY: board-enable-qemu-uboot
|
.PHONY: board-enable-qemu-uboot
|
||||||
board-enable-qemu-uboot:
|
board-enable-qemu-uboot:
|
||||||
@@ -19,13 +20,6 @@ board-enable-qemu-uboot:
|
|||||||
'$$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config' \
|
'$$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config' \
|
||||||
--enable TARGET_UBOOT_FORMAT_DTB
|
--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
|
.PHONY: board-sparx-flash-uboot
|
||||||
board-sparx-flash-uboot: $(BINARIES_DIR)/u-boot.bin
|
board-sparx-flash-uboot: $(BINARIES_DIR)/u-boot.bin
|
||||||
@grep -q 'BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mscc_fireant_pcb135_emmc"' $(BR2_CONFIG) || \
|
@grep -q 'BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mscc_fireant_pcb135_emmc"' $(BR2_CONFIG) || \
|
||||||
|
|||||||
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/common.mk
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/ix-board.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/ix-board.mk
|
||||||
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/*/*/*.mk))
|
-include $(BR2_EXTERNAL_INFIX_PATH)/board/$(patsubst "%",%,$(BR2_ARCH))/board.mk
|
||||||
|
|||||||
+18
-149
@@ -1,32 +1,28 @@
|
|||||||
menuconfig SIGN_ENABLED
|
menu "Images"
|
||||||
bool "Image Signing"
|
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rootfs/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-aux/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-qcow/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-gns3a/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rauc/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-dl-release/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-readme/Config.in"
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
config QEMU_SCRIPTS
|
||||||
|
bool "QEMU scripts"
|
||||||
default y
|
default y
|
||||||
|
help
|
||||||
choice
|
Install QEMU scripts and related files in the images
|
||||||
prompt "Signing key source"
|
directory, which can be used to launch virtual Infix
|
||||||
depends on SIGN_ENABLED
|
instances.
|
||||||
default SIGN_SRC_DIR
|
|
||||||
|
|
||||||
config SIGN_SRC_DIR
|
|
||||||
bool "Directory"
|
|
||||||
|
|
||||||
config SIGN_SRC_PKCS11
|
|
||||||
bool "PKCS#11 URL"
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config SIGN_KEY
|
|
||||||
string "Signing key"
|
|
||||||
depends on SIGN_ENABLED
|
|
||||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development" if SIGN_SRC_DIR
|
|
||||||
|
|
||||||
menuconfig TRUSTED_KEYS
|
menuconfig TRUSTED_KEYS
|
||||||
bool "Trusted keys for image"
|
bool "Trusted keys for image"
|
||||||
depends on SIGN_ENABLED
|
|
||||||
help
|
help
|
||||||
Keys that will be accepted for this image
|
Keys that will be accepted for this image
|
||||||
|
|
||||||
|
|
||||||
config TRUSTED_KEYS_DEVELOPMENT
|
config TRUSTED_KEYS_DEVELOPMENT
|
||||||
bool "Development key"
|
bool "Development key"
|
||||||
depends on TRUSTED_KEYS
|
depends on TRUSTED_KEYS
|
||||||
@@ -39,130 +35,3 @@ config TRUSTED_KEYS_DEVELOPMENT_PATH
|
|||||||
config TRUSTED_KEYS_EXTRA_PATH
|
config TRUSTED_KEYS_EXTRA_PATH
|
||||||
string "Path to extra keys to include in image"
|
string "Path to extra keys to include in image"
|
||||||
depends on TRUSTED_KEYS
|
depends on TRUSTED_KEYS
|
||||||
|
|
||||||
menuconfig DISK_IMAGE
|
|
||||||
bool "Disk image"
|
|
||||||
help
|
|
||||||
Compose a full disk image with redundant Linux OS partitions,
|
|
||||||
configuration partition, etc.
|
|
||||||
|
|
||||||
This is useful when:
|
|
||||||
- Bringing up a blank system during manufacturing
|
|
||||||
- Creating a GNS3 appliance
|
|
||||||
- Developing/debugging issues in the boot process in QEMU
|
|
||||||
|
|
||||||
menuconfig DISK_IMAGE_SIZE
|
|
||||||
string "Image size"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
default "512M"
|
|
||||||
help
|
|
||||||
Create a disk image of this size. A K/M/G suffix may be used
|
|
||||||
to multiply by powers of 1024. Suffixes like KB/MB/GB may be
|
|
||||||
used to multiply by powers of 1000. The image will be split
|
|
||||||
proportionally to fit the two rootfs, a kernel, a writable
|
|
||||||
/cfg and /var partiotions.
|
|
||||||
|
|
||||||
Minimum supported size is 512M.
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Bootloader"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
default DISK_IMAGE_BOOT_EFI if BR2_x86_64
|
|
||||||
default DISK_IMAGE_BOOT_NONE
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_NONE
|
|
||||||
bool "None"
|
|
||||||
help
|
|
||||||
Do not create any bootloader partition in the disk image.
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_EFI
|
|
||||||
bool "EFI"
|
|
||||||
help
|
|
||||||
Create a boot partition from a directory containing an EFI
|
|
||||||
boot application, e.g. GRUB.
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_BIN
|
|
||||||
bool "Binary"
|
|
||||||
help
|
|
||||||
Create a boot partition from a raw image containing the boot
|
|
||||||
application, e.g. U-Boot.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_DATA
|
|
||||||
string "Bootloader data"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
depends on DISK_IMAGE_BOOT_EFI || DISK_IMAGE_BOOT_BIN
|
|
||||||
default "${BINARIES_DIR}/efi-part/EFI" if BR2_x86_64
|
|
||||||
help
|
|
||||||
Path to the directory or file holding the bootloader data.
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_OFFSET
|
|
||||||
hex "Bootloader offset"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
depends on DISK_IMAGE_BOOT_EFI || DISK_IMAGE_BOOT_BIN
|
|
||||||
default 0x8000
|
|
||||||
help
|
|
||||||
Offset at which the bootloader partition is placed. Remember
|
|
||||||
to make sure that the GPT still fits at the start of the
|
|
||||||
image.
|
|
||||||
|
|
||||||
config DISK_IMAGE_RELEASE_URL
|
|
||||||
string "Infix URL"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
depends on !BR2_TARGET_ROOTFS_SQUASHFS
|
|
||||||
default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
|
|
||||||
help
|
|
||||||
In situations where Infix itself is not being built, but a
|
|
||||||
disk image is, i.e. when building a bootloader: place this
|
|
||||||
Infix release in the primary and secondary partitions.
|
|
||||||
|
|
||||||
menuconfig GNS3_APPLIANCE
|
|
||||||
bool "GNS3 Appliance"
|
|
||||||
select DISK_IMAGE
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
Create a GNS3 appliance description that, together with the
|
|
||||||
disk image, can be imported into GNS3.
|
|
||||||
|
|
||||||
config GNS3_APPLIANCE_RAM
|
|
||||||
int "Reserved RAM (MiB)"
|
|
||||||
depends on GNS3_APPLIANCE
|
|
||||||
default "192"
|
|
||||||
help
|
|
||||||
Amount of host RAM reserved for an appliance instance.
|
|
||||||
|
|
||||||
Minimum supported size is 192M.
|
|
||||||
|
|
||||||
config GNS3_APPLIANCE_IFNUM
|
|
||||||
int "Number of interfaces"
|
|
||||||
depends on GNS3_APPLIANCE
|
|
||||||
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
|
|
||||||
|
|
||||||
config SDCARD_AUX
|
|
||||||
bool "Create SD-card aux partition"
|
|
||||||
help
|
|
||||||
Create and populate aux.ext4 with rootfs.itbh and rauc.status
|
|
||||||
For use with a static genimage.cfg for, e.g., SD-cards.
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
ifeq ($(SIGN_ENABLED),y)
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/image/image.mk
|
||||||
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/qemu/qemu.mk
|
||||||
|
|
||||||
|
ifeq ($(TRUSTED_KEYS),y)
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/uboot.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/uboot.mk
|
||||||
|
|
||||||
TRUSTED_KEYS=$(TRUSTED_KEYS_DEVELOPMENT_PATH) $(TRUSTED_KEYS_EXTRA_PATH)
|
TRUSTED_KEYS=$(TRUSTED_KEYS_DEVELOPMENT_PATH) $(TRUSTED_KEYS_EXTRA_PATH)
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
config IMAGE_ITB_AUX
|
||||||
|
bool "aux partition"
|
||||||
|
depends on IMAGE_ITB_ROOTFS
|
||||||
|
select BR2_PACKAGE_HOST_UBOOT_TOOLS
|
||||||
|
select BR2_PACKAGE_HOST_GENIMAGE
|
||||||
|
help
|
||||||
|
Create and populate auxiliary partition, aux.ext4, with
|
||||||
|
metadata needed by U-Boot and RAUC to operate properly on
|
||||||
|
systems using ITB images. This may then be included as a
|
||||||
|
partition in a larger disk image.
|
||||||
Executable
+85
@@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
boot="${1}"
|
||||||
|
squash="${BINARIES_DIR}"/rootfs.squashfs
|
||||||
|
itbh="${BINARIES_DIR}"/rootfs.itbh
|
||||||
|
aux="${BINARIES_DIR}"/aux.ext4
|
||||||
|
|
||||||
|
mkdir -p "${WORKDIR}"/aux
|
||||||
|
rm -rf "${WORKDIR}"/tmp
|
||||||
|
mkdir -p "${WORKDIR}"/tmp
|
||||||
|
|
||||||
|
cp -f "${itbh}" "${WORKDIR}"/aux/primary.itbh
|
||||||
|
cp -f "${itbh}" "${WORKDIR}"/aux/secondary.itbh
|
||||||
|
|
||||||
|
tstamp=$(date -u +%FT%TZ)
|
||||||
|
rootsha=$(sha256sum "${squash}" | cut -d" " -f1)
|
||||||
|
rootsize=$(stat -c %s "${squash}")
|
||||||
|
cat <<EOF >"${WORKDIR}"/aux/rauc.status
|
||||||
|
[slot.rootfs.0]
|
||||||
|
bundle.compatible=${COMPATIBLE}
|
||||||
|
bundle.version=${VERSION}
|
||||||
|
status=ok
|
||||||
|
sha256=${rootsha}
|
||||||
|
size=${rootsize}
|
||||||
|
installed.timestamp=$tstamp
|
||||||
|
installed.count=1
|
||||||
|
activated.timestamp=$tstamp
|
||||||
|
activated.count=1
|
||||||
|
|
||||||
|
[slot.rootfs.1]
|
||||||
|
bundle.compatible=${COMPATIBLE}
|
||||||
|
bundle.version=${VERSION}
|
||||||
|
status=ok
|
||||||
|
sha256=${rootsha}
|
||||||
|
size=${rootsize}
|
||||||
|
installed.timestamp=$tstamp
|
||||||
|
installed.count=1
|
||||||
|
activated.timestamp=$tstamp
|
||||||
|
activated.count=1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
case "${boot}" in
|
||||||
|
uboot)
|
||||||
|
cat <<EOF | mkenvimage -s 0x4000 -o "${WORKDIR}"/aux/uboot.env -
|
||||||
|
BOOT_ORDER=primary secondary net
|
||||||
|
BOOT_primary_LEFT=1
|
||||||
|
BOOT_secondary_LEFT=1
|
||||||
|
BOOT_net_LEFT=1
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
grub)
|
||||||
|
mkdir -p "${WORKDIR}"/aux/grub
|
||||||
|
cp -f "${PKGDIR}"/grub.cfg "${PKGDIR}"/grubenv "${WORKDIR}"/aux/grub
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "UNSUPPORTED BOOTLOADER ${boot}" >&2
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
cat <<EOF >"${WORKDIR}"/genimage.cfg
|
||||||
|
image $(basename ${aux}) {
|
||||||
|
mountpoint = "/"
|
||||||
|
size = 8M
|
||||||
|
|
||||||
|
ext4 {
|
||||||
|
label = "aux"
|
||||||
|
use-mke2fs = true
|
||||||
|
features = "^metadata_csum,^metadata_csum_seed,uninit_bg"
|
||||||
|
extraargs = "-m 0 -i 4096"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Silence genimage warnings
|
||||||
|
config {}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
genimage \
|
||||||
|
--loglevel 1 \
|
||||||
|
--tmppath "${WORKDIR}"/tmp \
|
||||||
|
--rootpath "${WORKDIR}"/aux \
|
||||||
|
--inputpath "${WORKDIR}" \
|
||||||
|
--outputpath "$(dirname ${aux})" \
|
||||||
|
--config "${WORKDIR}"/genimage.cfg
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
set timeout="1"
|
||||||
|
|
||||||
|
load_env ORDER DEBUG
|
||||||
|
|
||||||
|
if [ -z "$ORDER" ]; then
|
||||||
|
set ORDER="primary secondary"
|
||||||
|
fi
|
||||||
|
|
||||||
|
set ORDER="$ORDER reboot"
|
||||||
|
|
||||||
|
for slot in $ORDER; do
|
||||||
|
if [ -z "$default" ]; then
|
||||||
|
set default="$slot"
|
||||||
|
else
|
||||||
|
# Contrary to what the documentation says, GRUB (2.06) does
|
||||||
|
# not support using titles or IDs in the fallback variable, so
|
||||||
|
# we translate to indices.
|
||||||
|
if [ "$slot" = "primary" ]; then
|
||||||
|
set fallback="$fallback 0"
|
||||||
|
elif [ "$slot" = "secondary" ]; then
|
||||||
|
set fallback="$fallback 1"
|
||||||
|
elif [ "$slot" = "net" ]; then
|
||||||
|
set fallback="$fallback 2"
|
||||||
|
elif [ "$slot" = "reboot" ]; then
|
||||||
|
set fallback="$fallback 3"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$DEBUG" ]; then
|
||||||
|
set log="debug"
|
||||||
|
else
|
||||||
|
set log="loglevel=4"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# From board/common/rootfs/etc/partition-uuid
|
||||||
|
search -p 107ae911-a97b-4380-975c-7ce1a2dde1e0 --set primary
|
||||||
|
search -p 352bd9b2-2ca9-44e2-bdc7-edbc87ba1e02 --set secondary
|
||||||
|
|
||||||
|
export primary
|
||||||
|
export secondary
|
||||||
|
|
||||||
|
submenu "primary" "$log" {
|
||||||
|
set slot="$1"
|
||||||
|
set append="console=ttyS0 console=hvc0 usbcore.authorized_default=2 root=PARTLABEL=$slot $2"
|
||||||
|
set root="($primary)"
|
||||||
|
source /boot/grub/grub.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
submenu "secondary" "$log" {
|
||||||
|
set slot="$1"
|
||||||
|
set append="console=ttyS0 console=hvc0 usbcore.authorized_default=2 root=PARTLABEL=$slot $2"
|
||||||
|
set root="($secondary)"
|
||||||
|
source /boot/grub/grub.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
submenu "net" "$log" {
|
||||||
|
net_dhcp
|
||||||
|
|
||||||
|
if [ "$net_efinet0_dhcp_next_server" -a "$net_efinet0_dhcp_boot_file" ]; then
|
||||||
|
set initrd=(tftp,$net_efinet0_dhcp_next_server)/$net_efinet0_dhcp_boot_file
|
||||||
|
loopback initrd $initrd
|
||||||
|
set root=(initrd)
|
||||||
|
|
||||||
|
set slot="$1"
|
||||||
|
set append="console=ttyS0 console=hvc0 usbcore.authorized_default=2 qroot=/dev/ram0 ramdisk_size=65536 $2"
|
||||||
|
source /boot/grub/grub.cfg
|
||||||
|
else
|
||||||
|
if [ -z "$net_efinet0_dhcp_next_server" ]; then
|
||||||
|
echo "No TFTP server supplied in DHCP response"
|
||||||
|
fi
|
||||||
|
if [ -z "$net_efinet0_dhcp_boot_file" ]; then
|
||||||
|
echo "No bootfile supplied in DHCP response"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
submenu "reboot" {
|
||||||
|
reboot
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# GRUB Environment Block
|
||||||
|
# WARNING: Do not edit this file by tools other than grub-editenv!!!
|
||||||
|
ORDER=primary secondary net
|
||||||
|
primary_OK=1
|
||||||
|
secondary_OK=1
|
||||||
|
net_OK=1
|
||||||
|
primary_TRY=0
|
||||||
|
secondary_TRY=0
|
||||||
|
net_TRY=0
|
||||||
|
#########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-itb-aux
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IMAGE_ITB_AUX_DEPENDENCIES := host-uboot-tools host-genimage image-itb-rootfs
|
||||||
|
IMAGE_ITB_AUX_OPTS := $(if $(BR2_TARGET_GRUB2),grub,uboot)
|
||||||
|
|
||||||
|
$(eval $(ix-image))
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
menuconfig IMAGE_ITB_DL_RELEASE
|
||||||
|
bool "Download existing release"
|
||||||
|
depends on !BR2_TARGET_ROOTFS_SQUASHFS
|
||||||
|
help
|
||||||
|
This is primarily used by target specific builds, where the
|
||||||
|
bootloader artifact needs to be combined with an existing
|
||||||
|
Infix image, to create a full disk image that can be
|
||||||
|
provisioned to an SD-card or eMMC.
|
||||||
|
|
||||||
|
config IMAGE_ITB_DL_RELEASE_URL
|
||||||
|
string "URL"
|
||||||
|
depends on IMAGE_ITB_DL_RELEASE
|
||||||
|
default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
|
||||||
|
help
|
||||||
|
URL to release tarball.
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
squash="${BINARIES_DIR}"/rootfs.squashfs
|
||||||
|
aux="${BINARIES_DIR}"/aux.ext4
|
||||||
|
|
||||||
|
[ -f "${squash}" ] && [ -f "${aux}" ] && exit 0
|
||||||
|
|
||||||
|
archive="${WORKDIR}/$(basename ${URL})"
|
||||||
|
[ -f "${archive}" ] || wget -O"${archive}" "${URL}"
|
||||||
|
|
||||||
|
echo "Unpacking..."
|
||||||
|
tar -xa --strip-components=1 -C "${BINARIES_DIR}" -f "${archive}"
|
||||||
|
|
||||||
|
auxsize=$(stat -c %s "${aux}")
|
||||||
|
if [ "${auxsize}" -gt $((8 << 20)) ]; then
|
||||||
|
# In older releases, 16M aux.ext4 images were generated. In order
|
||||||
|
# to keep the image-itb-qcow logic simpler, trim it 8M, which we
|
||||||
|
# always generate nowadays.
|
||||||
|
echo "WARNING: Auxiliary partition is unexpectedly large. Resizing..."
|
||||||
|
resize2fs "${aux}" 8M
|
||||||
|
truncate -s 8M "${aux}"
|
||||||
|
tune2fs -l "${aux}"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-itb-dl-release
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IMAGE_ITB_DL_RELEASE_CONFIG_VARS := URL
|
||||||
|
|
||||||
|
$(eval $(ix-image))
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
menuconfig IMAGE_ITB_GNS3A
|
||||||
|
bool "GNS3 Appliance (ITB)"
|
||||||
|
depends on BR2_x86_64
|
||||||
|
select IMAGE_ITB_QCOW
|
||||||
|
help
|
||||||
|
Create a GNS3 appliance description that, together with the
|
||||||
|
disk image, can be imported into GNS3.
|
||||||
|
|
||||||
|
config IMAGE_ITB_GNS3A_RAM
|
||||||
|
int "Reserved RAM (MiB)"
|
||||||
|
depends on IMAGE_ITB_GNS3A
|
||||||
|
default "192"
|
||||||
|
help
|
||||||
|
Amount of host RAM reserved for an appliance instance.
|
||||||
|
|
||||||
|
Minimum supported size is 192M.
|
||||||
|
|
||||||
|
config IMAGE_ITB_GNS3A_IFNUM
|
||||||
|
int "Number of interfaces"
|
||||||
|
depends on IMAGE_ITB_GNS3A
|
||||||
|
default "1"
|
||||||
|
help
|
||||||
|
Number of Ethernet interfaces to create for an appliance instance.
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
bios="${BINARIES_DIR}"/OVMF.fd
|
||||||
|
qcow="${BINARIES_DIR}"/"${ARTIFACT}".qcow2
|
||||||
|
gns3a="${BINARIES_DIR}"/"${ARTIFACT}".gns3a
|
||||||
|
|
||||||
|
cat <<EOF >"${gns3a}"
|
||||||
|
{
|
||||||
|
"name": "${ARTIFACT} devel",
|
||||||
|
"category": "router",
|
||||||
|
"description": "${ARTIFACT} development appliance",
|
||||||
|
"vendor_name": "Kernelkit",
|
||||||
|
"vendor_url": "https://kernelkit.org",
|
||||||
|
"product_name": "${ARTIFACT} devel",
|
||||||
|
"registry_version": 6,
|
||||||
|
"status": "experimental",
|
||||||
|
"maintainer": "Kernelkit",
|
||||||
|
"maintainer_email": "null@kernelkit.org",
|
||||||
|
"usage": "Default login, user/pass: admin/admin\n\nType 'cli' (and Enter) followed by 'help' for an overview of commands and relevant configuration files.",
|
||||||
|
"port_name_format": "eth{0}",
|
||||||
|
"linked_clone": true,
|
||||||
|
"qemu": {
|
||||||
|
"adapter_type": "virtio-net-pci",
|
||||||
|
"adapters": ${IFNUM},
|
||||||
|
"ram": ${RAM},
|
||||||
|
"cpus": 1,
|
||||||
|
"hda_disk_interface": "virtio",
|
||||||
|
"arch": "x86_64",
|
||||||
|
"console_type": "telnet",
|
||||||
|
"bios_image": "$(basename ${bios})",
|
||||||
|
"kvm": "allow"
|
||||||
|
},
|
||||||
|
"images": [
|
||||||
|
{
|
||||||
|
"filename": "$(basename "${bios}")",
|
||||||
|
"filesize": $(stat --printf='%s' "${bios}"),
|
||||||
|
"md5sum": "$(md5sum "${bios}" | awk '{print $1}')",
|
||||||
|
"version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "$(basename "${qcow}")",
|
||||||
|
"filesize": $(stat --printf='%s' "${qcow}"),
|
||||||
|
"md5sum": "$(md5sum "${qcow}" | awk '{print $1}')",
|
||||||
|
"version": "${VERSION}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"name": "${VERSION}",
|
||||||
|
"images": {
|
||||||
|
"bios_image": "$(basename ${bios})",
|
||||||
|
"hda_disk_image": "$(basename ${qcow})"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
EOF
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-itb-gns3a
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IMAGE_ITB_GNS3A_DEPENDENCIES := image-itb-qcow
|
||||||
|
IMAGE_ITB_GNS3A_CONFIG_VARS := IFNUM RAM
|
||||||
|
|
||||||
|
$(eval $(ix-image))
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
menuconfig IMAGE_ITB_QCOW
|
||||||
|
bool "QEMU disk image (ITB)"
|
||||||
|
depends on (IMAGE_ITB_ROOTFS && IMAGE_ITB_AUX) || IMAGE_ITB_DL_RELEASE
|
||||||
|
select BR2_PACKAGE_HOST_GENIMAGE
|
||||||
|
help
|
||||||
|
Compose a full disk image with redundant Linux OS partitions,
|
||||||
|
configuration partition, etc., for systems using ITB images.
|
||||||
|
|
||||||
|
This is useful when:
|
||||||
|
- Bringing up a blank system during manufacturing
|
||||||
|
- Creating a GNS3 appliance
|
||||||
|
- Developing/debugging issues in the boot process in QEMU
|
||||||
|
|
||||||
|
menuconfig IMAGE_ITB_QCOW_SIZE
|
||||||
|
string "Image size"
|
||||||
|
depends on IMAGE_ITB_QCOW
|
||||||
|
default "512M"
|
||||||
|
help
|
||||||
|
Create a disk image of this size. A K/M/G suffix may be used
|
||||||
|
to multiply by powers of 1024. Suffixes like KB/MB/GB may be
|
||||||
|
used to multiply by powers of 1000. The image will be split
|
||||||
|
proportionally to fit the two rootfs, a kernel, a writable
|
||||||
|
/cfg and /var partiotions.
|
||||||
|
|
||||||
|
Minimum supported size is 512M.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Bootloader"
|
||||||
|
depends on IMAGE_ITB_QCOW
|
||||||
|
default IMAGE_ITB_QCOW_BOOT_EFI if BR2_x86_64
|
||||||
|
default IMAGE_ITB_QCOW_BOOT_NONE
|
||||||
|
|
||||||
|
config IMAGE_ITB_QCOW_BOOT_NONE
|
||||||
|
bool "None"
|
||||||
|
help
|
||||||
|
Do not create any bootloader partition in the disk image.
|
||||||
|
|
||||||
|
config IMAGE_ITB_QCOW_BOOT_EFI
|
||||||
|
bool "EFI"
|
||||||
|
help
|
||||||
|
Create a boot partition from a directory containing an EFI
|
||||||
|
boot application, e.g. GRUB.
|
||||||
|
|
||||||
|
config IMAGE_ITB_QCOW_BOOT_BIN
|
||||||
|
bool "Binary"
|
||||||
|
help
|
||||||
|
Create a boot partition from a raw image containing the boot
|
||||||
|
application, e.g. U-Boot.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config IMAGE_ITB_QCOW_BOOT_DATA
|
||||||
|
string "Bootloader data"
|
||||||
|
depends on IMAGE_ITB_QCOW
|
||||||
|
depends on IMAGE_ITB_QCOW_BOOT_EFI || IMAGE_ITB_QCOW_BOOT_BIN
|
||||||
|
default "${BINARIES_DIR}/efi-part/EFI" if BR2_x86_64
|
||||||
|
help
|
||||||
|
Path to the directory or file holding the bootloader data.
|
||||||
|
|
||||||
|
config IMAGE_ITB_QCOW_BOOT_OFFSET
|
||||||
|
hex "Bootloader offset"
|
||||||
|
depends on IMAGE_ITB_QCOW
|
||||||
|
depends on IMAGE_ITB_QCOW_BOOT_EFI || IMAGE_ITB_QCOW_BOOT_BIN
|
||||||
|
default 0x8000
|
||||||
|
help
|
||||||
|
Offset at which the bootloader partition is placed. Remember
|
||||||
|
to make sure that the GPT still fits at the start of the
|
||||||
|
image.
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
. $BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/etc/partition-uuid
|
|
||||||
|
|
||||||
K=10
|
K=10
|
||||||
M=20
|
M=20
|
||||||
G=30
|
G=30
|
||||||
@@ -47,43 +45,32 @@ dimension()
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Size var to fit whatever is left over. Also reserve another 32K
|
# Place aux right after the GPT...
|
||||||
# at the end to make room for the backup GPT.
|
auxoffs=$((32 << K))
|
||||||
varsize=$(($total - $auxsize - 2 * $imgsize - $cfgsize))
|
|
||||||
if [ "$bootoffs" ]; then
|
|
||||||
varsize=$(($varsize - $bootsize))
|
|
||||||
fi
|
|
||||||
varsize=$(($varsize - (32 << K)))
|
|
||||||
|
|
||||||
if [ "$bootoffs" ]; then
|
if [ "$bootoffs" ]; then
|
||||||
# Align the end of the boot partition to an even MiB. E.g. if
|
if [ $((bootoffs)) -lt $((32 << K)) ]; then
|
||||||
# boot was dimensioned to 4M, and bootoffs is 32K, then the
|
echo "Boot partition collides with GPT"
|
||||||
# final bootsize becomes 4M - 32K, meaning aux will start on
|
exit 1
|
||||||
# exactly 4M.
|
fi
|
||||||
auxoffs=$bootsize
|
|
||||||
bootsize=$(($bootsize - $bootoffs))
|
|
||||||
else
|
|
||||||
# No bootloader, place aux after GPT, resize it to end on an
|
|
||||||
# even MiB (as is done for boot above).
|
|
||||||
auxoffs=$((32 << K))
|
|
||||||
auxsize=$(($auxsize - $auxoffs))
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
probeboot()
|
# ...unless we have a boot partition, in which case we place
|
||||||
{
|
# it after that.
|
||||||
# If we have built an EFI app, typically grub, make sure to
|
auxoffs=$((auxoffs + bootsize))
|
||||||
# include it.
|
|
||||||
if [ -d $BINARIES_DIR/efi-part/EFI ]; then
|
|
||||||
bootoffs=$((32 << K))
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Finally, size var to fit whatever is left over by subtracting
|
||||||
|
# all other images, plus another 32K at the end for the backup
|
||||||
|
# GPT.
|
||||||
|
varsize=$((total - auxoffs - auxsize - 2 * imgsize - cfgsize - (32 << K)))
|
||||||
}
|
}
|
||||||
|
|
||||||
genboot()
|
genboot()
|
||||||
{
|
{
|
||||||
if [ -d "$bootdata" ]; then
|
if [ -d "$bootdata" ]; then
|
||||||
bootimg=$(cat <<EOF
|
bootimg=$(cat <<EOF
|
||||||
image $BINARIES_DIR/efi-part.vfat {
|
image efi-part.vfat {
|
||||||
|
temporary = true
|
||||||
size = $bootsize
|
size = $bootsize
|
||||||
vfat {
|
vfat {
|
||||||
file EFI {
|
file EFI {
|
||||||
@@ -98,7 +85,7 @@ EOF
|
|||||||
offset = $bootoffs
|
offset = $bootoffs
|
||||||
partition-type-uuid = U
|
partition-type-uuid = U
|
||||||
bootable = true
|
bootable = true
|
||||||
image = $BINARIES_DIR/efi-part.vfat
|
image = efi-part.vfat
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@@ -117,44 +104,29 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
common=$(dirname $(readlink -f "$0"))
|
mkdir -p "${WORKDIR}"/root
|
||||||
root=$BUILD_DIR/genimage.root
|
rm -rf "${WORKDIR}"/tmp
|
||||||
tmp=$BUILD_DIR/genimage.tmp
|
mkdir -p "${WORKDIR}"/tmp
|
||||||
|
|
||||||
total=$((512 << M))
|
qcowimg="${ARTIFACT}.qcow2"
|
||||||
bootoffs=$((32 << K))
|
total=$(size2int $SIZE)
|
||||||
bootdata=
|
bootoffs=
|
||||||
diskimg=disk.img
|
bootdata=$BOOT_DATA
|
||||||
bootimg=
|
bootimg=
|
||||||
bootpart=
|
bootpart=
|
||||||
tmpimage=$(mktemp)
|
|
||||||
while getopts "a:b:B:n:s:" opt; do
|
|
||||||
case ${opt} in
|
|
||||||
a)
|
|
||||||
arch=$OPTARG
|
|
||||||
;;
|
|
||||||
b)
|
|
||||||
bootdata=$OPTARG
|
|
||||||
;;
|
|
||||||
B)
|
|
||||||
bootoffs=$(($OPTARG))
|
|
||||||
;;
|
|
||||||
n)
|
|
||||||
diskimg=${OPTARG}
|
|
||||||
;;
|
|
||||||
s)
|
|
||||||
total=$(size2int $OPTARG)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND - 1))
|
|
||||||
|
|
||||||
mkdir -p $root
|
if [ -n "${BOOT_OFFSET}" ]; then
|
||||||
|
bootoffs=$(($BOOT_OFFSET))
|
||||||
|
fi
|
||||||
|
|
||||||
probeboot
|
|
||||||
dimension
|
dimension
|
||||||
genboot
|
genboot
|
||||||
|
|
||||||
|
. $BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/etc/partition-uuid
|
||||||
|
[ -n "${AUX_UUID}" ]
|
||||||
|
[ -n "${PRIMARY_UUID}" ]
|
||||||
|
[ -n "${SECONDARY_UUID}" ]
|
||||||
|
|
||||||
# Use awk over sed because replacement text may contain newlines,
|
# Use awk over sed because replacement text may contain newlines,
|
||||||
# which sed does not approve of.
|
# which sed does not approve of.
|
||||||
awk \
|
awk \
|
||||||
@@ -166,7 +138,7 @@ awk \
|
|||||||
-vimgsize=$imgsize \
|
-vimgsize=$imgsize \
|
||||||
-vcfgsize=$cfgsize \
|
-vcfgsize=$cfgsize \
|
||||||
-vvarsize=$varsize \
|
-vvarsize=$varsize \
|
||||||
-vdiskimg=$tmpimage \
|
-vqcowimg=$qcowimg \
|
||||||
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
||||||
'{
|
'{
|
||||||
sub(/@TOTALSIZE@/, total);
|
sub(/@TOTALSIZE@/, total);
|
||||||
@@ -175,7 +147,7 @@ awk \
|
|||||||
sub(/@IMGSIZE@/, imgsize);
|
sub(/@IMGSIZE@/, imgsize);
|
||||||
sub(/@CFGSIZE@/, cfgsize);
|
sub(/@CFGSIZE@/, cfgsize);
|
||||||
sub(/@VARSIZE@/, varsize);
|
sub(/@VARSIZE@/, varsize);
|
||||||
sub(/@DISKIMG@/, diskimg);
|
sub(/@QCOWIMG@/, qcowimg);
|
||||||
sub(/@BOOTIMG@/, bootimg);
|
sub(/@BOOTIMG@/, bootimg);
|
||||||
sub(/@BOOTPART@/, bootpart);
|
sub(/@BOOTPART@/, bootpart);
|
||||||
sub(/@AUXUUID@/, auxuuid);
|
sub(/@AUXUUID@/, auxuuid);
|
||||||
@@ -183,35 +155,11 @@ awk \
|
|||||||
sub(/@SECONDARYUUID@/, secondaryuuid);
|
sub(/@SECONDARYUUID@/, secondaryuuid);
|
||||||
|
|
||||||
}1' \
|
}1' \
|
||||||
< $common/genimage.cfg.in >$root/genimage.cfg
|
< $PKGDIR/genimage.cfg.in >$WORKDIR/genimage.cfg
|
||||||
|
|
||||||
mkdir -p $root/aux
|
|
||||||
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
|
||||||
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
|
||||||
cp -f $BINARIES_DIR/rauc.status $root/aux/rauc.status
|
|
||||||
|
|
||||||
case "$arch" in
|
|
||||||
aarch64)
|
|
||||||
mkenvimage -s 0x4000 -o "$root/aux/uboot.env" \
|
|
||||||
"$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt"
|
|
||||||
;;
|
|
||||||
x86_64)
|
|
||||||
mkdir -p "$root/aux/grub"
|
|
||||||
cp -f "$BR2_EXTERNAL_INFIX_PATH/board/$arch/grub.cfg" \
|
|
||||||
"$BR2_EXTERNAL_INFIX_PATH/board/$arch/grubenv" \
|
|
||||||
"$root/aux/grub/"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
rm -rf "$tmp"
|
|
||||||
|
|
||||||
genimage \
|
genimage \
|
||||||
--rootpath "$root" \
|
--tmppath "${WORKDIR}"/tmp \
|
||||||
--tmppath "$tmp" \
|
--rootpath "${WORKDIR}"/root \
|
||||||
--inputpath "$BINARIES_DIR" \
|
--inputpath "$BINARIES_DIR" \
|
||||||
--config "$root/genimage.cfg"
|
--outputpath "$BINARIES_DIR" \
|
||||||
|
--config "${WORKDIR}"/genimage.cfg
|
||||||
qemu-img convert -c -O qcow2 "$tmpimage" "$BINARIES_DIR/$diskimg"
|
|
||||||
rm "$tmpimage"
|
|
||||||
@@ -1,16 +1,5 @@
|
|||||||
@BOOTIMG@
|
@BOOTIMG@
|
||||||
|
|
||||||
image aux.ext4 {
|
|
||||||
mountpoint = "/aux"
|
|
||||||
temporary = true
|
|
||||||
size = @AUXSIZE@
|
|
||||||
|
|
||||||
ext4 {
|
|
||||||
label = "aux"
|
|
||||||
use-mke2fs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
image cfg.ext4 {
|
image cfg.ext4 {
|
||||||
empty = true
|
empty = true
|
||||||
temporary = true
|
temporary = true
|
||||||
@@ -33,7 +22,8 @@ image var.ext4 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image @DISKIMG@ {
|
image disk.img {
|
||||||
|
temporary = true
|
||||||
size = @TOTALSIZE@
|
size = @TOTALSIZE@
|
||||||
hdimage {
|
hdimage {
|
||||||
partition-table-type = "gpt"
|
partition-table-type = "gpt"
|
||||||
@@ -68,5 +58,15 @@ image @DISKIMG@ {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
image @QCOWIMG@ {
|
||||||
|
qemu {
|
||||||
|
format = "qcow2"
|
||||||
|
}
|
||||||
|
|
||||||
|
partition disk {
|
||||||
|
image = "disk.img"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Silence genimage warnings
|
# Silence genimage warnings
|
||||||
config {}
|
config {}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-itb-qcow
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# We can source the rootfs+aux from a local build, or from a
|
||||||
|
# downloaded release; so adjust our dependencies accordingly.
|
||||||
|
IMAGE_ITB_QCOW_SRC-$(IMAGE_ITB_ROOTFS) := image-itb-rootfs image-itb-aux
|
||||||
|
IMAGE_ITB_QCOW_SRC-$(IMAGE_ITB_DL_RELEASE) := image-itb-dl-release
|
||||||
|
|
||||||
|
IMAGE_ITB_QCOW_DEPENDENCIES := host-genimage $(IMAGE_ITB_QCOW_SRC-y)
|
||||||
|
IMAGE_ITB_QCOW_CONFIG_VARS := BOOT_DATA BOOT_OFFSET SIZE
|
||||||
|
|
||||||
|
$(eval $(ix-image))
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
menuconfig IMAGE_ITB_RAUC
|
||||||
|
bool "RAUC upgrade bundle (ITB)"
|
||||||
|
select IMAGE_ITB_ROOTFS
|
||||||
|
select BR2_PACKAGE_HOST_RAUC
|
||||||
|
help
|
||||||
|
Create RAUC upgrade bundle, for targets using ITB images,
|
||||||
|
that can be used to upgrade a running system to this version
|
||||||
|
of Infix.
|
||||||
|
|
||||||
|
config IMAGE_ITB_RAUC_KEY
|
||||||
|
string "signing key"
|
||||||
|
depends on IMAGE_ITB_RAUC
|
||||||
|
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.key"
|
||||||
|
help
|
||||||
|
Path to the private key, in PKCS#8 format, used to sign
|
||||||
|
the RAUC bundle; or a PKCS#11 URI.
|
||||||
|
|
||||||
|
config IMAGE_ITB_RAUC_CERT
|
||||||
|
string "signing certificate"
|
||||||
|
depends on IMAGE_ITB_RAUC
|
||||||
|
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.crt"
|
||||||
|
help
|
||||||
|
Path to the X509 certificate which will be associated with
|
||||||
|
the bundle signature.
|
||||||
|
|
||||||
|
NOTE: This cert MUST be included in the trust store of the
|
||||||
|
system on which this bundle is to be installed.
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
squash="${BINARIES_DIR}"/rootfs.squashfs
|
||||||
|
itbh="${BINARIES_DIR}"/rootfs.itbh
|
||||||
|
pkg="${BINARIES_DIR}"/"${ARTIFACT}.pkg"
|
||||||
|
|
||||||
|
cp -f "${PKGDIR}"/hooks.sh "${WORKDIR}"/hooks.sh
|
||||||
|
|
||||||
|
# RAUC internally uses the file extension to find a suitable install
|
||||||
|
# handler, hence the name must be .img
|
||||||
|
cp -f "${squash}" "${WORKDIR}"/rootfs.img
|
||||||
|
cp -f "${itbh}" "${WORKDIR}"/rootfs.itbh
|
||||||
|
|
||||||
|
cat >"${WORKDIR}"/manifest.raucm <<EOF
|
||||||
|
[update]
|
||||||
|
compatible=${COMPATIBLE}
|
||||||
|
version=${VERSION}
|
||||||
|
|
||||||
|
[bundle]
|
||||||
|
format=verity
|
||||||
|
|
||||||
|
[hooks]
|
||||||
|
filename=hooks.sh
|
||||||
|
|
||||||
|
[image.rootfs]
|
||||||
|
filename=rootfs.img
|
||||||
|
hooks=post-install
|
||||||
|
EOF
|
||||||
|
|
||||||
|
rauc --cert="${CERT}" --key="${KEY}" \
|
||||||
|
bundle "${WORKDIR}" "${pkg}.next"
|
||||||
|
|
||||||
|
mv "${pkg}.next" "${pkg}"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-itb-rauc
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IMAGE_ITB_RAUC_DEPENDENCIES := host-rauc image-itb-rootfs
|
||||||
|
IMAGE_ITB_RAUC_CONFIG_VARS := KEY CERT
|
||||||
|
|
||||||
|
$(eval $(ix-image))
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
menuconfig IMAGE_ITB_ROOTFS
|
||||||
|
bool "rootfs.itb+.itbh"
|
||||||
|
select BR2_TARGET_ROOTFS_SQUASHFS
|
||||||
|
select BR2_PACKAGE_HOST_UBOOT_TOOLS
|
||||||
|
help
|
||||||
|
Create a signed ITB image containing a SquashFS of rootfs
|
||||||
|
and extract detached header (.itbh) for U-Boot based
|
||||||
|
targets.
|
||||||
|
|
||||||
|
config IMAGE_ITB_ROOTFS_KEY
|
||||||
|
string "signing key"
|
||||||
|
depends on IMAGE_ITB_ROOTFS
|
||||||
|
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.key"
|
||||||
|
help
|
||||||
|
Path to the private RSA key, in PKCS#8 format, used to sign
|
||||||
|
the root filesystem.
|
||||||
|
|
||||||
|
If the path is prefixed with "<hint>:", then that used as
|
||||||
|
the "key-name-hint" in the resulting ITB, otherwise the
|
||||||
|
basename of the path, with any extension removed, is used.
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
squash="${BINARIES_DIR}"/rootfs.squashfs
|
||||||
|
|
||||||
|
itb="${BINARIES_DIR}"/rootfs.itb
|
||||||
|
itbh_size=0x1000
|
||||||
|
|
||||||
|
IFS=:
|
||||||
|
set ${KEY}
|
||||||
|
case $# in
|
||||||
|
1)
|
||||||
|
keyfile="$1"
|
||||||
|
hint=$(basename ${keyfile%.*})
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
keyfile="$2"
|
||||||
|
hint="$1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "INVALID KEY" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rsanibbles=$(openssl rsa -in "${KEY}" -noout -modulus | \
|
||||||
|
sed -e 's/^Modulus=//' | tr -d '\n' | wc -c)
|
||||||
|
if [ "${rsanibbles}" -le 0 ]; then
|
||||||
|
echo "ONLY RSA KEYS ARE SUPPORTED" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >"${WORKDIR}"/rootfs.its <<EOF
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
description = "${ARTIFACT}";
|
||||||
|
creator = "infix";
|
||||||
|
#address-cells = <0x1>;
|
||||||
|
|
||||||
|
images {
|
||||||
|
rootfs {
|
||||||
|
description = "rootfs";
|
||||||
|
type = "ramdisk";
|
||||||
|
os = "linux";
|
||||||
|
compression = "none";
|
||||||
|
data = /incbin/("${squash}");
|
||||||
|
signature-1 {
|
||||||
|
algo = "sha256,rsa$((rsanibbles << 2))";
|
||||||
|
key-name-hint = "${hint}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
default = "verity";
|
||||||
|
verity {
|
||||||
|
ramdisk = "rootfs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkimage -E -p $itbh_size -B $itbh_size \
|
||||||
|
-f "${WORKDIR}"/rootfs.its \
|
||||||
|
-g "${hint}" -G "${keyfile}" \
|
||||||
|
"${itb}"
|
||||||
|
|
||||||
|
dd if="${itb}" bs=$((itbh_size)) count=1 of="${itb}h" status=none
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-itb-rootfs
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IMAGE_ITB_ROOTFS_DEPENDENCIES := rootfs-squashfs
|
||||||
|
IMAGE_ITB_ROOTFS_CONFIG_VARS := KEY
|
||||||
|
|
||||||
|
$(eval $(ix-image))
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
config IMAGE_README
|
||||||
|
bool "Install README.md in images"
|
||||||
|
help
|
||||||
|
Install a README.md with useful information about getting
|
||||||
|
started with Infix in the images directory (thereby also
|
||||||
|
including it in the resulting release tarball).
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# image-readme
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
IMAGE_README_DIR := $(pkgdir)
|
||||||
|
|
||||||
|
image-readme: $(BINARIES_DIR)/README.md
|
||||||
|
|
||||||
|
$(BINARIES_DIR)/README.md: $(IMAGE_README_DIR)/README.md
|
||||||
|
@$(call IXMSG,"Installing README.md")
|
||||||
|
@mkdir -p $(BINARIES_DIR)
|
||||||
|
@cp $< $@
|
||||||
|
|
||||||
|
ifeq ($(IMAGE_README),y)
|
||||||
|
TARGETS_ROOTFS += image-readme
|
||||||
|
endif
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/image/ix-image.mk
|
||||||
|
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/common/image/*/*.mk))
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
define inner-ix-image
|
||||||
|
|
||||||
|
$(2)_DIR := $$(pkgdir)
|
||||||
|
|
||||||
|
$(1): $$($(2)_DEPENDENCIES)
|
||||||
|
@$$(call IXMSG,"$$(if $$($(2)_MESSAGE),$$($(2)_MESSAGE),Creating $(1))")
|
||||||
|
@mkdir -p $$(BUILD_DIR)/$(1)
|
||||||
|
@ \
|
||||||
|
PATH=$$(BR_PATH) \
|
||||||
|
PKGDIR=$$($(2)_DIR) \
|
||||||
|
WORKDIR=$$(BUILD_DIR)/$(1) \
|
||||||
|
BINARIES_DIR=$$(BINARIES_DIR) \
|
||||||
|
BR2_EXTERNAL_INFIX_PATH=$$(BR2_EXTERNAL_INFIX_PATH) \
|
||||||
|
ARTIFACT=$$(INFIX_ARTIFACT) \
|
||||||
|
COMPATIBLE=$$(INFIX_COMPATIBLE) \
|
||||||
|
VERSION=$$(INFIX_VERSION) \
|
||||||
|
$$(foreach var,$$($(2)_CONFIG_VARS),$$(var)=$$($(2)_$$(var)) ) \
|
||||||
|
$$($(2)_DIR)/generate.sh $$($(2)_OPTS)
|
||||||
|
|
||||||
|
ifeq ($$($(2)),y)
|
||||||
|
TARGETS_ROOTFS += $(1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
ix-image = $(call inner-ix-image,$(pkgname),$(call UPPERCASE,$(pkgname)))
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
rootdir=$BUILD_DIR/genimage.root
|
|
||||||
tempdir=$BUILD_DIR/genimage.tmp
|
|
||||||
|
|
||||||
cat <<EOF > /tmp/mkaux.cfg
|
|
||||||
image aux.ext4 {
|
|
||||||
mountpoint = "/aux"
|
|
||||||
size = 16M
|
|
||||||
|
|
||||||
ext4 {
|
|
||||||
label = "aux"
|
|
||||||
use-mke2fs = true
|
|
||||||
features = "^metadata_csum,^metadata_csum_seed,uninit_bg"
|
|
||||||
extraargs = "-m 0 -i 4096"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Silence genimage warnings
|
|
||||||
config {}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
rm -rf "$rootdir/aux"
|
|
||||||
mkdir -p "$rootdir/aux"
|
|
||||||
cp -f "$BINARIES_DIR/rootfs.itbh" "$rootdir/aux/primary.itbh"
|
|
||||||
cp -f "$BINARIES_DIR/rootfs.itbh" "$rootdir/aux/secondary.itbh"
|
|
||||||
cp -f "$BINARIES_DIR/rauc.status" "$rootdir/aux/rauc.status"
|
|
||||||
|
|
||||||
mkenvimage -s 0x4000 -o "$rootdir/aux/uboot.env" \
|
|
||||||
"$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt"
|
|
||||||
|
|
||||||
rm -rf "$BINARIES_DIR/aux.ext4"
|
|
||||||
rm -rf "$tempdir"
|
|
||||||
|
|
||||||
genimage \
|
|
||||||
--rootpath "$rootdir" \
|
|
||||||
--tmppath "$tempdir" \
|
|
||||||
--inputpath "$BINARIES_DIR" \
|
|
||||||
--outputpath "$BINARIES_DIR" \
|
|
||||||
--config "/tmp/mkaux.cfg"
|
|
||||||
@@ -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"
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. "$TARGET_DIR/etc/os-release"
|
|
||||||
|
|
||||||
if [ -n "$INFIX_RELEASE" ]; then
|
|
||||||
rel="-${INFIX_RELEASE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ARCH=$1
|
|
||||||
NM="${2:-custom}${rel}"
|
|
||||||
DISK=$3
|
|
||||||
RAM=${4:-512}
|
|
||||||
IFNUM=${5:-1}
|
|
||||||
|
|
||||||
# The aarch64 build currently has no "loader" but instead starts Linux
|
|
||||||
# directly, so we need to add a basic cmdline.
|
|
||||||
loader_args()
|
|
||||||
{
|
|
||||||
if [ "$ARCH" = "aarch64" ]; then
|
|
||||||
cat <<EOF
|
|
||||||
"kernel_command_line": "console=ttyAMA0 root=PARTLABEL=primary quiet",
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
loader_img()
|
|
||||||
{
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
|
||||||
cat <<EOF
|
|
||||||
"bios_image": "$loader",
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
cat <<EOF
|
|
||||||
"kernel_image": "$loader",
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
|
||||||
loader=OVMF.fd
|
|
||||||
accel=allow
|
|
||||||
opts=
|
|
||||||
else
|
|
||||||
loader=Image
|
|
||||||
accel=disable
|
|
||||||
opts="-M virt -cpu cortex-a72"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ">> Disk image MD5: $(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')"
|
|
||||||
|
|
||||||
cat <<EOF >"$BINARIES_DIR/${NM}.gns3a"
|
|
||||||
{
|
|
||||||
"name": "$NM",
|
|
||||||
"category": "router",
|
|
||||||
"description": "$INFIX_DESC",
|
|
||||||
"vendor_name": "$VENDOR_NAME",
|
|
||||||
"vendor_url": "$VENDOR_HOME",
|
|
||||||
"product_name": "$NAME",
|
|
||||||
"registry_version": 6,
|
|
||||||
"status": "stable",
|
|
||||||
"maintainer": "$VENDOR_NAME",
|
|
||||||
"maintainer_email": "${SUPPORT_URL#mailto:}",
|
|
||||||
"usage": "Default login, user/pass: admin/admin\n\nType 'cli' (and Enter) followed by 'help' for an overview of commands and relevant configuration files.",
|
|
||||||
"port_name_format": "eth{0}",
|
|
||||||
"linked_clone": true,
|
|
||||||
"qemu": {
|
|
||||||
"adapter_type": "virtio-net-pci",
|
|
||||||
"adapters": ${IFNUM},
|
|
||||||
"ram": ${RAM},
|
|
||||||
"cpus": 1,
|
|
||||||
"hda_disk_interface": "virtio",
|
|
||||||
"arch": "$ARCH",
|
|
||||||
"console_type": "telnet",
|
|
||||||
$(loader_img)
|
|
||||||
$(loader_args)
|
|
||||||
"kvm": "$accel",
|
|
||||||
"options": "$opts"
|
|
||||||
},
|
|
||||||
"images": [
|
|
||||||
{
|
|
||||||
"filename": "$loader",
|
|
||||||
"filesize": $(stat --printf='%s' "$BINARIES_DIR/$loader"),
|
|
||||||
"md5sum": "$(md5sum "$BINARIES_DIR/$loader" | awk '{print $1}')",
|
|
||||||
"version": "0.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "$DISK",
|
|
||||||
"filesize": $(stat --printf='%s' "$BINARIES_DIR/$DISK"),
|
|
||||||
"md5sum": "$(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')",
|
|
||||||
"version": "0.0"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"versions": [
|
|
||||||
{
|
|
||||||
"name": "0.0",
|
|
||||||
"images": {
|
|
||||||
$(loader_img)
|
|
||||||
"hda_disk_image": "$DISK"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
common=$(dirname $(readlink -f "$0"))
|
|
||||||
root=$BUILD_DIR/genimage.root
|
|
||||||
tmp=$BUILD_DIR/genimage.tmp
|
|
||||||
|
|
||||||
|
|
||||||
mkdir -p $root/aux
|
|
||||||
cp -f $BINARIES_DIR/uboot-env.bin $root/aux/uboot.env
|
|
||||||
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
|
||||||
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
|
||||||
|
|
||||||
rm -rf $tmp
|
|
||||||
|
|
||||||
genimage \
|
|
||||||
--rootpath $root \
|
|
||||||
--tmppath $tmp \
|
|
||||||
--inputpath $BINARIES_DIR \
|
|
||||||
--outputpath $BINARIES_DIR \
|
|
||||||
--config $common/genimage.cfg
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Bootstrap a RAUC status file showing the newly created image
|
|
||||||
# installed to both the primary and secondary slots. This then bundled
|
|
||||||
# in the aux partition in mkdisk.sh, so that RAUC (on the target) can
|
|
||||||
# always report the installed versions.
|
|
||||||
rauc info --no-verify --output-format=shell $1 >/tmp/rauc-$$.info
|
|
||||||
. /tmp/rauc-$$.info
|
|
||||||
rm /tmp/rauc-$$.info
|
|
||||||
tstamp=$(date -u +%FT%TZ)
|
|
||||||
cat <<EOF
|
|
||||||
[slot.rootfs.0]
|
|
||||||
bundle.compatible=$RAUC_MF_COMPATIBLE
|
|
||||||
bundle.version=$RAUC_MF_VERSION
|
|
||||||
status=ok
|
|
||||||
sha256=$RAUC_IMAGE_DIGEST_0
|
|
||||||
size=$RAUC_IMAGE_SIZE_0
|
|
||||||
installed.timestamp=$tstamp
|
|
||||||
installed.count=1
|
|
||||||
activated.timestamp=$tstamp
|
|
||||||
activated.count=1
|
|
||||||
|
|
||||||
[slot.rootfs.1]
|
|
||||||
bundle.compatible=$RAUC_MF_COMPATIBLE
|
|
||||||
bundle.version=$RAUC_MF_VERSION
|
|
||||||
status=ok
|
|
||||||
sha256=$RAUC_IMAGE_DIGEST_0
|
|
||||||
size=$RAUC_IMAGE_SIZE_0
|
|
||||||
installed.timestamp=$tstamp
|
|
||||||
installed.count=1
|
|
||||||
activated.timestamp=$tstamp
|
|
||||||
activated.count=1
|
|
||||||
EOF
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
name=$1
|
|
||||||
compat=$2
|
|
||||||
sign=$3
|
|
||||||
|
|
||||||
crt=$(ls $sign/*.crt)
|
|
||||||
key=$(ls $sign/*.key)
|
|
||||||
|
|
||||||
common=$(dirname "$(readlink -f "$0")")
|
|
||||||
|
|
||||||
work=$BUILD_DIR/mkrauc
|
|
||||||
mkdir -p "$work"
|
|
||||||
|
|
||||||
cp -f "$common/rauc-hooks.sh" "$work/hooks.sh"
|
|
||||||
|
|
||||||
# RAUC internally uses the file extension to find a suitable install
|
|
||||||
# handler, hence the name must be .img
|
|
||||||
cp -f "$BINARIES_DIR/rootfs.squashfs" "$work/rootfs.img"
|
|
||||||
cp -f "$BINARIES_DIR/rootfs.itbh" "$work/rootfs.itbh"
|
|
||||||
|
|
||||||
cat >"$work/manifest.raucm" <<EOF
|
|
||||||
[update]
|
|
||||||
compatible=${compat}
|
|
||||||
version=${INFIX_VERSION}
|
|
||||||
|
|
||||||
[bundle]
|
|
||||||
format=verity
|
|
||||||
|
|
||||||
[hooks]
|
|
||||||
filename=hooks.sh
|
|
||||||
|
|
||||||
[image.rootfs]
|
|
||||||
filename=rootfs.img
|
|
||||||
hooks=post-install
|
|
||||||
EOF
|
|
||||||
|
|
||||||
rm -f "$BINARIES_DIR/$name.pkg"
|
|
||||||
|
|
||||||
rauc --cert="$crt" --key="$key" \
|
|
||||||
bundle "$work" "$BINARIES_DIR/$name.pkg"
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
|
|
||||||
common=$(dirname "$(readlink -f "$0")")
|
|
||||||
. "$common/lib.sh"
|
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. "$TARGET_DIR/etc/os-release"
|
|
||||||
|
|
||||||
# The INFIX_* variables may be composed from BR2_* variables,
|
|
||||||
# so we source them last.
|
|
||||||
load_cfg BR2_ARCH
|
|
||||||
load_cfg BR2_DEFCONFIG
|
|
||||||
load_cfg BR2_EXTERNAL_INFIX_PATH
|
|
||||||
load_cfg BR2_TARGET_ROOTFS
|
|
||||||
load_cfg INFIX_ID
|
|
||||||
load_cfg INFIX_COMPATIBLE
|
|
||||||
|
|
||||||
# The default IMAGE_ID is infix-$BR2_ARCH but can be overridden
|
|
||||||
# for imaage names, and compat strings, like infix-r2s
|
|
||||||
if [ -n "$IMAGE_ID" ]; then
|
|
||||||
NAME="$IMAGE_ID"
|
|
||||||
else
|
|
||||||
NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/')
|
|
||||||
fi
|
|
||||||
diskimg=disk.qcow2
|
|
||||||
|
|
||||||
ver()
|
|
||||||
{
|
|
||||||
if [ -n "$INFIX_RELEASE" ]; then
|
|
||||||
printf -- "-%s" "${INFIX_RELEASE#v}"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
load_cfg SIGN_ENABLED
|
|
||||||
if [ "$SIGN_ENABLED" = "y" ]; then
|
|
||||||
load_cfg BR2_ARCH
|
|
||||||
load_cfg SIGN_KEY
|
|
||||||
|
|
||||||
ixmsg "Signing SquashFS Image"
|
|
||||||
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
|
||||||
|
|
||||||
ixmsg "Creating RAUC Update Bundle"
|
|
||||||
$common/mkrauc.sh "$NAME$(ver)" $INFIX_COMPATIBLE $SIGN_KEY
|
|
||||||
fi
|
|
||||||
|
|
||||||
load_cfg DISK_IMAGE
|
|
||||||
if [ "$DISK_IMAGE" = "y" ]; then
|
|
||||||
ixmsg "Creating Disk Image"
|
|
||||||
diskimg="${NAME}-disk$(ver).qcow2"
|
|
||||||
bootcfg=
|
|
||||||
if [ "$DISK_IMAGE_BOOT_DATA" ]; then
|
|
||||||
bootcfg="-b $DISK_IMAGE_BOOT_DATA -B $DISK_IMAGE_BOOT_OFFSET"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" != "y" ] && \
|
|
||||||
[ ! -f "$BINARIES_DIR/rootfs.squashfs" ]; then
|
|
||||||
ixmsg " Injecting $DISK_IMAGE_RELEASE_URL"
|
|
||||||
archive="$BINARIES_DIR/$(basename $DISK_IMAGE_RELEASE_URL)"
|
|
||||||
[ -f "$archive" ] || wget -O"$archive" "$DISK_IMAGE_RELEASE_URL"
|
|
||||||
tar -xa --strip-components=1 -C "$BINARIES_DIR" -f "$archive"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status"
|
|
||||||
$common/mkdisk.sh -a $BR2_ARCH -n $diskimg -s $DISK_IMAGE_SIZE $bootcfg
|
|
||||||
fi
|
|
||||||
|
|
||||||
load_cfg SDCARD_AUX
|
|
||||||
if [ "$SDCARD_AUX" = "y" ]; then
|
|
||||||
ixmsg "Creating initial rauc.status"
|
|
||||||
$common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status"
|
|
||||||
ixmsg "Creating aux.ext4 for sdcard.img"
|
|
||||||
$common/mkaux.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
load_cfg GNS3_APPLIANCE
|
|
||||||
if [ "$GNS3_APPLIANCE" = "y" ]; then
|
|
||||||
ixmsg "Creating GNS3 Appliance, $GNS3_APPLIANCE_RAM MiB with $GNS3_APPLIANCE_IFNUM ports"
|
|
||||||
$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)
|
|
||||||
ln -sf rootfs.squashfs "$BINARIES_DIR/${NAME}${rel}.img"
|
|
||||||
if [ -n "$rel" ]; then
|
|
||||||
ln -sf "${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/usr/bin/onieprom" "$BINARIES_DIR/"
|
|
||||||
|
|
||||||
# Menuconfig support for modifying Qemu args in release tarballs
|
|
||||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/"
|
|
||||||
sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \
|
|
||||||
-e "s/@DISK_IMG@/$diskimg/" \
|
|
||||||
< "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \
|
|
||||||
> "$BINARIES_DIR/Config.in"
|
|
||||||
rm -f "$BINARIES_DIR/qemu.cfg"
|
|
||||||
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
|
|
||||||
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
|
|
||||||
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
|
|
||||||
|
|
||||||
# Quick intro for beginners, with links to more information
|
|
||||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/README.txt" "$BINARIES_DIR/"
|
|
||||||
fi
|
|
||||||
@@ -78,7 +78,7 @@ endchoice
|
|||||||
config QEMU_MACHINE
|
config QEMU_MACHINE
|
||||||
string "Select emulated machine"
|
string "Select emulated machine"
|
||||||
default "qemu-system-arm -M virt,accel=kvm:tcg -cpu max" if QEMU_arm
|
default "qemu-system-arm -M virt,accel=kvm:tcg -cpu max" if QEMU_arm
|
||||||
default "qemu-system-aarch64 -M virt,accel=kvm:tcg -cpu max,pauth-impdef=on" if QEMU_aarch64
|
default "qemu-system-aarch64 -M virt,accel=kvm:tcg -cpu cortex-a53" if QEMU_aarch64
|
||||||
default "qemu-system-x86_64 -M pc,accel=kvm:tcg -cpu max" if QEMU_x86_64
|
default "qemu-system-x86_64 -M pc,accel=kvm:tcg -cpu max" if QEMU_x86_64
|
||||||
help
|
help
|
||||||
You should not have to change this setting, although you may
|
You should not have to change this setting, although you may
|
||||||
@@ -99,20 +99,20 @@ config QEMU_MACHINE_RAM
|
|||||||
config QEMU_KERNEL
|
config QEMU_KERNEL
|
||||||
string
|
string
|
||||||
depends on QEMU_LOADER_KERNEL
|
depends on QEMU_LOADER_KERNEL
|
||||||
default "zImage" if QEMU_arm
|
default "../zImage" if QEMU_arm
|
||||||
default "Image" if QEMU_aarch64
|
default "../Image" if QEMU_aarch64
|
||||||
default "bzImage" if QEMU_x86_64
|
default "../bzImage" if QEMU_x86_64
|
||||||
|
|
||||||
config QEMU_BIOS
|
config QEMU_BIOS
|
||||||
string
|
string
|
||||||
depends on !QEMU_LOADER_KERNEL
|
depends on !QEMU_LOADER_KERNEL
|
||||||
default "u-boot.bin" if QEMU_LOADER_UBOOT
|
default "../u-boot.bin" if QEMU_LOADER_UBOOT
|
||||||
default "OVMF.fd" if QEMU_LOADER_OVMF
|
default "../OVMF.fd" if QEMU_LOADER_OVMF
|
||||||
|
|
||||||
config QEMU_ROOTFS
|
config QEMU_ROOTFS
|
||||||
string
|
string
|
||||||
default "@DISK_IMG@" if !QEMU_ROOTFS_INITRD
|
default "@DISK_IMG@" if !QEMU_ROOTFS_INITRD
|
||||||
default "rootfs.squashfs" if QEMU_ROOTFS_INITRD
|
default "../rootfs.squashfs" if QEMU_ROOTFS_INITRD
|
||||||
|
|
||||||
config QEMU_DTB_EXTEND
|
config QEMU_DTB_EXTEND
|
||||||
bool
|
bool
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# qemu-scripts
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
QEMU_SCRIPTS_DIR := $(pkgdir)
|
||||||
|
qemu-kconfig = \
|
||||||
|
CONFIG_="CONFIG_" \
|
||||||
|
BR2_CONFIG="$(BINARIES_DIR)/qemu/.config" \
|
||||||
|
$(BUILD_DIR)/buildroot-config/$(1) $(2) "$(BINARIES_DIR)/qemu/Config.in"
|
||||||
|
|
||||||
|
ifeq ($(QEMU_SCRIPTS),y)
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run:
|
||||||
|
@$(BINARIES_DIR)/qemu/run.sh
|
||||||
|
|
||||||
|
.PHONY: run-menuconfig
|
||||||
|
run-menuconfig: $(BUILD_DIR)/buildroot-config/mconf
|
||||||
|
@$(call qemu-kconfig,mconf)
|
||||||
|
|
||||||
|
qemu-scripts: \
|
||||||
|
$(BINARIES_DIR)/qemu/run.sh \
|
||||||
|
$(BINARIES_DIR)/qemu/Config.in \
|
||||||
|
$(BINARIES_DIR)/qemu/.config
|
||||||
|
|
||||||
|
$(BINARIES_DIR)/qemu/run.sh: $(QEMU_SCRIPTS_DIR)/run.sh
|
||||||
|
@$(call IXMSG,"Installing QEMU scripts")
|
||||||
|
@mkdir -p $(dir $@)
|
||||||
|
@cp $< $@
|
||||||
|
|
||||||
|
$(BINARIES_DIR)/qemu/Config.in: $(QEMU_SCRIPTS_DIR)/Config.in.in
|
||||||
|
@mkdir -p $(dir $@)
|
||||||
|
@sed \
|
||||||
|
-e "s:@ARCH@:QEMU_$(BR2_ARCH):" \
|
||||||
|
-e "s:@DISK_IMG@:../$(INFIX_ARTIFACT).qcow2:" \
|
||||||
|
< $< >$@
|
||||||
|
|
||||||
|
$(BINARIES_DIR)/qemu/.config: $(BINARIES_DIR)/qemu/Config.in
|
||||||
|
@$(call qemu-kconfig,conf,--olddefconfig)
|
||||||
|
@rm -f $@.old
|
||||||
|
|
||||||
|
TARGETS_ROOTFS += qemu-scripts
|
||||||
|
endif
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
#
|
#
|
||||||
# shellcheck disable=SC3037
|
# shellcheck disable=SC3037
|
||||||
|
|
||||||
# Local variables
|
qdir=$(dirname "$(readlink -f "$0")")
|
||||||
imgdir=$(readlink -f "$(dirname "$0")")
|
imgdir=$(readlink -f "${qdir}/..")
|
||||||
prognm=$(basename "$0")
|
prognm=$(basename "$0")
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
@@ -56,12 +56,8 @@ die()
|
|||||||
|
|
||||||
load_qemucfg()
|
load_qemucfg()
|
||||||
{
|
{
|
||||||
tmp=$(mktemp -p /tmp)
|
|
||||||
|
|
||||||
grep ^CONFIG_QEMU_ "$1" >"$tmp"
|
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "$tmp"
|
. "./.config"
|
||||||
rm "$tmp"
|
|
||||||
|
|
||||||
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
|
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
|
||||||
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
|
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
|
||||||
@@ -247,7 +243,7 @@ rocker_port_args()
|
|||||||
net_args()
|
net_args()
|
||||||
{
|
{
|
||||||
# Infix will pick up this file via fwcfg and install it to /etc
|
# Infix will pick up this file via fwcfg and install it to /etc
|
||||||
mactab=${imgdir}/mactab
|
mactab=${qdir}/mactab
|
||||||
:> "$mactab"
|
:> "$mactab"
|
||||||
echo -n "-fw_cfg name=opt/mactab,file=$mactab "
|
echo -n "-fw_cfg name=opt/mactab,file=$mactab "
|
||||||
|
|
||||||
@@ -286,7 +282,7 @@ vpd_args()
|
|||||||
{
|
{
|
||||||
[ "$CONFIG_QEMU_VPD" = "y" ] || return
|
[ "$CONFIG_QEMU_VPD" = "y" ] || return
|
||||||
|
|
||||||
vpd_file="${imgdir}/vpd"
|
vpd_file="${qdir}/vpd"
|
||||||
|
|
||||||
if ! [ -f "$vpd_file" ]; then
|
if ! [ -f "$vpd_file" ]; then
|
||||||
onieprom="${imgdir}/onieprom"
|
onieprom="${imgdir}/onieprom"
|
||||||
@@ -430,7 +426,7 @@ dtb_args()
|
|||||||
|
|
||||||
# Extend it with the environment and signing information in
|
# Extend it with the environment and signing information in
|
||||||
# u-boot.dtb.
|
# u-boot.dtb.
|
||||||
echo "qemu.dtb u-boot.dtb" | \
|
echo "qemu.dtb ../u-boot.dtb" | \
|
||||||
xargs -n 1 dtc -I dtb -O dts | \
|
xargs -n 1 dtc -I dtb -O dts | \
|
||||||
{ echo "/dts-v1/;"; sed -e 's:/dts-v[0-9]\+/;::'; } | \
|
{ echo "/dts-v1/;"; sed -e 's:/dts-v[0-9]\+/;::'; } | \
|
||||||
dtc >qemu-extended.dtb 2>/dev/null
|
dtc >qemu-extended.dtb 2>/dev/null
|
||||||
@@ -439,7 +435,7 @@ dtb_args()
|
|||||||
echo -n "-dtb qemu-extended.dtb "
|
echo -n "-dtb qemu-extended.dtb "
|
||||||
else
|
else
|
||||||
# Otherwise we just use the unmodified one
|
# Otherwise we just use the unmodified one
|
||||||
echo -n "-dtb u-boot.dtb "
|
echo -n "-dtb ../u-boot.dtb "
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,13 +481,12 @@ EOF
|
|||||||
|
|
||||||
menuconfig()
|
menuconfig()
|
||||||
{
|
{
|
||||||
grep -q QEMU_MACHINE Config.in || die "$prognm: must be run from the output/images directory"
|
grep -q QEMU_MACHINE Config.in || die "$prognm: must be run from the $$O/images/qemu directory"
|
||||||
command -v kconfig-mconf >/dev/null || die "$prognm: cannot find kconfig-mconf for menuconfig"
|
command -v kconfig-mconf >/dev/null || die "$prognm: cannot find kconfig-mconf for menuconfig"
|
||||||
exec kconfig-mconf Config.in
|
exec kconfig-mconf Config.in
|
||||||
}
|
}
|
||||||
|
|
||||||
scriptdir=$(dirname "$(readlink -f "$0")")
|
cd "$qdir" || (echo "Failed cd to $qdir"; exit 1)
|
||||||
cd "$scriptdir" || (echo "Failed cd to $scriptdir"; exit 1)
|
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -510,13 +505,7 @@ while [ "$1" != "" ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -f .config ]; then
|
load_qemucfg
|
||||||
# Customized settings from 'qemu.sh -c'
|
|
||||||
load_qemucfg .config
|
|
||||||
else
|
|
||||||
# Shipped defaults from release tarball
|
|
||||||
load_qemucfg qemu.cfg
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$QEMU_EXTRA_APPEND" ]; then
|
if [ -z "$QEMU_EXTRA_APPEND" ]; then
|
||||||
QEMU_EXTRA_APPEND="$*"
|
QEMU_EXTRA_APPEND="$*"
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "Infix";
|
|
||||||
creator = "infix";
|
|
||||||
#address-cells = <0x1>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
rootfs {
|
|
||||||
description = "Infix";
|
|
||||||
type = "ramdisk";
|
|
||||||
os = "linux";
|
|
||||||
compression = "none";
|
|
||||||
data = /incbin/("rootfs.squashfs");
|
|
||||||
signature-1 {
|
|
||||||
algo = "sha256,rsa4096";
|
|
||||||
key-name-hint = "infix";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
default = "verity";
|
|
||||||
verity {
|
|
||||||
ramdisk = "rootfs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import importlib.machinery
|
|
||||||
import json
|
import json
|
||||||
|
import onieprom
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import struct
|
import struct
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
onieprom = importlib.machinery.SourceFileLoader("onieprom", "/bin/onieprom").load_module()
|
|
||||||
SYSTEM_JSON = "/run/system.json"
|
SYSTEM_JSON = "/run/system.json"
|
||||||
KKIT_IANA_PEM = 61046
|
KKIT_IANA_PEM = 61046
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
common=$(dirname $(readlink -f "$0"))
|
|
||||||
|
|
||||||
cd $BINARIES_DIR
|
|
||||||
cp $common/rootfs.its .
|
|
||||||
|
|
||||||
mkimage -E -p 0x1000 -B 0x1000 -k $2 -f rootfs.its rootfs.itb
|
|
||||||
|
|
||||||
cp rootfs.itb rootfs.itbh
|
|
||||||
truncate -s $((0x1000)) rootfs.itbh
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/riscv64/*/*.mk))
|
||||||
@@ -98,17 +98,14 @@ BR2_PACKAGE_WATCHDOGD=y
|
|||||||
BR2_PACKAGE_LESS=y
|
BR2_PACKAGE_LESS=y
|
||||||
BR2_PACKAGE_MG=y
|
BR2_PACKAGE_MG=y
|
||||||
BR2_PACKAGE_NANO=y
|
BR2_PACKAGE_NANO=y
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
||||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
||||||
BR2_PACKAGE_HOST_GENEXT2FS=y
|
BR2_PACKAGE_HOST_GENEXT2FS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_KMOD_XZ=y
|
BR2_PACKAGE_HOST_KMOD_XZ=y
|
||||||
BR2_PACKAGE_HOST_MTOOLS=y
|
BR2_PACKAGE_HOST_MTOOLS=y
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_RASPBERRYPI_RPI2=y
|
BR2_PACKAGE_RASPBERRYPI_RPI2=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers."
|
INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers."
|
||||||
@@ -135,11 +132,13 @@ BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
|
|||||||
BR2_PACKAGE_LOWDOWN=y
|
BR2_PACKAGE_LOWDOWN=y
|
||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_SHOW=y
|
BR2_PACKAGE_SHOW=y
|
||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
DISK_IMAGE_BOOT_BIN=y
|
|
||||||
GNS3_APPLIANCE_RAM=512
|
|
||||||
GNS3_APPLIANCE_IFNUM=10
|
|
||||||
|
|||||||
@@ -98,17 +98,14 @@ BR2_PACKAGE_WATCHDOGD=y
|
|||||||
BR2_PACKAGE_LESS=y
|
BR2_PACKAGE_LESS=y
|
||||||
BR2_PACKAGE_MG=y
|
BR2_PACKAGE_MG=y
|
||||||
BR2_PACKAGE_NANO=y
|
BR2_PACKAGE_NANO=y
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
||||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
||||||
BR2_PACKAGE_HOST_GENEXT2FS=y
|
BR2_PACKAGE_HOST_GENEXT2FS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_KMOD_XZ=y
|
BR2_PACKAGE_HOST_KMOD_XZ=y
|
||||||
BR2_PACKAGE_HOST_MTOOLS=y
|
BR2_PACKAGE_HOST_MTOOLS=y
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_RASPBERRYPI_RPI2=y
|
BR2_PACKAGE_RASPBERRYPI_RPI2=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers."
|
INFIX_DESC="Infix is an immutable, friendly, and secure operating system that turns any ARM or x86 device into a powerful, manageable network appliance. Deploy on anything from $35 Raspberry Pi boards to enterprise switches as routers, IoT gateways, or edge devices. Infix models Linux networking features using YANG so you can manage your devices using NETCONF/RESTCONF APIs and focus on your business logic running in isolated containers."
|
||||||
@@ -135,11 +132,13 @@ BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
|
|||||||
BR2_PACKAGE_LOWDOWN=y
|
BR2_PACKAGE_LOWDOWN=y
|
||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_SHOW=y
|
BR2_PACKAGE_SHOW=y
|
||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
DISK_IMAGE_BOOT_BIN=y
|
|
||||||
GNS3_APPLIANCE_RAM=512
|
|
||||||
GNS3_APPLIANCE_IFNUM=10
|
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
|
|||||||
BR2_TARGET_TZ_INFO=y
|
BR2_TARGET_TZ_INFO=y
|
||||||
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/rootfs"
|
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/rootfs"
|
||||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
||||||
@@ -123,16 +122,12 @@ BR2_PACKAGE_WATCHDOGD=y
|
|||||||
BR2_PACKAGE_LESS=y
|
BR2_PACKAGE_LESS=y
|
||||||
BR2_PACKAGE_MG=y
|
BR2_PACKAGE_MG=y
|
||||||
BR2_PACKAGE_NANO=y
|
BR2_PACKAGE_NANO=y
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
||||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
||||||
BR2_PACKAGE_HOST_GENEXT2FS=y
|
BR2_PACKAGE_HOST_GENEXT2FS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_GO_BIN=y
|
BR2_PACKAGE_HOST_GO_BIN=y
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
@@ -171,6 +166,7 @@ BR2_PACKAGE_LOWDOWN=y
|
|||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
BR2_PACKAGE_NETBROWSE=y
|
BR2_PACKAGE_NETBROWSE=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_PODMAN=y
|
BR2_PACKAGE_PODMAN=y
|
||||||
BR2_PACKAGE_PODMAN_DRIVER_BTRFS=y
|
BR2_PACKAGE_PODMAN_DRIVER_BTRFS=y
|
||||||
BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
|
BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
|
||||||
@@ -180,8 +176,9 @@ BR2_PACKAGE_TETRIS=y
|
|||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
|
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
|
||||||
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
DISK_IMAGE_BOOT_BIN=y
|
|
||||||
GNS3_APPLIANCE_RAM=512
|
|
||||||
GNS3_APPLIANCE_IFNUM=10
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
|
|||||||
BR2_TARGET_TZ_INFO=y
|
BR2_TARGET_TZ_INFO=y
|
||||||
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/rootfs"
|
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/aarch64/rootfs"
|
||||||
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
BR2_ROOTFS_POST_BUILD_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
||||||
@@ -101,15 +100,11 @@ BR2_PACKAGE_WATCHDOGD=y
|
|||||||
BR2_PACKAGE_LESS=y
|
BR2_PACKAGE_LESS=y
|
||||||
BR2_PACKAGE_MG=y
|
BR2_PACKAGE_MG=y
|
||||||
BR2_PACKAGE_NANO=y
|
BR2_PACKAGE_NANO=y
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
||||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
||||||
BR2_PACKAGE_HOST_GENEXT2FS=y
|
BR2_PACKAGE_HOST_GENEXT2FS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
@@ -144,13 +139,15 @@ BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
|
|||||||
BR2_PACKAGE_LOWDOWN=y
|
BR2_PACKAGE_LOWDOWN=y
|
||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_LIBINPUT=y
|
BR2_PACKAGE_LIBINPUT=y
|
||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
|
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
|
||||||
BR2_PACKAGE_GETENT=y
|
BR2_PACKAGE_GETENT=y
|
||||||
DISK_IMAGE_BOOT_BIN=y
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
GNS3_APPLIANCE_RAM=512
|
|
||||||
GNS3_APPLIANCE_IFNUM=10
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
|
|||||||
BR2_SSP_NONE=y
|
BR2_SSP_NONE=y
|
||||||
BR2_INIT_NONE=y
|
BR2_INIT_NONE=y
|
||||||
BR2_SYSTEM_BIN_SH_NONE=y
|
BR2_SYSTEM_BIN_SH_NONE=y
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
# BR2_PACKAGE_BUSYBOX is not set
|
# BR2_PACKAGE_BUSYBOX is not set
|
||||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
@@ -22,9 +21,10 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.07.02"
|
|||||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="qemu_arm64"
|
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="qemu_arm64"
|
||||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/qemu-uboot/extras.config"
|
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/qemu-uboot/extras.config"
|
||||||
BR2_TARGET_UBOOT_FORMAT_DTB=y
|
BR2_TARGET_UBOOT_FORMAT_DTB=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||||
# GNS3_APPLIANCE is not set
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_DL_RELEASE=y
|
||||||
|
TRUSTED_KEYS=y
|
||||||
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
|
|||||||
BR2_SSP_NONE=y
|
BR2_SSP_NONE=y
|
||||||
BR2_INIT_NONE=y
|
BR2_INIT_NONE=y
|
||||||
BR2_SYSTEM_BIN_SH_NONE=y
|
BR2_SYSTEM_BIN_SH_NONE=y
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
# BR2_PACKAGE_BUSYBOX is not set
|
# BR2_PACKAGE_BUSYBOX is not set
|
||||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
|
|||||||
BR2_TARGET_TZ_INFO=y
|
BR2_TARGET_TZ_INFO=y
|
||||||
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/riscv64/rootfs"
|
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/riscv64/rootfs"
|
||||||
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_INFIX_PATH)/board/common/post-build.sh"
|
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_INFIX_PATH)/board/common/post-build.sh"
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_INFIX_PATH)/board/common/post-image.sh support/scripts/genimage.sh"
|
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
|
||||||
BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_INFIX_PATH)/board/riscv64/visionfive2/genimage.cfg"
|
BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BR2_EXTERNAL_INFIX_PATH)/board/riscv64/visionfive2/genimage.cfg"
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||||
@@ -139,7 +139,6 @@ BR2_TARGET_ROOTFS_EXT2_4=y
|
|||||||
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
||||||
BR2_TARGET_ROOTFS_EXT2_INODE_SIZE=0
|
BR2_TARGET_ROOTFS_EXT2_INODE_SIZE=0
|
||||||
BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^64bit,large_file,ext_attr"
|
BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^64bit,large_file,ext_attr"
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_TARGET_OPENSBI=y
|
BR2_TARGET_OPENSBI=y
|
||||||
BR2_TARGET_OPENSBI_CUSTOM_VERSION=y
|
BR2_TARGET_OPENSBI_CUSTOM_VERSION=y
|
||||||
@@ -165,9 +164,6 @@ BR2_TARGET_UBOOT_SPL=y
|
|||||||
BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin.normal.out"
|
BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin.normal.out"
|
||||||
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_INFIX_PATH)/board/riscv64/visionfive2/uboot/visionfive2-env.dtsi"
|
BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_INFIX_PATH)/board/riscv64/visionfive2/uboot/visionfive2-env.dtsi"
|
||||||
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
BR2_PACKAGE_HOST_BMAP_TOOLS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
@@ -195,6 +191,7 @@ BR2_PACKAGE_LOWDOWN=y
|
|||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
BR2_PACKAGE_NETBROWSE=y
|
BR2_PACKAGE_NETBROWSE=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_PODMAN=y
|
BR2_PACKAGE_PODMAN=y
|
||||||
BR2_PACKAGE_PODMAN_DRIVER_BTRFS=y
|
BR2_PACKAGE_PODMAN_DRIVER_BTRFS=y
|
||||||
BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
|
BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
|
||||||
@@ -204,7 +201,9 @@ BR2_PACKAGE_TETRIS=y
|
|||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
|
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
|
||||||
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
# GNS3_APPLIANCE is not set
|
|
||||||
SDCARD_AUX=y
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_INFIX_PATH)/patches"
|
|||||||
BR2_SSP_NONE=y
|
BR2_SSP_NONE=y
|
||||||
BR2_INIT_NONE=y
|
BR2_INIT_NONE=y
|
||||||
BR2_SYSTEM_BIN_SH_NONE=y
|
BR2_SYSTEM_BIN_SH_NONE=y
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
# BR2_PACKAGE_BUSYBOX is not set
|
# BR2_PACKAGE_BUSYBOX is not set
|
||||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||||
BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y
|
BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
|
|||||||
BR2_TARGET_TZ_INFO=y
|
BR2_TARGET_TZ_INFO=y
|
||||||
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs"
|
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs"
|
||||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
||||||
@@ -119,7 +118,6 @@ BR2_PACKAGE_WATCHDOGD=y
|
|||||||
BR2_PACKAGE_LESS=y
|
BR2_PACKAGE_LESS=y
|
||||||
BR2_PACKAGE_MG=y
|
BR2_PACKAGE_MG=y
|
||||||
BR2_PACKAGE_NANO=y
|
BR2_PACKAGE_NANO=y
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_TARGET_EDK2=y
|
BR2_TARGET_EDK2=y
|
||||||
BR2_TARGET_GRUB2=y
|
BR2_TARGET_GRUB2=y
|
||||||
@@ -131,11 +129,8 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
|||||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
||||||
BR2_PACKAGE_HOST_GENEXT2FS=y
|
BR2_PACKAGE_HOST_GENEXT2FS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_GO_BIN=y
|
BR2_PACKAGE_HOST_GO_BIN=y
|
||||||
BR2_PACKAGE_HOST_MTOOLS=y
|
BR2_PACKAGE_HOST_MTOOLS=y
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
@@ -168,6 +163,7 @@ BR2_PACKAGE_LOWDOWN=y
|
|||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
BR2_PACKAGE_NETBROWSE=y
|
BR2_PACKAGE_NETBROWSE=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_PODMAN=y
|
BR2_PACKAGE_PODMAN=y
|
||||||
BR2_PACKAGE_PODMAN_DRIVER_BTRFS=y
|
BR2_PACKAGE_PODMAN_DRIVER_BTRFS=y
|
||||||
BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
|
BR2_PACKAGE_PODMAN_DRIVER_DEVICEMAPPER=y
|
||||||
@@ -177,7 +173,9 @@ BR2_PACKAGE_TETRIS=y
|
|||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
|
BR2_PACKAGE_HOST_PYTHON_YANGDOC=y
|
||||||
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
GNS3_APPLIANCE_RAM=512
|
|
||||||
GNS3_APPLIANCE_IFNUM=10
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ BR2_GENERATE_LOCALE="en_US en_CA C.UTF-8"
|
|||||||
BR2_TARGET_TZ_INFO=y
|
BR2_TARGET_TZ_INFO=y
|
||||||
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs"
|
BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs"
|
||||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh"
|
||||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.60"
|
||||||
@@ -97,7 +96,6 @@ BR2_PACKAGE_WATCHDOGD=y
|
|||||||
BR2_PACKAGE_LESS=y
|
BR2_PACKAGE_LESS=y
|
||||||
BR2_PACKAGE_MG=y
|
BR2_PACKAGE_MG=y
|
||||||
BR2_PACKAGE_NANO=y
|
BR2_PACKAGE_NANO=y
|
||||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
|
||||||
# BR2_TARGET_ROOTFS_TAR is not set
|
# BR2_TARGET_ROOTFS_TAR is not set
|
||||||
BR2_TARGET_EDK2=y
|
BR2_TARGET_EDK2=y
|
||||||
BR2_TARGET_GRUB2=y
|
BR2_TARGET_GRUB2=y
|
||||||
@@ -109,10 +107,7 @@ BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
|||||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||||
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
BR2_PACKAGE_HOST_ENVIRONMENT_SETUP=y
|
||||||
BR2_PACKAGE_HOST_GENEXT2FS=y
|
BR2_PACKAGE_HOST_GENEXT2FS=y
|
||||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
|
||||||
BR2_PACKAGE_HOST_MTOOLS=y
|
BR2_PACKAGE_HOST_MTOOLS=y
|
||||||
BR2_PACKAGE_HOST_RAUC=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||||
INFIX_VENDOR_HOME="https://kernelkit.org"
|
INFIX_VENDOR_HOME="https://kernelkit.org"
|
||||||
@@ -139,10 +134,13 @@ BR2_PACKAGE_KLISH_PLUGIN_INFIX=y
|
|||||||
BR2_PACKAGE_LOWDOWN=y
|
BR2_PACKAGE_LOWDOWN=y
|
||||||
BR2_PACKAGE_MCD=y
|
BR2_PACKAGE_MCD=y
|
||||||
BR2_PACKAGE_MDNS_ALIAS=y
|
BR2_PACKAGE_MDNS_ALIAS=y
|
||||||
|
BR2_PACKAGE_ONIEPROM=y
|
||||||
BR2_PACKAGE_SHOW=y
|
BR2_PACKAGE_SHOW=y
|
||||||
BR2_PACKAGE_ROUSETTE=y
|
BR2_PACKAGE_ROUSETTE=y
|
||||||
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
BR2_PACKAGE_RAUC_INSTALLATION_STATUS=y
|
||||||
|
IMAGE_ITB_AUX=y
|
||||||
|
IMAGE_ITB_QCOW=y
|
||||||
|
IMAGE_ITB_RAUC=y
|
||||||
|
IMAGE_README=y
|
||||||
TRUSTED_KEYS=y
|
TRUSTED_KEYS=y
|
||||||
TRUSTED_KEYS_DEVELOPMENT=y
|
TRUSTED_KEYS_DEVELOPMENT=y
|
||||||
GNS3_APPLIANCE_RAM=512
|
|
||||||
GNS3_APPLIANCE_IFNUM=10
|
|
||||||
|
|||||||
-11
@@ -1,8 +1,6 @@
|
|||||||
include $(BR2_EXTERNAL_INFIX_PATH)/infix.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/infix.mk
|
||||||
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/package/*/*.mk))
|
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/package/*/*.mk))
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/common.mk
|
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/board.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/board.mk
|
||||||
-include $(BR2_EXTERNAL_INFIX_PATH)/board/$(patsubst "%",%,$(BR2_ARCH))/board.mk
|
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/test/test.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/test/test.mk
|
||||||
|
|
||||||
.PHONY: local.mk
|
.PHONY: local.mk
|
||||||
@@ -10,15 +8,6 @@ local.mk:
|
|||||||
@$(call IXMSG,"Installing local override for certain packages")
|
@$(call IXMSG,"Installing local override for certain packages")
|
||||||
@(cd $O && ln -s $(BR2_EXTERNAL_INFIX_PATH)/local.mk .)
|
@(cd $O && ln -s $(BR2_EXTERNAL_INFIX_PATH)/local.mk .)
|
||||||
|
|
||||||
.PHONY: run
|
|
||||||
run:
|
|
||||||
@$(BINARIES_DIR)/qemu.sh
|
|
||||||
|
|
||||||
.PHONY: run-menuconfig
|
|
||||||
run-menuconfig: $(BUILD_DIR)/buildroot-config/mconf
|
|
||||||
CONFIG_="CONFIG_" BR2_CONFIG="$(BINARIES_DIR)/.config" \
|
|
||||||
$(BUILD_DIR)/buildroot-config/mconf $(BINARIES_DIR)/Config.in
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Buildroot package extensions
|
# Buildroot package extensions
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ INFIX_TOPDIR = $(if $(oem-dir),$(oem-dir),$(BR2_EXTERNAL_INFIX_PATH))
|
|||||||
# release is being built.
|
# release is being built.
|
||||||
export INFIX_BUILD_ID ?= $(shell git -C $(INFIX_TOPDIR) describe --dirty --always --tags)
|
export INFIX_BUILD_ID ?= $(shell git -C $(INFIX_TOPDIR) describe --dirty --always --tags)
|
||||||
export INFIX_VERSION = $(if $(INFIX_RELEASE),$(INFIX_RELEASE),$(INFIX_BUILD_ID))
|
export INFIX_VERSION = $(if $(INFIX_RELEASE),$(INFIX_RELEASE),$(INFIX_BUILD_ID))
|
||||||
|
export INFIX_ARTIFACT = $(call qstrip,$(INFIX_IMAGE_ID)$(if $(INFIX_RELEASE),-$(INFIX_RELEASE)))
|
||||||
|
|
||||||
INFIX_CFLAGS:=-Wall -Werror -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-overflow=2 -Winit-self -Wstrict-overflow=4 -Wno-format-truncation -Wno-format-nonliteral
|
INFIX_CFLAGS:=-Wall -Werror -Wextra -Wno-unused-parameter -Wformat=2 -Wformat-overflow=2 -Winit-self -Wstrict-overflow=4 -Wno-format-truncation -Wno-format-nonliteral
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/lowdown/Config.in"
|
|||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/mcd/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/mcd/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/mdns-alias/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/mdns-alias/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/netbrowse/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/netbrowse/Config.in"
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/package/onieprom/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/podman/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/podman/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/python-libyang/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/python-libyang/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/python-statd/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/python-statd/Config.in"
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
menuconfig BR2_PACKAGE_ONIEPROM
|
||||||
|
bool "onieprom"
|
||||||
|
select BR2_PACKAGE_HOST_PYTHON3
|
||||||
|
help
|
||||||
|
ONIE EEPROM parser/generator
|
||||||
|
|
||||||
|
config BR2_PACKAGE_ONIEPROM_INSTALL_IMAGES
|
||||||
|
bool "install onieprom in images"
|
||||||
|
depends on BR2_PACKAGE_ONIEPROM
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Install the onieprom script in the images direcory. Useful
|
||||||
|
when the release is destined for someone who will have to
|
||||||
|
create ONIE EEPROM binaries for deployment during
|
||||||
|
manufacturing.
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PYTHONPATH=$(readlink -f $(dirname $0)/..) \
|
||||||
|
exec python3 -m onieprom "$@"
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
ONIEPROM_VERSION = 1.0
|
||||||
|
ONIEPROM_SITE_METHOD = local
|
||||||
|
ONIEPROM_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/onieprom
|
||||||
|
ONIEPROM_LICENSE = GPLv2
|
||||||
|
ONIEPROM_LICENSE_FILES = COPYING
|
||||||
|
ONIEPROM_DEPENDENCIES = host-python3 python3 host-python-poetry-core
|
||||||
|
ONIEPROM_SETUP_TYPE = pep517 # poetry
|
||||||
|
ONIEPROM_INSTALL_IMAGES = $(if $(BR2_PACKAGE_ONIEPROM_INSTALL_IMAGES),YES,NO)
|
||||||
|
|
||||||
|
define ONIEPROM_INSTALL_IMAGES_CMDS
|
||||||
|
@cp -a $(@D)/onieprom $(BINARIES_DIR)/onieprom
|
||||||
|
@cp $(ONIEPROM_PKGDIR)/onieprom $(BINARIES_DIR)/onieprom/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(python-package))
|
||||||
@@ -0,0 +1,339 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License.
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
from .tlv import into_tlv, from_tlv
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
def main():
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(prog='onieprom')
|
||||||
|
|
||||||
|
parser.add_argument("infile", nargs="?", default=sys.stdin, type=argparse.FileType("rb", 0))
|
||||||
|
parser.add_argument("outfile", nargs="?", default=sys.stdout, type=argparse.FileType("wb"))
|
||||||
|
|
||||||
|
parser.add_argument("-e", "--encode", default=False, action="store_true",
|
||||||
|
help="Encode JSON input to binary output")
|
||||||
|
|
||||||
|
parser.add_argument("-d", "--decode", default=False, action="store_true",
|
||||||
|
help="Decode binary input to JSON output")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if (not args.encode) and (not args.decode):
|
||||||
|
c = args.infile.read(1)
|
||||||
|
args.infile.seek(0, 0)
|
||||||
|
|
||||||
|
if c == b"{":
|
||||||
|
args.encode = True
|
||||||
|
elif c == b"T":
|
||||||
|
args.decode = True
|
||||||
|
else:
|
||||||
|
sys.stderr.write("Neither encode nor decode specified, and could not infer operation from input")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
if args.encode:
|
||||||
|
args.outfile.buffer.write(into_tlv(json.load(args.infile)))
|
||||||
|
else:
|
||||||
|
args.outfile.write(json.dumps(from_tlv(args.infile)))
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Executable → Regular
-38
@@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
@@ -180,39 +178,3 @@ def from_tlv(f):
|
|||||||
d[info["name"]] = unpack(v)
|
d[info["name"]] = unpack(v)
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
import argparse
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(prog='onieprom')
|
|
||||||
|
|
||||||
parser.add_argument("infile", nargs="?", default=sys.stdin, type=argparse.FileType("rb", 0))
|
|
||||||
parser.add_argument("outfile", nargs="?", default=sys.stdout, type=argparse.FileType("wb"))
|
|
||||||
|
|
||||||
parser.add_argument("-e", "--encode", default=False, action="store_true",
|
|
||||||
help="Encode JSON input to binary output")
|
|
||||||
|
|
||||||
parser.add_argument("-d", "--decode", default=False, action="store_true",
|
|
||||||
help="Decode binary input to JSON output")
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
if (not args.encode) and (not args.decode):
|
|
||||||
c = args.infile.read(1)
|
|
||||||
args.infile.seek(0, 0)
|
|
||||||
|
|
||||||
if c == b"{":
|
|
||||||
args.encode = True
|
|
||||||
elif c == b"T":
|
|
||||||
args.decode = True
|
|
||||||
else:
|
|
||||||
sys.stderr.write("Neither encode nor decode specified, and could not infer operation from input")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if args.encode:
|
|
||||||
args.outfile.buffer.write(into_tlv(json.load(args.infile)))
|
|
||||||
else:
|
|
||||||
args.outfile.write(json.dumps(from_tlv(args.infile)))
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "infix-onieprom"
|
||||||
|
version = "1.0"
|
||||||
|
description = "ONIE EEPROM parser/generator"
|
||||||
|
license = "GPLv2"
|
||||||
|
authors = [
|
||||||
|
"KernelKit developers"
|
||||||
|
]
|
||||||
|
packages = [
|
||||||
|
{ include = "onieprom" }
|
||||||
|
]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core>=1.0.0"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.poetry.scripts]
|
||||||
|
onieprom = "onieprom.__main__:main"
|
||||||
@@ -74,7 +74,7 @@ get_base_img()
|
|||||||
{
|
{
|
||||||
local files="$1"
|
local files="$1"
|
||||||
local base_img_file
|
local base_img_file
|
||||||
base_img_file=$(echo "$files" | tr ' ' '\n' | grep -- '-disk.qcow2$')
|
base_img_file=$(echo "$files" | tr ' ' '\n' | grep -- '.qcow2$')
|
||||||
echo "$envdir/qeneth/$(basename "$base_img_file")"
|
echo "$envdir/qeneth/$(basename "$base_img_file")"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,16 +95,16 @@ start_topology()
|
|||||||
ln -sf "$file" "$envdir/qeneth/$filename"
|
ln -sf "$file" "$envdir/qeneth/$filename"
|
||||||
done
|
done
|
||||||
|
|
||||||
base_img=$(get_base_img "$files")
|
base_img_qcow2=$(get_base_img "$files")
|
||||||
test_img_name="${base_img%-disk.qcow2}-disk-test"
|
base_img_disk="${base_img_qcow2%.qcow2}.disk"
|
||||||
base_img_name="${base_img%-disk.qcow2}-disk"
|
|
||||||
test_img_raw="${test_img_name}.img"
|
test_img_disk="${base_img_qcow2%.qcow2}-test.disk"
|
||||||
base_img_raw="${base_img_name}.img"
|
test_img_qcow2="${test_img_disk%.disk}.qcow2"
|
||||||
test_img_qcow2="${test_img_name}.qcow2"
|
|
||||||
|
qemu-img convert -f qcow2 -O raw "$base_img_qcow2" "$base_img_disk"
|
||||||
|
$testdir/inject-test-mode -b "$base_img_disk" -o "$test_img_disk"
|
||||||
|
qemu-img convert -f raw -O qcow2 "$test_img_disk" "$test_img_qcow2"
|
||||||
|
|
||||||
qemu-img convert -f qcow2 -O raw "$base_img" "$base_img_raw"
|
|
||||||
$testdir/inject-test-mode -b "$base_img_raw" -o "$test_img_raw"
|
|
||||||
qemu-img convert -f raw -O qcow2 "$test_img_raw" "$test_img_qcow2"
|
|
||||||
img_name=$(basename $test_img_qcow2)
|
img_name=$(basename $test_img_qcow2)
|
||||||
sed -i "s/qn_image=\".*\"/qn_image=\"$img_name\"/" "$envdir/qeneth/topology.dot.in"
|
sed -i "s/qn_image=\".*\"/qn_image=\"$img_name\"/" "$envdir/qeneth/topology.dot.in"
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -17,11 +17,11 @@ mode-qeneth := -q $(test-dir)/virt/quad
|
|||||||
mode-host := -t $(or $(TOPOLOGY),/etc/infamy.dot)
|
mode-host := -t $(or $(TOPOLOGY),/etc/infamy.dot)
|
||||||
mode-run := -t $(BINARIES_DIR)/qemu.dot
|
mode-run := -t $(BINARIES_DIR)/qemu.dot
|
||||||
mode := $(mode-$(TEST_MODE))
|
mode := $(mode-$(TEST_MODE))
|
||||||
INFIX_IMAGE_ID := $(call qstrip,$(INFIX_IMAGE_ID))
|
|
||||||
binaries-$(ARCH) := $(addprefix $(INFIX_IMAGE_ID),.img -disk.qcow2)
|
pkg-$(ARCH) := -p $(O)/images/$(INFIX_ARTIFACT).pkg
|
||||||
pkg-$(ARCH) := -p $(O)/images/$(addprefix $(INFIX_IMAGE_ID),.pkg)
|
binaries-$(ARCH) := $(INFIX_ARTIFACT).qcow2
|
||||||
binaries-x86_64 += OVMF.fd
|
binaries-x86_64 += OVMF.fd
|
||||||
binaries := $(foreach bin,$(binaries-$(ARCH)),-f $(BINARIES_DIR)/$(bin))
|
binaries := $(foreach bin,$(binaries-$(ARCH)),-f $(BINARIES_DIR)/$(bin))
|
||||||
|
|
||||||
# Common transport override for minimal defconfigs
|
# Common transport override for minimal defconfigs
|
||||||
ifneq ($(BR2_PACKAGE_ROUSETTE),y)
|
ifneq ($(BR2_PACKAGE_ROUSETTE),y)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ graph "quad" {
|
|||||||
edge [color="cornflowerblue", penwidth="2"];
|
edge [color="cornflowerblue", penwidth="2"];
|
||||||
|
|
||||||
qn_template="infix-bios-x86_64";
|
qn_template="infix-bios-x86_64";
|
||||||
qn_image="infix-x86_64-disk-test.qcow2"
|
qn_image="infix-x86_64-test.qcow2"
|
||||||
qn_oui="00:a0:85";
|
qn_oui="00:a0:85";
|
||||||
qn_append="quiet";
|
qn_append="quiet";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user