Skip to content
Snippets Groups Projects
Commit d4bc4b5f authored by Tobias Kahlki's avatar Tobias Kahlki
Browse files

bsp:tools: Added memtool from imx-test

Added an extracted version of the memtool for reading/writing registers
of i.MX SoCs.
parent 2be00ac1
No related branches found
No related tags found
1 merge request!342bsp:tools: Added memtool from imx-test
# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright (C) 2017-2022 NXP
SUMMARY = "i.MX Register Manipulation Tool"
DESCRIPTION = "Tool to manipulate (read/write) the registers of \
i.MX SoCs (taken from the imx-test package)"
SECTION = "base"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
PE = "1"
PV = "7.0+${SRCPV}"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI = " \
git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \
file://0001-Add-compile-install-and-clean-to-memtool.patch \
"
SRCBRANCH = "lf-5.15.32_2.0.0"
SRCREV = "c640c7e8456b0516851e76adb2acce6b3866b1fb"
S = "${WORKDIR}/git/test/memtool"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PARALLEL_MAKE = "-j 1"
EXTRA_OEMAKE += "${PACKAGECONFIG_CONFARGS}"
do_compile() {
CFLAGS="${TOOLCHAIN_OPTIONS}"
oe_runmake V=1 VERBOSE='' \
CROSS_COMPILE=${TARGET_PREFIX} \
INC="-I${S}" \
CC="${CC} -L${STAGING_LIBDIR} ${LDFLAGS}" \
SDKTARGETSYSROOT=${STAGING_DIR_HOST} \
LINUXPATH=${STAGING_KERNEL_DIR} \
KBUILD_OUTPUT=${STAGING_KERNEL_BUILDDIR}
}
do_install() {
oe_runmake DESTDIR=${D}/${sbindir} \
install
}
FILES:${PN} += "${sbindir}"
From 2e30af873f4853d0cfbf2ec6884c5ee8cb7c83fe Mon Sep 17 00:00:00 2001
From: Tobias Poganiuch <tobias.poganiuch@seco.com>
Date: Thu, 19 Jan 2023 13:58:10 +0100
Subject: [PATCH] Add compile, install and clean to memtool
---
Makefile | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/Makefile b/Makefile
index 3210a29..c488958 100644
--- a/Makefile
+++ b/Makefile
@@ -3,3 +3,19 @@ memtool = memtool.o mx6dl_modules.o mx6q_modules.o mx6sl_modules.o \
mx6sx_modules.o mx6ul_modules.o mx7d_modules.o mx6ull_modules.o \
mx7ulp_modules.o mx8mq_modules.o
CFLAGS = -Os
+
+all: memtool
+
+memtool: $(memtool)
+ @echo "MAKE imx-memtool"
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+install:
+ @echo "INSTALL imx-memtool"
+ mkdir -p $(DESTDIR)
+ cp memtool $(DESTDIR)
+
+clean:
+ @echo "CLEAN imx-memtool"
+ rm -f memtool *.o *~ *.bak
+
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