页次: 1
8192C的驱动正常, 可以扫描周边 热点, 但 wpa_supplicant 连接热点时, 一直提示 Driver does not support authentication/association or connect commands, 实在找不到原因了. 有高手知道的, 请赐教一下.
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:1D:43:20:00:11
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf & iwconfig
wlan0
rtw_wx_get_rts, rts_thresh=2347
Successfully initialized wpa_supplicant
[ 869.744614] rtw_wx_get_frag, frag_len=2346
wlan0 unassociated Mode:Auto Frequency=2.412 GHz
Access Point: Not-Associated
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
# nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface
目前已成功通过ttyUSB2 访问4G模块PPP端口, 进行拔号上网,
现在想通过 通过ttyUSB1 访问4G模块,使用AT指令,
在控制台测试结果如下:
root@TinaLinux:/# cat /dev/ttyUSB1
[ 168.317142] ERR: sunxi_hcd_schedule, best_end
[ 168.322014] ERR: sunxi_hcd_schedule failed
[ 168.326744] ERR: sunxi_hcd_schedule, best_end
[ 168.331596] ERR: sunxi_hcd_schedule failed
[ 168.336205] ERR: sunxi_hcd_schedule, best_end
[ 168.341048] ERR: sunxi_hcd_schedule failed
[ 168.345642] ERR: sunxi_hcd_schedule, best_end
[ 168.350479] ERR: sunxi_hcd_schedule failed
芯片是F1C200S
请问高手们,这是什么原因?
查寄存手册,
3.5.5. INTC Register List
Module Name Base Address
INTC 0x01C20400
Register Name Offset Description
INTC_VECTOR_REG 0x00 Interrupt Vector Register
INTC_BASE_ADDR_REG 0x04 Interrupt Base Address Register
NMI_INT_CTRL_REG 0x0C NMI Interrupt Control Register
INTC_PEND_REG0 0x10 Interrupt Pending Register 0
INTC_PEND_REG1 0x14 Interrupt Pending Register 1
INTC_EN_REG0 0x20 Interrupt Enable Register 0
INTC_EN_REG1 0x24 Interrupt Enable Register 1
INTC_MASK_REG0 0x30 Interrupt Mask Register 0
INTC_MASK_REG1 0x34 Interrupt Mask Register 1
INTC_RESP_REG0 0x40 Interrupt Response Register 0
INTC_RESP_REG1 0x44 Interrupt Response Register 1
INTC_FF_REG0 0x50 Interrupt Fast Forcing Register 0
INTC_FF_REG1 0x54 Interrupt Fast Forcing Register 1
INTC_PRIO_REG0 0x60 Interrupt Source Priority Register 0
INTC_PRIO_REG1 0x64 Interrupt Source Priority Register 1
INTC_PRIO_REG2 0x68 Interrupt Source Priority Register 2
INTC_PRIO_REG3 0x6C Interrupt Source Priority Register 3
设置 INTC_PRIO_REG0 ~ INTC_PRIO_REG3, 控制 优先级发现 没用,
指定 INTC_FF_REG0~INTC_RESP_REG1, 为快速中断, 系统卡死,
应该是 底层没有 实现快速中断,,
晕啦, 不知道怎么实现.
我用 代理商提供的 package/allwinner/tina_multimedia_demo/decodertest/src
decodertest 进行解码, 输入MB420, 对应的是 PIXEL_FORMAT_YUV_MB32_420 格式,
生成 YUV数据文件 保存到U盘
在电脑上用程序转RGB显示出来, 发现 Y(灰度) 数据 是对的
U/V(色彩)数值 在一个很小的范围变化, 几乎转不出色彩
用16进制工具, 打开这个 YUV数据文件,也明显看到, U V数据是不对的,
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
75 85 75 85 75 85 75 85
74 86 74 86 74 86 74 86
74 86 74 86 74 86 74 86
74 86 74 86 74 86 74 86
74 86 74 86 74 86 74 86
74 86 74 86 74 86 74 86
有没有高手指教一下,到底是什么问题?
4. buildroot 编译
因为在c600的buildroot没有搞定直接配置编译,所以单独处理buildroot问题,使用c600 bsp的工具链.
cd /opt/
wget https://buildroot.org/downloads/buildroot-2017.08.1.tar.gz ###下载buildroot源码
tar xvf buildroot-2017.08.1.tar.gz
cd /opt/buildroot-2017.08.1/
wget https://whycan.cn/files/c600_bsp/buildroot.config -O .config ###下载配置文件
make ###直接编译
5. 拷贝可执行文件:
cp /opt/buildroot-2017.08.1/output/target/usr/bin/fb-test* /opt/c600/out/sunivw1p1/linux/common/buildroot/target/usr/bin ##拷贝到根文件系统
这里 下载了 buildroot-2017.08.1, 并且正常编译,
后面的:
./build.sh -p sunivw1p1 -k linux-3.10 -m all ###编译
./build.sh pack ####打包
好像没有使用到 buildroot-2017.08.1.tar.gz. 那下载这个有什么用了?
busybox里面开启 udhcpc 就可以了,
执行
udhcpc -i eth0
太太太太太感谢了!可以正常工作了。
估计这里很多高手早就弄出来了, 不过我还是说一下流程吧,后面的朋友们可以参考参考
一、 在 arch/arm/boot/dts/suniv.dtsi
1. 添加头文件引用 #include <dt-bindings/interrupt-controller/irq.h>
2. 添加
spi1: spi@1c06000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c06000 0x1000>;
interrupts = <11>;
clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_BUS_SPI1>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
二、 在 arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
添加
&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins_a>;
status = "okay";
eth1: enc28j60@0{
compatible = "microchip,enc28j60";
reg = <0x0>; /* CE0 */
interrupt-parent = <&pio>;
interrupts = <4 11 IRQ_TYPE_EDGE_FALLING>; /* (PE11) */
gpios = <&pio 4 11 GPIO_ACTIVE_HIGH>;
spi-max-frequency = <12000000>;
status = "okay";
};
};
前面两点,在uboot 和 内核 的dst 文件都添加
三、 在\include\generated\autoconf.h
文件添加 #define CONFIG_ENC28J60 1
就可以了。
# cat /proc/interrupts
CPU0
16: 500 sun4i_irq 13 Edge timer@1c20c00
19: 90592 sun4i_irq 10 Edge sun6i-spi
20: 260 sun4i_irq 11 Edge sun6i-spi
22: 220 sun4i_irq 23 Edge sunxi-mmc
27: 331 sun4i_irq 2 Edge ttyS1
29: 0 sun4i_irq 26 Edge musb-hdrc.1.auto
65: 1 sunxi_pio_edge 34 Edge usb0-id-det
74: 24 sunxi_pio_edge 43 Edge enc28j60
拿导线,把 INT脚,接地,就有中断次数了
中断接了吗?dts配了中断吗?
cat /proc/interrupts 显示enc28j60有多少次中断?
# cat /proc/interrupts
CPU0
16: 695 sun4i_irq 13 Edge timer@1c20c00
19: 90546 sun4i_irq 10 Edge sun6i-spi
20: 67 sun4i_irq 11 Edge sun6i-spi
22: 362 sun4i_irq 23 Edge sunxi-mmc
27: 244 sun4i_irq 2 Edge ttyS1
29: 0 sun4i_irq 26 Edge musb-hdrc.1.auto
65: 1 sunxi_pio_edge 34 Edge usb0-id-det
74: 0 sunxi_pio_edge 43 Edge enc28j60
非常感觉!
现在启动时,
[0.958407] enc28j60 spi1.0: enc28j60 Ethernet driver 1.02 loaded
[0.975314] net eth0: enc28j60 driver registered
不过网络无法连接, 还得继续研究
搞不掂,可以分享你那个DTS吗?
参考这个帖子: https://whycan.cn/t_3380.html
找到了,原来是在 menuconfig里面设置
参考这个帖子: https://whycan.cn/t_3380.html
就是先参考这个例子,
发现一编译,改了 u-boot/u-boot.cfg include/generated/autoconf.h
一编译, 马上变回去,,,,,可能这两个文件都是编译过程中生成的
在 /sys/class/spi_master 目录下,看得到 SPI0 SPI1, 在 /dev/目录下没有,
如何是好了?
# ls
backlight graphics misc pwm spi_master
bdi i2c-adapter mmc_host regulator spidev
block i2c-dev mtd scsi_changer thermal
bsg ieee80211 net scsi_device tty
dma input phy scsi_disk udc
drm leds power_supply scsi_generic vc
extcon mdio_bus pps scsi_host vtconsole
gpio mem ptp sound
# cd spi_master
# ls
spi0 spi1
原来是设备树没配好 重要的设备节点漏了
参考了链接 http://linux-sunxi.org/SPIdev
把/dev/spidev1.0配出来了
最后怎么搞掂的?
我这里也是,有看到,SPI1 初始化信息,但在 /dev/ 没有 SPI1 设备, SPI0也没有
编译那个, linux 4 版本正常运行,
想编译这个, linux 3的版本,
提示如下错误,不知道怎么解决 ubuntu 版本是 18 64位的
Makefile:241: recipe for target 'autoconf.info' failed
make[3]: *** [autoconf.info] Error 1
make[3]: Leaving directory '/root/Documents/C600_Linux/out/sunivw1p1/linux/common/buildroot/build/host-autoconf-2.65/doc'
Makefile:338: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/root/Documents/C600_Linux/out/sunivw1p1/linux/common/buildroot/build/host-autoconf-2.65'
Makefile:653: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/root/Documents/C600_Linux/out/sunivw1p1/linux/common/buildroot/build/host-autoconf-2.65'
package/Makefile.package.in:296: recipe for target '/root/Documents/C600_Linux/out/sunivw1p1/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed' failed
make: *** [/root/Documents/C600_Linux/out/sunivw1p1/linux/common/buildroot/build/host-autoconf-2.65/.stamp_host_installed] Error 2
make: Leaving directory '/root/Documents/C600_Linux/buildroot'
ERROR: build buildroot Failed
root@ubuntu:~/Documents/C600_Linux# apt-get install-recursive
E: Invalid operation install-recursive
root@ubuntu:~/Documents/C600_Linux# apt-get install recursive
Reading package lists... Done
Building dependency tree
Reading state information... Done
非常感谢 ^_^ GPIO中断早就按,上面第一第二的例子的搞掂了,
现在是在设备树描述文件里,添加 TIME,上面第三个例子值得参考,
kernel header (2.6.x) 那里改选 4.10.x
上面的改过来 了,编译了好久, 然后遇到问题了, 是不是 arm-linux-gnueabi_7.x 不支持?
arm-none-linux-gnueabihf_9.2 这个不行,
arm-none-linux-gnueabi_9.x的没找到
错误提示如下:
root@ubuntu:~/Documents/F1C100S/buildroot-2019.11# make
>>> toolchain-external-custom Configuring
Incorrect selection of the C library
package/pkg-generic.mk:228: recipe for target '/root/Documents/F1C100S/buildroot-2019.11/output/build/toolchain-external-custom/.stamp_configured' failed
make: *** [/root/Documents/F1C100S/buildroot-2019.11/output/build/toolchain-external-custom/.stamp_configured] Error 255
root@ubuntu:~/Documents/F1C100S/buildroot-2019.11#
>>> toolchain-external-custom Configuring
Incorrect selection of kernel headers: expected 2.6.x, got 4.10.x
package/pkg-generic.mk:228: recipe for target '/root/Documents/F1C100S/buildroot-2019.11/output/build/toolchain-external-custom/.stamp_configured' failed
make: *** [/root/Documents/F1C100S/buildroot-2019.11/output/build/toolchain-external-custom/.stamp_configured] Error 1
我的提示这个错误
又一个掉坑里面的,那个冒号要去掉,本来是个空格的
你好,晕哥,现在编译好的 linux 烧录后运行正常,在window 下,通过串来控制 这系统,目前用 DNW 这工具,
返回的,数据不好看,
# ls
[1;36mbin[m [1;36mlib[m [1;34mmedia[m [1;34mproc[m [1;36msbin[m [1;34musr[m
[1;34mdev[m [1;36mlib32[m [1;34mmnt[m [1;34mroot[m [1;34msys[m [1;34mvar[m
[1;34metc[m [1;36mlinuxrc[m [1;34mopt[m [1;34mrun[m [1;34mtmp[m
请问一般为什么串口工具来了?
非常感谢,已经可以正常运行了,现在在测试其它功能。
没有生成 mtd 分区吧
十分感谢指导
现在离成功更近一步了
[ 1.542665] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 1.566491] devtmpfs: mounted
[ 1.580350] Freeing unused kernel memory: 1024K
[ 1.827494] random: crng init done
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving random seed: SKIP (read-only file system detected)
Starting network: OK
[ 0.923270] 0x000000000000-0x000000070000 : "u-boot"
[ 0.930955] 0x000000070000-0x000000080000 : "dtb"
[ 0.938202] 0x000000080000-0x000000480000 : "kernel"
[ 0.945814] 0x000000480000-0x000000c00000 : "rootfs"
[ 0.953431] 0x000000c00000-0x000001000000 : "overlayfs"
[ 0.961801] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.968533] ehci-platform: EHCI generic platform driver
[ 0.974142] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.980516] ohci-platform: OHCI generic platform driver
[ 0.986201] usbcore: registered new interface driver usb-storage
[ 0.993304] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.002445] i2c /dev entries driver
[ 1.068475] sunxi-mmc 1c0f000.mmc: base:0x(ptrval) irq:19
[ 1.075973] usbcore: registered new interface driver usbhid
[ 1.081738] usbhid: USB HID core driver
[ 1.103411] NET: Registered protocol family 17
[ 1.108165] Key type dns_resolver registered
[ 1.114772] Loading compiled-in X.509 certificates
[ 1.130104] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739cb8)
[ 1.139110] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0738f9c)
[ 1.146867] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.153611] [drm] No driver support for vblank timestamp query.
[ 1.207614] Console: switching to colour frame buffer device 60x34
[ 1.231292] sun4i-drm display-engine: fb0: frame buffer device
[ 1.238842] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.259667] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.289135] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.307200] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.330226] hub 1-0:1.0: USB hub found
[ 1.340830] hub 1-0:1.0: 1 port detected
[ 1.352912] using random self ethernet address
[ 1.363921] using random host ethernet address
[ 1.376556] usb0: HOST MAC 7e:7b:3d:f3:4e:82
[ 1.387339] usb0: MAC 92:2a:53:ab:08:31
[ 1.397489] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.417198] g_cdc gadget: g_cdc ready
[ 1.428086] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.457997] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.477266] vcc3v3: disabling
[ 1.486541] ALSA device list:
[ 1.495707] #0: Loopback 1
[ 1.505478] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.526180] cfg80211: failed to load regulatory.db
[ 1.539015] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[ 1.559040] Please append a correct "root=" boot option; here are the available partitions:
[ 1.579475] 1f00 448 mtdblock0
[ 1.579488] (driver?)
[ 1.597887] 1f01 64 mtdblock1
[ 1.597899] (driver?)
[ 1.615901] 1f02 4096 mtdblock2
[ 1.615914] (driver?)
[ 1.633498] 1f03 7680 mtdblock3
[ 1.633510] (driver?)
[ 1.650737] 1f04 4096 mtdblock4
[ 1.650749] (driver?)
[ 1.667502] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 1.686010] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc8-licheepi-nano #2
[ 1.703834] Hardware name: Allwinner suniv Family
[ 1.714091] [<c010e584>] (unwind_backtrace) from [<c010b6cc>] (show_stack+0x10/0x14)
[ 1.732874] [<c010b6cc>] (show_stack) from [<c0116880>] (panic+0xb8/0x230)
[ 1.750844] [<c0116880>] (panic) from [<c0901190>] (mount_block_root+0x170/0x250)
[ 1.769568] [<c0901190>] (mount_block_root) from [<c0901364>] (mount_root+0xf4/0x120)
[ 1.788642] [<c0901364>] (mount_root) from [<c09014b8>] (prepare_namespace+0x128/0x188)
[ 1.808181] [<c09014b8>] (prepare_namespace) from [<c0900dc0>] (kernel_init_freeable+0x174/0x1b8)
[ 1.828995] [<c0900dc0>] (kernel_init_freeable) from [<c0666410>] (kernel_init+0x8/0x10c)
[ 1.849179] [<c0666410>] (kernel_init) from [<c0107de0>] (ret_from_fork+0x14/0x34)
[ 1.868781] Rebooting in 5 seconds..
[ 7.853959] Reboot failed -- System halted
MTD不错OK了就是还有问题
.config 里面选了一些不需要的组件,比如 Qt, ffmpeg, mplayer 等吧?
都是按官方教程一步步来的,不管了, 再按 https://whycan.cn/t_2179.html
这里的教程,全部重来一遍. 有点心憔力悴
和这个没关系, 你是你的 target/ 目录太大了。
T_T 为什么我生成的目标文件这么大
#! /bin/bash
rm -rf ./output
mkdir ./output
cd ./output
OUT_FILENAME="flashimg.bin"
UBOOT_FILE=../u-boot/u-boot-sunxi-with-spl.bin
KERNEL_DIR=../linux
KERNEL_MODULES_DIR=$KERNEL_DIR/out/*
DTB_FILE=$KERNEL_DIR/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
KERNEL_FILE=$KERNEL_DIR/arch/arm/boot/zImage
ROOTFS_FILE=../buildroot-2017.08/output/images/rootfs.tar
SPEC_FILE=./custom/*
SCRIPTES=./scripts/*.sh
dd if=/dev/zero of=$OUT_FILENAME bs=1M count=16
dd if=$UBOOT_FILE of=$OUT_FILENAME bs=1K conv=notrunc
dd if=$DTB_FILE of=$OUT_FILENAME bs=1K seek=448 conv=notrunc
dd if=$KERNEL_FILE of=$OUT_FILENAME bs=1K seek=512 conv=notrunc
mkdir rootfs
tar xf $ROOTFS_FILE -C ./rootfs
cp -r $KERNEL_MODULES_DIR rootfs/usr/
cp -r $SPEC_FILE rootfs/
# add some custom modify
for f in $SCRIPTES; do
ROOTFS_PATH=./rootfs bash "$f" -H
done
fakeroot mksquashfs rootfs/ rootfs.img -no-exports -no-xattrs -all-root
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -d overlay/
dd if=rootfs.img of=$OUT_FILENAME bs=1K seek=4608 conv=notrunc
dd if=jffs2.img of=$OUT_FILENAME bs=1M seek=12 conv=notrunc
rm -rf rootfs rootfs.img jffs2.img
mkfs.jffs2: not found
sudo apt-get install mtd-utils
加了这两个,生成的文件好大,100M, 我把 build.sh 的,
#fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -r rootfs -o rootfs.img -D rootfs
#fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -D overlay
#dd if=rootfs.img of=$OUT_FILENAME bs=1K seek=5184 conv=notrunc
#dd if=jffs2.img of=$OUT_FILENAME bs=1M seek=12 conv=notrunc
这两句屏蔽了,就和以前一样了,可能不需要这几句
没有生成 mtd 分区吧
<*> OpenFirmware partitioning information support
<*> Caching block device access to MTD devices
<*> Support most SPI Flash chips (AT26DF, M25P, W25X, ...)
< > Microchip 23K256 SRAM
< > Support SST25L (non JEDEC) SPI Flash chips
< > Uncached system RAM
< > Physical system RAM
< > Test driver using RAM
<*> MTD using block device
*** Disk-On-Chip Device Drivers ***
< > M-Systems Disk-On-Chip G3
这样勾选了同学 是生成不了 MTD
打包脚本用这个,对不对?
#! /bin/bash
rm -rf ./output
mkdir ./output
cd ./output
OUT_FILENAME="flashimg.bin"
UBOOT_FILE=../u-boot/u-boot-sunxi-with-spl.bin
KERNEL_DIR=../linux
KERNEL_MODULES_DIR=$KERNEL_DIR/out/*
DTB_FILE=$KERNEL_DIR/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
#DTB_FILE=../u-boot/arch/arm/dts/suniv-f1c100s-licheepi-nano.dtb
KERNEL_FILE=$KERNEL_DIR/arch/arm/boot/zImage
ROOTFS_FILE=../buildroot-2017.08/output/images/rootfs.tar
SPEC_FILE=./custom/*
SCRIPTES=./scripts/*.sh
dd if=/dev/zero of=$OUT_FILENAME bs=1M count=16
dd if=$UBOOT_FILE of=$OUT_FILENAME bs=1K conv=notrunc
dd if=$DTB_FILE of=$OUT_FILENAME bs=1K seek=1024 conv=notrunc
dd if=$KERNEL_FILE of=$OUT_FILENAME bs=1K seek=1088 conv=notrunc
mkdir rootfs
tar xf $ROOTFS_FILE -C ./rootfs
cp -r $KERNEL_MODULES_DIR rootfs/usr/
cp -r $SPEC_FILE rootfs/
# add some custom modify
#for f in $SCRIPTES; do
# ROOTFS_PATH=./rootfs bash "$f" -H
#done
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -r rootfs -o rootfs.img -D rootfs
fakeroot mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0x400000 -o jffs2.img -D overlay
dd if=rootfs.img of=$OUT_FILENAME bs=1K seek=5184 conv=notrunc
dd if=jffs2.img of=$OUT_FILENAME bs=1M seek=12 conv=notrunc
rm -rf rootfs rootfs.img jffs2.img
打包结果,这样有没有问题?
root@ubuntu:~/Documents/F1C100S_NEW# ./build.sh
16+0 records in
16+0 records out
16777216 bytes (17 MB, 16 MiB) copied, 0.0107207 s, 1.6 GB/s
984+0 records in
984+0 records out
1007616 bytes (1.0 MB, 984 KiB) copied, 0.00136088 s, 740 MB/s
7+1 records in
7+1 records out
7583 bytes (7.6 kB, 7.4 KiB) copied, 9.7571e-05 s, 77.7 MB/s
3796+1 records in
3796+1 records out
3888056 bytes (3.9 MB, 3.7 MiB) copied, 0.0068818 s, 565 MB/s
cp: cannot stat '../linux/out/*': No such file or directory
cp: cannot stat './custom/*': No such file or directory
/usr/bin/fakeroot: 175: /usr/bin/fakeroot: mkfs.jffs2: not found
/usr/bin/fakeroot: 175: /usr/bin/fakeroot: mkfs.jffs2: not found
dd: failed to open 'rootfs.img': No such file or directory
dd: failed to open 'jffs2.img': No such file or directory
[ 0.853546] console [ttyS0] enabled
[ 0.863832] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.873182] SCSI Media Changer driver v0.25
[ 0.878835] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.885367] ehci-platform: EHCI generic platform driver
[ 0.890955] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.897244] ohci-platform: OHCI generic platform driver
[ 0.902839] usbcore: registered new interface driver usb-storage
[ 0.909847] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 0.918886] i2c /dev entries driver
[ 0.975887] sunxi-mmc 1c0f000.mmc: base:0x403ca28c irq:19
[ 0.983255] usbcore: registered new interface driver usbhid
[ 0.988951] usbhid: USB HID core driver
[ 1.010475] NET: Registered protocol family 17
[ 1.015152] Key type dns_resolver registered
[ 1.021706] Loading compiled-in X.509 certificates
[ 1.036650] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0739498)
[ 1.045402] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc073877c)
[ 1.053191] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.059851] [drm] No driver support for vblank timestamp query.
[ 1.113843] Console: switching to colour frame buffer device 60x34
[ 1.137202] sun4i-drm display-engine: fb0: frame buffer device
[ 1.144327] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.153495] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.165377] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.171300] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.181465] hub 1-0:1.0: USB hub found
[ 1.185384] hub 1-0:1.0: 1 port detected
[ 1.190974] using random self ethernet address
[ 1.195507] using random host ethernet address
[ 1.201827] usb0: HOST MAC 4e:65:ae:9c:8e:cc
[ 1.206355] usb0: MAC 02:17:03:3e:ee:1c
[ 1.210354] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.217917] g_cdc gadget: g_cdc ready
[ 1.222484] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.240093] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.246956] vcc3v3: disabling
[ 1.249939] ALSA device list:
[ 1.252906] #0: Loopback 1
[ 1.256717] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.265385] cfg80211: failed to load regulatory.db
[ 1.271009] Waiting for root device /dev/mtdblock3...
[ 202.875895] random: crng init done
页次: 1