mirror of https://github.com/OpenIPC/firmware.git
commit
3aa3e8233a
.github/workflows
br-ext-chip-hisilicon
board
hi3516av100
kernel
overlay/arch/arm/boot/dts
hi3516av200
kernel
overlay.2/arch/arm/boot/dts
overlay
arch/arm/mach-hisi
include/linux
hi3516cv100
configs
br-ext-chip-sigmastar/system
packages
configs
patches/busybox
|
@ -63,7 +63,7 @@ jobs:
|
|||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3516ev200-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make -j$(($(nproc)+1)) BOARD=unknown_unknown_hi3516ev200_openipc all
|
||||
make BOARD=unknown_unknown_hi3516ev200_openipc all
|
||||
tar -C ${GITHUB_WORKSPACE}/output/images -cvzf $ARCHIVE_FW rootfs.squashfs uImage
|
||||
|
||||
- name: Build Hi3516Ev200 SDK
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
name: OpenIPC for Hi3518Ev300
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build_core:
|
||||
name: OpenIPC v2.0 for Hi3518Ev300
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install build dependencies
|
||||
id: install
|
||||
run: |
|
||||
make install-deps
|
||||
mkdir -p tmp
|
||||
|
||||
- name: Free disk space
|
||||
id: freshing
|
||||
run: |
|
||||
sudo swapoff -a
|
||||
sudo rm -f /swapfile
|
||||
sudo apt clean
|
||||
docker rmi $(docker image ls -aq)
|
||||
df -h
|
||||
|
||||
- name: Prepare buildroot
|
||||
id: prepare
|
||||
run: |
|
||||
HEAD_TAG=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
|
||||
BRANCH_NAME=$(echo $GITHUB_REF | cut -d'/' -f 3)
|
||||
if [ -z "$HEAD_TAG" ]; then
|
||||
TAG_NAME="latest"
|
||||
RELEASE_NAME="Development Build"
|
||||
PRERELEASE=true
|
||||
else
|
||||
TAG_NAME=${{ github.ref }}
|
||||
RELEASE_NAME="Release ${{ github.ref }}"
|
||||
PRERELEASE=false
|
||||
fi
|
||||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV
|
||||
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
|
||||
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
|
||||
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make prepare
|
||||
|
||||
- name: Build Hi3518Ev300 firmware
|
||||
id: build-hi3518ev300-firmware
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_FW="${GITHUB_WORKSPACE}/output/images/openipc.hi3518ev300-br.tgz"
|
||||
echo "ARCHIVE_FW=$ARCHIVE_FW" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE
|
||||
make BOARD=unknown_unknown_hi3518ev300_openipc all
|
||||
tar -C ${GITHUB_WORKSPACE}/output/images -cvzf $ARCHIVE_FW rootfs.squashfs uImage
|
||||
|
||||
- name: Build Hi3518Ev300 SDK
|
||||
id: build-hi3518ev300-sdk
|
||||
continue-on-error: true
|
||||
run: |
|
||||
ARCHIVE_SDK="${GITHUB_WORKSPACE}/output/images/arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
echo "ARCHIVE_SDK=$ARCHIVE_SDK" >> $GITHUB_ENV
|
||||
cd $GITHUB_WORKSPACE/output
|
||||
make sdk
|
||||
|
||||
- name: Send warning message to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
if: steps.build-hi3518ev300-firmware.outcome != 'success' || steps.build-hi3518ev300-sdk.outcome != 'success'
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 5 --max-time 15"
|
||||
TG_NOTIFY="Warning, Buildroot compiling error..."
|
||||
TG_HEADER=$(echo -e "\r\n$TG_NOTIFY \r\n\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9A\xA0 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendMessage \
|
||||
-F chat_id=$TG_CHANNEL -F text="$TG_HEADER"
|
||||
|
||||
- name: Create release
|
||||
uses: actions/create-release@v1
|
||||
continue-on-error: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: ${{ env.RELEASE_NAME }}
|
||||
draft: false
|
||||
prerelease: ${{ env.PRERELEASE }}
|
||||
|
||||
- name: Upload FW to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_FW }}
|
||||
asset_name: "openipc.hi3518ev300-br.tgz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Upload SDK to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.ARCHIVE_SDK }}
|
||||
asset_name: "arm-openipc-linux-musleabi_sdk-buildroot.tar.gz"
|
||||
tag: ${{ env.TAG_NAME }}
|
||||
overwrite: true
|
||||
|
||||
- name: Send binary file to telegram channel
|
||||
env:
|
||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN_BOT_OPENIPC }}
|
||||
TG_CHANNEL: ${{ secrets.TELEGRAM_CHANNEL_OPENIPC_DEV }}
|
||||
run: |
|
||||
TG_OPTIONS="-s --connect-timeout 5 --max-time 15"
|
||||
TG_HEADER=$(echo -e "\r\nCommit: $GIT_HASH \r\nBranch: $BRANCH_NAME \r\nTag: $TAG_NAME \r\n\r\n\xE2\x9C\x85 GitHub Actions")
|
||||
curl $TG_OPTIONS -H "Content-Type: multipart/form-data" -X POST https://api.telegram.org/bot$TG_TOKEN/sendDocument \
|
||||
-F chat_id=$TG_CHANNEL -F document="@$ARCHIVE_FW" -F caption="$TG_HEADER"
|
68
NOTIFY.md
68
NOTIFY.md
|
@ -1,68 +0,0 @@
|
|||
# openipc-v2.0
|
||||
|
||||
OpenIPC v2.0 based on Buildroot
|
||||
|
||||
[](https://github.com/FlyRouter/openipc-v2.0/actions/workflows/main.yml)
|
||||
|
||||
-----
|
||||
|
||||
## Quick Start for Hi3516Ev300
|
||||
|
||||
```
|
||||
make prepare
|
||||
make -j$(($(nproc)+1)) BOARD=unknown_unknown_hi3516ev300_unknown all
|
||||
```
|
||||
|
||||
Execute the commands above and your files will be in the directory **output/images**
|
||||
|
||||
-----
|
||||
|
||||
## ToDo support
|
||||
|
||||
* br-ext-chip-anyka
|
||||
* br-ext-chip-fullhan
|
||||
* br-ext-chip-goke
|
||||
* br-ext-chip-grainmedia
|
||||
* br-ext-chip-ingenic
|
||||
|
||||
* br-ext-chip-infineon
|
||||
|
||||
-----
|
||||
|
||||
## Other strings
|
||||
|
||||
```
|
||||
#
|
||||
# make help
|
||||
# make install-deps
|
||||
# make prepare
|
||||
# make list-configs
|
||||
#
|
||||
# make busybox-{dirclean,rebuild}
|
||||
# make fwprintenv-ng-{dirclean,rebuild}
|
||||
# make hisilicon-osdrv4-{dirclean,rebuild}
|
||||
# make ipctool-{dirclean,rebuild}
|
||||
# make jpeg-turbo-{dirclean,rebuild}
|
||||
# make libevent-mini-{dirclean,rebuild}
|
||||
# make linux-{dirclean,rebuild}
|
||||
# make majestic-{dirclean,rebuild}
|
||||
# make uboot-tools-fwprintenv-{dirclean,rebuild}
|
||||
#
|
||||
# make BOARD=unknown_unknown_hi3516ev300_unknown board-info
|
||||
# make BOARD=unknown_unknown_hi3516ev300_unknown all && 2dolphin
|
||||
#
|
||||
# make BOARD=unknown_unknown_xm530_unknown board-info
|
||||
# make BOARD=unknown_unknown_xm530_unknown all
|
||||
#
|
||||
# cd output ; make sdk
|
||||
#
|
||||
# tag="v21.04.10.3"
|
||||
#
|
||||
# git pull
|
||||
# git push
|
||||
# git tag ${tag} -m "Jump to ${tag}"
|
||||
# git push origin --tags
|
||||
# git push --follow-tags
|
||||
#
|
||||
```
|
||||
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
[](https://github.com/OpenIPC/openipc-2.1/actions/workflows/hi3516ev300_images.yml)
|
||||
|
||||
[](https://github.com/OpenIPC/openipc-2.1/actions/workflows/hi3518ev300_images.yml)
|
||||
|
||||
### Supporting
|
||||
|
||||
If you like our work, please consider supporting us on [Opencollective](https://opencollective.com/openipc/contribute/backer-14335/checkout) or [PayPal](https://www.paypal.com/donate/?hosted_button_id=C6F7UJLA58MBS) or [YooMoney](https://openipc.org/donation/yoomoney.html).
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2014 Linaro Ltd.
|
||||
* Copyright (c) 2015-2017 HiSilicon Technologies Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "hi3516a.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Hisilicon HI3516A DEMO Board";
|
||||
compatible = "hiSilicon,hi3516a";
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a7";
|
||||
reg = <0>;
|
||||
|
||||
operating-points = <
|
||||
/* KHz uV */
|
||||
600000 1100000
|
||||
732000 1200000
|
||||
850000 1300000
|
||||
500000 1060000
|
||||
400000 1020000
|
||||
>;
|
||||
|
||||
clocks = <&clock HI3516A_A7_MUX>,
|
||||
<&clock HI3516A_FIXED_400M>,
|
||||
<&clock HI3516A_FIXED_500M>,
|
||||
<&clock HI3516A_APLL_CLK>;
|
||||
clock-names = "a7_mux","400m", "500m","apll";
|
||||
|
||||
vcc-supply = <&a7_regulator>;
|
||||
};
|
||||
};
|
||||
|
||||
avs {
|
||||
compatible = "hi3516a,avs";
|
||||
avs-num = <2>;
|
||||
avs-name-array = "cpu-avs","media-avs";
|
||||
cpu_avs: cpu_avs{
|
||||
avs-name = "cpu-avs";
|
||||
opp-num = <5>;
|
||||
opp-freq = <600000 732000 850000 500000 400000>;
|
||||
opp-volt-min = <940000 1000000 1070000 940000 940000>;
|
||||
opp-hpm = <270 325 365 255 240>;
|
||||
opp-div = <11 14 16 10 8>;
|
||||
opp-volt-max = <1310000>;
|
||||
};
|
||||
|
||||
media_avs: media_avs{
|
||||
avs-name = "media-avs";
|
||||
opp-num = <5>;
|
||||
opp-freq = <0 1 2 3 4>;
|
||||
opp-volt-min = <930000 930000 930000 930000 930000>;
|
||||
opp-hpm = <245 245 245 260 285>;
|
||||
opp-div = <3 3 4 5 5>;
|
||||
opp-volt-max = <1310000>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x40000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dual_timer0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&hidmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&i2c_bus0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&spi_bus0{
|
||||
status = "okay";
|
||||
num-cs = <1>;
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com_mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi_bus1{
|
||||
status = "okay";
|
||||
num-cs = <3>;
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com_mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
|
||||
spidev@1 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <1>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com_mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
|
||||
spidev@2 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <2>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com_mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&higmac {
|
||||
phy-handle = <ðphy>;
|
||||
phy-mode = "rmii";
|
||||
};
|
||||
|
||||
|
||||
&mmc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip7 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip8 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip9 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip10 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip11 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip12 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip13 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip14 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip15 {
|
||||
status = "okay";
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,247 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2014 Linaro Ltd.
|
||||
* Copyright (c) 2015 HiSilicon Technologies Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "hisi-hi3519v101.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Hisilicon HI3519V101 DEMO Board";
|
||||
compatible = "hisilicon,hi3519v101";
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
enable-method = "hisilicon,hi3519-smp";
|
||||
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a7";
|
||||
device_type = "cpu";
|
||||
clock-frequency = <HI3519_FIXED_792M>;
|
||||
reg = <0>;
|
||||
cci-control-port = <&cci_control0>;
|
||||
};
|
||||
|
||||
/*cpu@100 {
|
||||
compatible = "arm,cortex-a17";
|
||||
device_type = "cpu";
|
||||
clock-frequency = <HI3519_FIXED_1000M>;
|
||||
reg = <0x100>;
|
||||
cci-control-port = <&cci_control1>;
|
||||
};*/
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x40000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dual_timer0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi_bus0 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24750000>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&spi_bus1 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24750000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi_bus2 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24750000>;
|
||||
};
|
||||
|
||||
spidev@1 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <1>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24750000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi_bus3 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24750000>;
|
||||
};
|
||||
};
|
||||
|
||||
&hisfc {
|
||||
hi_sfc {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <160000000>;
|
||||
m25p,fast-read;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&hisnfc {
|
||||
hinand {
|
||||
compatible = "jedec,spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <160000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&hinfc {
|
||||
hinand {
|
||||
compatible = "jedec,nand";
|
||||
reg = <0>;
|
||||
nand-max-frequency = <200000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&higmac {
|
||||
phy-handle = <ðphy>;
|
||||
phy-mode = "rmii";
|
||||
};
|
||||
|
||||
&gpio_chip0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip7 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip8 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip9 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip10 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip11 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip12 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip13 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip14 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip16 {
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,310 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2014 Linaro Ltd.
|
||||
* Copyright (c) 2015 HiSilicon Technologies Co., Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "hisi-hi3519v101.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Hisilicon HI3519V101 DEMO Board";
|
||||
compatible = "hisilicon,hi3519v101";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyAMA0,115200 early_printk
|
||||
root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),
|
||||
4M(kernel),11M(rootfs)";
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
enable-method = "hisilicon,hi3519-smp";
|
||||
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a7";
|
||||
device_type = "cpu";
|
||||
clock-frequency = <HI3519_FIXED_792M>;
|
||||
reg = <0>;
|
||||
cci-control-port = <&cci_control0>;
|
||||
};
|
||||
|
||||
cpu@100 {
|
||||
compatible = "arm,cortex-a17";
|
||||
device_type = "cpu";
|
||||
reg = <0x100>;
|
||||
cci-control-port = <&cci_control1>;
|
||||
operating-points = <
|
||||
/* KHz uV */
|
||||
1250000 1060000
|
||||
1150000 1060000
|
||||
1000000 1000000
|
||||
930000 1000000
|
||||
792000 940000
|
||||
594000 940000
|
||||
>;
|
||||
clocks = <&clock HI3519_A17_MUX>,
|
||||
<&clock HI3519_FIXED_400M>,
|
||||
<&clock HI3519_FIXED_500M>,
|
||||
<&clock HI3519_FIXED_594M>,
|
||||
<&clock HI3519_FIXED_792M>,
|
||||
<&clock HI3519_APLL_CLK>;
|
||||
clock-names = "a17_mux","400m", "500m",
|
||||
"594m", "792m", "apll";
|
||||
vcc-supply = <&a17_regulator>;
|
||||
};
|
||||
};
|
||||
|
||||
avs {
|
||||
compatible = "hi3519,avs";
|
||||
avs-num = <2>;
|
||||
avs-name-array = "cpu-avs","media-avs";
|
||||
cpu_avs: cpu_avs{
|
||||
avs-name = "cpu-avs";
|
||||
opp-num = <6>;
|
||||
opp-freq = <1250000 1150000 1000000 930000 792000 594000 >;
|
||||
opp-volt-min = <870000 870000 800000 800000 740000 740000>;
|
||||
opp-hpm = <310 310 280 280 250 250>;
|
||||
opp-div = <24 22 19 18 15 11>;
|
||||
opp-volt-max = <1060000>;
|
||||
};
|
||||
|
||||
media_avs: media_avs{
|
||||
avs-name = "media-avs";
|
||||
opp-num = <4>;
|
||||
opp-prof-num = <2>;
|
||||
opp-temp-num = <2>;
|
||||
opp-temp = <50 200>;
|
||||
opp-freq = <1 2 3 4>;
|
||||
opp-volt-min = <
|
||||
/* profile2 profile3*/
|
||||
770000 770000
|
||||
770000 770000
|
||||
>;
|
||||
opp-hpm = <
|
||||
/* profile2 profile3*/
|
||||
210 215
|
||||
190 215
|
||||
>;
|
||||
opp-div = <3 3 3 3>;
|
||||
opp-volt-max = <
|
||||
/* profile2 profile3*/
|
||||
977000 977000
|
||||
977000 977000
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x40000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dual_timer0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c_bus3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi_bus0 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&spi_bus1 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
|
||||
spidev@1 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <1>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi_bus2 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi_bus3 {
|
||||
status = "okay";
|
||||
|
||||
spidev@0 {
|
||||
compatible = "rohm,dh2228fv";
|
||||
reg = <0>;
|
||||
pl022,interface = <0>;
|
||||
pl022,com-mode = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&hisfc {
|
||||
hi_sfc {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <160000000>;
|
||||
m25p,fast-read;
|
||||
};
|
||||
};
|
||||
|
||||
&hisnfc {
|
||||
hinand {
|
||||
compatible = "jedec,spi-nand";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <160000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&hinfc {
|
||||
hinand {
|
||||
compatible = "jedec,nand";
|
||||
reg = <0>;
|
||||
nand-max-frequency = <200000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
&higmac {
|
||||
compatible = "hisilicon,higmac-v3", "hisilicon,higmac";
|
||||
phy-handle = <ðphy>;
|
||||
phy-mode = "rmii";
|
||||
};
|
||||
|
||||
&gpio_chip0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip2 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip4 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip6 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip7 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip8 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip9 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip10 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip11 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip12 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip13 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip14 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio_chip16 {
|
||||
status = "okay";
|
||||
};
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* power mangager control for hisilicon hi3516av200 soc
|
||||
*
|
||||
* Copyright (c) 2015 HiSilicon Technologies Co., Ltd.
|
||||
* Authors: zengtao@hisilicon.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/resource.h>
|
||||
#include <mach/platform.h>
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define PERI_PMC77 (0x134)
|
||||
#define PERI_PMC79 (0x13c)
|
||||
#define PERI_PMC85 (0x154)
|
||||
|
||||
static void __iomem *pmc_base;
|
||||
static u32 __attribute__((used)) pmc_phys_addr;
|
||||
|
||||
#define PMC_ADDRESS(reg) (pmc_base + reg)
|
||||
/* set bitfield of reg from start bit to end - 1 bit */
|
||||
static void reg_bit_set(u32 reg, u32 start, u32 end, u32 val)
|
||||
{
|
||||
u32 regval, mask;
|
||||
|
||||
regval = readl((void __iomem *)PMC_ADDRESS(reg));
|
||||
mask = ((0xffffffff << (32 - start)) >> (32 - start))
|
||||
| ((0xffffffff >> end) << end);
|
||||
|
||||
regval &= mask;
|
||||
regval |= (val << start);
|
||||
|
||||
writel(regval, (void __iomem *)PMC_ADDRESS(reg));
|
||||
}
|
||||
|
||||
/* get bitfield of reg from start bit to end - 1 bit */
|
||||
static u32 reg_bit_get(u32 reg, u32 start, u32 end)
|
||||
{
|
||||
u32 regval;
|
||||
|
||||
|
||||
regval = readl((void __iomem *)PMC_ADDRESS(reg));
|
||||
regval = (regval << (32 - end)) >> (32 - end);
|
||||
regval = regval >> start;
|
||||
|
||||
|
||||
return regval;
|
||||
}
|
||||
|
||||
void hi_pmc_power_up_done(void)
|
||||
{
|
||||
writel(0, (void __iomem *)PMC_ADDRESS(PERI_PMC85));
|
||||
writel(1, (void __iomem *)PMC_ADDRESS(PERI_PMC85));
|
||||
|
||||
}
|
||||
|
||||
/* before power down set ac inactive */
|
||||
void hi_pmc_set_ac_inactive(void)
|
||||
{
|
||||
reg_bit_set(PERI_PMC79, 8, 9, 1);
|
||||
}
|
||||
|
||||
/* after powerup clear ac inactive */
|
||||
void hi_pmc_clear_ac_inactive(void)
|
||||
{
|
||||
reg_bit_set(PERI_PMC79, 8, 9, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(hi_pmc_clear_ac_inactive);
|
||||
|
||||
/* call from assable context */
|
||||
asmlinkage void __naked hi_pmc_clear_a17_ac(void)
|
||||
{
|
||||
asm volatile("\n"
|
||||
"adr r2, 1f\n"
|
||||
"ldmia r2, {r1, r3}\n"
|
||||
"sub r0, r2, r1\n"
|
||||
"ldr r2, [r0, r3]\n"
|
||||
"ldr r0, ="__stringify(PERI_PMC79)"\n"
|
||||
"add r0, r0, r2\n"
|
||||
"ldr r1, [r0]\n"
|
||||
"bic r1, #0x100\n"
|
||||
"str r1, [r0]\n"
|
||||
"mov r0, #0\n"
|
||||
"bx lr\n"
|
||||
|
||||
".align 2\n"
|
||||
"1: .word .\n"
|
||||
" .word pmc_phys_addr\n"
|
||||
);
|
||||
|
||||
unreachable();
|
||||
}
|
||||
|
||||
static void hi_pmc_config(void)
|
||||
{
|
||||
/* enable pmc timeout */
|
||||
reg_bit_set(PERI_PMC77, 12, 13, 1);
|
||||
/* enable pmc auto mode */
|
||||
reg_bit_set(PERI_PMC79, 0, 2, 0);
|
||||
/* enable irq triger source power on */
|
||||
reg_bit_set(PERI_PMC79, 7, 8, 1);
|
||||
}
|
||||
|
||||
/* cpu hotplug powerup */
|
||||
void hi_pmc_power_up(void)
|
||||
{
|
||||
u32 power_state;
|
||||
|
||||
hi_pmc_config();
|
||||
|
||||
/* make sure it powerup state when power up */
|
||||
power_state = reg_bit_get(PERI_PMC79, 12, 16);
|
||||
BUG_ON(power_state != 0);
|
||||
|
||||
/* disable interrupt wakeup */
|
||||
reg_bit_set(PERI_PMC79, 5, 6, 0);
|
||||
|
||||
/* power on */
|
||||
reg_bit_set(PERI_PMC79, 3, 4, 0);
|
||||
reg_bit_set(PERI_PMC79, 3, 4, 1);
|
||||
}
|
||||
|
||||
/* cpu hotplug powerdown */
|
||||
void hi_pmc_power_down(void)
|
||||
{
|
||||
u32 power_state;
|
||||
|
||||
power_state = reg_bit_get(PERI_PMC79, 12, 16);
|
||||
BUG_ON(power_state != 6);
|
||||
|
||||
/* disable interrupt wakeup */
|
||||
reg_bit_set(PERI_PMC79, 5, 6, 0);
|
||||
|
||||
/* power off */
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 0);
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 1);
|
||||
}
|
||||
|
||||
/* cpuidle powerdown */
|
||||
void hi_pmc_automode_power_down(void)
|
||||
{
|
||||
u32 power_state;
|
||||
|
||||
power_state = reg_bit_get(PERI_PMC79, 12, 16);
|
||||
BUG_ON(power_state != 6);
|
||||
|
||||
/* enable interrupt wakeup */
|
||||
reg_bit_set(PERI_PMC79, 5, 6, 1);
|
||||
|
||||
/* power off */
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 0);
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 1);
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(hi_pmc_automode_power_down);
|
||||
|
||||
|
||||
/* enable timeout */
|
||||
static int hi_pmc_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct resource res;
|
||||
int ret = -ENODEV;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "hisilicon,pmc");
|
||||
if (!np)
|
||||
goto err;
|
||||
|
||||
pmc_base = of_iomap(np, 0);
|
||||
if (!pmc_base) {
|
||||
pr_err("failed to map pmc base\n");
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = of_address_to_resource(np, 0, &res);
|
||||
if (ret) {
|
||||
pr_err("failed to get pmc base phys\n");
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
pmc_phys_addr = res.start;
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
early_initcall(hi_pmc_init);
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* power mangager control for hisilicon hi3519 soc
|
||||
*
|
||||
* Copyright (c) 2015 HiSilicon Technologies Co., Ltd.
|
||||
* Authors: zengtao@hisilicon.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/resource.h>
|
||||
#include <mach/platform.h>
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define PERI_PMC77 (0x134)
|
||||
#define PERI_PMC79 (0x13c)
|
||||
#define PERI_PMC85 (0x154)
|
||||
|
||||
static void __iomem *pmc_base;
|
||||
static u32 __attribute__((used)) pmc_phys_addr;
|
||||
|
||||
#define PMC_ADDRESS(reg) (pmc_base + reg)
|
||||
/* set bitfield of reg from start bit to end - 1 bit */
|
||||
static void reg_bit_set(u32 reg, u32 start, u32 end, u32 val)
|
||||
{
|
||||
u32 regval, mask;
|
||||
|
||||
regval = readl((void __iomem *)PMC_ADDRESS(reg));
|
||||
mask = ((0xffffffff << (32 - start)) >> (32 - start))
|
||||
| ((0xffffffff >> end) << end);
|
||||
|
||||
regval &= mask;
|
||||
regval |= (val << start);
|
||||
|
||||
writel(regval, (void __iomem *)PMC_ADDRESS(reg));
|
||||
}
|
||||
|
||||
/* get bitfield of reg from start bit to end - 1 bit */
|
||||
static u32 reg_bit_get(u32 reg, u32 start, u32 end)
|
||||
{
|
||||
u32 regval;
|
||||
|
||||
|
||||
regval = readl((void __iomem *)PMC_ADDRESS(reg));
|
||||
regval = (regval << (32 - end)) >> (32 - end);
|
||||
regval = regval >> start;
|
||||
|
||||
|
||||
return regval;
|
||||
}
|
||||
|
||||
void hi_pmc_power_up_done(void)
|
||||
{
|
||||
writel(0, (void __iomem *)PMC_ADDRESS(PERI_PMC85));
|
||||
writel(1, (void __iomem *)PMC_ADDRESS(PERI_PMC85));
|
||||
|
||||
}
|
||||
|
||||
/* before power down set ac inactive */
|
||||
void hi_pmc_set_ac_inactive(void)
|
||||
{
|
||||
reg_bit_set(PERI_PMC79, 8, 9, 1);
|
||||
}
|
||||
|
||||
/* after powerup clear ac inactive */
|
||||
void hi_pmc_clear_ac_inactive(void)
|
||||
{
|
||||
reg_bit_set(PERI_PMC79, 8, 9, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(hi_pmc_clear_ac_inactive);
|
||||
|
||||
/* call from assable context */
|
||||
asmlinkage void __naked hi_pmc_clear_a17_ac(void)
|
||||
{
|
||||
asm volatile("\n"
|
||||
"adr r2, 1f\n"
|
||||
"ldmia r2, {r1, r3}\n"
|
||||
"sub r0, r2, r1\n"
|
||||
"ldr r2, [r0, r3]\n"
|
||||
"ldr r0, ="__stringify(PERI_PMC79)"\n"
|
||||
"add r0, r0, r2\n"
|
||||
"ldr r1, [r0]\n"
|
||||
"bic r1, #0x100\n"
|
||||
"str r1, [r0]\n"
|
||||
"mov r0, #0\n"
|
||||
"bx lr\n"
|
||||
|
||||
".align 2\n"
|
||||
"1: .word .\n"
|
||||
" .word pmc_phys_addr\n"
|
||||
);
|
||||
|
||||
unreachable();
|
||||
}
|
||||
|
||||
static void hi_pmc_config(void)
|
||||
{
|
||||
/* enable pmc timeout */
|
||||
reg_bit_set(PERI_PMC77, 12, 13, 1);
|
||||
/* enable pmc auto mode */
|
||||
reg_bit_set(PERI_PMC79, 0, 2, 0);
|
||||
/* enable irq triger source power on */
|
||||
reg_bit_set(PERI_PMC79, 7, 8, 1);
|
||||
}
|
||||
|
||||
/* cpu hotplug powerup */
|
||||
void hi_pmc_power_up(void)
|
||||
{
|
||||
u32 power_state;
|
||||
|
||||
hi_pmc_config();
|
||||
|
||||
/* make sure it powerup state when power up */
|
||||
power_state = reg_bit_get(PERI_PMC79, 12, 16);
|
||||
BUG_ON(power_state != 0);
|
||||
|
||||
/* disable interrupt wakeup */
|
||||
reg_bit_set(PERI_PMC79, 5, 6, 0);
|
||||
|
||||
/* power on */
|
||||
reg_bit_set(PERI_PMC79, 3, 4, 0);
|
||||
reg_bit_set(PERI_PMC79, 3, 4, 1);
|
||||
}
|
||||
|
||||
/* cpu hotplug powerdown */
|
||||
void hi_pmc_power_down(void)
|
||||
{
|
||||
u32 power_state;
|
||||
|
||||
power_state = reg_bit_get(PERI_PMC79, 12, 16);
|
||||
BUG_ON(power_state != 6);
|
||||
|
||||
/* disable interrupt wakeup */
|
||||
reg_bit_set(PERI_PMC79, 5, 6, 0);
|
||||
|
||||
/* power off */
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 0);
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 1);
|
||||
}
|
||||
|
||||
/* cpuidle powerdown */
|
||||
void hi_pmc_automode_power_down(void)
|
||||
{
|
||||
u32 power_state;
|
||||
|
||||
power_state = reg_bit_get(PERI_PMC79, 12, 16);
|
||||
BUG_ON(power_state != 6);
|
||||
|
||||
/* enable interrupt wakeup */
|
||||
reg_bit_set(PERI_PMC79, 5, 6, 1);
|
||||
|
||||
/* power off */
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 0);
|
||||
reg_bit_set(PERI_PMC79, 4, 5, 1);
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(hi_pmc_automode_power_down);
|
||||
|
||||
|
||||
/* enable timeout */
|
||||
static int hi_pmc_init(void)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct resource res;
|
||||
int ret = -ENODEV;
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "hisilicon,pmc");
|
||||
if (!np)
|
||||
goto err;
|
||||
|
||||
pmc_base = of_iomap(np, 0);
|
||||
if (!pmc_base) {
|
||||
pr_err("failed to map pmc base\n");
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = of_address_to_resource(np, 0, &res);
|
||||
if (ret) {
|
||||
pr_err("failed to get pmc base phys\n");
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
pmc_phys_addr = res.start;
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
early_initcall(hi_pmc_init);
|
|
@ -0,0 +1,65 @@
|
|||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
|
@ -0,0 +1,65 @@
|
|||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
* linux/arch/arm/lib/memset.S
|
||||
*
|
||||
* Copyright (C) 1995-2000 Russell King
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* ASM optimised string functions
|
||||
*/
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
|
||||
.text
|
||||
.align 5
|
||||
.word 0
|
||||
|
||||
1: subs r2, r2, #4 @ 1 do we have enough
|
||||
blt 5f @ 1 bytes to align with?
|
||||
cmp r3, #2 @ 1
|
||||
strltb r1, [ip], #1 @ 1
|
||||
strleb r1, [ip], #1 @ 1
|
||||
strb r1, [ip], #1 @ 1
|
||||
add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
|
||||
/*
|
||||
* The pointer is now aligned and the length is adjusted. Try doing the
|
||||
* memset again.
|
||||
*/
|
||||
|
||||
ENTRY(memset)
|
||||
/*
|
||||
* Preserve the contents of r0 for the return value.
|
||||
*/
|
||||
mov ip, r0
|
||||
ands r3, ip, #3 @ 1 unaligned?
|
||||
bne 1b @ 1
|
||||
/*
|
||||
* we know that the pointer in ip is aligned to a word boundary.
|
||||
*/
|
||||
orr r1, r1, r1, lsl #8
|
||||
orr r1, r1, r1, lsl #16
|
||||
mov r3, r1
|
||||
cmp r2, #16
|
||||
blt 4f
|
||||
|
||||
#if ! CALGN(1)+0
|
||||
|
||||
/*
|
||||
* We need 2 extra registers for this loop - use r8 and the LR
|
||||
*/
|
||||
stmfd sp!, {r8, lr}
|
||||
mov r8, r1
|
||||
mov lr, r1
|
||||
|
||||
2: subs r2, r2, #64
|
||||
stmgeia ip!, {r1, r3, r8, lr} @ 64 bytes at a time.
|
||||
stmgeia ip!, {r1, r3, r8, lr}
|
||||
stmgeia ip!, {r1, r3, r8, lr}
|
||||
stmgeia ip!, {r1, r3, r8, lr}
|
||||
bgt 2b
|
||||
ldmeqfd sp!, {r8, pc} @ Now <64 bytes to go.
|
||||
/*
|
||||
* No need to correct the count; we're only testing bits from now on
|
||||
*/
|
||||
tst r2, #32
|
||||
stmneia ip!, {r1, r3, r8, lr}
|
||||
stmneia ip!, {r1, r3, r8, lr}
|
||||
tst r2, #16
|
||||
stmneia ip!, {r1, r3, r8, lr}
|
||||
ldmfd sp!, {r8, lr}
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* This version aligns the destination pointer in order to write
|
||||
* whole cache lines at once.
|
||||
*/
|
||||
|
||||
stmfd sp!, {r4-r8, lr}
|
||||
mov r4, r1
|
||||
mov r5, r1
|
||||
mov r6, r1
|
||||
mov r7, r1
|
||||
mov r8, r1
|
||||
mov lr, r1
|
||||
|
||||
cmp r2, #96
|
||||
tstgt ip, #31
|
||||
ble 3f
|
||||
|
||||
and r8, ip, #31
|
||||
rsb r8, r8, #32
|
||||
sub r2, r2, r8
|
||||
movs r8, r8, lsl #(32 - 4)
|
||||
stmcsia ip!, {r4, r5, r6, r7}
|
||||
stmmiia ip!, {r4, r5}
|
||||
tst r8, #(1 << 30)
|
||||
mov r8, r1
|
||||
strne r1, [ip], #4
|
||||
|
||||
3: subs r2, r2, #64
|
||||
stmgeia ip!, {r1, r3-r8, lr}
|
||||
stmgeia ip!, {r1, r3-r8, lr}
|
||||
bgt 3b
|
||||
ldmeqfd sp!, {r4-r8, pc}
|
||||
|
||||
tst r2, #32
|
||||
stmneia ip!, {r1, r3-r8, lr}
|
||||
tst r2, #16
|
||||
stmneia ip!, {r4-r7}
|
||||
ldmfd sp!, {r4-r8, lr}
|
||||
|
||||
#endif
|
||||
|
||||
4: tst r2, #8
|
||||
stmneia ip!, {r1, r3}
|
||||
tst r2, #4
|
||||
strne r1, [ip], #4
|
||||
/*
|
||||
* When we get here, we've got less than 4 bytes to zero. We
|
||||
* may have an unaligned pointer as well.
|
||||
*/
|
||||
5: tst r2, #2
|
||||
strneb r1, [ip], #1
|
||||
strneb r1, [ip], #1
|
||||
tst r2, #1
|
||||
strneb r1, [ip], #1
|
||||
mov pc, lr
|
||||
ENDPROC(memset)
|
|
@ -0,0 +1,65 @@
|
|||
#ifndef __LINUX_COMPILER_H
|
||||
#error "Please don't include <linux/compiler-gcc7.h> directly, include <linux/compiler.h> instead."
|
||||
#endif
|
||||
|
||||
#define __used __attribute__((__used__))
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
|
||||
/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
to them will be unlikely. This means a lot of manual unlikely()s
|
||||
are unnecessary now for any paths leading to the usual suspects
|
||||
like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
older compilers]
|
||||
|
||||
Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
in the preprocessor, but we can live with this because they're unreleased.
|
||||
Maketime probing would be overkill here.
|
||||
|
||||
gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
a special section, but I don't see any sense in this right now in
|
||||
the kernel context */
|
||||
#define __cold __attribute__((__cold__))
|
||||
|
||||
#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
|
||||
#ifndef __CHECKER__
|
||||
# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
# define __compiletime_error(message) __attribute__((error(message)))
|
||||
#endif /* __CHECKER__ */
|
||||
|
||||
/*
|
||||
* Mark a position in code as unreachable. This can be used to
|
||||
* suppress control flow warnings after asm blocks that transfer
|
||||
* control elsewhere.
|
||||
*
|
||||
* Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
* this in the preprocessor, but we can live with this because they're
|
||||
* unreleased. Really, we need to have autoconf for the kernel.
|
||||
*/
|
||||
#define unreachable() __builtin_unreachable()
|
||||
|
||||
/* Mark a function definition as prohibited from being cloned. */
|
||||
#define __noclone __attribute__((__noclone__))
|
||||
|
||||
/*
|
||||
* Tell the optimizer that something else uses this function or variable.
|
||||
*/
|
||||
#define __visible __attribute__((externally_visible))
|
||||
|
||||
/*
|
||||
* GCC 'asm goto' miscompiles certain code sequences:
|
||||
*
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
*
|
||||
* Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
*
|
||||
* (asm goto is automatically volatile - the naming reflects this.)
|
||||
*/
|
||||
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
|
||||
#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
#define __HAVE_BUILTIN_BSWAP32__
|
||||
#define __HAVE_BUILTIN_BSWAP64__
|
||||
#define __HAVE_BUILTIN_BSWAP16__
|
||||
#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
|
@ -0,0 +1,379 @@
|
|||
#!/usr/bin/perl
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
# Copyright 2007-2008 rPath, Inc. - All Rights Reserved
|
||||
#
|
||||
# This file is part of the Linux kernel, and is made available under
|
||||
# the terms of the GNU General Public License version 2 or (at your
|
||||
# option) any later version; incorporated herein by reference.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
#
|
||||
|
||||
#
|
||||
# Usage: timeconst.pl HZ > timeconst.h
|
||||
#
|
||||
|
||||
# Precomputed values for systems without Math::BigInt
|
||||
# Generated by:
|
||||
# timeconst.pl --can 24 32 48 64 100 122 128 200 250 256 300 512 1000 1024 1200
|
||||
%canned_values = (
|
||||
24 => [
|
||||
'0xa6aaaaab','0x2aaaaaa',26,
|
||||
125,3,
|
||||
'0xc49ba5e4','0x1fbe76c8b4',37,
|
||||
3,125,
|
||||
'0xa2c2aaab','0xaaaa',16,
|
||||
125000,3,
|
||||
'0xc9539b89','0x7fffbce4217d',47,
|
||||
3,125000,
|
||||
], 32 => [
|
||||
'0xfa000000','0x6000000',27,
|
||||
125,4,
|
||||
'0x83126e98','0xfdf3b645a',36,
|
||||
4,125,
|
||||
'0xf4240000','0x0',17,
|
||||
31250,1,
|
||||
'0x8637bd06','0x3fff79c842fa',46,
|
||||
1,31250,
|
||||
], 48 => [
|
||||
'0xa6aaaaab','0x6aaaaaa',27,
|
||||
125,6,
|
||||
'0xc49ba5e4','0xfdf3b645a',36,
|
||||
6,125,
|
||||
'0xa2c2aaab','0x15555',17,
|
||||
62500,3,
|
||||
'0xc9539b89','0x3fffbce4217d',46,
|
||||
3,62500,
|
||||
], 64 => [
|
||||
'0xfa000000','0xe000000',28,
|
||||
125,8,
|
||||
'0x83126e98','0x7ef9db22d',35,
|
||||
8,125,
|
||||
'0xf4240000','0x0',18,
|
||||
15625,1,
|
||||
'0x8637bd06','0x1fff79c842fa',45,
|
||||
1,15625,
|
||||
], 100 => [
|
||||
'0xa0000000','0x0',28,
|
||||
10,1,
|
||||
'0xcccccccd','0x733333333',35,
|
||||
1,10,
|
||||
'0x9c400000','0x0',18,
|
||||
10000,1,
|
||||
'0xd1b71759','0x1fff2e48e8a7',45,
|
||||
1,10000,
|
||||
], 122 => [
|
||||
'0x8325c53f','0xfbcda3a',28,
|
||||
500,61,
|
||||
'0xf9db22d1','0x7fbe76c8b',35,
|
||||
61,500,
|
||||
'0x8012e2a0','0x3ef36',18,
|
||||
500000,61,
|
||||
'0xffda4053','0x1ffffbce4217',45,
|
||||
61,500000,
|
||||
], 128 => [
|
||||
'0xfa000000','0x1e000000',29,
|
||||
125,16,
|
||||
'0x83126e98','0x3f7ced916',34,
|
||||
16,125,
|
||||
'0xf4240000','0x40000',19,
|
||||
15625,2,
|
||||
'0x8637bd06','0xfffbce4217d',44,
|
||||
2,15625,
|
||||
], 200 => [
|
||||
'0xa0000000','0x0',29,
|
||||
5,1,
|
||||
'0xcccccccd','0x333333333',34,
|
||||
1,5,
|
||||
'0x9c400000','0x0',19,
|
||||
5000,1,
|
||||
'0xd1b71759','0xfff2e48e8a7',44,
|
||||
1,5000,
|
||||
], 250 => [
|
||||
'0x80000000','0x0',29,
|
||||
4,1,
|
||||
'0x80000000','0x180000000',33,
|
||||
1,4,
|
||||
'0xfa000000','0x0',20,
|
||||
4000,1,
|
||||
'0x83126e98','0x7ff7ced9168',43,
|
||||
1,4000,
|
||||
], 256 => [
|
||||
'0xfa000000','0x3e000000',30,
|
||||
125,32,
|
||||
'0x83126e98','0x1fbe76c8b',33,
|
||||
32,125,
|
||||
'0xf4240000','0xc0000',20,
|
||||
15625,4,
|
||||
'0x8637bd06','0x7ffde7210be',43,
|
||||
4,15625,
|
||||
], 300 => [
|
||||
'0xd5555556','0x2aaaaaaa',30,
|
||||
10,3,
|
||||
'0x9999999a','0x1cccccccc',33,
|
||||
3,10,
|
||||
'0xd0555556','0xaaaaa',20,
|
||||
10000,3,
|
||||
'0x9d495183','0x7ffcb923a29',43,
|
||||
3,10000,
|
||||
], 512 => [
|
||||
'0xfa000000','0x7e000000',31,
|
||||
125,64,
|
||||
'0x83126e98','0xfdf3b645',32,
|
||||
64,125,
|
||||
'0xf4240000','0x1c0000',21,
|
||||
15625,8,
|
||||
'0x8637bd06','0x3ffef39085f',42,
|
||||
8,15625,
|
||||
], 1000 => [
|
||||
'0x80000000','0x0',31,
|
||||
1,1,
|
||||
'0x80000000','0x0',31,
|
||||
1,1,
|
||||
'0xfa000000','0x0',22,
|
||||
1000,1,
|
||||
'0x83126e98','0x1ff7ced9168',41,
|
||||
1,1000,
|
||||
], 1024 => [
|
||||
'0xfa000000','0xfe000000',32,
|
||||
125,128,
|
||||
'0x83126e98','0x7ef9db22',31,
|
||||
128,125,
|
||||
'0xf4240000','0x3c0000',22,
|
||||
15625,16,
|
||||
'0x8637bd06','0x1fff79c842f',41,
|
||||
16,15625,
|
||||
], 1200 => [
|
||||
'0xd5555556','0xd5555555',32,
|
||||
5,6,
|
||||
'0x9999999a','0x66666666',31,
|
||||
6,5,
|
||||
'0xd0555556','0x2aaaaa',22,
|
||||
2500,3,
|
||||
'0x9d495183','0x1ffcb923a29',41,
|
||||
3,2500,
|
||||
]
|
||||
);
|
||||
|
||||
$has_bigint = eval 'use Math::BigInt qw(bgcd); 1;';
|
||||
|
||||
sub bint($)
|
||||
{
|
||||
my($x) = @_;
|
||||
return Math::BigInt->new($x);
|
||||
}
|
||||
|
||||
#
|
||||
# Constants for division by reciprocal multiplication.
|
||||
# (bits, numerator, denominator)
|
||||
#
|
||||
sub fmul($$$)
|
||||
{
|
||||
my ($b,$n,$d) = @_;
|
||||
|
||||
$n = bint($n);
|
||||
$d = bint($d);
|
||||
|
||||
return scalar (($n << $b)+$d-bint(1))/$d;
|
||||
}
|
||||
|
||||
sub fadj($$$)
|
||||
{
|
||||
my($b,$n,$d) = @_;
|
||||
|
||||
$n = bint($n);
|
||||
$d = bint($d);
|
||||
|
||||
$d = $d/bgcd($n, $d);
|
||||
return scalar (($d-bint(1)) << $b)/$d;
|
||||
}
|
||||
|
||||
sub fmuls($$$) {
|
||||
my($b,$n,$d) = @_;
|
||||
my($s,$m);
|
||||
my($thres) = bint(1) << ($b-1);
|
||||
|
||||
$n = bint($n);
|
||||
$d = bint($d);
|
||||
|
||||
for ($s = 0; 1; $s++) {
|
||||
$m = fmul($s,$n,$d);
|
||||
return $s if ($m >= $thres);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
# Generate a hex value if the result fits in 64 bits;
|
||||
# otherwise skip.
|
||||
sub bignum_hex($) {
|
||||
my($x) = @_;
|
||||
my $s = $x->as_hex();
|
||||
|
||||
return (length($s) > 18) ? undef : $s;
|
||||
}
|
||||
|
||||
# Provides mul, adj, and shr factors for a specific
|
||||
# (bit, time, hz) combination
|
||||
sub muladj($$$) {
|
||||
my($b, $t, $hz) = @_;
|
||||
my $s = fmuls($b, $t, $hz);
|
||||
my $m = fmul($s, $t, $hz);
|
||||
my $a = fadj($s, $t, $hz);
|
||||
return (bignum_hex($m), bignum_hex($a), $s);
|
||||
}
|
||||
|
||||
# Provides numerator, denominator values
|
||||
sub numden($$) {
|
||||
my($n, $d) = @_;
|
||||
my $g = bgcd($n, $d);
|
||||
return ($n/$g, $d/$g);
|
||||
}
|
||||
|
||||
# All values for a specific (time, hz) combo
|
||||
sub conversions($$) {
|
||||
my ($t, $hz) = @_;
|
||||
my @val = ();
|
||||
|
||||
# HZ_TO_xx
|
||||
push(@val, muladj(32, $t, $hz));
|
||||
push(@val, numden($t, $hz));
|
||||
|
||||
# xx_TO_HZ
|
||||
push(@val, muladj(32, $hz, $t));
|
||||
push(@val, numden($hz, $t));
|
||||
|
||||
return @val;
|
||||
}
|
||||
|
||||
sub compute_values($) {
|
||||
my($hz) = @_;
|
||||
my @val = ();
|
||||
my $s, $m, $a, $g;
|
||||
|
||||
if (!$has_bigint) {
|
||||
die "$0: HZ == $hz not canned and ".
|
||||
"Math::BigInt not available\n";
|
||||
}
|
||||
|
||||
# MSEC conversions
|
||||
push(@val, conversions(1000, $hz));
|
||||
|
||||
# USEC conversions
|
||||
push(@val, conversions(1000000, $hz));
|
||||
|
||||
return @val;
|
||||
}
|
||||
|
||||
sub outputval($$)
|
||||
{
|
||||
my($name, $val) = @_;
|
||||
my $csuf;
|
||||
|
||||
if (defined($val)) {
|
||||
if ($name !~ /SHR/) {
|
||||
$val = "U64_C($val)";
|
||||
}
|
||||
printf "#define %-23s %s\n", $name.$csuf, $val.$csuf;
|
||||
}
|
||||
}
|
||||
|
||||
sub output($@)
|
||||
{
|
||||
my($hz, @val) = @_;
|
||||
my $pfx, $bit, $suf, $s, $m, $a;
|
||||
|
||||
print "/* Automatically generated by kernel/timeconst.pl */\n";
|
||||
print "/* Conversion constants for HZ == $hz */\n";
|
||||
print "\n";
|
||||
print "#ifndef KERNEL_TIMECONST_H\n";
|
||||
print "#define KERNEL_TIMECONST_H\n";
|
||||
print "\n";
|
||||
|
||||
print "#include <linux/param.h>\n";
|
||||
print "#include <linux/types.h>\n";
|
||||
|
||||
print "\n";
|
||||
print "#if HZ != $hz\n";
|
||||
print "#error \"kernel/timeconst.h has the wrong HZ value!\"\n";
|
||||
print "#endif\n";
|
||||
print "\n";
|
||||
|
||||
foreach $pfx ('HZ_TO_MSEC','MSEC_TO_HZ',
|
||||
'HZ_TO_USEC','USEC_TO_HZ') {
|
||||
foreach $bit (32) {
|
||||
foreach $suf ('MUL', 'ADJ', 'SHR') {
|
||||
outputval("${pfx}_$suf$bit", shift(@val));
|
||||
}
|
||||
}
|
||||
foreach $suf ('NUM', 'DEN') {
|
||||
outputval("${pfx}_$suf", shift(@val));
|
||||
}
|
||||
}
|
||||
|
||||
print "\n";
|
||||
print "#endif /* KERNEL_TIMECONST_H */\n";
|
||||
}
|
||||
|
||||
# Pretty-print Perl values
|
||||
sub perlvals(@) {
|
||||
my $v;
|
||||
my @l = ();
|
||||
|
||||
foreach $v (@_) {
|
||||
if (!defined($v)) {
|
||||
push(@l, 'undef');
|
||||
} elsif ($v =~ /^0x/) {
|
||||
push(@l, "\'".$v."\'");
|
||||
} else {
|
||||
push(@l, $v.'');
|
||||
}
|
||||
}
|
||||
return join(',', @l);
|
||||
}
|
||||
|
||||
($hz) = @ARGV;
|
||||
|
||||
# Use this to generate the %canned_values structure
|
||||
if ($hz eq '--can') {
|
||||
shift(@ARGV);
|
||||
@hzlist = sort {$a <=> $b} (@ARGV);
|
||||
|
||||
print "# Precomputed values for systems without Math::BigInt\n";
|
||||
print "# Generated by:\n";
|
||||
print "# timeconst.pl --can ", join(' ', @hzlist), "\n";
|
||||
print "\%canned_values = (\n";
|
||||
my $pf = "\t";
|
||||
foreach $hz (@hzlist) {
|
||||
my @values = compute_values($hz);
|
||||
print "$pf$hz => [\n";
|
||||
while (scalar(@values)) {
|
||||
my $bit;
|
||||
foreach $bit (32) {
|
||||
my $m = shift(@values);
|
||||
my $a = shift(@values);
|
||||
my $s = shift(@values);
|
||||
print "\t\t", perlvals($m,$a,$s), ",\n";
|
||||
}
|
||||
my $n = shift(@values);
|
||||
my $d = shift(@values);
|
||||
print "\t\t", perlvals($n,$d), ",\n";
|
||||
}
|
||||
print "\t]";
|
||||
$pf = ', ';
|
||||
}
|
||||
print "\n);\n";
|
||||
} else {
|
||||
$hz += 0; # Force to number
|
||||
if ($hz < 1) {
|
||||
die "Usage: $0 HZ\n";
|
||||
}
|
||||
|
||||
@val = @{$canned_values{$hz}};
|
||||
#if (!defined(@val)) {
|
||||
if(!@val) {
|
||||
@val = compute_values($hz);
|
||||
}
|
||||
output($hz, @val);
|
||||
}
|
||||
exit 0;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x80000000
|
||||
KERNEL_UPLOAD_ADDR=0x81000000
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,2 @@
|
|||
MEM_START_ADDR=0x40000000
|
||||
KERNEL_UPLOAD_ADDR=0x41000000
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
MEM_START_ADDR=0x40000000
|
||||
KERNEL_UPLOAD_ADDR=0x41000000
|
|
@ -510,7 +510,6 @@ CONFIG_CMA_AREAS=77
|
|||
# CONFIG_ZSMALLOC is not set
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
# CONFIG_IDLE_PAGE_TRACKING is not set
|
||||
CONFIG_FRAME_VECTOR=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=11
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
# CONFIG_UACCESS_WITH_MEMCPY is not set
|
||||
|
@ -720,8 +719,10 @@ CONFIG_BQL=y
|
|||
# CONFIG_STREAM_PARSER is not set
|
||||
CONFIG_FIB_RULES=y
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_EXT=y
|
||||
CONFIG_WEXT_CORE=y
|
||||
CONFIG_WEXT_PROC=y
|
||||
CONFIG_WEXT_PRIV=y
|
||||
CONFIG_CFG80211=m
|
||||
# CONFIG_NL80211_TESTMODE is not set
|
||||
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
|
||||
|
@ -781,8 +782,7 @@ CONFIG_REGMAP=y
|
|||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
# CONFIG_FENCE_TRACE is not set
|
||||
# CONFIG_DMA_SHARED_BUFFER is not set
|
||||
CONFIG_DMA_CMA=y
|
||||
|
||||
#
|
||||
|
@ -1178,11 +1178,7 @@ CONFIG_WLAN=y
|
|||
CONFIG_WLAN_VENDOR_MEDIATEK=y
|
||||
CONFIG_MT7601U=m
|
||||
# CONFIG_WLAN_VENDOR_RALINK is not set
|
||||
CONFIG_WLAN_VENDOR_REALTEK=y
|
||||
# CONFIG_RTL8187 is not set
|
||||
# CONFIG_RTL_CARDS is not set
|
||||
CONFIG_RTL8XXXU=m
|
||||
CONFIG_RTL8XXXU_UNTESTED=y
|
||||
# CONFIG_WLAN_VENDOR_REALTEK is not set
|
||||
# CONFIG_WLAN_VENDOR_RSI is not set
|
||||
# CONFIG_WLAN_VENDOR_ST is not set
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
|
@ -1700,95 +1696,20 @@ CONFIG_MEDIA_SUPPORT=y
|
|||
#
|
||||
# Multimedia core support
|
||||
#
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
# CONFIG_MEDIA_CAMERA_SUPPORT is not set
|
||||
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
|
||||
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
|
||||
# CONFIG_MEDIA_RADIO_SUPPORT is not set
|
||||
# CONFIG_MEDIA_SDR_SUPPORT is not set
|
||||
# CONFIG_MEDIA_RC_SUPPORT is not set
|
||||
# CONFIG_MEDIA_CONTROLLER is not set
|
||||
CONFIG_VIDEO_DEV=y
|
||||
CONFIG_VIDEO_V4L2=y
|
||||
# CONFIG_VIDEO_ADV_DEBUG is not set
|
||||
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
|
||||
CONFIG_VIDEOBUF2_CORE=y
|
||||
CONFIG_VIDEOBUF2_MEMOPS=y
|
||||
CONFIG_VIDEOBUF2_VMALLOC=y
|
||||
# CONFIG_TTPCI_EEPROM is not set
|
||||
|
||||
#
|
||||
# Media drivers
|
||||
#
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
|
||||
#
|
||||
# Webcam devices
|
||||
#
|
||||
CONFIG_USB_VIDEO_CLASS=y
|
||||
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
|
||||
CONFIG_USB_GSPCA=m
|
||||
# CONFIG_USB_M5602 is not set
|
||||
# CONFIG_USB_STV06XX is not set
|
||||
# CONFIG_USB_GL860 is not set
|
||||
# CONFIG_USB_GSPCA_BENQ is not set
|
||||
# CONFIG_USB_GSPCA_CONEX is not set
|
||||
# CONFIG_USB_GSPCA_CPIA1 is not set
|
||||
# CONFIG_USB_GSPCA_DTCS033 is not set
|
||||
# CONFIG_USB_GSPCA_ETOMS is not set
|
||||
# CONFIG_USB_GSPCA_FINEPIX is not set
|
||||
# CONFIG_USB_GSPCA_JEILINJ is not set
|
||||
# CONFIG_USB_GSPCA_JL2005BCD is not set
|
||||
# CONFIG_USB_GSPCA_KINECT is not set
|
||||
# CONFIG_USB_GSPCA_KONICA is not set
|
||||
# CONFIG_USB_GSPCA_MARS is not set
|
||||
# CONFIG_USB_GSPCA_MR97310A is not set
|
||||
# CONFIG_USB_GSPCA_NW80X is not set
|
||||
# CONFIG_USB_GSPCA_OV519 is not set
|
||||
# CONFIG_USB_GSPCA_OV534 is not set
|
||||
# CONFIG_USB_GSPCA_OV534_9 is not set
|
||||
# CONFIG_USB_GSPCA_PAC207 is not set
|
||||
# CONFIG_USB_GSPCA_PAC7302 is not set
|
||||
# CONFIG_USB_GSPCA_PAC7311 is not set
|
||||
# CONFIG_USB_GSPCA_SE401 is not set
|
||||
# CONFIG_USB_GSPCA_SN9C2028 is not set
|
||||
# CONFIG_USB_GSPCA_SN9C20X is not set
|
||||
# CONFIG_USB_GSPCA_SONIXB is not set
|
||||
# CONFIG_USB_GSPCA_SONIXJ is not set
|
||||
# CONFIG_USB_GSPCA_SPCA500 is not set
|
||||
# CONFIG_USB_GSPCA_SPCA501 is not set
|
||||
# CONFIG_USB_GSPCA_SPCA505 is not set
|
||||
# CONFIG_USB_GSPCA_SPCA506 is not set
|
||||
# CONFIG_USB_GSPCA_SPCA508 is not set
|
||||
# CONFIG_USB_GSPCA_SPCA561 is not set
|
||||
# CONFIG_USB_GSPCA_SPCA1528 is not set
|
||||
# CONFIG_USB_GSPCA_SQ905 is not set
|
||||
# CONFIG_USB_GSPCA_SQ905C is not set
|
||||
# CONFIG_USB_GSPCA_SQ930X is not set
|
||||
# CONFIG_USB_GSPCA_STK014 is not set
|
||||
# CONFIG_USB_GSPCA_STK1135 is not set
|
||||
# CONFIG_USB_GSPCA_STV0680 is not set
|
||||
# CONFIG_USB_GSPCA_SUNPLUS is not set
|
||||
# CONFIG_USB_GSPCA_T613 is not set
|
||||
# CONFIG_USB_GSPCA_TOPRO is not set
|
||||
# CONFIG_USB_GSPCA_TOUPTEK is not set
|
||||
# CONFIG_USB_GSPCA_TV8532 is not set
|
||||
# CONFIG_USB_GSPCA_VC032X is not set
|
||||
# CONFIG_USB_GSPCA_VICAM is not set
|
||||
# CONFIG_USB_GSPCA_XIRLINK_CIT is not set
|
||||
# CONFIG_USB_GSPCA_ZC3XX is not set
|
||||
# CONFIG_USB_PWC is not set
|
||||
# CONFIG_VIDEO_CPIA2 is not set
|
||||
# CONFIG_USB_ZR364XX is not set
|
||||
# CONFIG_USB_STKWEBCAM is not set
|
||||
# CONFIG_USB_S2255 is not set
|
||||
|
||||
#
|
||||
# Webcam, TV (analog/digital) USB devices
|
||||
#
|
||||
# CONFIG_VIDEO_EM28XX is not set
|
||||
# CONFIG_V4L_PLATFORM_DRIVERS is not set
|
||||
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
|
||||
# CONFIG_V4L_TEST_DRIVERS is not set
|
||||
# CONFIG_MEDIA_USB_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Supported MMC/SDIO adapters
|
||||
|
@ -1798,51 +1719,12 @@ CONFIG_USB_GSPCA=m
|
|||
#
|
||||
# Media ancillary drivers (tuners, sensors, i2c, spi, frontends)
|
||||
#
|
||||
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
|
||||
|
||||
#
|
||||
# Audio decoders, processors and mixers
|
||||
#
|
||||
|
||||
#
|
||||
# RDS decoders
|
||||
#
|
||||
|
||||
#
|
||||
# Video decoders
|
||||
#
|
||||
|
||||
#
|
||||
# Video and audio decoders
|
||||
#
|
||||
|
||||
#
|
||||
# Video encoders
|
||||
#
|
||||
|
||||
#
|
||||
# Camera sensor devices
|
||||
#
|
||||
|
||||
#
|
||||
# Flash devices
|
||||
#
|
||||
|
||||
#
|
||||
# Video improvement chips
|
||||
#
|
||||
|
||||
#
|
||||
# Audio/Video compression chips
|
||||
#
|
||||
|
||||
#
|
||||
# Miscellaneous helper chips
|
||||
#
|
||||
|
||||
#
|
||||
# Sensors used on soc_camera driver
|
||||
# Customise DVB Frontends
|
||||
#
|
||||
# CONFIG_DVB_TUNER_DIB0070 is not set
|
||||
# CONFIG_DVB_TUNER_DIB0090 is not set
|
||||
|
||||
#
|
||||
# Tools to develop new frontends
|
||||
|
@ -2162,7 +2044,6 @@ CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
|||
# CONFIG_USB_CONFIGFS_F_LB_SS is not set
|
||||
# CONFIG_USB_CONFIGFS_F_FS is not set
|
||||
# CONFIG_USB_CONFIGFS_F_HID is not set
|
||||
# CONFIG_USB_CONFIGFS_F_UVC is not set
|
||||
# CONFIG_USB_CONFIGFS_F_PRINTER is not set
|
||||
# CONFIG_USB_ULPI_BUS is not set
|
||||
# CONFIG_UWB is not set
|
||||
|
@ -2170,7 +2051,7 @@ CONFIG_MMC=y
|
|||
# CONFIG_MMC_DEBUG is not set
|
||||
CONFIG_PWRSEQ_EMMC=y
|
||||
CONFIG_PWRSEQ_SIMPLE=y
|
||||
-
|
||||
|
||||
#
|
||||
# MMC/SD/SDIO Card Drivers
|
||||
#
|
||||
|
@ -2197,7 +2078,6 @@ CONFIG_MMC_SDHCI_HISI=y
|
|||
# CONFIG_MMC_USDHI6ROL0 is not set
|
||||
# CONFIG_MMC_MTK is not set
|
||||
# CONFIG_MMC_CQ_HCI is not set
|
||||
|
||||
# CONFIG_MEMSTICK is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
|
@ -2326,7 +2206,13 @@ CONFIG_RTC_DRV_HIBVT=y
|
|||
#
|
||||
# Microsoft Hyper-V guest support
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
CONFIG_STAGING=y
|
||||
# CONFIG_PRISM2_USB is not set
|
||||
# CONFIG_COMEDI is not set
|
||||
# CONFIG_RTLLIB is not set
|
||||
# CONFIG_R8712U is not set
|
||||
CONFIG_R8188EU=m
|
||||
CONFIG_88EU_AP_MODE=y
|
||||
# CONFIG_GOLDFISH is not set
|
||||
# CONFIG_CHROME_PLATFORMS is not set
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
|
@ -2466,15 +2352,7 @@ CONFIG_HAVE_ARM_SMCCC=y
|
|||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
# CONFIG_EXT2_FS is not set
|
||||
# CONFIG_EXT3_FS is not set
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_USE_FOR_EXT2=y
|
||||
# CONFIG_EXT4_FS_POSIX_ACL is not set
|
||||
# CONFIG_EXT4_FS_SECURITY is not set
|
||||
# CONFIG_EXT4_ENCRYPTION is not set
|
||||
# CONFIG_EXT4_DEBUG is not set
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_JBD2_DEBUG is not set
|
||||
CONFIG_FS_MBCACHE=y
|
||||
# CONFIG_EXT4_FS is not set
|
||||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_XFS_FS is not set
|
||||
|
@ -2482,7 +2360,13 @@ CONFIG_FS_MBCACHE=y
|
|||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
# CONFIG_NILFS2_FS is not set
|
||||
# CONFIG_F2FS_FS is not set
|
||||
CONFIG_F2FS_FS=m
|
||||
CONFIG_F2FS_FS_XATTR=y
|
||||
CONFIG_F2FS_FS_POSIX_ACL=y
|
||||
# CONFIG_F2FS_FS_SECURITY is not set
|
||||
# CONFIG_F2FS_CHECK_FS is not set
|
||||
# CONFIG_F2FS_FS_ENCRYPTION is not set
|
||||
# CONFIG_F2FS_FAULT_INJECTION is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_EXPORTFS=y
|
||||
# CONFIG_EXPORTFS_BLOCK_OPS is not set
|
||||
|
@ -2515,9 +2399,9 @@ CONFIG_ISO9660_FS=y
|
|||
#
|
||||
# DOS/FAT/NT Filesystems
|
||||
#
|
||||
CONFIG_FAT_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_FAT_FS=m
|
||||
CONFIG_MSDOS_FS=m
|
||||
CONFIG_VFAT_FS=m
|
||||
CONFIG_FAT_DEFAULT_CODEPAGE=437
|
||||
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||
# CONFIG_FAT_DEFAULT_UTF8 is not set
|
||||
|
@ -2551,15 +2435,7 @@ CONFIG_YAFFS_FS=y
|
|||
CONFIG_YAFFS_YAFFS1=y
|
||||
# CONFIG_YAFFS_9BYTE_TAGS is not set
|
||||
# CONFIG_YAFFS_DOES_ECC is not set
|
||||
CONFIG_YAFFS_YAFFS2=y
|
||||
CONFIG_YAFFS_AUTO_YAFFS2=y
|
||||
# CONFIG_YAFFS_DISABLE_TAGS_ECC is not set
|
||||
# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
|
||||
# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set
|
||||
# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set
|
||||
# CONFIG_YAFFS_DISABLE_BACKGROUND is not set
|
||||
# CONFIG_YAFFS_DISABLE_BAD_BLOCK_MARKING is not set
|
||||
CONFIG_YAFFS_XATTR=y
|
||||
# CONFIG_YAFFS_YAFFS2 is not set
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||
|
@ -2578,7 +2454,7 @@ CONFIG_UBIFS_FS_LZO=y
|
|||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
# CONFIG_UBIFS_ATIME_SUPPORT is not set
|
||||
# CONFIG_LOGFS is not set
|
||||
CONFIG_CRAMFS=y
|
||||
# CONFIG_CRAMFS is not set
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_FILE_CACHE=y
|
||||
# CONFIG_SQUASHFS_FILE_DIRECT is not set
|
||||
|
@ -2631,42 +2507,42 @@ CONFIG_SUNRPC_GSS=y
|
|||
CONFIG_NLS=y
|
||||
CONFIG_NLS_DEFAULT="iso8859-1"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_CODEPAGE_737=m
|
||||
CONFIG_NLS_CODEPAGE_775=m
|
||||
CONFIG_NLS_CODEPAGE_850=m
|
||||
CONFIG_NLS_CODEPAGE_852=m
|
||||
CONFIG_NLS_CODEPAGE_855=m
|
||||
CONFIG_NLS_CODEPAGE_857=m
|
||||
CONFIG_NLS_CODEPAGE_860=m
|
||||
CONFIG_NLS_CODEPAGE_861=m
|
||||
CONFIG_NLS_CODEPAGE_862=m
|
||||
CONFIG_NLS_CODEPAGE_863=m
|
||||
CONFIG_NLS_CODEPAGE_864=m
|
||||
CONFIG_NLS_CODEPAGE_865=m
|
||||
CONFIG_NLS_CODEPAGE_866=m
|
||||
CONFIG_NLS_CODEPAGE_869=m
|
||||
CONFIG_NLS_CODEPAGE_936=y
|
||||
CONFIG_NLS_CODEPAGE_950=m
|
||||
CONFIG_NLS_CODEPAGE_932=m
|
||||
CONFIG_NLS_CODEPAGE_949=m
|
||||
CONFIG_NLS_CODEPAGE_874=m
|
||||
CONFIG_NLS_ISO8859_8=m
|
||||
CONFIG_NLS_CODEPAGE_1250=m
|
||||
CONFIG_NLS_CODEPAGE_1251=m
|
||||
# CONFIG_NLS_CODEPAGE_737 is not set
|
||||
# CONFIG_NLS_CODEPAGE_775 is not set
|
||||
# CONFIG_NLS_CODEPAGE_850 is not set
|
||||
# CONFIG_NLS_CODEPAGE_852 is not set
|
||||
# CONFIG_NLS_CODEPAGE_855 is not set
|
||||
# CONFIG_NLS_CODEPAGE_857 is not set
|
||||
# CONFIG_NLS_CODEPAGE_860 is not set
|
||||
# CONFIG_NLS_CODEPAGE_861 is not set
|
||||
# CONFIG_NLS_CODEPAGE_862 is not set
|
||||
# CONFIG_NLS_CODEPAGE_863 is not set
|
||||
# CONFIG_NLS_CODEPAGE_864 is not set
|
||||
# CONFIG_NLS_CODEPAGE_865 is not set
|
||||
# CONFIG_NLS_CODEPAGE_866 is not set
|
||||
# CONFIG_NLS_CODEPAGE_869 is not set
|
||||
# CONFIG_NLS_CODEPAGE_936 is not set
|
||||
# CONFIG_NLS_CODEPAGE_950 is not set
|
||||
# CONFIG_NLS_CODEPAGE_932 is not set
|
||||
# CONFIG_NLS_CODEPAGE_949 is not set
|
||||
# CONFIG_NLS_CODEPAGE_874 is not set
|
||||
# CONFIG_NLS_ISO8859_8 is not set
|
||||
# CONFIG_NLS_CODEPAGE_1250 is not set
|
||||
# CONFIG_NLS_CODEPAGE_1251 is not set
|
||||
CONFIG_NLS_ASCII=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_ISO8859_2=m
|
||||
CONFIG_NLS_ISO8859_3=m
|
||||
CONFIG_NLS_ISO8859_4=m
|
||||
CONFIG_NLS_ISO8859_5=m
|
||||
CONFIG_NLS_ISO8859_6=m
|
||||
CONFIG_NLS_ISO8859_7=m
|
||||
CONFIG_NLS_ISO8859_9=m
|
||||
CONFIG_NLS_ISO8859_13=m
|
||||
CONFIG_NLS_ISO8859_14=m
|
||||
CONFIG_NLS_ISO8859_15=m
|
||||
CONFIG_NLS_KOI8_R=m
|
||||
CONFIG_NLS_KOI8_U=m
|
||||
# CONFIG_NLS_ISO8859_2 is not set
|
||||
# CONFIG_NLS_ISO8859_3 is not set
|
||||
# CONFIG_NLS_ISO8859_4 is not set
|
||||
# CONFIG_NLS_ISO8859_5 is not set
|
||||
# CONFIG_NLS_ISO8859_6 is not set
|
||||
# CONFIG_NLS_ISO8859_7 is not set
|
||||
# CONFIG_NLS_ISO8859_9 is not set
|
||||
# CONFIG_NLS_ISO8859_13 is not set
|
||||
# CONFIG_NLS_ISO8859_14 is not set
|
||||
# CONFIG_NLS_ISO8859_15 is not set
|
||||
# CONFIG_NLS_KOI8_R is not set
|
||||
# CONFIG_NLS_KOI8_U is not set
|
||||
# CONFIG_NLS_MAC_ROMAN is not set
|
||||
# CONFIG_NLS_MAC_CELTIC is not set
|
||||
# CONFIG_NLS_MAC_CENTEURO is not set
|
||||
|
@ -2916,7 +2792,7 @@ CONFIG_CRYPTO_HMAC=m
|
|||
# Digest
|
||||
#
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
# CONFIG_CRYPTO_CRC32 is not set
|
||||
CONFIG_CRYPTO_CRC32=m
|
||||
CONFIG_CRYPTO_CRCT10DIF=y
|
||||
CONFIG_CRYPTO_GHASH=m
|
||||
# CONFIG_CRYPTO_POLY1305 is not set
|
||||
|
|
|
@ -719,8 +719,10 @@ CONFIG_BQL=y
|
|||
# CONFIG_STREAM_PARSER is not set
|
||||
CONFIG_FIB_RULES=y
|
||||
CONFIG_WIRELESS=y
|
||||
CONFIG_WIRELESS_EXT=y
|
||||
CONFIG_WEXT_CORE=y
|
||||
CONFIG_WEXT_PROC=y
|
||||
CONFIG_WEXT_PRIV=y
|
||||
CONFIG_CFG80211=m
|
||||
# CONFIG_NL80211_TESTMODE is not set
|
||||
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
|
||||
|
@ -1707,7 +1709,7 @@ CONFIG_MEDIA_SUPPORT=y
|
|||
#
|
||||
# Media drivers
|
||||
#
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
# CONFIG_MEDIA_USB_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Supported MMC/SDIO adapters
|
||||
|
@ -2429,19 +2431,7 @@ CONFIG_MISC_FILESYSTEMS=y
|
|||
# CONFIG_BEFS_FS is not set
|
||||
# CONFIG_BFS_FS is not set
|
||||
# CONFIG_EFS_FS is not set
|
||||
CONFIG_YAFFS_FS=y
|
||||
CONFIG_YAFFS_YAFFS1=y
|
||||
# CONFIG_YAFFS_9BYTE_TAGS is not set
|
||||
# CONFIG_YAFFS_DOES_ECC is not set
|
||||
CONFIG_YAFFS_YAFFS2=y
|
||||
# CONFIG_YAFFS_AUTO_YAFFS2 is not set
|
||||
# CONFIG_YAFFS_DISABLE_TAGS_ECC is not set
|
||||
# CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED is not set
|
||||
# CONFIG_YAFFS_EMPTY_LOST_AND_FOUND is not set
|
||||
# CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING is not set
|
||||
# CONFIG_YAFFS_DISABLE_BACKGROUND is not set
|
||||
# CONFIG_YAFFS_DISABLE_BAD_BLOCK_MARKING is not set
|
||||
# CONFIG_YAFFS_XATTR is not set
|
||||
# CONFIG_YAFFS_FS is not set
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516av100
|
||||
CHIP=hi3516av100
|
||||
RAM_SIZE=256M
|
||||
RAM_LINUX_SIZE=128M
|
||||
RAM_MPP_SIZE=128M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516av200
|
||||
CHIP=hi3516av200
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516cv500
|
||||
CHIP=hi3516av300
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516cv100
|
||||
CHIP=hi3516cv100
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516cv500
|
||||
CHIP=hi3516cv500
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516av100
|
||||
CHIP=hi3516dv100
|
||||
RAM_SIZE=256M
|
||||
RAM_LINUX_SIZE=128M
|
||||
RAM_MPP_SIZE=128M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516cv500
|
||||
CHIP=hi3516dv300
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516cv100
|
||||
CHIP=hi3518cv100
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516cv100
|
||||
CHIP=hi3518ev100
|
||||
RAM_SIZE=64M
|
||||
RAM_LINUX_SIZE=48M
|
||||
RAM_MPP_SIZE=8M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516ev200
|
||||
CHIP=hi3518ev300
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3519av100
|
||||
CHIP=hi3519av100
|
||||
RAM_SIZE=512M
|
||||
RAM_LINUX_SIZE=256M
|
||||
RAM_MPP_SIZE=256M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3516av200
|
||||
CHIP=hi3519v101
|
||||
RAM_SIZE=128M
|
||||
RAM_LINUX_SIZE=64M
|
||||
RAM_MPP_SIZE=64M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,10 @@
|
|||
VENDOR=unknown
|
||||
MODEL=unknown
|
||||
FAMILY=hi3559av100
|
||||
CHIP=hi3559av100
|
||||
RAM_SIZE=512M
|
||||
RAM_LINUX_SIZE=256M
|
||||
RAM_MPP_SIZE=256M
|
||||
ROM_SIZE=?
|
||||
CMOS=unknown
|
||||
UBOOT_SIZE=1024K
|
|
@ -0,0 +1,22 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.37"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av100/kernel/hi3516av100.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av100/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av100/kernel/overlay"
|
|
@ -0,0 +1,22 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a17_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="3.18.20"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.20"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av200/kernel/hi3516av200.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av200/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av200/kernel/overlay"
|
|
@ -0,0 +1,22 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.37"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/hi3516av300.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/overlay"
|
|
@ -0,0 +1,19 @@
|
|||
BR2_arm=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="3.0.8"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.8"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/hi3516cv100.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/overlay"
|
|
@ -0,0 +1,22 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.37"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/hi3516cv500.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/overlay"
|
|
@ -0,0 +1,22 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.37"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av100/kernel/hi3516dv100.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av100/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av100/kernel/overlay"
|
|
@ -0,0 +1,22 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.37"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/hi3516dv300.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv500/kernel/overlay"
|
|
@ -34,16 +34,16 @@ BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3
|
|||
# BR2_TARGET_TZ_INFO is not set
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HISILICON_PATH)/system/skeleton"
|
||||
BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay"
|
||||
|
||||
# OpenIPC configuration
|
||||
BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.17.1"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1"
|
||||
BR2_TARGET_GENERIC_HOSTNAME="ipcam"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/patches"
|
||||
BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches"
|
||||
|
||||
# Packages
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/configs/busybox.config"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config"
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
BR2_PACKAGE_FWPRINTENV_NG=y
|
||||
BR2_PACKAGE_HISILICON_OSDRV4=y
|
||||
|
|
|
@ -34,16 +34,16 @@ BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3
|
|||
# BR2_TARGET_TZ_INFO is not set
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HISILICON_PATH)/system/skeleton"
|
||||
BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay"
|
||||
|
||||
# OpenIPC configuration
|
||||
BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.17.1"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1"
|
||||
BR2_TARGET_GENERIC_HOSTNAME="ipcam"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/patches"
|
||||
BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches"
|
||||
|
||||
# Packages
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/configs/busybox.config"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config"
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
BR2_PACKAGE_FWPRINTENV_NG=y
|
||||
BR2_PACKAGE_HISILICON_OSDRV4=y
|
||||
|
|
|
@ -34,16 +34,16 @@ BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3
|
|||
# BR2_TARGET_TZ_INFO is not set
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HISILICON_PATH)/system/skeleton"
|
||||
BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay"
|
||||
|
||||
# OpenIPC configuration
|
||||
BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.17.1"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1"
|
||||
BR2_TARGET_GENERIC_HOSTNAME="ipcam"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/patches"
|
||||
BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches"
|
||||
|
||||
# Packages
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/configs/busybox.config"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config"
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
BR2_PACKAGE_FWPRINTENV_NG=y
|
||||
BR2_PACKAGE_HISILICON_OSDRV4=y
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
BR2_arm=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="3.0.8"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.8"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/hi3518cv100.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/overlay"
|
|
@ -0,0 +1,19 @@
|
|||
BR2_arm=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="3.0.8"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.0.8"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/hi3518ev100.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516cv100/kernel/overlay"
|
|
@ -0,0 +1,69 @@
|
|||
# Architecture
|
||||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
|
||||
|
||||
# Toolchain
|
||||
# BR2_GCC_VERSION_7_X is not set
|
||||
# BR2_TOOLCHAIN_USES_UCLIBC is not set
|
||||
# BR2_TOOLCHAIN_BUILDROOT_UCLIBC is not set
|
||||
# BR2_TOOLCHAIN_BUILDROOT_LIBC="uclibc"
|
||||
BR2_TOOLCHAIN_USES_MUSL=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LIBC="musl"
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.37"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3516ev200/kernel/hi3518ev300.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3516ev200/kernel/patches/ $(BR2_EXTERNAL_HISILICON_PATH)/board/hi3516ev200/kernel/overlay"
|
||||
|
||||
# Filesystem
|
||||
# BR2_TARGET_TZ_INFO is not set
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay"
|
||||
|
||||
# OpenIPC configuration
|
||||
BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1"
|
||||
BR2_TARGET_GENERIC_HOSTNAME="ipcam"
|
||||
BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches"
|
||||
|
||||
# Packages
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config"
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
BR2_PACKAGE_FWPRINTENV_NG=y
|
||||
BR2_PACKAGE_HISILICON_OSDRV4=y
|
||||
BR2_PACKAGE_IPCTOOL=y
|
||||
BR2_PACKAGE_JSON_C=y
|
||||
BR2_PACKAGE_LAME=y
|
||||
BR2_PACKAGE_LIBEVENT_MINI=y
|
||||
BR2_PACKAGE_MAJESTIC=y
|
||||
BR2_PACKAGE_MINI_SNMPD=y
|
||||
|
||||
# Unused
|
||||
# BR2_SHARED_STATIC_LIBS is not set
|
||||
# BR2_PACKAGE_JPEG_TURBO is not set
|
||||
# BR2_PACKAGE_MINIHTTP is not set
|
||||
# BR2_PACKAGE_MXML is not set
|
||||
# BR2_PACKAGE_SSHPASS is not set
|
||||
# BR2_PACKAGE_RTL8188EU is not set
|
||||
|
||||
# Experimental
|
||||
BR2_PER_PACKAGE_DIRECTORIES=y
|
||||
BR2_PACKAGE_WIRELESS_TOOLS=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT=y
|
||||
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
|
|
@ -0,0 +1,24 @@
|
|||
BR2_arm=y
|
||||
BR2_cortex_a17_a7=y
|
||||
BR2_ARM_EABI=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="3.18.20"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
BR2_GCC_VERSION_7_X=y
|
||||
BR2_ROOTFS_OVERLAY="$(TOPDIR)/../overlay-common"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.20"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av200/kernel/hi3519v101.generic.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER=y
|
||||
BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av200/kernel/patches/ $(BR2_EXTERNAL_HISICAM_PATH)/board/hi3516av200/kernel/overlay $(BR2_EXTERNAL_HISICAM_PATH)/board/jvt_s274h19v-l29_hi3519v101_imx274/kernel/overlay"
|
File diff suppressed because it is too large
Load Diff
|
@ -1,353 +0,0 @@
|
|||
diff -urn -- a/miscutils/rng_fips.h b/miscutils/rng_fips.h
|
||||
--- a/miscutils/rng_fips.h 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ b/miscutils/rng_fips.h 2008-08-17 13:28:27.000000000 +0000
|
||||
@@ -0,0 +1,152 @@
|
||||
+/* vi: set sw=4 ts=4: */
|
||||
+/* rng_fips.h
|
||||
+ *
|
||||
+ * Ported to busybox by Malek Degachi
|
||||
+ *
|
||||
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _RNG_FIPS_H
|
||||
+#define _RNG_FIPS_H
|
||||
+
|
||||
+#include "libbb.h"
|
||||
+
|
||||
+/**********************************************
|
||||
+ * FIPS part
|
||||
+ *********************************************/
|
||||
+
|
||||
+/* Size of a FIPS test buffer, do not change this */
|
||||
+#define FIPS_RNG_BUFFER_SIZE 2500
|
||||
+
|
||||
+/* Context for running FIPS tests */
|
||||
+typedef struct {
|
||||
+ int poker[16];
|
||||
+ int runs[12];
|
||||
+ int ones;
|
||||
+ int rlength;
|
||||
+ int current_bit;
|
||||
+ int last_bit;
|
||||
+ int longrun;
|
||||
+ unsigned int last32;
|
||||
+} fips_ctx_t;
|
||||
+
|
||||
+/*
|
||||
+ * Return values for fips_run_rng_test. These values are OR'ed together
|
||||
+ * for all tests that failed.
|
||||
+ */
|
||||
+#define FIPS_RNG_MONOBIT 0x0001 /* FIPS 140-2 2001-10-10 monobit */
|
||||
+#define FIPS_RNG_POKER 0x0002 /* FIPS 140-2 2001-10-10 poker */
|
||||
+#define FIPS_RNG_RUNS 0x0004 /* FIPS 140-2 2001-10-10 runs */
|
||||
+#define FIPS_RNG_LONGRUN 0x0008 /* FIPS 140-2 2001-10-10 long run */
|
||||
+#define FIPS_RNG_CONTINUOUS_RUN 0x0010 /* FIPS 140-2 continuous run */
|
||||
+
|
||||
+/*
|
||||
+ * fips_test_store - store 8 bits of entropy in FIPS
|
||||
+ * internal test data pool
|
||||
+ */
|
||||
+static void fips_test_store(fips_ctx_t *ctx, unsigned int rng_data)
|
||||
+{
|
||||
+ int j;
|
||||
+
|
||||
+ ctx->poker[rng_data >> 4]++;
|
||||
+ ctx->poker[rng_data & 15]++;
|
||||
+
|
||||
+ /* Note in the loop below rlength is always one less than the actual
|
||||
+ run length. This makes things easier. */
|
||||
+ for (j = 7; j >= 0; j--) {
|
||||
+ ctx->ones += ctx->current_bit = ((rng_data >> j) & 1);
|
||||
+ if (ctx->current_bit != ctx->last_bit) {
|
||||
+ /* If runlength is 1-6 count it in correct bucket. 0's go in
|
||||
+ runs[0-5] 1's go in runs[6-11] hence the 6*current_bit below */
|
||||
+ if (ctx->rlength < 5) {
|
||||
+ ctx->runs[ctx->rlength +
|
||||
+ (6 * ctx->current_bit)]++;
|
||||
+ } else {
|
||||
+ ctx->runs[5 + (6 * ctx->current_bit)]++;
|
||||
+ }
|
||||
+
|
||||
+ /* Check if we just failed longrun test */
|
||||
+ if (ctx->rlength >= 25)
|
||||
+ ctx->longrun = 1;
|
||||
+ ctx->rlength = 0;
|
||||
+ /* flip the current run type */
|
||||
+ ctx->last_bit = ctx->current_bit;
|
||||
+ } else {
|
||||
+ ctx->rlength++;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int fips_run_rng_test(fips_ctx_t *ctx, const void *buf)
|
||||
+{
|
||||
+ int i, j;
|
||||
+ int rng_test = 0;
|
||||
+ unsigned char *rngdatabuf;
|
||||
+
|
||||
+ if (!ctx) return -1;
|
||||
+ if (!buf) return -1;
|
||||
+ rngdatabuf = (unsigned char *)buf;
|
||||
+
|
||||
+ for (i=0; i<FIPS_RNG_BUFFER_SIZE; i += 4) {
|
||||
+ int new32 = rngdatabuf[i] |
|
||||
+ ( rngdatabuf[i+1] << 8 ) |
|
||||
+ ( rngdatabuf[i+2] << 16 ) |
|
||||
+ ( rngdatabuf[i+3] << 24 );
|
||||
+ if (new32 == ctx->last32) rng_test |= FIPS_RNG_CONTINUOUS_RUN;
|
||||
+ ctx->last32 = new32;
|
||||
+ fips_test_store(ctx, rngdatabuf[i]);
|
||||
+ fips_test_store(ctx, rngdatabuf[i+1]);
|
||||
+ fips_test_store(ctx, rngdatabuf[i+2]);
|
||||
+ fips_test_store(ctx, rngdatabuf[i+3]);
|
||||
+ }
|
||||
+
|
||||
+ /* add in the last (possibly incomplete) run */
|
||||
+ if (ctx->rlength < 5)
|
||||
+ ctx->runs[ctx->rlength + (6 * ctx->current_bit)]++;
|
||||
+ else {
|
||||
+ ctx->runs[5 + (6 * ctx->current_bit)]++;
|
||||
+ if (ctx->rlength >= 25)
|
||||
+ rng_test |= FIPS_RNG_LONGRUN;
|
||||
+ }
|
||||
+
|
||||
+ if (ctx->longrun) {
|
||||
+ rng_test |= FIPS_RNG_LONGRUN;
|
||||
+ ctx->longrun = 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Ones test */
|
||||
+ if ((ctx->ones >= 10275) || (ctx->ones <= 9725))
|
||||
+ rng_test |= FIPS_RNG_MONOBIT;
|
||||
+ /* Poker calcs */
|
||||
+ for (i = 0, j = 0; i < 16; i++)
|
||||
+ j += ctx->poker[i] * ctx->poker[i];
|
||||
+ /* 16/5000*1563176-5000 = 2.1632 */
|
||||
+ /* 16/5000*1576928-5000 = 46.1696 */
|
||||
+ if ((j > 1576928) || (j < 1563176))
|
||||
+ rng_test |= FIPS_RNG_POKER;
|
||||
+
|
||||
+ if ((ctx->runs[0] < 2315) || (ctx->runs[0] > 2685) ||
|
||||
+ (ctx->runs[1] < 1114) || (ctx->runs[1] > 1386) ||
|
||||
+ (ctx->runs[2] < 527) || (ctx->runs[2] > 723) ||
|
||||
+ (ctx->runs[3] < 240) || (ctx->runs[3] > 384) ||
|
||||
+ (ctx->runs[4] < 103) || (ctx->runs[4] > 209) ||
|
||||
+ (ctx->runs[5] < 103) || (ctx->runs[5] > 209) ||
|
||||
+ (ctx->runs[6] < 2315) || (ctx->runs[6] > 2685) ||
|
||||
+ (ctx->runs[7] < 1114) || (ctx->runs[7] > 1386) ||
|
||||
+ (ctx->runs[8] < 527) || (ctx->runs[8] > 723) ||
|
||||
+ (ctx->runs[9] < 240) || (ctx->runs[9] > 384) ||
|
||||
+ (ctx->runs[10] < 103) || (ctx->runs[10] > 209) ||
|
||||
+ (ctx->runs[11] < 103) || (ctx->runs[11] > 209)) {
|
||||
+ rng_test |= FIPS_RNG_RUNS;
|
||||
+ }
|
||||
+
|
||||
+ /* finally, clear out FIPS variables for start of next run */
|
||||
+ memset(ctx->poker, 0, sizeof (ctx->poker));
|
||||
+ memset(ctx->runs, 0, sizeof (ctx->runs));
|
||||
+ ctx->ones = 0;
|
||||
+ ctx->rlength = -1;
|
||||
+ ctx->current_bit = 0;
|
||||
+
|
||||
+ return rng_test;
|
||||
+}
|
||||
+#endif /* _RNG_FIPS_H */
|
||||
diff -urn -- a/miscutils/rngd.c b/miscutils/rngd.c
|
||||
--- a/miscutils/rngd.c 2021-04-14 10:06:59.131381906 +0300
|
||||
+++ b/miscutils/rngd.c 2021-04-14 10:04:59.785401231 +0300
|
||||
@@ -0,0 +1,193 @@
|
||||
+/* vi: set sw=4 ts=4: */
|
||||
+/*
|
||||
+ * rngd implementation for busybox
|
||||
+ *
|
||||
+ * Ported to busybox by Malek Degachi
|
||||
+ *
|
||||
+ * Licensed under GPLv2 or later, see file License in this tarball for details.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+//config:config RNGD
|
||||
+//config: bool "rngd"
|
||||
+//config: default n
|
||||
+//config: help
|
||||
+//config: Hardware random number generation daemon.
|
||||
+//config:config FEATURE_RNGD_LONG_OPTIONS
|
||||
+//config: bool "Enable long options"
|
||||
+//config: default n
|
||||
+//config: depends on RNGD && GETOPT_LONG
|
||||
+//config: help
|
||||
+//config: Support long options for the rngd applet.
|
||||
+
|
||||
+//applet:IF_RNGD(APPLET(rngd, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
||||
+
|
||||
+//kbuild:lib-$(CONFIG_RNGD) += rngd.o
|
||||
+
|
||||
+//usage:#define rngd_trivial_usage
|
||||
+//usage: "[-bf] [-o random file] [-r rng file] [-s step] [-t nnn] [-W n]"
|
||||
+//usage:#define rngd_full_usage "\n\n"
|
||||
+//usage: "Check and feed random data from hardware device to kernel entropy pool.\n"
|
||||
+//usage: "\nOptions:"
|
||||
+//usage: "\n -b,--background Become a daemon (default)"
|
||||
+//usage: "\n -f,--foreground Do not fork and become a daemon"
|
||||
+//usage: "\n -o,--rng-device=file Kernel device used for random number output"
|
||||
+//usage: "\n (default: /dev/random)"
|
||||
+//usage: "\n -r,--random-step=nnn Kernel device used for random number input"
|
||||
+//usage: "\n (default: /dev/hw_random)"
|
||||
+//usage: "\n -s,--random-step=nnn Number of bytes written to random-device at a time"
|
||||
+//usage: "\n (default: 64)"
|
||||
+//usage: "\n -t,--timeout=nnn Interval written to random-device when the entropy"
|
||||
+//usage: "\n pool is full, in seconds (default: 60)"
|
||||
+//usage: "\n -W,--fill-watermark=n Do not stop feeding entropy to random-device until"
|
||||
+//usage: "\n at least n bits of entropy are available in the"
|
||||
+//usage: "\n pool (default: 2048), 0 <= n <= 4096"
|
||||
+
|
||||
+
|
||||
+#include "libbb.h"
|
||||
+#include "rng_fips.h"
|
||||
+#include <syslog.h>
|
||||
+
|
||||
+#ifndef __u32
|
||||
+typedef unsigned int __u32;
|
||||
+#endif
|
||||
+#include <linux/random.h> /* struct rand_pool_info, RNDADDENTROPY and RNDGETENTCNT */
|
||||
+
|
||||
+enum {
|
||||
+ RNG_b = (1 << 0),
|
||||
+ RNG_f = (1 << 1),
|
||||
+ RNG_o = (1 << 2),
|
||||
+ RNG_r = (1 << 3),
|
||||
+ RNG_s = (1 << 4),
|
||||
+ RNG_t = (1 << 5),
|
||||
+ RNG_W = (1 << 6),
|
||||
+};
|
||||
+
|
||||
+static void random_add_entropy(int random_fd, void *buf, size_t size)
|
||||
+{
|
||||
+ struct rand_pool_info *entropy;
|
||||
+
|
||||
+ entropy = xmalloc(sizeof(struct rand_pool_info) + size);
|
||||
+
|
||||
+ entropy->entropy_count = size * 8;
|
||||
+ entropy->buf_size = size;
|
||||
+ memcpy(entropy->buf, buf, size);
|
||||
+
|
||||
+ ioctl_or_perror_and_die(random_fd, RNDADDENTROPY, entropy, "RNDADDENTROPY failed: %s\n",
|
||||
+ strerror(errno));
|
||||
+}
|
||||
+
|
||||
+static void random_sleep(int random_fd, double timeout, unsigned fill_watermark)
|
||||
+{
|
||||
+ int ent_count;
|
||||
+ struct pollfd pfd[1];
|
||||
+
|
||||
+ pfd[0].fd = random_fd;
|
||||
+ pfd[0].events = POLLOUT;
|
||||
+
|
||||
+ ioctl_or_perror_and_die(random_fd, RNDGETENTCNT, &ent_count, "RNDGETENTCNT failed: %s\n",
|
||||
+ strerror(errno));
|
||||
+ if (ent_count < fill_watermark) return;
|
||||
+
|
||||
+ safe_poll(pfd, 1, 1000.0 * timeout);
|
||||
+}
|
||||
+
|
||||
+/* Initialize entropy source */
|
||||
+static int discard_initial_data(int rng_fd)
|
||||
+{
|
||||
+ /* Trash 32 bits of what is probably stale (non-random)
|
||||
+ * initial state from the RNG. For Intel's, 8 bits would
|
||||
+ * be enough, but since AMD's generates 32 bits at a time...
|
||||
+ *
|
||||
+ * The kernel drivers should be doing this at device powerup,
|
||||
+ * but at least up to 2.4.24, it doesn't. */
|
||||
+ unsigned char tempbuf[4];
|
||||
+
|
||||
+ xread(rng_fd, tempbuf, sizeof tempbuf);
|
||||
+
|
||||
+ /* Return 32 bits of bootstrap data */
|
||||
+ xread(rng_fd, tempbuf, sizeof tempbuf);
|
||||
+
|
||||
+ return tempbuf[0] | (tempbuf[1] << 8) |
|
||||
+ (tempbuf[2] << 16) | (tempbuf[3] << 24);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+#if ENABLE_FEATURE_RNGD_LONG_OPTIONS
|
||||
+static const char rngd_longopts[] ALIGN1 =
|
||||
+ "background\0" No_argument "b"
|
||||
+ "foreground\0" No_argument "f"
|
||||
+ "random-device\0" Required_argument "o"
|
||||
+ "rng-device\0" Required_argument "r"
|
||||
+ "random-step\0" Required_argument "s"
|
||||
+ "timeout\0" Required_argument "t"
|
||||
+ "fill-watermark\0" Required_argument "W"
|
||||
+ ;
|
||||
+#endif
|
||||
+
|
||||
+int rngd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
+int rngd_main(int argc UNUSED_PARAM, char **argv)
|
||||
+{
|
||||
+ const char *random_name = "/dev/random";
|
||||
+ const char *rng_name = "/dev/hw_random";
|
||||
+ int random_step = 64;
|
||||
+ unsigned fill_watermark;
|
||||
+ double poll_timeout = 60;
|
||||
+
|
||||
+ const char *watermark = "2048";
|
||||
+ static int rng_fd;
|
||||
+ static int random_fd;
|
||||
+
|
||||
+ unsigned char buf[FIPS_RNG_BUFFER_SIZE];
|
||||
+ unsigned char *p;
|
||||
+ int fips;
|
||||
+ fips_ctx_t *fipsctx;
|
||||
+
|
||||
+#if ENABLE_FEATURE_RNGD_LONG_OPTIONS
|
||||
+ applet_long_options = rngd_longopts;
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+ getopt32(argv, "bfo:r:s:t:W:", &random_name, &rng_name, &random_step, &poll_timeout, &watermark);
|
||||
+ argv += optind;
|
||||
+
|
||||
+ fill_watermark = xatou_range(watermark, 0, 4096);
|
||||
+
|
||||
+ /* Init entropy source, and open hardware RNG device */
|
||||
+ rng_fd = xopen(rng_name, O_RDONLY);
|
||||
+
|
||||
+ /* Bootstrap FIPS tests */
|
||||
+ fipsctx = (fips_ctx_t *) xzalloc(sizeof(fips_ctx_t));
|
||||
+ fipsctx->rlength = -1;
|
||||
+ fipsctx->last32 = discard_initial_data(rng_fd);
|
||||
+
|
||||
+ /* Init entropy sink and open random device */
|
||||
+ random_fd = xopen(random_name, O_RDWR);
|
||||
+
|
||||
+ if (!(option_mask32 & RNG_f)) { /* no -f */
|
||||
+ bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv);
|
||||
+ openlog(applet_name, LOG_PID, LOG_DAEMON);
|
||||
+ logmode = LOGMODE_SYSLOG;
|
||||
+ }
|
||||
+
|
||||
+ write_pidfile("/var/run/rngd.pid");
|
||||
+ for (;;) {
|
||||
+ xread(rng_fd, buf, sizeof buf);
|
||||
+
|
||||
+ fips = fips_run_rng_test(fipsctx, buf);
|
||||
+
|
||||
+ if (fips) {
|
||||
+ bb_info_msg("failed fips test");
|
||||
+ sleep(1);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ for (p = buf; p + random_step <= &buf[sizeof buf]; p += random_step) {
|
||||
+ random_add_entropy(random_fd, p, random_step);
|
||||
+ random_sleep(random_fd, poll_timeout ? : -1.0, fill_watermark);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return EXIT_SUCCESS;
|
||||
+}
|
||||
+
|
|
@ -1 +0,0 @@
|
|||
MSK-3
|
|
@ -1,55 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON="syslogd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
SYSLOGD_ARGS="-C64"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
# BusyBox' syslogd does not create a pidfile, so pass "-n" in the command line
|
||||
# and use "-m" to instruct start-stop-daemon to create one.
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
|
||||
-- -n $SYSLOGD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature.
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
|
@ -1,48 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
NAME="rngd"
|
||||
DAEMON="/usr/sbin/${NAME}"
|
||||
DAEMON_ARGS="-r /dev/urandom"
|
||||
CFG_FILE="/etc/default/${NAME}"
|
||||
PID_FILE="/var/run/${NAME}.pid"
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
|
||||
|
||||
start()
|
||||
{
|
||||
printf "Starting ${NAME}: "
|
||||
start-stop-daemon -S -q -x "${DAEMON}" -- ${DAEMON_ARGS}
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
printf "Stopping ${NAME}: "
|
||||
# This daemon does not exit properly with the default TERM signal unless
|
||||
# it's forced to work by something reading /dev/random. Killing it and
|
||||
# removing its PID file is more straightforward.
|
||||
if start-stop-daemon -K -q -s KILL -p "${PID_FILE}" -n "${NAME}"; then
|
||||
rm -f "${PID_FILE}"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Loading modules:"
|
||||
# load modules for detected devices
|
||||
# find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq
|
||||
|
||||
# load modules from /etc/modules
|
||||
[ -r /etc/modules ] || exit 0
|
||||
while read module args; do
|
||||
case "$module" in
|
||||
""|"#"*) continue ;;
|
||||
esac
|
||||
|
||||
# attempt to load modules
|
||||
modprobe ${module} ${args} >/dev/null
|
||||
done < /etc/modules
|
||||
;;
|
||||
esac
|
|
@ -1,55 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON="ntpd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
NTPD_ARGS="-p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
# BusyBox' ntpd does not create a pidfile, so pass "-n" in the command line
|
||||
# and use "-m" to instruct start-stop-daemon to create one.
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \
|
||||
-- -n $NTPD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature.
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
|
@ -1,61 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Starts dropbear sshd.
|
||||
#
|
||||
|
||||
# Allow a few customizations from a config file
|
||||
test -r /etc/default/dropbear && . /etc/default/dropbear
|
||||
|
||||
start() {
|
||||
DROPBEAR_ARGS="$DROPBEAR_ARGS -R -B -k -p 22 -K 300"
|
||||
|
||||
# If /etc/dropbear is a symlink to /var/run/dropbear, and
|
||||
# - the filesystem is RO (i.e. we can not rm the symlink),
|
||||
# create the directory pointed to by the symlink.
|
||||
# - the filesystem is RW (i.e. we can rm the symlink),
|
||||
# replace the symlink with an actual directory
|
||||
if [ -L /etc/dropbear \
|
||||
-a "$(readlink /etc/dropbear)" = "/var/run/dropbear" ]
|
||||
then
|
||||
if rm -f /etc/dropbear >/dev/null 2>&1; then
|
||||
mkdir -p /etc/dropbear
|
||||
else
|
||||
echo "No persistent location to store SSH host keys. New keys will be"
|
||||
echo "generated at each boot. Are you sure this is what you want to do?"
|
||||
mkdir -p "$(readlink /etc/dropbear)"
|
||||
fi
|
||||
fi
|
||||
|
||||
printf "Starting dropbear sshd: "
|
||||
umask 077
|
||||
|
||||
start-stop-daemon -S -q -p /var/run/dropbear.pid \
|
||||
--exec /usr/sbin/dropbear -- $DROPBEAR_ARGS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping dropbear sshd: "
|
||||
start-stop-daemon -K -q -p /var/run/dropbear.pid
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
|
@ -1,55 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
DAEMON="mini-snmpd"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
|
||||
SNMPD_ARGS="-n -4 -c openipc -i eth0 -D OpenIPC -C https://openipc.org -L Internet -l notice"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
# The mini-snmpd does not create a pidfile, so pass "-n" in the command line
|
||||
# and use "-m" to instruct start-stop-daemon to create one.
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \
|
||||
-- $SNMPD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
rm -f "$PIDFILE"
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
# Restart, since there is no true "reload" feature.
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
|
@ -1,2 +0,0 @@
|
|||
#mt7601u
|
||||
#r8188eu
|
|
@ -1,8 +0,0 @@
|
|||
# Interfaces
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
hwaddress ether $(fw_printenv -n ethaddr)
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
OpenIPC is asking for your help to support development cost and long-term maintenance of what we believe will serve a fundamental
|
||||
role in the advancement of a stable, flexible and most importantly, Open IP Network Camera Framework for users worldwide.
|
||||
|
||||
Your contribution will help us advance development proposals forward, and interact with the community on a regular basis.
|
||||
|
||||
https://openipc.org/contribution/
|
|
@ -1,24 +0,0 @@
|
|||
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
|
||||
export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6)
|
||||
export HOME=${HOME:-/root}
|
||||
export TZ=$(cat /etc/TZ)
|
||||
|
||||
if [ "$PS1" ]; then
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
export PS1='\u@\h:\w\# '
|
||||
else
|
||||
export PS1='\u@\h:\w\$ '
|
||||
fi
|
||||
fi
|
||||
|
||||
export EDITOR='/bin/vi'
|
||||
|
||||
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
|
||||
|
||||
# Source configuration files from /etc/profile.d
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
unset i
|
|
@ -1,3 +0,0 @@
|
|||
#
|
||||
nameserver 1.1.1.1
|
||||
#
|
|
@ -1,32 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
on_exit()
|
||||
{
|
||||
mountpoint -q /proc && umount /proc
|
||||
exec /sbin/init $*
|
||||
}
|
||||
trap on_exit 0
|
||||
|
||||
|
||||
mount -t proc proc /proc || exit
|
||||
grep -q overlay /proc/filesystems || exit
|
||||
|
||||
mount -t jffs2 /dev/$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd | sed 's/mtd/mtdblock/') /overlay || \
|
||||
mount -t tmpfs tmpfs /overlay || exit
|
||||
|
||||
if grep -q overlayfs /proc/filesystems; then
|
||||
mount -t overlayfs overlayfs -o lowerdir=/,upperdir=/overlay,ro /mnt \
|
||||
|| { umount /overlay; exit; }
|
||||
else
|
||||
overlay_rootdir=/overlay/root
|
||||
overlay_workdir=/overlay/work
|
||||
mkdir -p ${overlay_rootdir} ${overlay_workdir}
|
||||
mount -t overlay overlay \
|
||||
-o lowerdir=/,upperdir=${overlay_rootdir},workdir=${overlay_workdir} /mnt \
|
||||
|| { umount /overlay; exit; }
|
||||
fi
|
||||
|
||||
pivot_root /mnt /mnt/rom
|
||||
mount -o noatime,move /rom/proc /proc
|
||||
mount -o noatime,move /rom/dev /dev
|
||||
mount -o noatime,move /rom/overlay /overlay
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue