您尚未登录。

楼主 #1 2020-01-06 12:22:56

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

请教,安装mfgtools for linux报错。

发现imx6ul的下载工具,在github上有开源版本的:https://github.com/NXPmicro/mfgtools,于是下载下来,按教程来,执行cmake .   ,结果报错:


-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENSSL_CRYPTO_LIBRARY (ADVANCED)
    linked by target "uuu" in directory /home/any/imx6ul/mfgtools/uuu
OPENSSL_SSL_LIBRARY (ADVANCED)
    linked by target "uuu" in directory /home/any/imx6ul/mfgtools/uuu

离线

#2 2020-01-06 13:40:42

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: 请教,安装mfgtools for linux报错。

sudo apt-get install libssl-dev -y





离线

楼主 #3 2020-01-06 13:54:49

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

谢谢,之前看提示是有关openssl的,就尝试安装openssl,发现其实是有的。
现在安装libssl-dev后,不报错了,只是有个警告:

Desktop:~/imx6ul/mfgtools$ cmake .
CMake Warning (dev) at libuuu/CMakeLists.txt:56:
  Syntax Warning in cmake code at column 159

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/any/imx6ul/mfgtools

查找相关文件,第56行是这样的:
COMMAND sh -c 'cd ${CMAKE_CURRENT_SOURCE_DIR} && rm -f ${gitversion_h} && ./gen_ver.sh "${gitversion_h}.tmp" && mv -f "${gitversion_h}.tmp" "${gitvers    ion_h}"'

忽略这警告,执行mak,报错:
/home/any/imx6ul/mfgtools/libuuu/buffer.cpp: In member function ‘int FileBuffer::reload(std::string, bool)’:
/home/any/imx6ul/mfgtools/libuuu/buffer.cpp:1203:35: error: no matching function for call to ‘atomic_init(std::atomic_int*, int)’
  atomic_init(&this->m_dataflags, 0);

...

/usr/include/c++/4.8/atomic:818:5: note:   template argument deduction/substitution failed:
/home/any/imx6ul/mfgtools/libuuu/buffer.cpp:1203:35: note:   ‘std::atomic_int {aka std::__atomic_base<int>}’ is not derived from ‘volatile std::atomic<_ITp>’
  atomic_init(&this->m_dataflags, 0);
                                   ^
libuuu/CMakeFiles/uuc_s.dir/build.make:91: recipe for target 'libuuu/CMakeFiles/uuc_s.dir/buffer.cpp.o' failed
make[2]: *** [libuuu/CMakeFiles/uuc_s.dir/buffer.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'libuuu/CMakeFiles/uuc_s.dir/all' failed
make[1]: *** [libuuu/CMakeFiles/uuc_s.dir/all] Error 2
Makefile:129: recipe for target 'all' failed

最近编辑记录 Gentlepig (2020-01-06 13:57:19)

离线

#4 2020-01-06 13:58:58

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

离线

楼主 #5 2020-01-06 14:27:42

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

现在用的gcc版本是7.4.0。太高了?

---------------------------------------

查看出错信息:
In file included from /home/any/imx6ul/mfgtools/libuuu/buffer.h:39:0,
                 from /home/any/imx6ul/mfgtools/libuuu/buffer.cpp:33:
/usr/include/c++/4.8/atomic:814:5: note: template<class _ITp> void std::atomic_init(std::atomic<_ITp>*, _ITp)
     atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept;

这里提到的是c++4.8。
为何是4.8?我这里gcc -v明明是7.4.0了。

那么,如何确定gcc路径,然后指定c++版本再make呢?

--------------------------------------------
晕,gcc是7.4.0,g++是4.8.5.
---------------------------------------------
用下面这个命令切换gcc和g++版本。
sudo update-alternatives --config gcc

最近编辑记录 Gentlepig (2020-01-06 15:02:54)

离线

楼主 #6 2020-01-06 15:04:52

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

g++切换到7.4.0后再make,又有新的错误:
any@Any-Desktop:~/imx6ul/mfgtools$ make
[  3%] Generating gitversion.h
build not in appveyor
Scanning dependencies of target uuc_s
[  6%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/buffer.cpp.o
[  9%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/cmd.cpp.o
[ 12%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/config.cpp.o
[ 16%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/notify.cpp.o
[ 19%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/sdps.cpp.o
[ 22%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/trans.cpp.o
[ 25%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/usbhotplug.cpp.o
[ 29%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/version.cpp.o
[ 32%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/sdp.cpp.o
[ 35%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/fastboot.cpp.o
[ 38%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/zip.cpp.o
[ 41%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/fat.cpp.o
[ 45%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/tar.cpp.o
[ 48%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/rominfo.cpp.o
[ 51%] Building CXX object libuuu/CMakeFiles/uuc_s.dir/http.cpp.o
/home/any/imx6ul/mfgtools/libuuu/http.cpp: In member function ‘int HttpStream::HttpGetHeader(std::__cxx11::string, std::__cxx11::string, int)’:
/home/any/imx6ul/mfgtools/libuuu/http.cpp:296:50: warning: ‘const SSL_METHOD* TLSv1_2_client_method()’ is deprecated [-Wdeprecated-declarations]
   const SSL_METHOD *meth = TLSv1_2_client_method();
                                                  ^
In file included from /usr/include/openssl/e_os2.h:13:0,
                 from /usr/include/openssl/ssl.h:15,
                 from /home/any/imx6ul/mfgtools/libuuu/http.cpp:55:
/usr/include/openssl/ssl.h:1866:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void))
^
[ 54%] Linking CXX static library libuuc_s.a
[ 58%] Built target uuc_s
[ 61%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/nand_burn_loader.clst
[ 64%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/uuu.clst
[ 67%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/emmc_burn_loader.clst
[ 70%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/emmc_burn_all.clst
[ 74%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/fat_write.clst
[ 77%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/qspi_burn_loader.clst
[ 80%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/sd_burn_loader.clst
[ 83%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/spl_boot.clst
[ 87%] Creating preprocessed clst file /home/any/imx6ul/mfgtools/uuu/gen/sd_burn_all.clst
Scanning dependencies of target uuu
[ 90%] Building CXX object uuu/CMakeFiles/uuu.dir/uuu.cpp.o
[ 93%] Building CXX object uuu/CMakeFiles/uuu.dir/buildincmd.cpp.o
[ 96%] Building CXX object uuu/CMakeFiles/uuu.dir/autocomplete.cpp.o
[100%] Linking CXX executable uuu
../libuuu/libuuc_s.a(buffer.cpp.o):在函数‘FSBackFile::get_file_timesample(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long*)’中:
buffer.cpp:(.text+0xa81):对‘set_last_err_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)’未定义的引用
../libuuu/libuuc_s.a(buffer.cpp.o):在函数‘FileBuffer::reload(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)’中:
buffer.cpp:(.text+0x1756):对‘set_last_err_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)’未定义的引用
../libuuu/libuuc_s.a(buffer.cpp.o):在函数‘FSHttp::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<FileBuffer>, bool)’中:
buffer.cpp:(.text+0x1fa5):对‘set_last_err_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)’未定义的引用
../libuuu/libuuc_s.a(buffer.cpp.o):在函数‘FSZip::exist(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)’中:
buffer.cpp:(.text+0x253b):对‘set_last_err_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)’未定义的引用
../libuuu/libuuc_s.a(buffer.cpp.o):在函数‘FileBuffer::request_data(unsigned long)’中:
buffer.cpp:(.text+0x3889):对‘set_last_err_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)’未定义的引用
../libuuu/libuuc_s.a(buffer.cpp.o):buffer.cpp:(.text+0x38cd): 跟着更多未定义的参考到 set_last_err_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
collect2: error: ld returned 1 exit status
uuu/CMakeFiles/uuu.dir/build.make:194: recipe for target 'uuu/uuu' failed
make[2]: *** [uuu/uuu] Error 1
CMakeFiles/Makefile2:140: recipe for target 'uuu/CMakeFiles/uuu.dir/all' failed
make[1]: *** [uuu/CMakeFiles/uuu.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

最近编辑记录 Gentlepig (2020-01-06 15:14:12)

离线

楼主 #7 2020-01-07 12:04:13

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

https://www.cnblogs.com/lukybee/p/11846889.html
https://www.cnblogs.com/JsonZhangAA/p/8973516.html
搜到两片文章,说是c++11对某些函数做了修改。
我现在用的是g++7.4.0,那么如何关闭c++11功能呢?

其中一篇文章如下:
原因

  gcc5以及以后的版本,将std::string和std::list重写,std::list变为std::__cxx11::list<int>,std::string在c++03库是std::basic_string<char>,而在c++11中变为了std::__cxx11::basic_string<char>。而为了在编译的时候兼容旧版本(链接阶段),可在编译的时候启动_GLIBCXX_USE_CXX11_ABI 宏指定具体链接的库。

  注意:不要将c++11和c++03的库混用。
GCC官方解释
1
2
   
<em>If you get linker errors about undefined references to symbols that involve types in the std::__cxx11 namespace or the tag [abi:cxx11] then it probably indicates that you are trying to link together object files that were compiled with different values for the _GLIBCXX_USE_CXX11_ABI macro. This commonly happens when linking to a third-party library that was compiled with an older version of GCC. If the third-party library cannot be rebuilt with the new ABI then you will need to recompile your code with the old ABI.
<br>Not all uses of the new ABI will cause changes in symbol names, for example a class with a std::string member variable will have the same mangled name whether compiled with the old or new ABI. In order to detect such problems the new types and functions are annotated with the abi_tag attribute, allowing the compiler to warn about potential ABI incompatibilities in code using them. Those warnings can be enabled with the -Wabi-tag option.</em>

  如出现std::__cxx11命名空间或abi:cxx11中未定义符号的链接错误,很可能是因为链接了使用不同的_GLIBCXX_USE_CXX11_ABI宏编译的目标,在链接旧版gcc编译的第三方库中经常出现。如第三方库无法使用新的ABI编译,则需使用旧版ABI重新编译本地代码。

  使用新版ABI不一定都会出现符号的重命名,如std::string在新旧版中名字相同。可通过在编译的时候使用-Wabi-tag选项提醒ABI是否一致。

宏定义的使用
1
2
3
4
   
-D_GLIBCXX_USE_CXX11_ABI=0 // 链接到旧版本,未启用c++11特性,std::string是std::basic_string<char>,如将c++11下的string当作参数传入非c++11库,就会出现error: cannot convert 'const std::__cxx11::basic_string<char>' to 'const char*',或者未定义的方法引用(undefined reference)
-D_GLIBCXX_USE_CXX11_ABI=1 // 链接到新版本
#define _GLIBCXX_USE_CXX11_ABI 0
#define _GLIBCXX_USE_CXX11_ABI 1

最近编辑记录 Gentlepig (2020-01-07 12:05:32)

离线

楼主 #8 2020-01-07 14:43:59

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

问题已解决,make clean后再make,就可以了。

离线

#9 2020-01-07 14:50:12

超级萌新
会员
注册时间: 2018-05-04
已发帖子: 408
积分: 407

Re: 请教,安装mfgtools for linux报错。

emmmm,这么奇怪的问题。

离线

楼主 #10 2020-01-07 15:41:11

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

用uuu命令烧录u-boot到emmc里,结果usb端一直是这个信息:
sendpix8.jpg
而串口端是这个:
sendpix7.jpg

最近编辑记录 Gentlepig (2020-01-07 15:41:24)

离线

#11 2020-01-07 15:57:43

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

Re: 请教,安装mfgtools for linux报错。

为楼主的钻研精神点赞,话说win下面的mfgtool不香吗

只要不变砖,mfgtool几乎用不到了,楼主可以把时间花在应用上。

只是建议,当然多折腾也是收获。

离线

楼主 #12 2020-01-07 16:07:38

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

Jmhh247 说:

为楼主的钻研精神点赞,话说win下面的mfgtool不香吗

只要不变砖,mfgtool几乎用不到了,楼主可以把时间花在应用上。

只是建议,当然多折腾也是收获。

觉得Linux挺香的。
qt学不进去了...换换脑筋吧。

离线

楼主 #13 2020-01-07 16:56:38

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

现在想烧写内核,发现编译内核后,在arch/arm/boot下只有image文件,而没有zImage文件,不知道是哪里搞错了。

离线

楼主 #14 2020-01-08 09:22:55

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

LD      vmlinux
  SORTEX  vmlinux
  SYSMAP  System.map
  OBJCOPY arch/arm/boot/Image
  Building modules, stage 2.
  MODPOST 76 modules
  Kernel: arch/arm/boot/Image is ready
  LDS     arch/arm/boot/compressed/vmlinux.lds
  AS      arch/arm/boot/compressed/head.o
  LZO     arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
  CC      arch/arm/boot/compressed/misc.o
arch/arm/boot/compressed/Makefile:180: recipe for target 'arch/arm/boot/compressed/piggy.lzo' failed
make[2]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[2]: *** 正在等待未完成的任务....
make[2]: *** wait: 没有子进程。 停止。
arch/arm/boot/Makefile:52: recipe for target 'arch/arm/boot/compressed/vmlinux' failed
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
arch/arm/Makefile:316: recipe for target 'zImage' failed
make: *** [zImage] Error 2
make: *** 正在等待未完成的任务....

向上翻编译信息,找到这两个错误。

--------------------------------------------------------

sudo apt-get install lzop,问题解决。

最近编辑记录 Gentlepig (2020-01-08 09:33:37)

离线

#15 2020-01-08 09:36:36

红白机
会员
注册时间: 2020-01-02
已发帖子: 133
积分: 133

Re: 请教,安装mfgtools for linux报错。

感谢楼主分享!

离线

楼主 #16 2020-01-08 17:45:55

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

#Download uboot    
uuu flash.bin

#Burn uboot into emmc    
uuu -b emmc flash.bin

#Burn rootfs image into emmc    
uuu -b emmc_all flash.bin rootfs.sdcard

#Decompress rootfs image and burn into emmc    
uuu -b emmc_all flash.bin rootfs.sdcard.bz2

#Burn release image into emmc    
uuu L4.9.123_2.3.0_8mm-ga.zip

这是uuu(NXP Universal Update Utility)常用的几个命令,我想烧录到emmc,我编译uboot,内核,文件系统,生成的文件有:
u-boot.img、设备树.dts
zImage
rootfs.tar(buildroot同时生成了个sdcard.img)

通过uuu命令,只烧录uboot,貌似可以。
通过uuu命令烧录uboot、内核、文件系统,不知道该怎么操作了:
emmc_all    burn whole image to eMMC
        arg0: _flash.bin
        arg1: _rootfs.sdcard
这第二个参数.sdcard不知道该如何得到,是内核和根文件系统压缩到一块了吗?那么设备树什么时候用?

-----------------------------------------------
将buildroot生成的sdcard.imx用ubuntu挂载看了下,两个盘符,一个是文件系统,另一个里面有内核和设备树,但是有多个设备树...

最近编辑记录 Gentlepig (2020-01-08 17:50:38)

离线

楼主 #17 2020-01-09 09:49:15

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

用uuu u-boot.imx命令
终端有如下提示:

any@Any-Desktop:~/imx6ul/ebf_6ull_buildroot/output/images$ ~/imx6ul/mfgtools/uuu/uuu u-boot.imx
uuu (Universal Update Utility) for nxp imx chips -- lib1.3.124-0-gee3f09a

Success 1    Failure 0                              

串口有如下提示:

U-Boot 2016.03 (Jan 08 2020 - 16:59:37 +0800)                     
                                                                  
CPU:   Freescale i.MX6ULL rev1.1 69 MHz (running at 396 MHz)      
CPU:   Industrial temperature grade (-40C to 105C) at 45C         
Reset cause: POR                                                  
Board: MX6ULL 14x14 EVK                                           
I2C:   ready                                                      
DRAM:  512 MiB                                                    
MMC:   FSL_SDHC: 0, FSL_SDHC: 1                                   
MMC: no card present                                              
*** Warning - MMC init failed, using default environment          
                                                                  
In:    serial                                                     
Out:   serial                                                     
Err:   serial                                                     
MMC: no card present                                              
Net:   FEC1                                                       
Error: FEC1 address not set.                                      
                                                                  
Boot from USB for mfgtools                                        
Use default environment for                              mfgtools 
Run bootcmd_mfg: run mfgtool_args;bootz ${loadaddr} ${initrd_addr;
Hit any key to stop autoboot:  0                                  
Bad Linux ARM zImage magic!                                       
=> 

用uuu -b emmc u-boot.imx命令
终端有如下提示:

any@Any-Desktop:~/imx6ul/ebf_6ull_buildroot/output/images$ ~/imx6ul/mfgtools/uuu/uuu -b emmc u-boot.imx
uuu (Universal Update Utility) for nxp imx chips -- lib1.3.124-0-gee3f09a

Success 0    Failure 0                                                                 
                                                                                        
                                                                                        
1:31     1/ 1 [=================100%=================] SDP: boot -f u-boot.imx      

串口有如下提示:

U-Boot 2016.03 (Jan 08 2020 - 16:59:37 +0800)                     
                                                                  
CPU:   Freescale i.MX6ULL rev1.1 69 MHz (running at 396 MHz)      
CPU:   Industrial temperature grade (-40C to 105C) at 46C         
Reset cause: POR                                                  
Board: MX6ULL 14x14 EVK                                           
I2C:   ready                                                      
DRAM:  512 MiB                                                    
MMC:   FSL_SDHC: 0, FSL_SDHC: 1                                   
MMC: no card present                                              
*** Warning - MMC init failed, using default environment          
                                                                  
In:    serial                                                     
Out:   serial                                                     
Err:   serial                                                     
MMC: no card present                                              
Net:   FEC1                                                       
Error: FEC1 address not set.                                      
                                                                  
Boot from USB for mfgtools                                        
Use default environment for                              mfgtools 
Run bootcmd_mfg: run mfgtool_args;bootz ${loadaddr} ${initrd_addr;
Hit any key to stop autoboot:  0                                  
Bad Linux ARM zImage magic!                                       
=> 

uuu u-boot.imx是烧录到ram里,uuu -b emmc u-boot.imx是烧录到emmc里。
看提示,我烧录到ram里是成功的,但烧录到emmc里,没提示成功,也没提示失败。

最近编辑记录 Gentlepig (2020-01-09 09:53:50)

离线

楼主 #18 2020-01-09 12:00:07

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

玩死了...
本来想重启板子,应该输入reboot,结果忘记命令了,输了几次reset,后来重启后,进不去系统了,串口没有调试信息了。
拨码开关设到usb模式,结果启动后串口也没调试信息,而且用uuu -lsusb命令,也查不到设备了...

离线

#19 2020-01-09 15:27:02

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

Re: 请教,安装mfgtools for linux报错。

问题不大,win10下的mfgtool烧回出厂固件,继续折腾~


Gentlepig 说:

玩死了...
本来想重启板子,应该输入reboot,结果忘记命令了,输了几次reset,后来重启后,进不去系统了,串口没有调试信息了。
拨码开关设到usb模式,结果启动后串口也没调试信息,而且用uuu -lsusb命令,也查不到设备了...

离线

楼主 #20 2020-01-09 16:41:52

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

我买的是野火的mini板。
原子的资料要从网盘下,4G多,我这里下载速度才100K/s,要五六个小时。
费劲从nxp官网下载了mfgtools,结果运行后,连不上板子...

手头又没tf卡了,3个卡都格式化不聊了,悲催。

离线

#21 2020-01-09 17:04:08

红白机
会员
注册时间: 2020-01-02
已发帖子: 133
积分: 133

Re: 请教,安装mfgtools for linux报错。

https://whycan.cn/t_3291.html

晕哥的VIP百度云

离线

楼主 #22 2020-01-09 17:11:52

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

正在下,原来要五六个小时,现在五六分钟即可,感谢站长。

离线

楼主 #23 2020-01-09 17:25:33

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

下载了原子修改过的mfgtools,仍是找不到板子。
难道是硬件问题?

-----------------------------------------
板上由4各按钮开关,复位、按键、开关、模式。看了原理图,上面写着开关键长按3秒以上实现开关机。
按了这个开关键之后,起来了。估计之前也是长按过这个按钮导致关闭。
虽然还不懂是什么原理。

https://whycan.cn/files/members/1209/_EBF6ULL%20S1%20Mini%20底板_V1_0_原理图.pdf

最近编辑记录 Gentlepig (2020-01-09 17:48:39)

离线

#24 2020-01-09 19:09:26

放羊娃
会员
注册时间: 2019-11-29
已发帖子: 14
积分: 14

Re: 请教,安装mfgtools for linux报错。

插上USB,看下设备,能否找到usb,然后记下vid和pid,和mfgtool V2的ucl2.xml这个文件开头的配置比对下,是不是类型一致,你现在应该用的不是uuu(mfgtool v3)吧?

Gentlepig 说:

下载了原子修改过的mfgtools,仍是找不到板子。
难道是硬件问题?

-----------------------------------------
板上由4各按钮开关,复位、按键、开关、模式。看了原理图,上面写着开关键长按3秒以上实现开关机。
按了这个开关键之后,起来了。估计之前也是长按过这个按钮导致关闭。
虽然还不懂是什么原理。

https://whycan.cn/files/members/1209/_EBF6ULL%20S1%20Mini%20底板_V1_0_原理图.pdf

离线

#25 2020-01-10 08:41:15

Jmhh247
会员
注册时间: 2018-12-21
已发帖子: 262
积分: 262

Re: 请教,安装mfgtools for linux报错。

有点懵,野火的板子为啥用原子的mfgtools。。。


Gentlepig 说:

我买的是野火的mini板。
原子的资料要从网盘下,4G多,我这里下载速度才100K/s,要五六个小时。
费劲从nxp官网下载了mfgtools,结果运行后,连不上板子...

手头又没tf卡了,3个卡都格式化不聊了,悲催。

离线

楼主 #26 2020-01-10 09:00:46

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

Jmhh247 说:

有点懵,野火的板子为啥用原子的mfgtools。。。

哈,有病乱投医。
问题已解决,可以正常启动板子了。
但是用uuu烧录程序还是不行。

离线

楼主 #27 2020-01-10 09:03:25

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

放羊娃 说:

插上USB,看下设备,能否找到usb,然后记下vid和pid,和mfgtool V2的ucl2.xml这个文件开头的配置比对下,是不是类型一致,你现在应该用的不是uuu(mfgtool v3)吧?

现在能起来了,无论用win下的mfgtools还是用uuu,都能检测到设备。
现在的问题还是用uuu无法烧录程序到emmc。

离线

楼主 #28 2022-04-12 16:12:25

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

前几天又把垫桌角的imx6ull开发板拾起来了。
下载了最新的uboot和nxp官方的linux,用最新的gcc编译,通过了。然后又尝试uuu下载,还算两年前的问题。
不过现在再搜索的话,就能找到一些有用的帖子了。
使用uuu直接下载uboot,貌似是下载到ram里,可以成功。
使用uuu -b emmc下载的话,需要用到支持fastboot的uboot,而imx6ul的uboot如何开启配置fastboot功能,野火和原子的教程里没有提到。
fastboot功能是提供了uboot下的一些烧录协议,可以通过这个协议烧录文件到emmc或nand里。
韦东山提供了个带gui界面的uuu软件,在git上开源了。但是也没有介绍在menuconfig里如何配置,不过提供了个配置好的config文件,在git上可以找到。
另,uuu有个说明文档,uuu.pdf,第18页也介绍了如何开启fastboot,但是那是以imx8为例的。我按这个例子配置,结果没成功。
我按韦东山的config文件对照配置,也没成功...
但是用韦东山制作好的uboot_fastboot.imx,可以用,而且这个将我制作的uboot下载到了emmc了,虽然我的uboot无法实现再下载了。

U-Boot 2022.04 (Apr 12 2022 - 15:56:53 +0800)               
                                                            
CPU:   Freescale i.MX6ULL rev1.1 792 MHz (running at 396 MH)
CPU:   Industrial temperature grade (-40C to 105C) at 39C   
Reset cause: POR                                            
Model: Freescale i.MX6 UltraLiteLite 14x14 EVK Board        
Board: MX6ULL 14x14 EVK                                     
DRAM:  512 MiB                                              
Core:  56 devices, 14 uclasses, devicetree: separate        
MMC:   FSL_SDHC: 0, FSL_SDHC: 1                             
Loading Environment from MMC... OK                          
In:    serial                                               
Out:   serial                                               
Err:   serial                                               
Net:                                                        
Error: ethernet@20b4000 address not set.                    
                                                            
Error: ethernet@20b4000 address not set.                    
                                                            
Error: ethernet@20b4000 address not set.                    
                                                            
Error: ethernet@20b4000 address not set.                    
Could not get PHY for FEC0: addr 2                          
                                                            
Error: ethernet@20b4000 address not set.                    
                                                            
Error: ethernet@20b4000 address not set.                    
Could not get PHY for FEC0: addr 2                          
No ethernet found.                                          
                                                            
Hit any key to stop autoboot:  0      

离线

楼主 #29 2022-04-14 13:24:15

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

nxp官方提供的uboot,2019,4.15.35编译后确实有fastboot功能,最新的2021,也有fastboot功能。

我之所以编译2019版后fastboot没成功,是因为我写了个脚本将生成的文件拷贝到uuu目录下。结果写错了,本应该拷贝的是u-boot-dtb.imx,结果写成了u-boot-dtb.bin。这样我总是烧录uuu目录下的另一个.imx文件了,而那个是不带fastboot功能的。

nxp官方的uboot因该是从某个版本以后,均支持fastboot功能了,而且是默认开启的。

我从uboot官网下载的uboot2022,是无法开启imx6ul的fastboot的,我还好奇为啥在make menuconfig时找不到CONFIG_FSL_FASTBOOT这个宏呢,原来nxp是额外添加了一部分内容。

离线

楼主 #30 2022-04-14 17:30:41

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

晕了,不会用uuu烧录内核、设备树、跟文件系统了...

$ ./uuu -h
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.193-4-gf8a783a

uuu [-d -m -v -V] <bootloader|cmdlists|cmd>

    bootloader  download bootloader to board by usb
    cmdlist     run all commands in cmdlist file
                If it is path, search uuu.auto in dir
                If it is zip, search uuu.auto in zip
    cmd         Run one command, use -H see detail
                example: SDPS: boot -f flash.bin
    -d          Daemon mode, wait for forever.
    -v -V       verbose mode, -V enable libusb error\warning info
    -dry        Dry run mode, check if script or cmd correct 
    -m          USBPATH Only monitor these paths.
                    -m 1:2 -m 1:3

    -t          Timeout second for wait known usb device appeared
    -T          Timeout second for wait next known usb device appeared at stage switch
    -e          set environment variable key=value
    -pp         usb polling period in milliseconds
uuu -s          Enter shell mode. uuu.inputlog record all input commands
                you can use "uuu uuu.inputlog" next time to run all commands

uuu -udev       linux: show udev rule to avoid sudo each time 
uuu -lsusb      List connected know devices
uuu -IgSerNum   Set windows registry to ignore USB serial number for known uuu devices
uuu -h          show general help
uuu -H          show general help and detailed help for commands

uuu [-d -m -v] -b[run] <emmc|emmc_all|fat_write|nand|qspi|sd|sd_all|spl> arg...
	Run Built-in scripts
	emmc	burn boot loader to eMMC boot partition
		arg0: _flash.bin  bootloader
		arg1: _image[Optional]  image burn to emmc, default is the same as bootloader
	emmc_all	burn whole image to eMMC
		arg0: _flash.bin  bootloader, which can extract from wic image
		arg1: _image[Optional]  wic image burn to emmc.
	fat_write	update one file in fat partition, require uboot fastboot running in board
		arg0: _image  image, which cp to fat partition
		arg1: _device  storage device, mmc\sata
		arg2: _partition  fat partition number, like 1:1
		arg3: _filename[Optional]  file name in target fat partition, only support rootdir now
	nand	burn boot loader to NAND flash
		arg0: _flash.bin  bootloader
		arg1: _image[Optional]  image burn to nand, default is the same as bootloader
	qspi	burn boot loader to qspi nor flash
		arg0: _flexspi.bin  bootloader
		arg1: _image[Optional]  image burn to flexspi, default is the same as bootloader
	sd	burn boot loader to sd card
		arg0: _flash.bin  bootloader
		arg1: _image[Optional]  image burn to emmc, default is the same as bootloader
	sd_all	burn whole image to sd card
		arg0: _flash.bin  bootloader, which can extract from wic image
		arg1: _image[Optional]  wic image burn to emmc.
	spl	boot spl and uboot
		arg0: _flash.bin 

uuu -bshow <emmc|emmc_all|fat_write|nand|qspi|sd|sd_all|spl>
	Show built-in script

Enjoy auto [tab] command complete by put below script into /etc/bash_completion.d/uuu
  _uuu_autocomplete()
  {
       COMPREPLY=($(/usr/local/bin/uuu $1 $2 $3))
  }
  complete -o nospace -F _uuu_autocomplete  uuu

需要自己建脚本吗?太难了...

离线

楼主 #31 2022-04-20 10:40:56

Gentlepig
会员
注册时间: 2018-10-24
已发帖子: 1,199
积分: 1139.5

Re: 请教,安装mfgtools for linux报错。

用这个脚本可以向emmc烧写zImage和dtb。烧写根文件系统还不知道该怎么操作。

CFG: FB:  -vid 0x18D1 -pid 0x0D02
SDP: boot -f u-boot-dtb.imx
FB: getvar version
FB: ucmd setenv fastboot_buffer 0x80800000
FB: download -f zImage
FB: ucmd fatwrite mmc ${emmc_dev}:1 ${fastboot_buffer} /zImage ${fastboot_bytes}
FB: ucmd setenv fastboot_buffer 0x83000000
FB: download -f imx6ull-14x14-evk-emmc.dtb
FB: ucmd fatwrite mmc ${emmc_dev}:1 ${fastboot_buffer} /imx6ull-14x14-evk-emmc.dtb ${fastboot_bytes}
FB: ucmd boot

目前看来完全用uuu烧写还是不好搞。向emmc烧写zImage和dtb,首先需要emmc已经分好区。emmc分区需要先将系统运行起来,估计只能先用uuu烧写uboot,运行uboot后,用ftp或nfs将zImage和dtb下载到内存,然后挂载nfs,或者initramfs。从内存中运行系统后,再将emmc分区,然后执行向emmc烧写内核、设备树、根文件系统。
但,这也太麻烦了,还不如用mfgtools。

最近编辑记录 Gentlepig (2022-04-20 10:43:42)

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn