您尚未登录。

楼主 #1 2019-06-15 06:57:39

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

Hello,
i would like to setup the toolchain for Sunxi F1C100S and F1C200S on OSX but i am struggling despite many attempts.
The reason why i want to install it on OSX rather that using Linux (Ubuntu/Debian) on a virtual machine (VirtualBox) is simple : the performance of Ubuntu on VirtualBox is too bad, so the compilation is too long, also my IDEs are all on OSX (Eclipse, QT Editor).

I have installed crosstool-ng with Homebrew, i also created an empty case sensitive volume (16GB) which is ready to use. I did not found a way yet to install the correct toolchain for F1C100S with crosstool-ng.

As a side note, i also installed a toolchain for MT7628 (RAMIPS) some time ago, everything is in a case sensitive volume and it works perfectly, it can build OpenWRT and compile C programs from Eclipse with no problem at all, it is very fast and convenient.
So the final goal is to do the same for F1C100S.
Does anyone succeed to do that or have any advce on how i should proceed?
N.B. the boards i use are the LicheePi Nano (with 5 inch LCD + capacitive touch) and the very nice F1C200S board from HQEmbed (with 5 inch LCD + capacitive touch).

Thank you !

你好,
我想在OSX上为Sunxi F1C100S和F1C200S设置工具链,但是尽管尝试了很多次,我还是在努力。
我想在OSX上安装它,而不是在虚拟机(virtualbox)上使用Linux(ubuntu/debian)的原因很简单:ubuntu在virtualbox上的性能太差,所以编译时间太长,而且我的IDE都在OSX上(eclipse,qt editor)。

我已经安装了Crosstool-ng和自制,还创建了一个空的大小写敏感卷(16GB),可以使用。我还没有找到使用Crosstool-ng为F1C100S安装正确工具链的方法。

顺便说一下,我之前也为MT7628(RAMIPS)安装了一个工具链,所有的东西都在一个区分大小写的卷中,并且工作得很好,它可以从Eclipse构建OpenWRT和编译C程序,一点问题都没有,它非常快速和方便。
所以最后的目标是对F1C100S做同样的事情。
是否有人成功地做到了这一点,或者有人对我应该如何继续工作有任何建议?
注意:我使用的是Licheepi Nano(带有5英寸LCD+电容式触摸)和HQEmbed(带有5英寸LCD+电容式触摸)的非常漂亮的F1C200S板。

谢谢您!

最近编辑记录 hoel (2019-06-15 06:58:26)

离线

#2 2019-06-15 07:05:37

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

emmmm,我虽然有mac air,但是几乎不会使用,不过这个论坛很多朋友都是用OSX,等会我邀请他们回复。





离线

楼主 #3 2019-06-15 07:11:37

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

@晕哥  谢谢,这个论坛充满了激情,太棒了

离线

#4 2019-06-15 07:30:36

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

不用谢,我们一起努力把这个论坛变得更好。





离线

#5 2019-06-15 10:10:35

Quotation
会员
注册时间: 2018-10-04
已发帖子: 296
积分: 259.5

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

@hoel  I develop for F1C100s on OSX, but the toolchain configuration may depend on what you are building. I only build barebone code and XBoot, no Linux or U-Boot.
You can first try the barebone code minimal_f1c100s_framebuffer.zip from this post: https://whycan.cn/t_1457.html.

1. Download the official gcc-arm-none-eabi from https://launchpad.net/gcc-arm-embedded/+download. I'm using an older version gcc-arm-none-eabi-5_2-2015q4. Extract and add `gcc-arm-none-eabi/bin` to PATH.

2. Extract minimal_f1c100s_framebuffer.zip. Edit `Makefile`, change `CROSS_COMPILE` to `arm-none-eabi-`.
3. `cd tools/mksunxi`, delete the Linux version `mksunxi` and make the OSX version.
3. Run `make` in `minimal_f1c100s`. The build succeeds if you see output "The bootloader head has been fixed".

4. `git clone https://github.com/Icenowy/sunxi-tools.git -b spi-rebase`, then build the OSX version of sunxi-tools.
5. Run `sunxi-fel -p spiflash-write 0 build/firmware.bin` to download the firmware to F1C100s.

离线

#6 2019-06-15 10:43:48

达克罗德
会员
注册时间: 2018-04-10
已发帖子: 1,138
积分: 1090.5

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

我都放弃折腾了,Mac下除了m0的编译器有现成的其它都得自己编,所以我还是最终用的Linux

离线

#7 2019-06-15 10:55:09

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

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

五楼的朋友英语和技术都好棒!

离线

楼主 #8 2019-06-15 17:28:51

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

@Quotation  Thank you very much for the detailed answer and steps to get a barebone toolchain working on OSX, much appreciated ! Ultimately the goal is to setup the toolchain for Linux and uboot, however for now i want to work on UI + touch + some peripheral so your suggestion is perfect. As a first step i am going to setup the barebone toolchain, run Xboot, try LittleVGL, QT (and maybe AWTK).

离线

楼主 #9 2019-06-15 17:35:42

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

@达克罗德  是的,让arm-linux工具链在OSX上工作的路径可能是漫长而痛苦的,但是由于我在OSX上成功地设置了ramips-linux工具链,并且它工作得很好,我认为在arm-linux上也应该可以实现(经过长期的斗争之后

@超级萌新  是的,100%同意,非常有用,从Quotation年起提出了全面的建议。

离线

楼主 #10 2019-06-15 18:00:21

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

光滑如婴儿皮肤


hoel@iMac-de-Hoel-7 /Volumes/EABI $ cd /Volumes/EABI/minimal_f1c100s/tools/mksunxi/
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s/tools/mksunxi $ make
gcc -Wall -Wextra -O2    mksunxi.c   -o mksunxi
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s/tools/mksunxi $ cd ..
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s/tools $ cd ..
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s $ make
mkdir -p build
mkdir -p build/arch/arm32/lib
mkdir -p build/driver
mkdir -p build/lib
mkdir -p build/machine
CC main.c
(...)
arm-none-eabi-size build/firmware.elf
   text	   data	    bss	    dec	    hex	filename
  30276	     88	 524424	 554788	  87724	build/firmware.elf
arm-none-eabi-objcopy -v -O binary build/firmware.elf build/firmware.bin
copy from `build/firmware.elf' [elf32-littlearm] to `build/firmware.bin' [binary]
Make header information for brom booting
bootloader size= 1800
The bootloader head has been fixed
hoel@iMac-de-Hoel-7 /Volumes/EABI/minimal_f1c100s $ 

最近编辑记录 hoel (2019-06-15 18:16:33)

离线

#11 2019-06-15 22:13:40

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

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

好厉害,围观

离线

楼主 #12 2019-06-15 22:21:42

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

我也运行过lvgl和zlg,它们都工作得很好,lvgl的性能似乎很差,可能是因为时钟很低(720MHz),并且没有使用2d加速,但是直接帧缓冲在f1c100s上已经过60fps的测试,所以可能只是lvgl没有性能(可能)。

我目前正在将GT911触摸屏移植到Xboot(Lichee Pi Nano),如果有人已经这样做了,请告诉我,因为我认为需要一些时间来纠正它。同时,我还在寻找一种在OSX上安装arm-none-linux-eabi工具链的方法,因为这个arm none eabi工具链只能在没有linux的情况下使用

最近编辑记录 hoel (2019-06-15 22:24:34)

离线

#13 2019-06-16 07:28:49

mango
会员
所在地: 芒果派1
注册时间: 2017-12-02
已发帖子: 780
积分: 726

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

因为OpenWrt在macOS上编译一直很正常,你可以这样来尝试。
首先,下载OpenWrt最新代码,以18.06为例。
第二,menuconfig中配置为ARM平台,例如MT7622、MT7623 。
第三,进行一次编译,编译完后,在staging_dir文件夹中可以看到编译后的toolchain with libc。
如果这个toolchain和你自己想要的版本差别不大的情况下,应该是可以用的。






歪朵拉开源硬件: https://widora.cn
淘宝:  https://widora.taobao.com/

离线

楼主 #14 2019-06-16 07:57:59

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

@Mango,哦,谢谢你,我没想到用OpenWRT ARM版本stagging_dir在F1C100的OSX上获得一个有效的工具链,这实际上是一个聪明的主意,我现在就要尝试一下。

离线

楼主 #15 2019-06-16 23:45:45

hoel
会员
注册时间: 2019-06-15
已发帖子: 96
积分: 31

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

Hello,
update on the case, i tried the Mango suggestion, it turned out the resulting toolchain was not correct for F1C100S because MT7622 is AA64 but F1C100S is not (ARM926ej-s) however, i recalled that Qin Fengling made a OpenWRT port for F1C100S and i gave it a try. After few fixes mainly due to system headers incompatibilities with OSX:

1) two libfdt related headers had to be removed from usr/local/include (can probably be fixed in the makefile, much cleaner)

2) OSX specific definition has to be added in bch.c

你好,
更新案例,我尝试了芒果的建议,结果发现结果的工具链对于F1C100S是不正确的,因为MT7622是AA64,但F1C100S不是(ARM926EJ-S),但是,我记得秦凤玲为F1C100S做了一个openwrt端口,我尝试了一下。由于系统头文件与OSX不兼容,在进行了一些修复之后:

1)必须从usr/local/include中删除两个与libfdt相关的头文件(可能在makefile中修复,更干净)
2)必须在bch.c中添加OSX特定定义。

#ifdef __APPLE__
  #include <libkern/OSByteOrder.h>

  #define htobe16(x) OSSwapHostToBigInt16(x)
  #define htole16(x) OSSwapHostToLittleInt16(x)
  #define be16toh(x) OSSwapBigToHostInt16(x)
  #define le16toh(x) OSSwapLittleToHostInt16(x)

  #define htobe32(x) OSSwapHostToBigInt32(x)
  #define htole32(x) OSSwapHostToLittleInt32(x)
  #define be32toh(x) OSSwapBigToHostInt32(x)
  #define le32toh(x) OSSwapLittleToHostInt32(x)

  #define htobe64(x) OSSwapHostToBigInt64(x)
  #define htole64(x) OSSwapHostToLittleInt64(x)
  #define be64toh(x) OSSwapBigToHostInt64(x)
  #define le64toh(x) OSSwapLittleToHostInt64(x)
#endif  /* __APPLE__ */

The built was successful and now it compiles OpenWRT in about 4 minutes.

构建成功,现在它在大约4分钟内编译了openwrt。

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt (licheepi-nano *=) $ make -j9
time: target/linux/prereq#0.10#0.07#0.28
 make[1] world
 make[2] package/cleanup
 make[2] target/compile
 make[3] -C target/linux compile
 make[2] diffconfig
 make[2] package/compile
 make[3] -C package/libs/libubox host-compile
 make[3] -C package/system/fwtool host-compile
 make[3] -C package/system/usign host-compile
 make[3] -C package/utils/e2fsprogs host-compile
 make[3] -C package/libs/ncurses host-compile
 make[3] -C package/libs/toolchain compile
 make[3] -C package/system/opkg host-compile
 make[3] -C package/system/fwtool compile
 make[3] -C package/libs/libnl-tiny compile
 make[3] -C package/firmware/linux-firmware compile
 make[3] -C package/libs/zlib compile
 make[3] -C package/libs/libjson-c compile
 make[3] -C package/firmware/prism54-firmware compile
 make[3] -C package/utils/lua compile
 make[3] -C package/system/openwrt-keyring compile
 make[3] -C package/boot/uboot-sunxi compile
 make[3] -C package/firmware/wireless-regdb compile
 make[3] -C package/firmware/b43legacy-firmware compile
 make[3] -C package/libs/mbedtls compile
 make[3] -C package/network/services/dropbear compile
 make[3] -C package/libs/libpcap compile
 make[3] -C package/network/utils/linux-atm compile
 make[3] -C package/network/utils/resolveip compile
 make[3] -C package/utils/busybox compile
 make[3] -C package/libs/libubox compile
 make[3] -C package/libs/ncurses compile
 make[3] -C package/network/utils/iw compile
 make[3] -C package/system/usign compile
 make[3] -C package/system/uci compile
 make[3] -C package/system/ubus compile
 make[3] -C package/utils/jsonfilter compile
 make[3] -C package/libs/ustream-ssl compile
 make[3] -C package/network/ipv6/odhcp6c compile
 make[3] -C package/system/mtd compile
 make[3] -C package/libs/uclient compile
 make[3] -C package/network/config/swconfig compile
 make[3] -C package/system/ubox compile
 make[3] -C package/network/config/netifd compile
 make[3] -C package/network/services/hostapd compile
 make[3] -C package/network/services/dnsmasq compile
 make[3] -C package/network/services/odhcpd compile
 make[3] -C package/network/utils/iwinfo compile
 make[3] -C package/system/opkg compile
 make[3] -C package/system/procd compile
 make[3] -C package/kernel/linux compile
 make[3] -C package/kernel/mac80211 compile
 make[3] -C package/network/utils/iptables compile
 make[3] -C package/network/services/ppp compile
 make[3] -C package/utils/util-linux compile
 make[3] -C package/utils/f2fs-tools compile
 make[3] -C package/utils/e2fsprogs compile
 make[3] -C package/system/fstools compile
 make[3] -C package/boot/uboot-envtools compile
 make[3] -C package/base-files compile
 make[3] -C package/network/config/firewall compile
 make[2] package/install
 make[2] target/install
 make[3] -C target/linux install
 make[2] package/index
 make[2] checksum
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt (licheepi-nano *=) $

Of course i also end-up with a working toolchain for F1C100S on OSX !
So I made a template for Eclipse to test it, and as expected it works perfectly.

当然,我最后也得到了一个在OSX上用于F1C100的工作工具链!
所以我为Eclipse制作了一个模板来测试它,正如预期的那样,它工作得很好。

04:25:22 **** Incremental Build of configuration Debug for project F1C100S_TEMPLATE ****
make all 
Building target: F1C100S_TEMPLATE
Invoking: Cross GCC Linker
arm-openwrt-linux-muslgnueabi-gcc  -o "F1C100S_TEMPLATE"  ./src/termios_cdc_acm/epoll2.o  ./src/libs/gpio.o ./src/libs/gpiolib.o ./src/libs/spi.o ./src/libs/sqlite3.o  ./src/gsm_serial.o   
Finished building target: F1C100S_TEMPLATE
04:25:23 Build Finished (took 509ms)

Big thanks to @Quotation, @Mango and @晕哥 for the help with this, it very nice to have a working toolchain on OSX for this target.

非常感谢@Quotation, @Mango and @晕哥 的帮助,在OSX上为这个目标提供了一个工作的工具链。


Now there is still two issues to address : the first is that this OpenWRT has been modified to build an SD card image rather than a flash image and it is a problem with the Lichee Pi Nano because the only way to have netwrok connectivity (and so to debug conveniently from Eclipse / QT editor) is by using the Micro SD card wifi adapter, which of course cannot be plugged if we use SD card, i have opened a new subject for this matter : https://whycan.cn/t_2573.html#p20277

The other problem is that i did not manage to build the Lichee Pi Nano "official" linux (nano-4.14-exp) with this new toolchain. I tried to add the new toolchain to my PATH and .bash_profile, but when i add it to the bash profile :

现在仍然有两个问题需要解决:第一个问题是这个openwrt被修改为构建一个SD卡图像而不是一个flash图像,这是Lichee Pi Nano的一个问题,因为只有使用micro SD卡WiFi适配器才能实现网络连接(并从Eclipse/Qt编辑器方便地进行调试),而Micro SD卡WiFi适配器是如果我们使用SD卡,URSE就无法接通电源,我已经为此打开了一个新主题:https://whycan.cn/t_2573.html#p20277

另一个问题是,我没有用这个新的工具链构建Lichee Pi nano“官方”Linux(nano-4.14-exp)。我试图将新的工具链添加到我的路径和.bash_概要文件中,但当我将其添加到bash概要文件中时:

PATH="/Volumes/arm-linux-toolchain/openwrt/staging_dir/toolchain-arm_arm926ej-s_gcc-7.3.0_musl_eabi/bin"

the build fails directly, it doesnt even find make, so either i am doing something wrong with PATH or .bash_profile or something must be changed in the Linux makefile so that it uses this toolchain.

构建直接失败,甚至找不到make,所以要么我在路径或.bash_profile上做了一些错误的事情,要么必须在Linux makefile中更改一些内容,以便它使用这个工具链。

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux $ make menuconfig
-bash: make: command not found
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux $ make ARCH=arm menuconfig
-bash: make: command not found

When i remove this PATH from .bash_profile, then make menuconfig fail

当我从.bash_profile中删除此路径时,将使menuconfig失败

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux (nano-4.14-exp *=) $ make ARCH=arm menuconfig
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
  HOSTLD  scripts/kconfig/mconf
Undefined symbols for architecture x86_64:
  "_acs_map", referenced from:
      _dialog_checklist in checklist.o
      _print_arrows in checklist.o
      _dialog_clear in util.o
      _draw_box in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      ...
  "_cbreak", referenced from:
      _init_dialog in util.o
  "_delwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_doupdate", referenced from:
      _dialog_checklist in checklist.o
  "_endwin", referenced from:
      _init_dialog in util.o
      _end_dialog in util.o
  "_flash", referenced from:
      _dialog_inputbox in inputbox.o
  "_getcurx", referenced from:
      _init_dialog in util.o
      _print_autowrap in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _print_arrows in menubox.o
  "_getcury", referenced from:
      _init_dialog in util.o
      _print_autowrap in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _print_arrows in menubox.o
  "_getmaxx", referenced from:
      _conf in mconf.o
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      ...
  "_getmaxy", referenced from:
      _dialog_checklist in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      ...
  "_has_colors", referenced from:
      _init_dialog in util.o
      _draw_shadow in util.o
  "_init_pair", referenced from:
      _init_dialog in util.o
  "_initscr", referenced from:
      _init_dialog in util.o
  "_keypad", referenced from:
      _dialog_checklist in checklist.o
      _init_dialog in util.o
      _on_key_esc in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
      ...
  "_newwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_nodelay", referenced from:
      _on_key_esc in util.o
  "_noecho", referenced from:
      _init_dialog in util.o
  "_scrollok", referenced from:
      _dialog_checklist in checklist.o
      _dialog_menu in menubox.o
  "_start_color", referenced from:
      _init_dialog in util.o
  "_stdscr", referenced from:
      _conf in mconf.o
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _end_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      ...
  "_subwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_textbox in textbox.o
      _dialog_menu in menubox.o
  "_ungetch", referenced from:
      _on_key_esc in util.o
  "_waddch", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_button in util.o
      ...
  "_waddnstr", referenced from:
      _print_item in checklist.o
      _print_arrows in checklist.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_autowrap in util.o
      _print_button in util.o
      _dialog_inputbox in inputbox.o
      ...
  "_wattrset", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_button in util.o
      ...
  "_wbkgdset", referenced from:
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      _dialog_menu in menubox.o
  "_wclrtoeol", referenced from:
      _refresh_text_box in textbox.o
      _do_print_item in menubox.o
  "_wgetch", referenced from:
      _dialog_checklist in checklist.o
      _on_key_esc in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_winch", referenced from:
      _draw_shadow in util.o
  "_wmove", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _end_dialog in util.o
      _print_title in util.o
      ...
  "_wnoutrefresh", referenced from:
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _draw_shadow in util.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      _dialog_menu in menubox.o
  "_wprintw", referenced from:
      _print_item in checklist.o
      _refresh_text_box in textbox.o
  "_wrefresh", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _end_dialog in util.o
      _dialog_inputbox in inputbox.o
      _refresh_text_box in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
      ...
  "_wscrl", referenced from:
      _dialog_checklist in checklist.o
      _dialog_menu in menubox.o
  "_wtouchln", referenced from:
      _attr_clear in util.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [scripts/kconfig/mconf] Error 1
make: *** [menuconfig] Error 2

The issue seems to point out to ncurse, but i know ncurse is not the actual culprit because make menuconfig works fine with OpenWRT, so I guess the problem is : linux doesnt look / use the correct toolchain, maybe a makefile problem or something like that?

If i use make nconfig or make ARCH=arm nconfig, i got the menuconfig interface but the build fail afterwards anyway:

这个问题似乎指向了ncurse,但我知道ncurse并不是真正的罪魁祸首,因为make menuconfig在openwrt中工作得很好,所以我猜问题是:linux看起来/使用的工具链不正确,可能是makefile问题或类似的问题?

如果我使用make nconfig或make arch=arm nconfig,我得到了menuconfig接口,但是构建之后还是失败了:

hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/linux (nano-4.14-exp *=) $ make ARCH=arm CROSS_COMPILE=arm-openwrt-linux-muslgnueabi- -j9
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
scripts/kconfig/conf  --silentoldconfig Kconfig
getconf: no such configuration parameter `LFS_CFLAGS'
getconf: no such configuration parameter `LFS_LDFLAGS'
getconf: no such configuration parameter `LFS_LIBS'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  WRAP    arch/arm/include/generated/uapi/asm/errno.h
  WRAP    arch/arm/include/generated/uapi/asm/bitsperlong.h
  WRAP    arch/arm/include/generated/uapi/asm/ioctl.h
  WRAP    arch/arm/include/generated/uapi/asm/msgbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/ipcbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/param.h
  WRAP    arch/arm/include/generated/uapi/asm/poll.h
  WRAP    arch/arm/include/generated/uapi/asm/resource.h
  WRAP    arch/arm/include/generated/uapi/asm/sembuf.h
  WRAP    arch/arm/include/generated/uapi/asm/shmbuf.h
  WRAP    arch/arm/include/generated/uapi/asm/siginfo.h
  WRAP    arch/arm/include/generated/uapi/asm/socket.h
  WRAP    arch/arm/include/generated/uapi/asm/sockios.h
  WRAP    arch/arm/include/generated/uapi/asm/termbits.h
  WRAP    arch/arm/include/generated/uapi/asm/termios.h
  WRAP    arch/arm/include/generated/asm/clkdev.h
  WRAP    arch/arm/include/generated/asm/current.h
  WRAP    arch/arm/include/generated/asm/early_ioremap.h
  WRAP    arch/arm/include/generated/asm/emergency-restart.h
  WRAP    arch/arm/include/generated/asm/exec.h
  WRAP    arch/arm/include/generated/asm/extable.h
  WRAP    arch/arm/include/generated/asm/irq_regs.h
  WRAP    arch/arm/include/generated/asm/kdebug.h
  WRAP    arch/arm/include/generated/asm/local.h
  WRAP    arch/arm/include/generated/asm/local64.h
  WRAP    arch/arm/include/generated/asm/mm-arch-hooks.h
  WRAP    arch/arm/include/generated/asm/msi.h
  WRAP    arch/arm/include/generated/asm/parport.h
  WRAP    arch/arm/include/generated/asm/preempt.h
  WRAP    arch/arm/include/generated/asm/rwsem.h
  WRAP    arch/arm/include/generated/asm/seccomp.h
  WRAP    arch/arm/include/generated/asm/segment.h
  WRAP    arch/arm/include/generated/asm/serial.h
  WRAP    arch/arm/include/generated/asm/simd.h
  WRAP    arch/arm/include/generated/asm/sizes.h
  WRAP    arch/arm/include/generated/asm/timex.h
  WRAP    arch/arm/include/generated/asm/trace_clock.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
scripts/sortextable.c:23:10: fatal error: 'elf.h' file not found
#include <elf.h>
         ^
scripts/mod/mk_elfconfig.c:5:10: fatal error: 'elf.h' file not found
#include <elf.h>
         ^
1 error generated.
make[2]: *** [scripts/mod/mk_elfconfig] Error 1
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/fstree.o
1 error generated.
make[1]: *** [scripts/sortextable] Error 1
make[1]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  SHIPPED scripts/dtc/dtc-lexer.lex.c
  SHIPPED scripts/dtc/dtc-parser.tab.h
  SHIPPED scripts/dtc/dtc-parser.tab.c
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
make: *** Waiting for unfinished jobs....
  UPD     include/config/kernel.release

If anyone has some ideas about what i should do to adjust OpenWRT image generation for 16M flash or to build the official Lichee Pi Nano with the new toolchain, please let me know. Once everything is working fine i will make a new subject that give all the steps to :
-get working toolchain for F1C100S on OSX
-get working OpenWRT for F1C100S on OSX (with flash image)
-get working Lichee Pi Nano linux on OSX
-setup Eclipse or another IDE to build and debug applications on F1C100S for linux directly from OSX (debug via wifi)
Thank you.

如果有人对我应该做些什么来调整16M闪存的openwrt图像生成或者用新的工具链构建官方的lichee pi nano有什么想法,请告诉我。一旦一切正常,我将提出一个新的主题,给出所有步骤:
-在OSX上获取F1C100S的工作工具链
-在OSX上获取F1C100S的工作openwrt(带Flash图像)
-在OSX上运行Lichee Pi Nano Linux
-设置Eclipse或其他IDE,以便直接从OSX(通过WiFi进行调试)在F1C100S上为Linux构建和调试应用程序。
谢谢您。

最近编辑记录 hoel (2019-06-17 00:45:21)

离线

#16 2019-06-19 10:38:32

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,348
积分: 9202

Re: Setup toolchain for F1C100S / F1C200S on OSX 在OSX上为F1C100S/F1C200S设置

@hole 感谢长文分享!Thanks for your share!





离线

页脚

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

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