summaryrefslogtreecommitdiff
path: root/README.md
blob: 9d68c4c9c388b2ba754b250f085e9720e9cab14d (plain)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# Linux Kernel for ARTIK
## Contents
1. [Introduction](#1-introduction)
2. [Build guide](#2-build-guide)
3. [Update guide](#3-update-guide)

## 1. Introduction
This 'linux-artik' repository is linux kernel source for artik5(artik520),
artik10(artik1020), artik710 and artik530. The base kernel version of artik5
and artik10 is linux-3.10.93 and based on Samsung Exynos kernel.
The artik710 and artik530 kernel is based on is based on linux-4.4.43.

---
## 2. Build guide
### 2.1 Install cross compiler
#### ARTIK710/710S
You'll need an arm64 cross compiler
```
sudo apt-get install gcc-aarch64-linux-gnu
```
If you can't install the above toolchain, you can use linaro toolchain.
```
wget https://releases.linaro.org/components/toolchain/binaries/5.4-2017.05/aarch64-linux-gnu/gcc-linaro-5.4.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
tar xf gcc-linaro-5.4.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
export PATH=~/gcc-linaro-5.4.1-2017.05-x86_64_aarch64-linux-gnu/bin:$PATH
```
You can the path permernently through adding it into ~/.bashrc

#### ARTIK5, ARTIK10, ARTIK530(S) and ARTIK533S
```
sudo apt-get install gcc-arm-linux-gnueabihf
```
If you can't install the above toolchain, you can use linaro toolchain.
```
wget https://releases.linaro.org/components/toolchain/binaries/5.4-2017.05/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
tar xf gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf.tar.xz
export PATH=~/gcc-linaro-5.4.1-2017.05-x86_64_arm-linux-gnueabihf/bin:$PATH
```
You can the path permernently through adding it into ~/.bashrc

### 2.2 Install android-fs-tools
To generate modules.img which contains kernel modules, you can use the make_ext4fs.
```
sudo apt-get install android-tools-fsutils
```

### 2.2 Build the u-boot with helper script of build-artik
#### ARTIK710
```
cd build-artik
./build_kernel.sh -b artik710
```
You can find the u-boot binaries from the build-artik/output/images/artik710/
#### ARTIK710S
```
cd build-artik
./build_kernel.sh -b artik710s
```
You can find the u-boot binaries from the build-artik/output/images/artik710s/
#### ARTIK530
```
cd build-artik
./build_kernel.sh -b artik530
```
You can find the u-boot binaries from the build-artik/output/images/artik530/
#### ARTIK530S
```
cd build-artik
./build_kernel.sh -b artik530s
```
You can find the u-boot binaries from the build-artik/output/images/artik530s/
#### ARTIK533S
```
cd build-artik
./build_kernel.sh -b artik533s
```
You can find the u-boot binaries from the build-artik/output/images/artik533s/
#### ARTIK5
```
cd build-artik
./build_kernel.sh -b artik5
```
You can find the u-boot binaries from the build-artik/output/images/artik5/
#### ARTIK10
```
cd build-artik
./build_kernel.sh -b artik10
```
You can find the u-boot binaries from the build-artik/output/images/artik10/

### 2.3 Build the u-boot with manual way
#### ARTIK710/710S
```
make ARCH=arm64 artik710_raptor_defconfig
```
If you want to change kernel configurations,
```
make ARCH=arm64 menuconfig
```

```
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image -j4
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs
mkdir usr/modules
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules -j4
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_install INSTALL_MOD_PATH=usr/modules INSTALL_MOD_STRIP=1
make_ext4fs -b 4096 -L modules \
	-l 32M usr/modules.img \
	usr/modules/lib/modules/
rm -rf usr/modules
```
#### ARTIK530/530S/533S
```
make ARCH=arm artik530_raptor_defconfig
```
If you want to change kernel configurations,
```
make ARCH=arm menuconfig
```

```
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
mkdir usr/modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=usr/modules INSTALL_MOD_STRIP=1
make_ext4fs -b 4096 -L modules \
	-l 32M usr/modules.img \
	usr/modules/lib/modules/
rm -rf usr/modules
```
#### ARTIK5
```
make ARCH=arm artik5_defconfig
```
If you want to change kernel configurations,
```
make ARCH=arm menuconfig
```

```
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- exynos3250-artik5.dtb
./scripts/mk_modules.sh
```
#### ARTIK10
```
make ARCH=arm artik10_defconfig
```
If you want to change kernel configurations,
```
make ARCH=arm menuconfig
```

```
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- exynos5422-artik10.dtb
./scripts/mk_modules.sh
```

## 3. Update Guide
Copy compiled binaries into your board.

#### ARTIK710/710S
```
scp arch/arm64/boot/Image root@{YOUR_BOARD_IP}:/root
scp arch/arm64/boot/dts/nexell/*.dtb root@{YOUR_BOARD_IP}:/root
scp usr/modules.img root@{YOUR_BOARD_IP}:/root
```

- On your board
```
mount -o remount,rw /boot
cp /root/Image /boot
cp /root/*.dtb /boot
dd if=/root/modules.img of=/dev/mmcblk0p5
sync
reboot
```

#### ARTIK530/530S/533S
```
scp arch/arm/boot/zImage root@{YOUR_BOARD_IP}:/root
scp arch/arm/boot/dts/s5p4418*.dtb root@{YOUR_BOARD_IP}:/root
scp usr/modules.img root@{YOUR_BOARD_IP}:/root
```

- On your board
```
mount -o remount,rw /boot
cp /root/zImage /boot
cp /root/s5p4418*.dtb /boot
dd if=/root/modules.img of=/dev/mmcblk0p5
sync
reboot
```

#### For artik5 and artik10
```
scp arch/arm/boot/zImage root@{YOUR_BOARD_IP}:/root
scp arch/arm/boot/dts/*.dtb root@{YOUR_BOARD_IP}:/root
scp usr/modules.img root@{YOUR_BOARD_IP}:/root
```

- On your board
```
mount -o remount,rw /boot
cp /root/zImage /boot
cp /root/*.dtb /boot
dd if=/root/modules.img of=/dev/mmcblk0p2
sync
reboot
```