偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.
全部博文(1750)
分类: Android平台
2016-04-07 17:44:32
文件系统搭建.
下载
Tegra124_Linux_R21.4.0_armhf.tbz2
Tegra_Linux_Sample-Root-Filesystem_R21.4.0_armhf.tbz2
tar -vxjf Tegra124_Linux_R21.4.0_armhf.tbz2
cd Linux_for_Tegra/rootfs
tar jxpf ../ Tegra_Linux_Sample-Root-Filesystem_R21.4.0_armhf.tbz2
cd ..
sudo ./apply_binaries.sh # 把用户空间的库拷贝到文件系统.
#获取内核源码
./source_sync.sh -k tegra-l4t-r21.4 #选用的Tag应当是 tegra-l4t-r21.4
#获取UBOOT代码
./source_sync.sh -u tegra-l4t-r21.4 # sources/u-boot_source.
#编译内核.
$ export CROSS_COMPILE= # requires GCC 4.4 or above.
$ export TEGRA_KERNEL_OUT=
$ export ARCH=arm
$ mkdir $TEGRA_KERNEL_OUT
$ make O=$TEGRA_KERNEL_OUT tegra12_defconfig
$ make O=$TEGRA_KERNEL_OUT zImage
$ make O=$TEGRA_KERNEL_OUT dtbs
$ make modules DESTDIR=
$ make modules_install INSTALL_MOD_PATH=
$ cp arch/arm/boot/zImage 根文件系统/kernel/zImage
$ 拷贝可用的DTB文件到对应的目录.
$ 拷贝可用的KO到对应的目录.
刷机: 首先进入刷机模式(按住Recovery键, 同时按一下reset键, USB线和PC的连接)
sudo ./flash.sh [options]
如烧片为
sudo ./flash.sh jetson-tk1 mmcblk0p1
只烧Kernel
sudo ./flash.sh -K sources/kernel_source/arch/arm/boot/zImage jetson-tk1 mmcblk0p1
启用 NFS
sudo ./flash.sh -n 192.168.46.202:192.168.46.11:192.168.46.254:255.255.255.0 -N 192.168.46.11: /home/ray/TK1_R21.4/Linux_for_Tegra/rootfs jetson-tk1 eth0
系统修补
/etc/rc.local
#修补音频无效 amixer cset name="Stereo ADC MIXL ADC2 Switch" 0 amixer cset name="Stereo ADC MIXR ADC2 Switch" 0 amixer cset name="Int Mic Switch" 0 amixer cset name="ADC Capture Switch" 1 amixer cset name="RECMIXL BST1 Switch" 0 amixer cset name="RECMIXR BST1 Switch" 0 amixer cset name="RECMIXL BST2 Switch" 1 amixer cset name="RECMIXR BST2 Switch" 1 amixer cset name="Stereo ADC L1 Mux" "ADC" amixer cset name="Stereo ADC R1 Mux" "ADC" amixer cset name="Stereo ADC MIXL ADC1 Switch" 1 amixer cset name="Stereo ADC MIXR ADC1 Switch" 1 amixer cset name="Stereo ADC MIXL ADC2 Switch" 0 amixer cset name="Stereo ADC MIXR ADC2 Switch" 0 amixer cset name="IN1 Mode Control" "Single ended" amixer cset name="IN2 Mode Control" "Single ended" amixer cset name="Mic Jack Switch" 1
#ifconfig eth0 up #ifconfig eth0 192.168.46.222 #route add default gw 192.168.46.254 dev eth0
echo "nameserver 8.8.8.8" >> /etc/resolv.conf echo "nameserver 192.168.9.35" >> /etc/resolv.conf echo "nameserver 192.168.9.72" >> /etc/resolv.conf
exit 0 |
添加 /etc/network/interfaces
# HWaddr 00:04:4b:49:0c:25
auto eth0 iface eth0 inet static address 192.168.46.202 gateway 192.168.46.254 netmask 255.255.255.0 |