Hello,
After some struggle i managed to get a working toolchain for F1C100S on OSX, thanks to the help and suggestions of Quotation, Mango and 晕哥 https://whycan.cn/t_2571.html#p20276, OpenWRT is also building and working fine, however there is stil a problem with it: this version was adjusted to create an SD card image instead of a flash image. It is a problem with the F1C100S since the wifi uses the SDIO interface so using an SD card to store OpenWRT and filesystem prevent wifi connectivity, which is really a problem in my opinion especially if you need to debug from an IDE (Eclipse or QT Editor) since network access is required.
The OpenWRT i use has been made by Qin Fengling and can be found here https://github.com/qinfengling/openwrt/tree/licheepi-nano some tweaking was required to get it working on OSX, i will detail these in new subject (step-by-step instruction to get everything working on OSX), once this image generation problem is fixed.
I checked the sources an found the SD card image generation is done by at least the makefile and the script gen_sunxi_sdcard_img.sh which can be found here : https://github.com/qinfengling/openwrt/tree/licheepi-nano/target/linux/sunxi/image, i am not sure if any other files are involved (.dts?). When i asked Qin Fengling about adjusting this OpenWRT to generate flash image instead he told i have to make a profile :
You need to add your own profile, if you want to support 16MB Flash, you can find some reference in the code:
https://github.com/openwrt/openwrt/tree/master/target/linux
I am not sure on how to remake a profile from scratch, i have worked on another target for a specific application (MT7628) and it generates a 16MB flash image which is what i need here for the F1C100S, i checked definition of this target, i am not sure i can just modify these files to make the F1C100S profile.
Does anyone know what steps should be taken to either adjust the current target profile for making 16MB flash image, or tailor another existing profile already generating 16MB flash image to the curent F1C00S target?
Thank you.
你好,
经过一番努力,我终于在OSX上找到了一个F1C100S的工作工具链,感谢报价的帮助和建议,Mango和晕哥https://whycan.cn/t_2571.html#p20276,OpenWRT也在构建和工作,但是它仍然有问题,这个版本被调整为创建SD卡图像而不是闪存。图像,这是F1C100的一个问题,因为WiFi使用SDIO接口,所以使用SD卡存储openwrt和文件系统会阻止WiFi连接,这在我看来确实是一个问题,特别是当您需要从IDE(Eclipse或Qt编辑器)调试时,因为这需要网络访问。
我使用的openwrt是由秦凤玲制作的,可以在这里找到https://github.com/qinfengling/openwrt/tree/licheepi-nano要使它在OSX上工作,需要进行一些调整,一旦解决了这个图像生成问题,我将在新主题中详细介绍这些内容(一步一步地说明如何使所有内容都在OSX上工作)。
我检查了来源,发现SD卡图像生成至少由makefile和脚本gen_sunxi_sdcard_img.sh完成,可以在这里找到:https://github.com/qinfengling/openwrt/tree/licheepi-nano/target/linux/sunxi/image,我不确定是否涉及其他文件(.dts?)当我问秦凤玲如何调整这个openwrt来生成flash image时,他告诉我必须做一个配置文件:
您需要添加自己的配置文件,如果您想支持16MB闪存,可以在代码中找到一些参考:
https://github.com/openwrt/openwrt/tree/master/target/linux
我不知道如何从头重新创建一个配置文件,我已经为一个特定的应用程序(MT7628)在另一个目标上工作,它生成一个16MB的闪存图像,这是我在这里需要的F1C100S,我检查了这个目标的定义,但我不确定我可以直接将这些文件用于F1C100S配置文件。
是否有人知道应该采取什么步骤来调整当前目标配置文件以生成16MB闪存图像,或者将16MB闪存image中已经生成的另一个现有配置文件调整为当前的f1c00s目标?
谢谢您。
最近编辑记录 hoel (2019-06-17 00:51:04)
离线
i presume the modification involve doing something along these lines :
http://nano.lichee.pro/build_sys/build_flash.html
dd if=/dev/zero of=flashimg.bin bs=1M count=16 &&\
dd if=$YOUR_UBOOT_FILE of=flashimg.bin bs=1K conv=notrunc &&\
dd if=$YOUR_DTB_FILE of=flashimg.bin bs=1K seek=1024 conv=notrunc &&\
dd if=$YOUR_KERNEL_FILE of=flashimg.bin bs=1K seek=1088 conv=notrunc &&\
mkdir rootfs
tar -xzvf $YOUR_ROOTFS_FILE -C ./rootfs &&\
cp -r $YOUR_MOD_FILE rootfs/lib/modules/ &&\
# 为根文件系统制作jffs2镜像包
# --pad参数指定 jffs2大小
# 由此计算得到 0x1000000(16M)-0x10000(64K)-0x100000(1M)-0x400000(4M)=0xAF0000
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o jffs2.img &&\
dd if=jffs2.img of=$YOUR_IMG_FILE bs=1K seek=5184 conv=notrunc &&\
but not sure how to achieve this, when i check the target bin directory there is nothing else that the SD card image:
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/bin/targets/sunxi/arm9 (licheepi-nano *=) $ ls
config.seed
openwrt-sunxi-arm9-device-suniv-f1c100s-licheepi-nano.manifest
openwrt-sunxi-arm9-suniv-f1c100s-licheepi-nano-ext4-sdcard.img.gz
openwrt-sunxi-arm9-suniv-f1c100s-licheepi-nano-squashfs-sdcard.img.gz
packages
sha256sums
No file for any of these:
$YOUR_UBOOT_FILE
$YOUR_DTB_FILE
$YOUR_KERNEL_FILE
$YOUR_ROOTFS_FILE
$YOUR_MOD_FILE
EDIT:
i found some u-boot image here :
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/build_dir/target-arm_arm926ej-s_musl_eabi/u-boot-licheepi_nano/u-boot-2017.11 (licheepi-nano *=) $ ls
Documentation arch dts snapshot.commit u-boot.bin
Kbuild board env spl u-boot.cfg
Kconfig cmd examples test u-boot.cfg.configs
Licenses common fs tools u-boot.dtb
MAINTAINERS config.mk include u-boot u-boot.img
Makefile configs lib u-boot-dtb.bin u-boot.lds
README disk net u-boot-dtb.img u-boot.map
System.map doc post u-boot-nodtb.bin u-boot.srec
api drivers scripts u-boot-sunxi-with-spl.bin u-boot.sym
and some other images here, which seem to be related to kernel / rootfs:
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/build_dir/target-arm_arm926ej-s_musl_eabi/linux-sunxi_arm9 (licheepi-nano *=) $ ls
backports-2017-11-01 linux-atm-2.5.2 root.ext4 vmlinux
base-files mtd root.squashfs vmlinux.debug
iptables-1.6.2 opkg-2017-12-07-3b417b9f suniv-f1c100s-licheepi-nano-kernel.bin vmlinux.elf
linux-4.14.63 packages tmp zImage
最近编辑记录 hoel (2019-06-17 01:32:32)
离线
Also a .dtb file here :
hoel@iMac-de-Hoel-7 /Volumes/arm-linux-toolchain/openwrt/build_dir/target-arm_arm926ej-s_musl_eabi/linux-sunxi_arm9/linux-4.14.63/arch/arm/boot/dts (licheepi-nano *=) $ find *.dtb
suniv-f1c100s-licheepi-nano-with-lcd.dtb
suniv-f1c100s-licheepi-nano.dtb
not sure if it is the right one tho.
One concern is that there is no jffs2 option when i check in OpenWRT menuconfig:
离线
你好,你在该设备上实现openWRT了吗?
离线