页次: 1
"这是用外部 工具链吗?"
->是的,/opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabif-gcc;
然后git uboot的时候出现这样的问题怎么解决?git内核成功了,
root@Linux:/home/robert/2_try_v3s/uboot# git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
Cloning into 'u-boot'...
remote: Enumerating objects: 516852, done.
error: RPC failed; result=56, HTTP code = 200 MiB | 23.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
换了一个buildroot:
root@Linux:/home/robert/v3s/buildroot-2017.08# make
>>> toolchain-external-custom Configuring
Cannot execute cross-compiler '/opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabif-gcc'
make: *** [/home/robert/v3s/buildroot-2017.08/output/build/toolchain-external-custom/.stamp_configured] Error 1
root@Linux:/home/robert/v3s/buildroot-2017.08# ls -lh /usr/bin/arm-linux-gnueabihf-gcc
lrwxrwxrwx 1 root root 27 2月 26 2014 /usr/bin/arm-linux-gnueabihf-gcc -> arm-linux-gnueabihf-gcc-4.8
换了一个buildroot:
root@Linux:/home/robert/v3s/buildroot-2017.08# make
>>> toolchain-external-custom Configuring
Cannot execute cross-compiler '/opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabif-gcc'
make: *** [/home/robert/v3s/buildroot-2017.08/output/build/toolchain-external-custom/.stamp_configured] Error 1
你的flash是什么型号呢,具体出了什么错误信息?
还在研究怎么编译出来在16Mflash上的;
然后,有一个问题是:
-》”Zero的文件系统 主要分为buildroot/LEDE,emdebian两类,前者较小,可以在spi flash(16/32MB)或者小容量TF卡(64/128MB)上运行。“(来自zero wiki上的(http://zero.lichee.pro/%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/type.html))
-》具体是怎么操作的呢??buildroot/LEDE在哪里?怎么配置16Mflash的???
flash的型号咋不对应呢???第1个对应的flash型号多,第2个对应的flash型号少?两个不是应该一样么???
第1个,
设备树配置
修改dts配置添加spi flash节点
vi arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
添加spi节点配置:
&spi0 {
status ="okay";
mx25l25635e:mx25l25635e@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
https://box.kancloud.cn/611c8c327abb212991c3d0c02b0cf6d8_954x809.jpg
这里的flash型号需要在下表之中,否则将无法识别:(注意容量也一定要对应)
static const struct spi_device_id m25p_ids[] = {
/*
* Allow non-DT platform devices to bind to the "spi-nor" modalias, and
* hack around the fact that the SPI core does not provide uevent
* matching for .of_match_table
*/
{"spi-nor"},
/*
* Entries not used in DTs that should be safe to drop after replacing
* them with "spi-nor" in platform data.
*/
{"s25sl064a"}, {"w25x16"}, {"m25p10"}, {"m25px64"},
/*
* Entries that were used in DTs without "jedec,spi-nor" fallback and
* should be kept for backward compatibility.
*/
{"at25df321a"}, {"at25df641"}, {"at26df081a"},
{"mx25l4005a"}, {"mx25l1606e"}, {"mx25l6405d"}, {"mx25l12805d"},
{"mx25l25635e"},{"mx66l51235l"},
{"n25q064"}, {"n25q128a11"}, {"n25q128a13"}, {"n25q512a"},
{"s25fl256s1"}, {"s25fl512s"}, {"s25sl12801"}, {"s25fl008k"},
{"s25fl064k"},
{"sst25vf040b"},{"sst25vf016b"},{"sst25vf032b"},{"sst25wf040"},
{"m25p40"}, {"m25p80"}, {"m25p16"}, {"m25p32"},
{"m25p64"}, {"m25p128"},
{"w25x80"}, {"w25x32"}, {"w25q32"}, {"w25q32dw"},
{"w25q80bl"}, {"w25q128"}, {"w25q256"},
/* Flashes that can't be detected using JEDEC */
{"m25p05-nonjedec"}, {"m25p10-nonjedec"}, {"m25p20-nonjedec"},
{"m25p40-nonjedec"}, {"m25p80-nonjedec"}, {"m25p16-nonjedec"},
{"m25p32-nonjedec"}, {"m25p64-nonjedec"}, {"m25p128-nonjedec"},
/* Everspin MRAMs (non-JEDEC) */
{ "mr25h256" }, /* 256 Kib, 40 MHz */
{ "mr25h10" }, /* 1 Mib, 40 MHz */
{ "mr25h40" }, /* 4 Mib, 40 MHz */
{ },
};
退出菜单配置并编译内核和dts
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j32
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
第2个:
uboot 对SPI flash 的识别
本文目录
uboot 对SPI flash 的识别
flash信息在
drivers/mtd/spi/spi_flash_ids.c¶
const struct spi_flash_info spi_flash_ids[] = {
{"w25p80", INFO(0xef2014, 0x0, 64 * 1024, 16, 0) },
{"w25p16", INFO(0xef2015, 0x0, 64 * 1024, 32, 0) },
{"w25p32", INFO(0xef2016, 0x0, 64 * 1024, 64, 0) },
{"w25x40", INFO(0xef3013, 0x0, 64 * 1024, 8, SECT_4K) },
{"w25x16", INFO(0xef3015, 0x0, 64 * 1024, 32, SECT_4K) },
{"w25x32", INFO(0xef3016, 0x0, 64 * 1024, 64, SECT_4K) },
{"w25x64", INFO(0xef3017, 0x0, 64 * 1024, 128, SECT_4K) },
{"w25q80bl", INFO(0xef4014, 0x0, 64 * 1024, 16, RD_FULL | WR_QPP | SECT_4K) },
{"w25q16cl", INFO(0xef4015, 0x0, 64 * 1024, 32, RD_FULL | WR_QPP | SECT_4K) },
{"w25q32bv", INFO(0xef4016, 0x0, 64 * 1024, 64, RD_FULL | WR_QPP | SECT_4K) },
{"w25q64cv", INFO(0xef4017, 0x0, 64 * 1024, 128, RD_FULL | WR_QPP | SECT_4K) },
{"w25q128bv", INFO(0xef4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
{"w25q256", INFO(0xef4019, 0x0, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) },
{"w25q80bw", INFO(0xef5014, 0x0, 64 * 1024, 16, RD_FULL | WR_QPP | SECT_4K) },
{"w25q16dw", INFO(0xef6015, 0x0, 64 * 1024, 32, RD_FULL | WR_QPP | SECT_4K) },
{"w25q32dw", INFO(0xef6016, 0x0, 64 * 1024, 64, RD_FULL | WR_QPP | SECT_4K) },
{"w25q64dw", INFO(0xef6017, 0x0, 64 * 1024, 128, RD_FULL | WR_QPP | SECT_4K) },
{"w25q128fw", INFO(0xef6018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
#define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
.id = { \
((_jedec_id) >> 16) & 0xff, \
((_jedec_id) >> 8) & 0xff, \
(_jedec_id) & 0xff, \
((_ext_id) >> 8) & 0xff, \
(_ext_id) & 0xff, \
}, \
.id_len = (!(_jedec_id) ? 0 : (3 + ((_ext_id) ? 2 : 0))), \
.sector_size = (_sector_size), \
.n_sectors = (_n_sectors), \
.page_size = 256, \
.flags = (_flags),
struct spi_flash_info {
/* Device name ([MANUFLETTER][DEVTYPE][DENSITY][EXTRAINFO]) */
const char *name;
/*
* This array stores the ID bytes.
* The first three bytes are the JEDIC ID.
* JEDEC ID zero means "no ID" (mostly older chips).
*/
u8 id[SPI_FLASH_MAX_ID_LEN];
u8 id_len;
/*
* The size listed here is what works with SPINOR_OP_SE, which isn't
* necessarily called a "sector" by the vendor.
*/
u32 sector_size;
u32 n_sectors;
u16 page_size;
u16 flags;
#define SECT_4K BIT(0) /* CMD_ERASE_4K works uniformly */
#define E_FSR BIT(1) /* use flag status register for */
#define SST_WR BIT(2) /* use SST byte/word programming */
#define WR_QPP BIT(3) /* use Quad Page Program */
#define RD_QUAD BIT(4) /* use Quad Read */
#define RD_DUAL BIT(5) /* use Dual Read */
#define RD_QUADIO BIT(6) /* use Quad IO Read */
#define RD_DUALIO BIT(7) /* use Dual IO Read */
#define RD_FULL (RD_QUAD | RD_DUAL | RD_QUADIO | RD_DUALIO)
};
Next Previous
“
晕哥,有v3s 16M的文件系统吗?
现在uboot zimage 都烧写正常,能启动,但是过一会就提示 [ 1.269366] Rebooting in 5 seconds..
应该是文件系统有问题。
我用buildroot2018.08.2,按照之前帖子说明配置好了,制作bin文件的步骤如下:
tar xvf ../../images/rootfs.tar -C ../../images 文件系统默认是压缩包,需要解压吧
mkfs.jffs2 -s 0x100 -e 0x10000 -p 0xAF0000 -d ../../images/rootfs/ -o jffs2.imgdd if=/dev/zero of=flashimg.bin bs=1M count=16
dd if=../uboot-v3s-spi-experimental/u-boot-sunxi-with-spl.bin of=flashimg.bin bs=1K conv=notrunc
dd if=arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb of=flashimg.bin bs=1K seek=1024 conv=notrunc
dd if=arch/arm/boot/zImage of=flashimg.bin bs=1K seek=1088 conv=notrunc
dd if=jffs2.img of=flashimg.bin bs=1K seek=5184 conv=notrunc哪些地方有错误吗?
”
哥们你这些配置弄成功了么?用16M的flash???
290qcxlf 说:晕哥 说:1. 16M 可以装下 Qt了
2. 我记得账号是root, 密码是 licheepi
3. ov5647 要用全志官方的camdroid才行 https://whycan.cn/t_1780.html, 搞MIPI/DVP摄像头,视频编解码目前只能用官方的SDK.主线Uboot + Bsp 内核是可以支持什么摄像头比较好啊???16M flash的系统可以同时开发摄像头+qt+wifi么?
主线Uboot + Bsp 内核 支持所有bsp支持的摄像头 ov271X, ov5647, ar0330 等,
16M flash的系统可以同时开发摄像头+qt+wifi, 一般的应用足够了,
实在不行还有32M.
OK,谢谢晕哥大神,那我用sd卡先熟悉编译系统,然后再编译16M的flash启动的linux开发ov5647摄像头+qt5+wifi(rtl8188cus或者esp的),采用主线Uboot + Bsp 内核的方式,就不用坑卓开发了
290qcxlf 说:问题1:编译16M的flash linux不能用qt写界面是么??
问题2: Debian GNU/Linux 8 LicheePi ttyS0
licheepi login: root
——》按下回车登录没有反应???
问题3:编译支持ov5647摄像头的linux系统的开发环境和主要步骤是怎样的???编sd卡启动和flash启动的步骤是一样的么???1. 16M 可以装下 Qt了
2. 我记得账号是root, 密码是 licheepi
3. ov5647 要用全志官方的camdroid才行 https://whycan.cn/t_1780.html, 搞MIPI/DVP摄像头,视频编解码目前只能用官方的SDK.
主线Uboot + Bsp 内核是可以支持什么摄像头比较好啊???16M flash的系统可以同时开发摄像头+qt+wifi么?
进入到 Device Drivers ‣ SPI Flash Support,选择Enable Driver Model for SPI flash:
-星号- Enable Driver Model for SPI flash │ │
│ │ [ ] Support sandbox SPI flash device │ │
│ │ [星号] Legacy SPI Flash Interface support │ │
│ │ [ ] SPI flash Bank/Extended address register support │ │
│ │ [ ] Atmel SPI flash support │ │
│ │ [ ] EON SPI flash support │ │
│ │ [ ] GigaDevice SPI flash support │ │
│ │ [ ] Macronix SPI flash support │ │
│ │ [ ] Spansion SPI flash support │ │
│ │ [ ] STMicro SPI flash support │ │
│ │ [ ] SST SPI flash support │ │
│ │ [星号] Winbond SPI flash support │ │
│ │ [星号] Use small 4096 B erase sectors │ │
│ │ [ ] AT45xxx DataFlash support │ │
│ │ [ ] SPI Flash MTD support
Save 以后直接退出是么????
然后遇到这个问题:
cmd/bootm.c: In function ‘do_imls_nor’:
cmd/bootm.c:327:7: error: ‘CONFIG_SYS_MAX_FLASH_BANKS’ undeclared (first use in this function)
i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
^
cmd/bootm.c:327:7: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:280: recipe for target 'cmd/bootm.o' failed
页次: 1