-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme-buildroot-howto
121 lines (92 loc) · 3.2 KB
/
readme-buildroot-howto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
download buildroot-2020.08.2.tar.gz and extract it. the version contains python 3.8.6.
install host packages listed in the buildroot user manual.
gather information from the target: cpu a53, kernel 4.6, gcc 6.3, aarch64 little endian
configure buildroot for a base build:
run
make menuconfig
select in menuconfig
target options
aarch64 little endian
cortex-a53
toolchain
external toolchain
custom toolchain
pre-installed toolchain
/opt/hm-linux/x86-arm/aarch64-hm-linux toolchain path
$(ARCH)-hm-linux toolchain prefix
gcc version 6.x
kernel header series 4.6.x
C library glibc/eglibc
toolchain has C++ support
run
make
configure buildroot to include python3 and build:
run make menuconfig to select
target package
interpreted language
python3
make a time stamp in file system
touch stamp1
run
make V=1 > log-build-screen 2>&1
inspect the log file and dl directory, new packages are downloaded and built
$ find dl -newer stamp1
dl/expat/expat-2.2.9.tar.xz
dl/python3/Python-3.8.6.tar.xz
dl/pkgconf/pkgconf-1.6.1.tar.xz
dl/libffi/libffi-3.3.tar.gz
dl/libzlib/zlib-1.2.11.tar.xz
get a list of new files in target directory
$ (cd output/target && find ./ -newer ../../stamp1)
edit the list to exclude files that should not be copied.
exclude the usr/lib/python3.8/ directory from the list.
exclude files existing on the target.
verify new files in /lib/ are on target under /lib64/ and of the same version each.
the final list is:
Link: ./usr/lib/libffi.so
File: ./usr/lib/libpython3.so
File: ./usr/lib/libpython3.8.so.1.0
File: ./usr/lib/libffi.so.7.1.0
Link: ./usr/lib/libffi.so.7
Link: ./usr/lib/libpython3.8.so
Link: ./usr/bin/python3
File: ./usr/bin/python3.8
Link: ./usr/bin/python
copy these files and links to the target. copy usr/lib/python3.8/ to the target.
configure to include python-pip package
stamp and build
inspect downloaded packages
$ find dl -newer stamp2
dl/libopenssl/openssl-1.1.1g.tar.gz
dl/python-setuptools/setuptools-44.0.0.zip
dl/python-pip/pip-20.0.2.tar.gz
find new files under output/target and copy these files:
./usr/lib/libz.so.1.2.11
./usr/lib/libssl.so
./usr/lib/libssl.so.1.1
./usr/lib/libcrypto.so.1.1
./usr/lib/libz.so.1
./usr/lib/libz.so
./usr/lib/libexpat.so.1
./usr/lib/libcrypto.so
./usr/lib/libpython3.so
./usr/lib/libpython3.8.so.1.0
./usr/lib/libffi.so.7.1.0
./usr/lib/libexpat.so
./usr/lib/libexpat.so.1.6.11
./usr/bin/easy_install-3.8
./usr/bin/xmlwf
./usr/bin/pip3.8
./usr/bin/python3.8
./usr/bin/pip
./usr/bin/pip3
./usr/bin/easy_install
configure to include zlib support in legacy packages
it looks no artifacts difference. so take it out.
need to rebuild host-python3 packages too to get the zlib and xml compiled.
zlib and xml are enabled by pip. but the frozenimportlib is built by host-python.
find all the *python* packages under output/build/ and do a -dirclean on them:
make host-python3-dirclean
make python3-dirclean
rebuild:
make