Skip to content
Snippets Groups Projects
Commit 17eca1c0 authored by Natalia Kovalenko's avatar Natalia Kovalenko
Browse files

initial commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 807 additions and 0 deletions
# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
#
# This bbclass is extremely hacky, should be replaced by something like:
# https://patchwork.openembedded.org/patch/154265/
#
def undo_allarch_inherit(d):
val = d.getVar('__inherit_cache', False) or []
deps = (d.getVar('__depends', False) or [])
f = os.path.join('classes', 'allarch.bbclass')
for v in val:
if v.endswith(f):
val.remove(v)
d.setVar('__inherit_cache', val)
new_deps = []
for v in deps:
if not v[0].endswith(f):
new_deps.append(v)
d.setVar('__depends', new_deps)
return ''
inherit ${@oe.utils.ifelse(d.getVar('MULTILIB_VARIANTS'), undo_allarch_inherit(d), 'allarch-core')}
# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
CURDIR := "${THISDIR}/"
PATCHPATH ?= "${@d.getVar('CURDIR') + d.getVar('BPN') + '_' + d.getVar('PV')}"
python () {
dir = d.getVar('PATCHPATH') or ''
if not os.path.isdir(dir):
return
bb.parse.mark_dependency(d, dir)
files = os.listdir(dir)
files.sort()
for file in files:
if file.endswith('.patch'):
d.appendVar('SRC_URI', ' file://' + dir + '/' + file)
bb.debug(2, 'Adding patch: ' + file + ' for ' + dir)
}
# Copyright (C) 2020, Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
BB_FILE := "${FILE}"
python () {
import glob
import subprocess
if d.getVar('FREEZE_REV') != '1':
return
if d.getVar('PN').startswith('nativesdk'):
return
file = d.getVar('BB_FILE')
fetcher = bb.fetch2.Fetch(d.getVar('SRC_URI').split(), d)
urldata = fetcher.ud
for u in urldata:
if not urldata[u].method.supports_srcrev():
continue
ud = urldata[u]
for name in ud.names:
autoinc, rev = getattr(ud.method, 'sortable_revision')(ud, d, name)
var = 'SRCREV'
if name != 'default':
var += '_' + name
cmd = 'sed -i "/\<%s\>/s/=.*/= \\"%s\\"/" %s' % (var, rev, file)
subprocess.call(cmd, shell=True)
bb.debug(2, 'Freezing %s to %s in %s' % (var, rev, file))
}
# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
#
# Convert packages to multilib packages
python () {
pkgs = d.getVar('PACKAGE_INSTALL')
if pkgs is None:
return
multilib_pkgs = ''
for pkg in pkgs.split():
multilib_pkgs = multilib_pkgs + " " + multilib_pkg_extend(d, pkg)
if bb.utils.contains('IMAGE_FEATURES', 'multilib-standalone', True, False, d):
pkgs = ' '.join(set(multilib_pkgs.split()).difference(set(pkgs.split())))
d.setVar('PACKAGE_INSTALL', pkgs)
}
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "seco-rockchip"
BBFILE_PATTERN_seco-rockchip := "^${LAYERDIR}/"
BBFILE_PRIORITY_seco-rockchip = "9"
RKBASE = '${@os.path.normpath("${LAYERDIR}")}'
BB_HASHBASE_WHITELIST:append = " RKBASE"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/licenses"
LAYERDEPENDS_seco-rockchip = "core openembedded-layer"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_seco-rockchip = "1"
LAYERSERIES_COMPAT_seco-rockchip = "dunfell honister"
# Copyright (c) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
SOC_FAMILY ?= "px30"
require conf/machine/include/rockchip-arm64-common.inc
MALI_GPU := "bifrost-g31"
MALI_VERSION := "rxp0"
IMAGE_FSTYPES += "wic.bmap"
BOOT_DEV ?= "emmc"
IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}-${BOOT_DEV}"
# Copyright (c) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
require conf/machine/include/rockchip-common.inc
include conf/machine/include/arm/arch-armv8.inc
include conf/machine/include/arm/arch-armv8a.inc
SERIAL_CONSOLES = "115200;ttyFIQ0"
RK_USE_COMPRESSED_KERNEL = "0"
RK_TRUST_INI = "${@d.getVar('SOC_FAMILY').upper() + 'TRUST.ini'}"
# Copyright (c) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
require conf/machine/include/soc-family.inc
MACHINE_EXTRA_RRECOMMENDS:append = " \
${RK_WIFIBT_FIRMWARES} \
kernel-modules \
"
SERIAL_CONSOLES ?= "115200;ttyFIQ0"
KERNEL_IMAGETYPE ?= "Image"
MACHINEOVERRIDES .= ":rockchip"
# Firmware
MACHINE_FIRMWARE ?= ""
MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE}"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-seco"
PREFERRED_VERSION_u-boot-toradex = "2017.09%"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-seco"
PREFERRED_VERSION_linux-seco ?= "4.4%"
LINUXLIBCVERSION ?= "4.4%"
# Custom kernel might not support newest python
PACKAGECONFIG:remove:pn-perf = " scripting"
PREFERRED_PROVIDER_virtual/egl ?= "rockchip-libmali"
PREFERRED_PROVIDER_virtual/libgles1 ?= "rockchip-libmali"
PREFERRED_PROVIDER_virtual/libgles2 ?= "rockchip-libmali"
PREFERRED_PROVIDER_virtual/libgles3 ?= "rockchip-libmali"
PREFERRED_PROVIDER_virtual/libopencl ?= "rockchip-libmali"
PREFERRED_PROVIDER_virtual/libgbm ?= "rockchip-libmali"
PACKAGECONFIG:pn-wayland ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'no-egl', '', d)}"
DEPENDS:append:pn-mesa-gl = " rockchip-libmali"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
PREFERRED_RPROVIDER_lib32-initd-functions = "lib32-initscripts"
export RK_ROOTDEV_UUID ?= "614e0000-0000-4b53-8000-1d28000054a9"
export RK_PARTITION_GROW ?= "1"
RK_USE_COMPRESSED_KERNEL ?= "1"
RDEPENDS:${KERNEL_PACKAGE_NAME}-base = ""
RK_MINILOADER_INI ?= "${@d.getVar('SOC_FAMILY').upper() + 'MINIALL.ini'}"
RK_TRUST_INI ?= "${@d.getVar('SOC_FAMILY').upper() + 'TOS.ini'}"
RK_IGNORE_BL32 ?= "0"
# loader's size(K) and backup num
RK_LOADER_SIZE ?= "1024"
RK_LOADER_BACKUP_NUM ?= "4"
IMAGE_FSTYPES:remove = "iso live"
export RK_ROOTFS_TYPE ?= "ext4"
IMAGE_FSTYPES:append = " ${RK_ROOTFS_TYPE} wic"
WKS_FILE ?= "gptdisk.wks.in"
# Some partitons, e.g. trust, are allowed to be optional.
do_image_wic[depends] += " \
virtual/kernel:do_deploy \
virtual/bootloader:do_deploy \
"
IMAGE_BOOT_FILES ?= " \
${KERNEL_IMAGETYPE} \
${IMG_KERNEL_DEVICETREE} \
"
RK_POST_ROOTFS_SCRIPTS ?= ""
RK_OVERLAY_DIRS ?= ""
BB_HASHBASE_WHITELIST:append = " RK_POST_ROOTFS_SCRIPTS RK_OVERLAY_DIRS"
# <fslabel:mountpoint> e.g. "oem:/oem userdata:/userdata"
RK_EXTRA_VOLUMES ?= ""
ROOTFS_POSTPROCESS_COMMAND:append = " do_post_rootfs;"
do_rootfs[depends] += "rsync-native:do_populate_sysroot"
do_post_rootfs() {
for volume in ${RK_EXTRA_VOLUMES};do
echo "Creating ${volume##*:} for ${volume%:*}(fslabel)..."
mkdir -p "${IMAGE_ROOTFS}${volume##*:}"
echo "PARTLABEL=${volume%:*}\t${volume##*:}\tauto defaults 0 2" \
>> "${IMAGE_ROOTFS}/etc/fstab"
done
for overlay in ${RK_OVERLAY_DIRS};do
[ -d "${overlay}" ] || continue
echo "Installing overlay: ${overlay}..."
rsync -av --chmod=u=rwX,go=rX "${overlay}/" "${IMAGE_ROOTFS}"
done
for script in ${RK_POST_ROOTFS_SCRIPTS};do
[ -f "${script}" ] || continue
echo "Running script: ${script}..."
cd "${script%/*}"
"${script}" "${IMAGE_ROOTFS}"
done
}
IMAGE_POSTPROCESS_COMMAND:append = " link_rootfs_image;"
link_rootfs_image() {
ln -sf "${IMAGE_LINK_NAME}.${RK_ROOTFS_TYPE}" \
"${IMGDEPLOYDIR}/rootfs.img"
}
IMAGE_POSTPROCESS_COMMAND:append = " gen_rkparameter;"
gen_rkparameter() {
IMAGE="${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.wic"
if [ ! -f "${IMAGE}" ];then
echo "${IMAGE} not found."
return
fi
cd "${IMGDEPLOYDIR}"
OUT="${IMAGE_LINK_NAME}.parameter"
ln -sf "${OUT}" parameter
echo "Generating ${OUT}..."
echo "# IMAGE_NAME: $(readlink ${IMAGE})" > "${OUT}"
echo "FIRMWARE_VER: 1.0" >> "${OUT}"
echo "TYPE: GPT" >> "${OUT}"
echo -n "CMDLINE: mtdparts=rk29xxnand:" >> "${OUT}"
sgdisk -p "${IMAGE}" | grep -E "^ +[0-9]" | while read line;do
NAME=$(echo ${line} | cut -f 7 -d ' ')
START=$(echo ${line} | cut -f 2 -d ' ')
END=$(echo ${line} | cut -f 3 -d ' ')
SIZE=$(expr ${END} - ${START} + 1)
printf "0x%08x@0x%08x(%s)," ${SIZE} ${START} ${NAME} >> "${OUT}"
done
echo >> "${OUT}"
if [ "$RK_PARTITION_GROW" = "1" ];then
sed -i "s/[^,]*\(@[^,]*\)),$/-\1:grow)/" "${OUT}"
fi
echo "uuid: rootfs=${RK_ROOTDEV_UUID}" >> "${OUT}"
}
IMAGE_POSTPROCESS_COMMAND:append = " link_latest_image;"
link_latest_image() {
rm -rf "${TOPDIR}/latest"
ln -sf "${DEPLOY_DIR_IMAGE}" "${TOPDIR}/latest"
}
#@TYPE: Machine
#@NAME: SECO SBC-D23
#@SOC: PX30
#@DESCRIPTION: Machine configuration for Seco Single Board Computer D23 based on Rockchip PX30 Applications Processors
require conf/machine/include/px30.inc
KBUILD_DEFCONFIG = "seco_px30_d23-linux_defconfig"
KERNEL_DEVICETREE = " \
seco/seco-px30-d23-revc-hdmi.dtb \
seco/seco-px30-d23-revc-lvds.dtb \
seco/seco-px30-d23-revc-lvds-800x480.dtb \
seco/seco-px30-d23-revc-hdmi-lvds-1280x800.dtb \
seco/seco-px30-d23-revc-hdmi-lvds.dtb \
seco/seco-px30-d23-revc-lvds-1024x600.dtb \
seco/seco-px30-d23-revc-lvds-1280x800.dtb \
"
IMG_KERNEL_DEVICETREE = " \
seco-px30-d23-revc-hdmi.dtb \
seco-px30-d23-revc-lvds.dtb \
seco-px30-d23-revc-lvds-800x480.dtb \
seco-px30-d23-revc-hdmi-lvds-1280x800.dtb \
seco-px30-d23-revc-hdmi-lvds.dtb \
seco-px30-d23-revc-lvds-1024x600.dtb \
seco-px30-d23-revc-lvds-1280x800.dtb \
"
IMAGE_BOOT_FILES += "uEnvD23.txt"
UBOOT_MACHINE = "seco_px30_d23_defconfig"
RK_WIFIBT_FIRMWARES = " "
MACHINE_FIRMWARE:append = " linux-firmware-bcm43455"
DISTRO_FEATURES:append = " wifi"
MACHINE_EXTRA_RRECOMMENDS:append = " \
linux-firmware-rk-cdndp \
rockchip-libmali \
kernel-modules \
lte-modem \
"
BOOT_DEV = "usbdisk"
WKS_FILE = "usbdisk.wks.in"
Copyright (c) 2020, Rockchip Electronics Co.Ltd
All rights reserved.
Redistribution. Redistribution and use in binary form, without
modification, are permitted provided that the following conditions are
met:
* Redistributions must reproduce the above copyright notice and the
following disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of Rockchip Electronics Co.Ltd, its products
nor the names of its suppliers may be used to endorse or promote products
derived from this Software without specific prior written permission.
* No reverse engineering, decompilation, or disassembly of this software
is permitted.
Limited patent license. Rockchip Electronics Co.Ltd grants a world-wide,
royalty-free, non-exclusive license under patents it now or hereafter
owns or controls to make, have made, use, import, offer to sell and
sell ("Utilize") this software, but solely to the extent that any
such patent is necessary to Utilize the software alone, or in
combination with an operating system licensed under an approved Open
Source license as listed by the Open Source Initiative at
http://opensource.org/licenses. The patent license shall not apply to
any other combinations which include this software. No hardware per
se is licensed hereunder.
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
inherit freeze-rev deploy native
DESCRIPTION = "Rockchip binary tools"
LICENSE = "LICENSE.rockchip"
LIC_FILES_CHKSUM = "file://${RKBASE}/licenses/LICENSE.rockchip;md5=d63890e209bf038f44e708bbb13e4ed9"
SRC_URI = " \
git://github.com/JeffyCN/mirrors.git;protocol=https;branch=rkbin;name=rkbin \
git://github.com/JeffyCN/mirrors.git;protocol=https;branch=tools;name=tools;destsuffix=git/extra \
"
PV:append = "+git${SRCPV}"
SRCREV_rkbin = "750302a720d6074ead976a8822ed38c7bdd341bf"
SRCREV_tools = "3009c707fdef358230b0d672dc19df8164c2e595"
SRCREV_FORMAT ?= "rkbin_tools"
S = "${WORKDIR}/git"
INSANE_SKIP:${PN} = "already-stripped"
# The pre-built tools have different link loader, don't change them.
UNINATIVE_LOADER := ""
do_install () {
install -d ${D}/${bindir}
cd ${S}/tools
install -m 0755 boot_merger ${D}/${bindir}
install -m 0755 trust_merger ${D}/${bindir}
install -m 0755 firmwareMerger ${D}/${bindir}
install -m 0755 kernelimage ${D}/${bindir}
install -m 0755 loaderimage ${D}/${bindir}
install -m 0755 mkkrnlimg ${D}/${bindir}
install -m 0755 resource_tool ${D}/${bindir}
install -m 0755 upgrade_tool ${D}/${bindir}
cd ${S}/extra/linux/Linux_Pack_Firmware/rockdev
install -m 0755 afptool ${D}/${bindir}
install -m 0755 rkImageMaker ${D}/${bindir}
}
NATIVE_TOOLS = "boot_merger trust_merger firmwareMerger loaderimage mkkrnlimg resource_tool upgrade_tool"
NATIVE_EXTRA_TOOLS = "afptool rkImageMaker"
addtask deploy before do_build after do_compile
do_deploy () {
cd ${S}/tools
if [ ! -e ${DEPLOY_DIR_IMAGE}/rk_tools ]; then
install -d ${DEPLOY_DIR_IMAGE}/rk_tools
fi
for binary in "${NATIVE_TOOLS}"; do
if [[ ! -e ${DEPLOY_DIR_IMAGE}/rk_tools/${binary} ]]; then
install -m 0755 ${binary} ${DEPLOY_DIR_IMAGE}/rk_tools
fi
done
cd ${S}/extra/linux/Linux_Pack_Firmware/rockdev
for binary in "${NATIVE_EXTRA_TOOLS}"; do
if [[ ! -e ${DEPLOY_DIR_IMAGE}/rk_tools/${binary} ]]; then
install -m 0755 ${binary} ${DEPLOY_DIR_IMAGE}/rk_tools
fi
done
}
DESCRIPTION = "U-Boot suppporting SECO boards based on Rockchip application processors"
PV = "2017.09+git${SRCPV}"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
DEPENDS:append = " rk-binary-native coreutils-native flex-native bison-native dtc-native"
UBOOT_SRC ?= "git://git.seco.com/pub/rockchip/u-boot-seco-rk2017.09.git;"
PROTOCOL ?= "protocol=ssh;"
SRCBRANCH = "develop"
SRCREV = "a0e34c8b7a41b1121b0a4275fd020a69419cbe12"
SRC_URI = "${UBOOT_SRC}branch=${SRCBRANCH};${PROTOCOL}"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
do_configure[cleandirs] = "${B}"
PE = "1"
# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
# Released under the MIT license (see COPYING.MIT for the terms)
require u-boot-seco-common.inc
require recipes-bsp/u-boot/u-boot.inc
inherit auto-patch
PATCHPATH = "${CURDIR}/u-boot"
inherit python3-dir
FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:"
inherit freeze-rev
# When updating this revision, be careful, as not all binaries are suitable.
# tested binary is px30_loader_v1.11.115.bin. (combination of FlashData=bin/rk33/px30_ddr_333MHz_v1.11.bin and FlashBoot=bin/rk33/px30_miniloader_v1.15.bin)
# see file PX30MINIALL.ini
SRCREV_rkbin = "fd4e26d31c5f8f34709ccae7b58afa05824de0cd"
SRC_URI += " \
git://github.com/JeffyCN/mirrors.git;protocol=https;branch=rkbin;name=rkbin;destsuffix=rkbin; \
file://flash_d23.sh \
file://uEnvD23.txt \
"
SRC_URI:remove = "file://0001-riscv32-Use-double-float-ABI-for-rv32.patch"
SRC_URI:remove = "file://0001-riscv-fix-build-with-binutils-2.38.patch"
SRCREV_FORMAT = "default_rkbin"
DEPENDS:append = " ${PYTHON_PN}-native"
# Needed for packing BSP u-boot
DEPENDS:append = " coreutils-native ${PYTHON_PN}-pyelftools-native"
do_configure:prepend() {
# Make sure we use /usr/bin/env ${PYTHON_PN} for scripts
for s in `grep -rIl python ${S}`; do
sed -i -e '1s|^#!.*python[23]*|#!/usr/bin/env ${PYTHON_PN}|' $s
done
# Support python3
sed -i -e 's/\(open(.*[^"]\))/\1, "rb")/' -e 's/,$//' \
-e 's/print >> \([^,]*\), *\(.*\)$/print(\2, file=\1)/' \
-e 's/print \(.*\)$/print(\1)/' \
${S}/arch/arm/mach-rockchip/make_fit_atf.py
# Remove unneeded stages from make.sh
#sed -i -e '/^select_tool/d' -e '/^clean/d' -e '/^\t*make/d' ${S}/make.sh
sed -i -e '650,710{/select_tool/d;}' -e '/^clean/d' -e '/^\t*make/d' ${S}/make.sh
if [ "x${RK_ALLOW_PREBUILT_UBOOT}" = "x1" ]; then
# Copy prebuilt images
if [ -e "${S}/${UBOOT_BINARY}" ]; then
bbnote "${PN}: Found prebuilt images."
mkdir -p ${B}/prebuilt/
mv ${S}/*.bin ${S}/*.img ${B}/prebuilt/
fi
fi
[ -e "${S}/.config" ] && make -C ${S} mrproper
}
# Generate Rockchip style loader binaries
RK_IDBLOCK_IMG = "idblock.img"
RK_LOADER_BIN = "loader.bin"
RK_TRUST_IMG = "trust.img"
UBOOT_BINARY = "uboot.img"
do_compile:append() {
cd ${B}
if [ -e "${B}/prebuilt/${UBOOT_BINARY}" ]; then
bbnote "${PN}: Using prebuilt images."
ln -sf ${B}/prebuilt/*.bin ${B}/prebuilt/*.img ${B}/
else
# Prepare needed files
for d in make.sh scripts configs arch/arm/mach-rockchip; do
cp -rT ${S}/${d} ${d}
done
# Pack rockchip loader images
./make.sh
fi
ln -sf *_loader*.bin "${RK_LOADER_BIN}"
# Generate idblock image
bbnote "${PN}: Generating ${RK_IDBLOCK_IMG} from ${RK_LOADER_BIN}"
./tools/boot_merger --unpack "${RK_LOADER_BIN}"
if [ -f FlashHead ];then
cat FlashHead FlashData > "${RK_IDBLOCK_IMG}"
else
./tools/mkimage -n "${SOC_FAMILY}" -T rksd -d FlashData \
"${RK_IDBLOCK_IMG}"
fi
cat FlashBoot >> "${RK_IDBLOCK_IMG}"
}
do_deploy:append() {
cd ${B}
for binary in "${RK_IDBLOCK_IMG}" "${RK_LOADER_BIN}" "${RK_TRUST_IMG}";do
[ -f "${binary}" ] || continue
install "${binary}" "${DEPLOYDIR}/${binary}-${PV}"
ln -sf "${binary}-${PV}" "${DEPLOYDIR}/${binary}"
done
install -m 0755 *_loader*.bin ${DEPLOY_DIR_IMAGE}
install -m 0755 ${WORKDIR}/rkbin/tools/upgrade_tool ${DEPLOY_DIR_IMAGE}
install -m 0755 ${WORKDIR}/flash_d23.sh ${DEPLOY_DIR_IMAGE}
install -m 0755 ${WORKDIR}/uEnvD23.txt ${DEPLOY_DIR_IMAGE}
}
From 193addb12b5d131673720f16b523fec0cfbd0b67 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan.agner@toradex.com>
Date: Tue, 14 Nov 2017 15:47:18 +0100
Subject: [PATCH 1/6] envtools: make sure version/timestamp header file are
available
With commit 84d46e7e8948 ("tools: env: allow to print U-Boot version")
the fw_env utilities need the version.h header file. Building only
the envtools in a pristine build directory will fail due to missing
header files.
Make sure the header files are a dependency of the envtools target.
Fixes: 84d46e7e8948 ("tools: env: allow to print U-Boot version")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit ded84f90a1066eef5f34daa4539273de64f7b811)
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index de68fa12be..17fde7b4aa 100644
--- a/Makefile
+++ b/Makefile
@@ -1467,7 +1467,7 @@ checkarmreloc: u-boot
false; \
fi
-envtools: scripts_basic
+envtools: scripts_basic $(version_h) $(timestamp_h)
$(Q)$(MAKE) $(build)=tools/env
sysdatatools: scripts_basic
--
2.20.1
diff --git a/tools/rkcommon.c b/tools/rkcommon.c
index af2a4835f6..5979a62569 100644
--- a/tools/rkcommon.c
+++ b/tools/rkcommon.c
@@ -78,7 +78,7 @@ static struct spl_info spl_infos[] = {
{ "rk3328", "RK32", 0x8000 - 0x1000, false },
{ "rk3368", "RK33", 0x8000 - 0x1000, false },
{ "rk3399", "RK33", 0x30000 - 0x2000, false },
- { "px30", "RK33", 0x2800, false },
+ { "px30", "RK33", 0x40000, false },
{ "rv1108", "RK11", 0x1800, false },
{ "rk1808", "RK18", 0x200000 - 0x2000, false},
};
From fcd16637970338ed3618c0ae971e38faf9a28bfe Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Tue, 2 Apr 2019 13:51:25 +0800
Subject: [PATCH 3/6] rockchip: vendor: Fix maybe-uninitialized
arch/arm/mach-rockchip/vendor.c:663:6 error: 'item_num' may be used uninitialized in this function [-Werror=maybe-uninitialized]
ret = vendor_storage_write(id, buffer, size);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: Ie80c345f6b8008fd4b46ba54788a6ac10d94e4f1
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
arch/arm/mach-rockchip/vendor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/vendor.c b/arch/arm/mach-rockchip/vendor.c
index d6703fb9b4..853585fd3c 100644
--- a/arch/arm/mach-rockchip/vendor.c
+++ b/arch/arm/mach-rockchip/vendor.c
@@ -593,7 +593,9 @@ int vendor_storage_test(void)
size = total_size/item_num;
break;
default:
- total_size = 0;
+ item_num = 0;
+ total_size = 0;
+ size = 0;
break;
}
/* Invalid bootdev? */
--
2.20.1
From ae86322b23aef2e4de6abdc1b220c6b56f38bcc8 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Tue, 22 Oct 2019 10:12:55 +0800
Subject: [PATCH] Revert "Makefile: enable -Werror option"
This reverts commit 76ba1d8a713bc964fc8e0a639f90344c4c60f026.
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 15ec80612b..c39e599a99 100644
--- a/Makefile
+++ b/Makefile
@@ -360,7 +360,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
-Wno-format-security \
-fno-builtin -ffreestanding
-KBUILD_CFLAGS += -fshort-wchar -Werror
+KBUILD_CFLAGS += -fshort-wchar
KBUILD_AFLAGS := -D__ASSEMBLY__
# Read UBOOTRELEASE from include/config/uboot.release (if it exists)
--
2.20.1
From da62a3139226e3889ed6a08a03084d88a36635f7 Mon Sep 17 00:00:00 2001
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Sun, 3 Sep 2017 08:17:46 +0200
Subject: [PATCH 5/6] scripts/Makefile.lib: remove overridden target
$(obj)/helloworld.so:
The target
$(obj)/helloworld.so:
exists twice in Makefile.lib.
If you add an echo command to each of the two recipes you get
warnings like:
scripts/Makefile.lib:383: warning:
overriding recipe for target 'drivers/power/battery/helloworld.so'
scripts/Makefile.lib:379: warning:
ignoring old recipe for target 'drivers/power/battery/helloworld.so'
This patch removes the obsolete target.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
(cherry picked from commit d6507e6fd9e0a6f1a8dd28c18cd320c1f861269e)
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Change-Id: I6b9557fab36be314c7fda3988db6c80e8e1e0e92
---
scripts/Makefile.lib | 2 --
1 file changed, 2 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 12d1123a07..8d5ca02c14 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -392,8 +392,6 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
-$(obj)/helloworld.so: $(EFI_LDS_PATH)
-
$(obj)/helloworld.so: $(obj)/helloworld.o arch/$(ARCH)/lib/$(EFI_CRT0) \
arch/$(ARCH)/lib/$(EFI_RELOC)
$(call cmd,efi_ld)
--
2.20.1
From 990c1d4c7db317fc19ce3da19525aeac2de0da37 Mon Sep 17 00:00:00 2001
From: Stefano Babic <sbabic@denx.de>
Date: Wed, 13 Mar 2019 09:46:45 +0100
Subject: [PATCH 6/6] Add target to generate initial environment
The initial environment is linked to the u-boot binary. Modifying the
environment from User Space with the env tools requires that the tools
are always built together with the bootloader to be sure that they
contain the initial environment in case no environment is stored into
persistent storage or when a board boots with just the default
environment. This makes difficult for distros to provide a general
package to access the environment. A simpler way is if the tools are
generic for all boards and a configuration file is given to provide the
initial environment.
The patch just generates the initial environment by extracting it from
the compiled object. This file can then be used for tools in user space
to initialize the environment.
Signed-off-by: Stefano Babic <sbabic@denx.de>
(cherry picked from commit bdaa73a5b3923257add182b4ab8058dbfa33421b)
Change-Id: I0968346510f814a12cb357c40c7785473a7aabfc
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Makefile | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Makefile b/Makefile
index 85bcd0c800..cbadc21da3 100644
--- a/Makefile
+++ b/Makefile
@@ -1698,6 +1698,13 @@ endif
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+quiet_cmd_genenv = GENENV $@
+cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
+ sed --in-place -e 's/\x00/\x0A/g' $@
+
+u-boot-initial-env: u-boot.bin
+ $(call if_changed,genenv)
+
# FIXME Should go into a make.lib or something
# ===========================================================================
--
2.20.1
#!/bin/bash
./upgrade_tool UL px30_loader_v1.11.115.bin
./upgrade_tool DI -u uboot.img
./upgrade_tool DI -t trust.img
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment