Skip to content

Commit

Permalink
Add RK3588 tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
luodeb committed Oct 17, 2024
0 parents commit a8d58fb
Show file tree
Hide file tree
Showing 11 changed files with 959 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Package and Release

on: [push, pull_request]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Zip folder
run: rm *.zip && ls | grep -v '*.zip'|awk '{print "zip -r -4 "$0".zip "$0}' | bash

- name: Upload Release
uses: softprops/action-gh-release@v1
with:
tag_name: latest
files: "*.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81 changes: 81 additions & 0 deletions rk3588/boot.its
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (C) 2021 Rockchip Electronics Co., Ltd
*
* SPDX-License-Identifier: GPL-2.0
*/

/dts-v1/;
/ {
description = "U-Boot FIT source file for arm";

images {
fdt {
data = /incbin/("kernel/arch/arm64/boot/dts/rockchip/rk3588-evb1-lp4-v10-linux.dtb");
type = "flat_dt";
arch = "arm64";
compression = "none";
load = <0xffffff00>;

hash {
algo = "sha256";
};
};

kernel {
data = /incbin/("kernel/arch/arm64/boot/Image");
type = "kernel";
arch = "arm64";
os = "linux";
compression = "none";
entry = <0xffffff01>;
load = <0xffffff01>;

hash {
algo = "sha256";
};
};

ramdisk {
data = /incbin/("kernel/ramdisk.img");
type = "ramdisk";
arch = "arm64";
os = "linux";
compression = "none";
load = <0xffffff02>;

hash {
algo = "sha256";
};
};

resource {
data = /incbin/("kernel/resource.img");
type = "multi";
arch = "arm64";
compression = "none";

hash {
algo = "sha256";
};
};
};

configurations {
default = "conf";

conf {
rollback-index = <0x00>;
fdt = "fdt";
kernel = "kernel";
ramdisk = "ramdisk";
multi = "resource";

signature {
algo = "sha256,rsa2048";
padding = "pss";
key-name-hint = "dev";
sign-images = "fdt", "kernel", "ramdisk", "multi";
};
};
};
};
Binary file added rk3588/logo.bmp
Binary file not shown.
Binary file added rk3588/logo_kernel.bmp
Binary file not shown.
83 changes: 83 additions & 0 deletions rk3588/mk-fitimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/bash

set -e

SOURCE_DIR="$(pwd)"
CUR_DIR="${SOURCE_DIR}/tools/rk3588"

fdt=0
kernel=0
ramdisk=0
resource=0
OUTPUT_TARGET_IMAGE="$1"
src_its_file="$2"
ramdisk_file_path="$3"
kernel_image="$4"
kernel_dtb_file="$5"
target_its_file="${CUR_DIR}/.tmp_its"

if [ -f $target_its_file ]; then
rm ${target_its_file}
fi

if [ ! -f $src_its_file ]; then
echo "Not Fount $src_its_file ..."
exit -1
fi

while read line
do
############################# generate fdt path
if [ $fdt -eq 1 ];then
echo "data = /incbin/(\"$kernel_dtb_file\");" >> $target_its_file
fdt=0
continue
fi
if echo $line | grep -w "^fdt" |grep -v ";"; then
fdt=1
echo "$line" >> $target_its_file
continue
fi

############################# generate kernel image path
if [ $kernel -eq 1 ];then
echo "data = /incbin/(\"$kernel_image\");" >> $target_its_file
kernel=0
continue
fi
if echo $line | grep -w "^kernel" |grep -v ";"; then
kernel=1
echo "$line" >> $target_its_file
continue
fi

############################# generate ramdisk path
if [ -f $ramdisk_file_path ]; then
if [ $ramdisk -eq 1 ];then
echo "data = /incbin/(\"$ramdisk_file_path\");" >> $target_its_file
ramdisk=0
continue
fi
if echo $line | grep -w "^ramdisk" |grep -v ";"; then
ramdisk=1
echo "$line" >> $target_its_file
continue
fi
fi

############################# generate resource path
if [ $resource -eq 1 ];then
echo "data = /incbin/(\"$SOURCE_DIR/resource.img\");" >> $target_its_file
resource=0
continue
fi
if echo $line | grep -w "^resource" |grep -v ";"; then
resource=1
echo "$line" >> $target_its_file
continue
fi

echo "$line" >> $target_its_file
done < $src_its_file

${CUR_DIR}/mkimage -f $target_its_file -E -p 0x800 $OUTPUT_TARGET_IMAGE
Loading

0 comments on commit a8d58fb

Please sign in to comment.