页次: 1
前几天司徒删了库,但是我fork了一个,看下这个是不是你需要的?
这里面啥源码?刚接触没看明白是啥
MTD没有生成,添加如下配置:
<*>Command line partition table parsing
<*>Caching block device access to MTD devices
Self-contained MTD device drivers
<*> MTD using block device
修改后打印:
[ 0.881293] 4 ofpart partitions found on MTD device spi0.0
[ 0.886895] Creating 4 MTD partitions on "spi0.0":
[ 0.891762] 0x000000000000-0x000000070000 : "u-boot"
[ 0.899263] 0x000000070000-0x000000080000 : "dtb"
[ 0.906572] 0x000000080000-0x000000480000 : "kernel"
[ 0.914126] 0x000000480000-0x000000800000 : "rootfs"
新问题:
[ 1.407685] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[ 1.415785] Please append a correct "root=" boot option; here are the available partitions:
[ 1.424261] 1f00 448 mtdblock0
[ 1.424273] (driver?)
[ 1.430866] 1f01 64 mtdblock1
[ 1.430874] (driver?)
[ 1.437520] 1f02 4096 mtdblock2
[ 1.437528] (driver?)
[ 1.444157] 1f03 3584 mtdblock3
[ 1.444165] (driver?)
[ 1.450752] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
设备树不对?
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "macronix,mx25l12805d", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x70000>;
read-only;
};
partition@70000 {
label = "dtb";
reg = <0x70000 0x10000>;
read-only;
};
partition@80000 {
label = "kernel";
reg = <0x80000 0x400000>;
read-only;
};
partition@480000 {
label = "rootfs";
reg = <0x480000 0x380000>;
};
};
};
uboot 里已经添加了
panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=ext4
[ 3.742288] Waiting for root device /dev/mtdblock3...
[ 5.219089] sunxi-mmc 1c0f000.mmc: fatal err update clk timeout
。。。。。。
按楼主步骤,内核启动挂在这了,这是从emmc启动了吗?
linux内核在哪里设置从spinor启动?
init下感觉源码写得太隐晦没太看明白
按我的理解,kernel启动之后,要挂载根文件系统,那么根文件系统有可能在NOR上,也有可能在MMC上
正常就应该有个标志指示从NOR还是MMC上启动,然后由相应的驱动根据MBR挂载rootfs,
那这个标示在linux内核在哪里呢?
参考 https://whycan.cn/t_1623.html , 改为CONFIG_SPI_SUN6I,结果还是一样,晕了
100s又掉进坑了
buildroot掉坑记录:
交叉编译工具链:gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)
buildroot版本:buildroot-2019.02.2 (低版本测试有相同的问题)
Target Architecture (ARM (little endian))
Target Architecture Variant (arm926t)
ARM instruction set (Thumb)
External toolchain gcc version (7.x)
External toolchain kernel headers series (4.14.x)
External toolchain C library (musl (experimental))
Incorrect selection of kernel headers: expected 4.14.x, got 4.10.x
make[1]: *** [/work/nano/buildroot-2019.02.2/output/build/toolchain-external-custom/.stamp_configured] Error 1
make: *** [_all] Error 2
改为:
External toolchain kernel headers series (4.10.x)
External toolchain C library (glibc/eglibc)
新问题:
ln: failed to create symbolic link ‘/work/nano/buildroot-2019.02.2/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/lib’: No such file or directory
make[1]: *** [/work/nano/buildroot-2019.02.2/output/build/toolchain-external-custom/.stamp_staging_installed] Error 1
make: *** [_all] Error 2
权限问题?手动复制过去编译中>>>
阔以了,权限问题
网络比较慢,linux版本的git一晚上没下好,下了官网链接win版本的eclipse ide
导入工程makefile指定平台后编译,发现make失败了,有用过windos的模拟器的大神没
makefile修改:
#
# Makefile for xboot
#
#
# You must pass CROSS_COMPILE and PLATFORM variable.
#
CROSS_COMPILE ?=arm-linux-gnueabihf-
PLATFORM ?=arm32-realview
----------------------------------------------------------
错误提示:
make all
Usage:
make [-AeEhiknpqrsStTuvVx] [-P#] [-f file] [macro[][+][:]=value ...] [target ...]
make: Error code 255, while making 'all'
11:05:56 Build Finished. 0 errors, 0 warnings. (took 158ms)
Learning 说:学习了。。。
linux生人,怎么默认修改串口为PA2 PA3 (串口1)? 只改dts好像不行
1. 先改 u-boot
2. bootargs 要修改
3. linux dts 修改
感谢,按参考网址的修改确实可以了
感觉tina直接修改的sys_config.fex还是相对简单方便些,
nano用来学习可以了解更多知识哈
页次: 1