summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing-Chun Liu (PaulLiu) <paulliu@debian.org>2021-06-16 06:03:01 +0800
committerYing-Chun Liu (PaulLiu) <paulliu@debian.org>2021-06-16 06:03:01 +0800
commitda4ca0d244477f546985f602d7f71f9bfb9686b0 (patch)
tree6c2d20110cf34fe3a4802d8f6e0c1b4daf896db2
parente67dd35ae95ea3b344ac8358f90be5087db5a4ed (diff)
M9: Fedora IoT installer.
In this commit we use OpTEE from the upstream. And also add a document on how to run Fedora IoT installer. Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
-rwxr-xr-xbuild_atf.sh6
-rwxr-xr-xbuild_everything.sh2
-rwxr-xr-xbuild_linux.sh15
-rwxr-xr-xbuild_optee.sh23
-rwxr-xr-xbuild_uboot.sh1
-rw-r--r--docs/rsb3720_fedora_iot_installer.md13
-rwxr-xr-xdownload_everything.sh5
7 files changed, 47 insertions, 18 deletions
diff --git a/build_atf.sh b/build_atf.sh
index 15547f0..65e62fa 100755
--- a/build_atf.sh
+++ b/build_atf.sh
@@ -27,9 +27,9 @@ make ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- PLAT=imx8mp \
LOG_LEVEL=50 \
USE_TBBR_DEFS=1 GENERATE_COT=1 TRUSTED_BOARD_BOOT=1 \
MBEDTLS_DIR=../mbedtls \
- BL32=../imx-optee-os/build.mx8mpevk/core/tee-header_v2.bin \
- BL32_EXTRA1=../imx-optee-os/build.mx8mpevk/core/tee-pager_v2.bin \
- BL32_EXTRA2=../imx-optee-os/build.mx8mpevk/core/tee-pageable_v2.bin \
+ BL32=../optee_os/build.mx8mpevk/core/tee-header_v2.bin \
+ BL32_EXTRA1=../optee_os/build.mx8mpevk/core/tee-pager_v2.bin \
+ BL32_EXTRA2=../optee_os/build.mx8mpevk/core/tee-pageable_v2.bin \
BL33=/tmp/uboot-imx8mp/u-boot.bin \
fip bl2 bl31
diff --git a/build_everything.sh b/build_everything.sh
index c71080f..479048a 100755
--- a/build_everything.sh
+++ b/build_everything.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-cd imx-optee-os
+cd optee_os
../build_optee.sh
cd ..
diff --git a/build_linux.sh b/build_linux.sh
new file mode 100755
index 0000000..bef4d96
--- /dev/null
+++ b/build_linux.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SELFPID=$$
+renice 10 -p "$SELFPID"
+ionice -c 3 -p "$SELFPID"
+
+B="/tmp/linux-rsb3720"
+rm -rf "$B"
+mkdir -p "$B"
+
+export ARCH=arm64
+export CROSS_COMPILE=aarch64-linux-gnu-
+
+nice -10 ionice -c 3 make O="$B" imx_v8_adv_defconfig
+nice -10 ionice -c 3 make O="$B"
diff --git a/build_optee.sh b/build_optee.sh
index f4461e1..64fe4f4 100755
--- a/build_optee.sh
+++ b/build_optee.sh
@@ -6,14 +6,17 @@ export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export CROSS_COMPILE64=aarch64-linux-gnu-
-#make PLATFORM=imx PLATFORM_FLAVOR=mx8mpevk O=build.mx8mpevk \
-# CFG_TEE_CORE_LOG_LEVEL=4 \
-# CFG_TEE_TA_LOG_LEVEL=4 \
-# CFG_TEE_CORE_DEBUG=y \
-# CFG_DEBUG_INFO=y
+make PLATFORM=imx PLATFORM_FLAVOR=mx8mp_rsb3720 O=build.mx8mpevk \
+ CFG_TEE_CORE_LOG_LEVEL=2 \
+ CFG_TEE_TA_LOG_LEVEL=2 \
+ CFG_TEE_CORE_DEBUG=y \
+ CFG_DEBUG_INFO=y \
+ CFG_DT_ADDR=0x52000000 \
+ CFG_EXTERNAL_DTB_OVERLAY=y \
+ CFG_DT=y
-env CFG_TEE_CORE_LOG_LEVEL=2 \
- CFG_DT_ADDR=0x52000000 \
- CFG_EXTERNAL_DTB_OVERLAY=y \
- CFG_DT=y \
- ./scripts/nxp_build.sh mx8mpevk
+#env CFG_TEE_CORE_LOG_LEVEL=2 \
+# CFG_DT_ADDR=0x52000000 \
+# CFG_EXTERNAL_DTB_OVERLAY=y \
+# CFG_DT=y \
+# ./scripts/nxp_build.sh mx8mpevk
diff --git a/build_uboot.sh b/build_uboot.sh
index 3101149..9dfce0a 100755
--- a/build_uboot.sh
+++ b/build_uboot.sh
@@ -15,7 +15,6 @@ export CROSS_COMPILE=aarch64-linux-gnu-
make O="$B" imx8mp_rsb3720a1_6G_defconfig
cat <<EOF > "${B}"/extraconfig
-CONFIG_FASTBOOT_FLASH_MMC_DEV=2
CONFIG_USB_XHCI_IMX8M=y
EOF
./scripts/kconfig/merge_config.sh -O ${B} ${B}/.config ${B}/extraconfig
diff --git a/docs/rsb3720_fedora_iot_installer.md b/docs/rsb3720_fedora_iot_installer.md
new file mode 100644
index 0000000..a4e1e38
--- /dev/null
+++ b/docs/rsb3720_fedora_iot_installer.md
@@ -0,0 +1,13 @@
+advantech rsb-3720 Fedora IoT installer Documents
+=================================================
+
+The pre-built image can be found on
+https://drive.google.com/file/d/19x1Dxw4ujrATU_3IehmkemeqOEg3Xh2g/view?usp=sharing
+
+We replaced the kernel image with vendor's one and also put the dtb onto it.
+
+The vendor kernel can be downloaded from
+git://github.com/ADVANTECH-Corp/linux-imx.git
+The branch is adv_5.4.70_2.3.0
+
+To build the kernel please run build_linux.sh inside the kernel directory.
diff --git a/download_everything.sh b/download_everything.sh
index 52fce50..fb8b80f 100755
--- a/download_everything.sh
+++ b/download_everything.sh
@@ -1,9 +1,8 @@
#!/bin/sh
# OPTEE
-git clone https://source.codeaurora.org/external/imx/imx-optee-os
-git -C imx-optee-os checkout origin/imx_5.4.70_2.3.0 -b linaro-rsb3720
-sed "s/UART2_BASE/UART3_BASE/" -i imx-optee-os/core/arch/arm/plat-imx/conf.mk
+git clone https://git.linaro.org/people/paul.liu/systemready/optee_os.git
+git -C optee_os checkout paulliu-rsb3720
# TF-A
git clone https://git.linaro.org/people/paul.liu/systemready/trusted-firmware-a.git