分类 技术代码类 下的文章

1. setup env/download uboot
ronz@RonzLocalLinux:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.0.1        0.0.0.0         UG    0      0        0 enp3s0
default         192.168.88.1    0.0.0.0         UG    600    0        0 wlp2s0
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 enp3s0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-059bee45ca2b
192.168.88.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp2s0
192.168.88.1    0.0.0.0         255.255.255.255 UH    600    0        0 wlp2s0
ronz@RonzLocalLinux:~$  ping github.com
PING github.com (20.205.243.166) 56(84) bytes of data.
64 bytes from 20.205.243.166: icmp_seq=1 ttl=112 time=89.7 ms

ronz@RonzLocalLinux:/opt/V3s_WS$ sudo route add -net 20.205.243.0 netmask 255.255.255.0 gw 192.168.88.1 dev wlp2s0
[sudo] password for ronz: 
ronz@RonzLocalLinux:/opt/V3s_WS$ git clone https://github.com/u-boot/u-boot -b v2021.07
Cloning into 'u-boot'...
remote: Enumerating objects: 1072908, done.
remote: Counting objects: 100% (1055/1055), done.
remote: Compressing objects: 100% (412/412), done.
remote: Total 1072908 (delta 763), reused 643 (delta 643), pack-reused 1071853 (from 3)
Receiving objects: 100% (1072908/1072908), 294.41 MiB | 16.72 MiB/s, done.
Resolving deltas: 100% (853843/853843), done.

2. refer whycan
https://whycan.com/t_7248.html
patch -p1 < smallwitpi_lite_v3x_uboot_patch_for_202107.diff

3. build docker
vim Dockerfile

FROM ubuntu:20.04
RUN  apt update
RUN  apt install lib32ncurses5-dev -y
RUN  apt install libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc python device-tree-compiler -y
RUN  apt install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
RUN  apt install python3 python3-dev python3-distutils python3-pip -y
RUN  apt install swig -y
RUN  apt install wget cpio unzip rsync git -y



sudo docker build -t ronz0313/v3s-build-env .

sudo docker run  -v /opt/V3s_WS/:/ws -it ronz0313/v3s-build-env /bin/bash

root@0166703103ec:/# cd /ws/u-boot/
root@0166703103ec:/ws/u-boot# ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make smallwitpi_lite_v3s_ddr2_debug_uart0_pb8_pb9_defconfig 

//
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make menuconfig 
//
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make

https://github.com/jake5253/allwinner-livesuit

and

Download source code https://packages.ubuntu.com/xenial/libpng12-0

wget http://archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng_1.2.54.orig.tar.xz

tar xvf  libpng_1.2.54.orig.tar.xz 

cd libpng-1.2.54
./autogen.sh
./configure
make -j8 
sudo make install

then update the links with:

sudo ldconfig

prior to any of this assure your machine has these preliminary packages installed ... baseline for any dev kit

sudo docker run  -v /opt/tinas3/s3_toCust/:/sdk -it ronz0313/public /bin/bash

cd /sdk/
source build/envsetup.sh 
zmake all 

--------------------------------
Instructions of zmake function and parameter
Compile module:
 zmake <zeta.in or modules.in path>
Clear module:
 zmake clean <zeta.in or modules.in path>
Compile configuration:
 zmake config
Compile bootloader:
 zmake uboot
Compile kernel:
 zmake kernel
Package file system:
 zmake rootfs
Make the firmware:
 zmake image [debug]
Full compilation:
 zmake all

mkdir rondocker
cd rondocker/
vim Dockerfile
---
# tina build env

FROM ubuntu:14.04
RUN apt update
RUN apt install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 -y
RUN apt install bc busybox wget -y
---
sudo docker build -t ronz0313/tina351-build-env .
docker login -u ronz0313
sudo docker push ronz0313/tina351-build-env

# 假设下载的 tina-sdk 目录是 /opt/tina-sdk
# 执行如下 docker 命令
docker run  -v /opt/tina-sdk:/sdk -it ronz0313/tina351-build-env /bin/bash
# 第一次执行的时候,需要下载镜像,会耗时比较久一点
# 执行完上面 docker 命令后, 会将本机 /opt/tina-sdk 映射到 docker 中的 /sdk 下,就可以在 docker 中编译 tina 了
cd /sdk
source ./build/envsetup.sh
# 选择编译内容
lunch

# 需要设置 FORCE_UNSAFE_CONFIGURE 变量解决 root 检测, 后面 -jx  x为配置编译线程数量,可以根据 cpu 数量来配置
make FORCE_UNSAFE_CONFIGURE=1 -j8
# 备注: 第一次编译,会编译一批 host 的依赖比较慢,但是编译一次后,下次重新编译就会跳过了,速度会快很多

# 打包
pack

https://blog.csdn.net/qq_64257614/article/details/148117146?spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-5-148117146-blog-145181465.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-5-148117146-blog-145181465.235%5Ev43%5Epc_blog_bottom_relevance_base7&utm_relevant_index=9

https://blog.csdn.net/qq_16810885/article/details/131315572?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-8-131315572-blog-145181465.235^v43^pc_blog_bottom_relevance_base7&spm=1001.2101.3001.4242.5&utm_relevant_index=10


https://blog.csdn.net/qq_33471732/article/details/145630644?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-145630644-blog-145181465.235^v43^pc_blog_bottom_relevance_base7&spm=1001.2101.3001.4242.2&utm_relevant_index=3

https://www.ezurio.com/resources/software-announcements/using-swupdate-upgrade-system?srsltid=AfmBOopJ-Pl6SxBHzkhYFND032QEo7tYFiBKQ-08VEKenWvgjpdSJlPS


https://blog.csdn.net/qq_33471732/article/details/145717033?spm=1001.2101.3001.6650.9&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-145717033-blog-145181465.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-145717033-blog-145181465.235%5Ev43%5Epc_blog_bottom_relevance_base7&utm_relevant_index=16