Skip to content

Commit 7d3facd

Browse files
Leif-Erik Kotschfrank-w
authored andcommitted
build.sh and README.md updates (#48)
* Updated build.sh user "interface" * Some small spelling changes; Using apt instead of apt-get * Syntax error fixed in README.md * Small simplifications
1 parent 957fbea commit 7d3facd

File tree

3 files changed

+37
-47
lines changed

3 files changed

+37
-47
lines changed

README

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
Kernel 4.14 for BananaPi R2
1+
#Kernel 4.14 for BananaPi R2
2+
3+
##HowTo compile kernel:
24

35
- checkout main branch
46
- run "./build.sh importconfig" to import my config for bpi-r2
57
- run "./build.sh config" to configure the kernel (menuconfig)
68
- run "./build.sh" to start building kernel
79

8-
internal Wifi-driver (MT6625L) included
10+
Internal Wifi-driver (MT6625L) included
911

10-
to use it:
12+
To use it:
1113

1214
copy firmware and tools to SD-Card from https://github.com/BPI-SINOVOIP/BPI-R2-bsp/tree/master/vendor/mediatek/connectivity or folder "utils"
1315

@@ -29,22 +31,3 @@ to use it:
2931
- internal wifi has a bug when hostapd is killed see issue #4
3032

3133
Master-Branch
32-
33-
Linux kernel
34-
============
35-
36-
This file was moved to Documentation/admin-guide/README.rst
37-
38-
Please notice that there are several guides for kernel developers and users.
39-
These guides can be rendered in a number of formats, like HTML and PDF.
40-
41-
In order to build the documentation, use ``make htmldocs`` or
42-
``make pdfdocs``.
43-
44-
There are various text files in the Documentation/ subdirectory,
45-
several of them using the Restructured Text markup notation.
46-
See Documentation/00-INDEX for a list of what is contained in each file.
47-
48-
Please read the Documentation/process/changes.rst file, as it contains the
49-
requirements for building and running the kernel, and information about
50-
the problems which may result by upgrading your kernel.

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# Kernel 4.14 for BPI-R2
1+
# Kernel 4.14 for BananaPi R2
22

33
<a href="https://travis-ci.com/frank-w/BPI-R2-4.14" target="_blank"><img src="https://travis-ci.com/frank-w/BPI-R2-4.14.svg?branch=4.14-main" alt="Build status 4.14-main"></a>
44

55
## Requirements
66

7-
On x86/x64-host you need cross compile tools for the armhf architecture (bison and flex-package are needed for kernels >=4.16):
7+
On a x86/x64-host you need cross compile tools for the armhf architecture (bison and flex-package are needed for kernels >=4.16):
88
```sh
9-
sudo apt-get install gcc-arm-linux-gnueabihf libc6-armhf-cross u-boot-tools bc make gcc libc6-dev libncurses5-dev libssl-dev bison flex
9+
sudo apt install gcc-arm-linux-gnueabihf libc6-armhf-cross u-boot-tools bc make gcc libc6-dev libncurses5-dev libssl-dev bison flex
1010
```
11-
if you build directly on r2 (not recommended) you do not need the crosscompile-packages gcc-arm-linux-gnueabihf and libc6-armhf-cross
11+
If you build it directly on the BananaPi-R2 (not recommended) you do not need the crosscompile-packages gcc-arm-linux-gnueabihf and libc6-armhf-cross
1212

1313
## Issues
14-
currently gcc7 is not supported (https://bugs.linaro.org/show_bug.cgi?id=3823)
14+
Currently gcc7 is not supported (https://bugs.linaro.org/show_bug.cgi?id=3823)
1515
```sh
16-
sudo apt-get install gcc-5-arm-linux-gnueabihf
16+
sudo apt install gcc-5-arm-linux-gnueabihf
1717
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-7 50
1818
update-alternatives: using /usr/bin/arm-linux-gnueabihf-gcc-7 to provide /usr/bin/arm-linux-gnueabihf-gcc (arm-linux-gnueabihf-gcc) in auto mode
1919
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-5 100
@@ -26,7 +26,7 @@ sudo update-alternatives --config arm-linux-gnueabihf-gcc
2626

2727
```sh
2828
./build.sh importconfig
29-
./build.sh config
29+
./build.sh config (To configure manually with menuconfig)
3030
./build.sh
3131
```
3232

@@ -41,11 +41,11 @@ Kernel upstream + BPI-R2
4141
* <a href="https://github.com/frank-w/BPI-R2-4.14/tree/4.19-rc">4.19-rc</a> (next LTS)
4242
* <a href="https://github.com/frank-w/BPI-R2-4.14/tree/4.19-main">4.19-main</a> (LTS, currently not all features merged)
4343

44-
## Kernel version
44+
## Kernel versions
4545

46-
Kernel breakdown features by version
46+
Kernel features by version
4747

48-
| | 4.4 | 4.9 | 4.14 | 4.16 | 4.17 | 4.18 | 4.19 (rc) |
48+
| Feature | 4.4 | 4.9 | 4.14 | 4.16 | 4.17 | 4.18 | 4.19 (rc) |
4949
|----------| --- | --- | --- | --- | --- | --- | --- |
5050
| PCIe | Y | Y | Y | Y | | ? | |
5151
| SATA | Y | Y | Y | Y? | | Y | |
@@ -60,16 +60,21 @@ Kernel breakdown features by version
6060
| BT | | | | | | | |
6161
| VIDEO | Y | N | Y | Y | | | Y |
6262
| ACPI | ? | N | Y | N | | | Y |
63-
||| other Options |||| | |
63+
| Other options |--|--|--|--|--|--|--|
6464
| OpenVPN | ? | Y | Y | ? | | ? | |
6565
| iptables | ? | Y | Y | ? | | ? | Y |
6666
| LXC / Docker | ? | ? | Y | ? | | ? | |
6767

68-
? = unsure
68+
Symbols:
6969

70-
() = testing (separate Branch wlan/hdmi/hwnat/hwqos)
70+
|Symbol|Meaning|
71+
|------|-------|
72+
| ? |Unsure |
73+
| () |Testing|
7174

72-
* HW-NAT only works between LAN and WAN (bridge unclear, wifi not working)
75+
(Testing in seperate branch wlan/hdmi/hwnat/hwqos)
76+
77+
* HW-NAT only works between LAN and WAN (bridge unclear, wifi not supported)
7378
* HW-QoS is merged into 4.14-main, but we do not know how to test it
7479
* ACPI-feature means System is powered off, not only halted (power-consumption ~0.2W, no reboot on reset), reboot-problem with soldered power-switch (see https://github.com/frank-w/BPI-R2-4.14/issues/35). Power-off is also initiated by pressing the power-switch
7580
* VIDEO is hdmi-output (X-server/framebuffer-console)...here some resolutions are not supported by vendor-driver
@@ -87,7 +92,6 @@ kernel 4.4 / uboot: https://github.com/frank-w/BPI-R2-4.4
8792

8893
License
8994
----
90-
9195
GPL-2.0
9296

93-
**Free Software, Hell Yeah!**
97+
*Free Software, Hell Yeah!*

build.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
2-
if [[ $UID -eq 0 ]];
2+
if [ $UID -eq 0 ];
33
then
4-
echo "do not run as root!"
5-
exit 1;
4+
echo "This should not be run as root."
5+
echo "Hit enter key to force or press CTRL+C to abort."
6+
read -s
7+
echo "[ OK ] Proceeding now."
68
fi
79

810
clr_red=$'\e[1;31m'
@@ -94,10 +96,11 @@ function install {
9496
cp ./uImage $kernelfile
9597
sudo make modules_install
9698
else
97-
echo "actual Kernel not found...is /boot mounted?"
99+
echo "Actual kernel not found..."
100+
echo "is /boot mounted?"
98101
fi
99102
else
100-
echo "by default this kernel-file will be loaded (uEnv.txt):"
103+
echo "By default this kernel-file will be loaded (uEnv.txt):"
101104
grep '^kernel=' /media/${USER}/BPI-BOOT/bananapi/bpi-r2/linux/uEnv.txt|tail -1
102105
read -p "Press [enter] to copy data to SD-Card..."
103106
if [[ -d /media/$USER/BPI-BOOT ]]; then
@@ -263,7 +266,7 @@ function build {
263266
mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "Linux Kernel $kernver-$gitbranch" -d arch/arm/boot/zImage-dtb ./uImage
264267
fi
265268
else
266-
echo "No Configfile found, Please Configure Kernel"
269+
echo "No configfile found, please configure kernel first."
267270
fi
268271
}
269272

@@ -272,15 +275,15 @@ function prepare_SD {
272275
cd $(dirname $0)
273276
mkdir -p ../SD >/dev/null 2>/dev/null
274277

275-
echo "cleanup..."
278+
echo "Cleaning up..."
276279
for toDel in "$SD/BPI-BOOT/" "$SD/BPI-ROOT/"; do
277280
rm -r ${toDel} 2>/dev/null
278281
done
279282
for createDir in "$SD/BPI-BOOT/bananapi/bpi-r2/linux/" "$SD/BPI-ROOT/lib/modules" "$SD/BPI-ROOT/etc/firmware" "$SD/BPI-ROOT/usr/bin" "$SD/BPI-ROOT/system/etc/firmware" "$SD/BPI-ROOT/lib/firmware"; do
280283
mkdir -p ${createDir} >/dev/null 2>/dev/null
281284
done
282285

283-
echo "copy..."
286+
echo "Copying..."
284287
export INSTALL_MOD_PATH=$SD/BPI-ROOT/;
285288
echo "INSTALL_MOD_PATH: $INSTALL_MOD_PATH"
286289
cp ./uImage $SD/BPI-BOOT/bananapi/bpi-r2/linux/uImage
@@ -332,7 +335,7 @@ function release
332335
git tag $reltag
333336
git push origin $reltag
334337
else
335-
echo "Tag already used, please use another"
338+
echo "Tag already used, please use another tag."
336339
fi
337340
}
338341

0 commit comments

Comments
 (0)