initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 1af7bc09451e0b779f7bfb0dcc58ffb3abe9c584 Mon Sep 17 00:00:00 2001
|
||||
From: Gary Bisson <bisson.gary@gmail.com>
|
||||
Date: Tue, 11 Feb 2020 15:30:12 +0100
|
||||
Subject: [PATCH] lnx_def.h: fix conflicting declaration of __time64_t
|
||||
|
||||
Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
|
||||
---
|
||||
MfgToolLib/lnx_def.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/MfgToolLib/lnx_def.h b/MfgToolLib/lnx_def.h
|
||||
index c6869dd..a38bb99 100644
|
||||
--- a/MfgToolLib/lnx_def.h
|
||||
+++ b/MfgToolLib/lnx_def.h
|
||||
@@ -124,7 +124,9 @@ typedef unsigned long * ULONG_PTR;
|
||||
typedef char * LPOLESTR;
|
||||
typedef void * HDEVINFO;
|
||||
typedef unsigned long long ULONGLONG;
|
||||
+#ifndef __time64_t
|
||||
typedef long long __time64_t;
|
||||
+#endif
|
||||
typedef long long __int64;
|
||||
typedef unsigned long DWORD_PTR;
|
||||
typedef unsigned int UINT;
|
||||
--
|
||||
2.25.0
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
config BR2_PACKAGE_HOST_MFGTOOLS
|
||||
bool "host mfgtools"
|
||||
depends on BR2_arm
|
||||
depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-libusb
|
||||
help
|
||||
This package contains the Freescale manufacturing tool.
|
||||
It is designed to program firmware to i.MX boards during
|
||||
production. The communication is done over USB using the
|
||||
Freescale UTP protocol.
|
||||
|
||||
https://github.com/codeauroraforum/mfgtools
|
||||
|
||||
comment "host mfgtools needs a toolchain w/ host gcc >= 4.9"
|
||||
depends on BR2_arm
|
||||
depends on !BR2_HOST_GCC_AT_LEAST_4_9
|
||||
@@ -0,0 +1,4 @@
|
||||
# locally computed
|
||||
sha256 055d71227d18883d6e8bc9e854c076015f9a7749820a94272e19071bf0b25c89 mfgtools-0.02.tar.gz
|
||||
sha256 2655559a6bb1179eae514f5c7166f4ede4f2453efa9cf4dc3c045cab5d57dede LICENSE
|
||||
sha256 0963b6e5086bf454265b0f57821a02b681d1211e40ad74c310231cb4d94815c9 README.txt
|
||||
@@ -0,0 +1,34 @@
|
||||
################################################################################
|
||||
#
|
||||
# mfgtools
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MFGTOOLS_VERSION = 0.02
|
||||
MFGTOOLS_SITE = $(call github,codeauroraforum,mfgtools,v$(MFGTOOLS_VERSION))
|
||||
MFGTOOLS_SUBDIR = MfgToolLib
|
||||
MFGTOOLS_LICENSE = BSD-3-Clause or CPOL
|
||||
MFGTOOLS_LICENSE_FILES = LICENSE README.txt
|
||||
HOST_MFGTOOLS_DEPENDENCIES = host-libusb
|
||||
|
||||
HOST_MFGTOOLS_CFLAGS = \
|
||||
$(HOST_CFLAGS) $(HOST_LDFLAGS) -std=c++11 -lpthread \
|
||||
-L$(@D)/MfgToolLib -lMfgToolLib -I$(@D)/MfgToolLib \
|
||||
-lusb-1.0 -I$(HOST_DIR)/include/libusb-1.0 \
|
||||
-fpermissive -Wno-write-strings
|
||||
|
||||
define HOST_MFGTOOLS_CLI_BUILD
|
||||
$(HOST_CONFIGURE_OPTS) $(MAKE) CC="$(HOSTCXX)" \
|
||||
CFLAGS="$(HOST_MFGTOOLS_CFLAGS)" -C $(@D)/TestPrgm
|
||||
endef
|
||||
|
||||
HOST_MFGTOOLS_POST_BUILD_HOOKS += HOST_MFGTOOLS_CLI_BUILD
|
||||
|
||||
define HOST_MFGTOOLS_INSTALL_CMDS
|
||||
$(INSTALL) -D -m 755 $(@D)/MfgToolLib/libMfgToolLib.so \
|
||||
$(HOST_DIR)/lib/libMfgToolLib.so
|
||||
$(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli \
|
||||
$(HOST_DIR)/bin/mfgtoolcli
|
||||
endef
|
||||
|
||||
$(eval $(host-cmake-package))
|
||||
@@ -0,0 +1,69 @@
|
||||
MfgTools Howto
|
||||
==============
|
||||
|
||||
1. Build your mfgtool image
|
||||
|
||||
Make sure to enable the following Buildroot options:
|
||||
|
||||
BR2_PACKAGE_FREESCALE_IMX=y
|
||||
BR2_PACKAGE_IMX_UUC=y
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
BR2_TARGET_ROOTFS_CPIO_GZIP=y
|
||||
BR2_TARGET_ROOTFS_CPIO_UIMAGE=y
|
||||
|
||||
Also modify your kernel configuration to have:
|
||||
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_MASS_STORAGE=y
|
||||
CONFIG_FSL_UTP=y
|
||||
CONFIG_MMC_BLOCK_MINORS=16
|
||||
|
||||
2. Go into the output and create the necessary folders
|
||||
|
||||
$ cd output
|
||||
$ mkdir -p "Profiles/Linux/OS Firmware/firmware"
|
||||
|
||||
3. Create your XML update script named ucl2.xml
|
||||
|
||||
You can find a sample XML at:
|
||||
|
||||
$ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
|
||||
-O Profiles/Linux/OS\ Firmware/ucl2.xml
|
||||
|
||||
4. Copy the U-Boot, Kernel and initramfs images to the appropriate
|
||||
folder
|
||||
|
||||
$ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
|
||||
images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
|
||||
|
||||
5. Copy the prebuilt binaries to be flashed
|
||||
|
||||
Depending on your ucl2.xml file, the sample doesn't flash anything.
|
||||
|
||||
6. Run the MfgTools client:
|
||||
|
||||
$ ./host/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
|
||||
-s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
|
||||
-s mmc=1 -p 1
|
||||
|
||||
For more information about the tools options, please read the
|
||||
"Manufacturing Tool V2 Quick Start Guide.docx" documentation contained
|
||||
in every mfgtools package from NXP website[1].
|
||||
|
||||
Note: All the above commands require your Linux host user to have
|
||||
permissions to access the USB devices. Please make sure to have udev
|
||||
rules that allow the user to communicate with the BootROM IDs
|
||||
(Freescale USB recovery) as well as the one used for the UTP Linux
|
||||
image (0x066F:0x37FF). Using 'sudo' in front of the mfgtoolcli
|
||||
command would also grant you the necessary permission but it is *not*
|
||||
recommended.
|
||||
|
||||
Also, if your U-Boot environment doesn't include mfgtools bootargs,
|
||||
make sure to set the following:
|
||||
|
||||
setenv bootargs "console=${console},${baudrate} g_mass_storage.stall=0 \
|
||||
g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F \
|
||||
g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber=\"\" \
|
||||
g_mass_storage.file=/fat"
|
||||
|
||||
[1] http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i.mx-6-series-software-and-development-tool-resources:IMX6_SW
|
||||
Reference in New Issue
Block a user