Skip to content

Commit

Permalink
build.sh and README.md updates (#48)
Browse files Browse the repository at this point in the history
* Updated build.sh user "interface"

* Some small spelling changes; Using apt instead of apt-get

* Syntax error fixed in README.md

* Small simplifications
  • Loading branch information
Leif-Erik Kotsch authored and frank-w committed Nov 5, 2018
1 parent 957fbea commit 7d3facd
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 47 deletions.
27 changes: 5 additions & 22 deletions README
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Kernel 4.14 for BananaPi R2
#Kernel 4.14 for BananaPi R2

##HowTo compile kernel:

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

internal Wifi-driver (MT6625L) included
Internal Wifi-driver (MT6625L) included

to use it:
To use it:

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

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

Master-Branch

Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Kernel 4.14 for BPI-R2
# Kernel 4.14 for BananaPi R2

<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>

## Requirements

On x86/x64-host you need cross compile tools for the armhf architecture (bison and flex-package are needed for kernels >=4.16):
On a x86/x64-host you need cross compile tools for the armhf architecture (bison and flex-package are needed for kernels >=4.16):
```sh
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
sudo apt install gcc-arm-linux-gnueabihf libc6-armhf-cross u-boot-tools bc make gcc libc6-dev libncurses5-dev libssl-dev bison flex
```
if you build directly on r2 (not recommended) you do not need the crosscompile-packages gcc-arm-linux-gnueabihf and libc6-armhf-cross
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

## Issues
currently gcc7 is not supported (https://bugs.linaro.org/show_bug.cgi?id=3823)
Currently gcc7 is not supported (https://bugs.linaro.org/show_bug.cgi?id=3823)
```sh
sudo apt-get install gcc-5-arm-linux-gnueabihf
sudo apt install gcc-5-arm-linux-gnueabihf
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-7 50
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
sudo update-alternatives --install /usr/bin/arm-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc /usr/bin/arm-linux-gnueabihf-gcc-5 100
Expand All @@ -26,7 +26,7 @@ sudo update-alternatives --config arm-linux-gnueabihf-gcc

```sh
./build.sh importconfig
./build.sh config
./build.sh config (To configure manually with menuconfig)
./build.sh
```

Expand All @@ -41,11 +41,11 @@ Kernel upstream + BPI-R2
* <a href="https://github.com/frank-w/BPI-R2-4.14/tree/4.19-rc">4.19-rc</a> (next LTS)
* <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)

## Kernel version
## Kernel versions

Kernel breakdown features by version
Kernel features by version

| | 4.4 | 4.9 | 4.14 | 4.16 | 4.17 | 4.18 | 4.19 (rc) |
| Feature | 4.4 | 4.9 | 4.14 | 4.16 | 4.17 | 4.18 | 4.19 (rc) |
|----------| --- | --- | --- | --- | --- | --- | --- |
| PCIe | Y | Y | Y | Y | | ? | |
| SATA | Y | Y | Y | Y? | | Y | |
Expand All @@ -60,16 +60,21 @@ Kernel breakdown features by version
| BT | | | | | | | |
| VIDEO | Y | N | Y | Y | | | Y |
| ACPI | ? | N | Y | N | | | Y |
||| other Options |||| | |
| Other options |--|--|--|--|--|--|--|
| OpenVPN | ? | Y | Y | ? | | ? | |
| iptables | ? | Y | Y | ? | | ? | Y |
| LXC / Docker | ? | ? | Y | ? | | ? | |

? = unsure
Symbols:

() = testing (separate Branch wlan/hdmi/hwnat/hwqos)
|Symbol|Meaning|
|------|-------|
| ? |Unsure |
| () |Testing|

* HW-NAT only works between LAN and WAN (bridge unclear, wifi not working)
(Testing in seperate branch wlan/hdmi/hwnat/hwqos)

* HW-NAT only works between LAN and WAN (bridge unclear, wifi not supported)
* HW-QoS is merged into 4.14-main, but we do not know how to test it
* 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
* VIDEO is hdmi-output (X-server/framebuffer-console)...here some resolutions are not supported by vendor-driver
Expand All @@ -87,7 +92,6 @@ kernel 4.4 / uboot: https://github.com/frank-w/BPI-R2-4.4

License
----

GPL-2.0

**Free Software, Hell Yeah!**
*Free Software, Hell Yeah!*
21 changes: 12 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
if [[ $UID -eq 0 ]];
if [ $UID -eq 0 ];
then
echo "do not run as root!"
exit 1;
echo "This should not be run as root."
echo "Hit enter key to force or press CTRL+C to abort."
read -s
echo "[ OK ] Proceeding now."
fi

clr_red=$'\e[1;31m'
Expand Down Expand Up @@ -94,10 +96,11 @@ function install {
cp ./uImage $kernelfile
sudo make modules_install
else
echo "actual Kernel not found...is /boot mounted?"
echo "Actual kernel not found..."
echo "is /boot mounted?"
fi
else
echo "by default this kernel-file will be loaded (uEnv.txt):"
echo "By default this kernel-file will be loaded (uEnv.txt):"
grep '^kernel=' /media/${USER}/BPI-BOOT/bananapi/bpi-r2/linux/uEnv.txt|tail -1
read -p "Press [enter] to copy data to SD-Card..."
if [[ -d /media/$USER/BPI-BOOT ]]; then
Expand Down Expand Up @@ -263,7 +266,7 @@ function build {
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
fi
else
echo "No Configfile found, Please Configure Kernel"
echo "No configfile found, please configure kernel first."
fi
}

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

echo "cleanup..."
echo "Cleaning up..."
for toDel in "$SD/BPI-BOOT/" "$SD/BPI-ROOT/"; do
rm -r ${toDel} 2>/dev/null
done
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
mkdir -p ${createDir} >/dev/null 2>/dev/null
done

echo "copy..."
echo "Copying..."
export INSTALL_MOD_PATH=$SD/BPI-ROOT/;
echo "INSTALL_MOD_PATH: $INSTALL_MOD_PATH"
cp ./uImage $SD/BPI-BOOT/bananapi/bpi-r2/linux/uImage
Expand Down Expand Up @@ -332,7 +335,7 @@ function release
git tag $reltag
git push origin $reltag
else
echo "Tag already used, please use another"
echo "Tag already used, please use another tag."
fi
}

Expand Down

0 comments on commit 7d3facd

Please sign in to comment.