[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [ImageBuilder 1/5] uboot-script-gen: Update to deal with uImage which is not executable
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> uImage is the Image that has a U-Boot wrapper, it doesn't contain "executable" string which subsequent "file" command is looking for when inspecting it. Below the proof: otyshchenko@EPUAKYIW03DD:~/work/xen_tests/input$ file -L binaries/uImage.gz binaries/uImage.gz: u-boot legacy uImage, Linux Kernel Image, Linux/ARM 64-bit, OS Kernel Image (gzip), 9822180 bytes, Fri Sep 29 15:39:42 2023, Load Address: 0X40000000, Entry Point: 0X40000000, Header CRC: 0XE1EF21BF, Data CRC: 0XC418025 otyshchenko@EPUAKYIW03DD:~/work/xen_tests/input$ file -L binaries/uImage binaries/uImage: u-boot legacy uImage, Linux Kernel Image, Linux/ARM 64-bit, OS Kernel Image (Not compressed), 23269888 bytes, Fri Sep 29 15:40:19 2023, Load Address: 0X40000000, Entry Point: 0X40000000, Header CRC: 0XA0B7D051, Data CRC: 0X42083F51 Suggested-by: Stefano Stabellini <stefano.stabellini@xxxxxxx> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> --- scripts/uboot-script-gen | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index 3cc6b47..7cb8c6d 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -505,9 +505,9 @@ function check_file_type() # if file doesn't know what it is, it outputs data, so include that # since some executables aren't recongnized - if [ "$type" = "executable" ] + if [[ "$type" = "executable"* ]] then - type="executable\|data\|ARM OpenFirmware" + type="$type\|data\|ARM OpenFirmware" # file in older distros (ex: RHEL 7.4) just output data for device # tree blobs elif [ "$type" = "Device Tree Blob" ] @@ -712,7 +712,7 @@ xen_file_loading() { if test "$DOM0_KERNEL" then - check_compressed_file_type $DOM0_KERNEL "executable" + check_compressed_file_type $DOM0_KERNEL "executable\|uImage" dom0_kernel_addr=$memaddr load_file $DOM0_KERNEL "dom0_linux" dom0_kernel_size=$filesize @@ -747,7 +747,7 @@ xen_file_loading() cleanup_and_return_err fi - check_compressed_file_type ${DOMU_KERNEL[$i]} "executable" + check_compressed_file_type ${DOMU_KERNEL[$i]} "executable\|uImage" domU_kernel_addr[$i]=$memaddr load_file ${DOMU_KERNEL[$i]} "domU${i}_kernel" domU_kernel_size[$i]=$filesize -- 2.34.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |