一.分区
修改target/allwinner/astar-parrot/configs/sys_partition.fex
例如:
[partition]
name = rootfs_data
size = 12582912
user_type = 0x8000
修改其中的size属性,单位: 扇区。
如要修改成1G,计算方法如下
size = 1024 * 1024 * 1024 / 512
二.把文件打包到rootfs
将文件放到package/base-files/files目录下即可。如果文件过大,在pack时报错,修改分区表的rootfs分区的大小
三.增加spi
1. 在内核中添加spi 驱动
$cd tinaV2.1
$source build/envsetup.sh
$lunch astar_parrot-tina
$make kernel_menuconfig
Device Drivers --->
SPI support --->
<*> User mode SPI device driver support
2.修改
tinaV2.1/target/allwinner/astar-parrot/configs/sys_config.fex
[spi_board0]
modalias = "at25df641"
sflash_size = 32
max_speed_hz = 50000000
bus_num = 0
chip_select = 0
mode = 0
修改成
[spi_board0]
modalias = "spidev"
sflash_size = 32
max_speed_hz = 50000000
bus_num = 0
chip_select = 0
mode = 0
四.以太网不可用
$cd tinaV2.1
$make kernel_menuconfig
Device Drivers --->
[*] Network device support --->
USB Network Adapters --->
<*> Multi-purpose USB Networking Frameworksuch as cable modems)
<*> SMSC LAN95XX based USB 2.0 10/100 ethernet devices
五.静态ip与动态ip
#vim /etc/config/network
静态ip:
config interface 'eth0'
option ifname 'eth0'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option ipaddr '192.168.137.5'
option macaddr 5A:29:47:01:DA:33
ps:
option proto 'static' 静态IP
option ipaddr '192.168.xxx.xx' 要设置的ip
动态ip:
config interface 'eth0'
option ifname 'eth0'
option proto 'dhcp'
option macaddr 5A:29:47:01:DA:33
ps:
option proto 'dhcp' 动态获取ip
option macaddr 5A:29:47:01:DA:33 mac地址
网友评论