-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit inicial da imagem Caipirinha-OS
- Loading branch information
Showing
10 changed files
with
404 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
CONFIG_TARGET_bcm27xx=y | ||
CONFIG_TARGET_bcm27xx_bcm2710=y | ||
CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y | ||
CONFIG_ALL_KMODS=y | ||
CONFIG_ALL_NONSHARED=y | ||
CONFIG_DEVEL=y | ||
CONFIG_AUTOREMOVE=y | ||
CONFIG_BPF_TOOLCHAIN_BUILD_LLVM=y | ||
# CONFIG_BPF_TOOLCHAIN_NONE is not set | ||
CONFIG_BUILDBOT=y | ||
CONFIG_COLLECT_KERNEL_DEBUG=y | ||
CONFIG_HAS_BPF_TOOLCHAIN=y | ||
CONFIG_IB=y | ||
CONFIG_IMAGEOPT=y | ||
CONFIG_KERNEL_BUILD_DOMAIN="buildhost" | ||
CONFIG_KERNEL_BUILD_USER="builder" | ||
# CONFIG_KERNEL_KALLSYMS is not set | ||
CONFIG_MAKE_TOOLCHAIN=y | ||
CONFIG_PACKAGE_brcmfmac-firmware-usb=m | ||
CONFIG_PACKAGE_cgi-io=y | ||
CONFIG_PACKAGE_cypress-firmware-43430-sdio=m | ||
CONFIG_PACKAGE_cypress-firmware-43455-sdio=m | ||
CONFIG_PACKAGE_cypress-nvram-43430-sdio-rpi-3b=m | ||
CONFIG_PACKAGE_cypress-nvram-43455-sdio-rpi-3b-plus=m | ||
CONFIG_PACKAGE_hostapd-common=m | ||
CONFIG_PACKAGE_iw=m | ||
CONFIG_PACKAGE_iwinfo=m | ||
CONFIG_PACKAGE_kmod-brcmfmac=m | ||
CONFIG_PACKAGE_kmod-brcmutil=m | ||
CONFIG_PACKAGE_kmod-cfg80211=m | ||
CONFIG_PACKAGE_kmod-mmc=m | ||
CONFIG_PACKAGE_libbpf=m | ||
CONFIG_PACKAGE_libelf=m | ||
CONFIG_PACKAGE_libiwinfo-lua=y | ||
CONFIG_PACKAGE_liblua=y | ||
CONFIG_PACKAGE_liblucihttp=y | ||
CONFIG_PACKAGE_liblucihttp-lua=y | ||
CONFIG_PACKAGE_libubus-lua=y | ||
CONFIG_PACKAGE_lua=y | ||
CONFIG_PACKAGE_luci=y | ||
CONFIG_PACKAGE_luci-app-firewall=y | ||
CONFIG_PACKAGE_luci-app-opkg=y | ||
CONFIG_PACKAGE_luci-base=y | ||
CONFIG_PACKAGE_luci-lib-base=y | ||
CONFIG_PACKAGE_luci-lib-ip=y | ||
CONFIG_PACKAGE_luci-lib-jsonc=y | ||
CONFIG_PACKAGE_luci-lib-nixio=y | ||
CONFIG_PACKAGE_luci-mod-admin-full=y | ||
CONFIG_PACKAGE_luci-mod-network=y | ||
CONFIG_PACKAGE_luci-mod-status=y | ||
CONFIG_PACKAGE_luci-mod-system=y | ||
CONFIG_PACKAGE_luci-proto-ipv6=y | ||
CONFIG_PACKAGE_luci-proto-ppp=y | ||
CONFIG_PACKAGE_luci-ssl=y | ||
CONFIG_PACKAGE_luci-theme-bootstrap=y | ||
CONFIG_PACKAGE_px5g-wolfssl=y | ||
CONFIG_PACKAGE_qosify=m | ||
CONFIG_PACKAGE_rpcd=y | ||
CONFIG_PACKAGE_rpcd-mod-file=y | ||
CONFIG_PACKAGE_rpcd-mod-iwinfo=y | ||
CONFIG_PACKAGE_rpcd-mod-luci=y | ||
CONFIG_PACKAGE_rpcd-mod-rrdns=y | ||
CONFIG_PACKAGE_tc-full=m | ||
CONFIG_PACKAGE_tc-mod-iptables=m | ||
CONFIG_PACKAGE_uhttpd=y | ||
CONFIG_PACKAGE_uhttpd-mod-ubus=y | ||
CONFIG_PACKAGE_wireless-regdb=m | ||
CONFIG_PACKAGE_wpad-basic-wolfssl=m | ||
CONFIG_PACKAGE_zlib=m | ||
CONFIG_REPRODUCIBLE_DEBUG_INFO=y | ||
CONFIG_SDK=y | ||
CONFIG_SDK_LLVM_BPF=y | ||
CONFIG_USE_LLVM_BUILD=y | ||
CONFIG_VERSIONOPT=y | ||
CONFIG_VERSION_BUG_URL="" | ||
CONFIG_VERSION_CODE="v0.1" | ||
CONFIG_VERSION_DIST="Caipirinha-OS" | ||
CONFIG_VERSION_FILENAMES=y | ||
CONFIG_VERSION_HOME_URL="" | ||
CONFIG_VERSION_HWREV="" | ||
CONFIG_VERSION_MANUFACTURER="" | ||
CONFIG_VERSION_MANUFACTURER_URL="" | ||
CONFIG_VERSION_NUMBER="" | ||
CONFIG_VERSION_PRODUCT="" | ||
CONFIG_VERSION_REPO="https://downloads.openwrt.org/releases/22.03.5" | ||
CONFIG_VERSION_SUPPORT_URL="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "openwrt"] | ||
path = openwrt | ||
url = https://github.com/openwrt/openwrt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM debian:buster | ||
|
||
ARG USER_ID | ||
ARG GROUP_ID | ||
|
||
RUN echo $USER_ID | ||
RUN echo $GROUP_ID | ||
|
||
RUN apt-get update &&\ | ||
apt-get install -y \ | ||
build-essential gawk gcc-multilib flex git gettext \ | ||
libncurses5 libncurses5-dev zlib1g-dev curl libsnmp-dev \ | ||
liblzma-dev sudo time git-core subversion g++ bash make \ | ||
libssl-dev patch wget unzip xz-utils python python-distutils-extra \ | ||
python3 python3-distutils python3-distutils-extra \ | ||
python3-setuptools libpam0g-dev cpio rsync && \ | ||
apt-get clean | ||
|
||
|
||
RUN addgroup --gid $USER_ID user | ||
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user | ||
|
||
VOLUME ['/usr/local/src/custom_firmware/'] | ||
WORKDIR /usr/local/src/custom_firmware/ | ||
|
||
USER user | ||
|
||
# set dummy git config | ||
RUN git config --global --add safe.directory '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
#!/usr/bin/env bash | ||
#Build Arduino Yun Image for Dragino2. MS14, HE. | ||
|
||
SFLAG= | ||
AFLAG= | ||
BFLAG= | ||
|
||
APP="caipirinha" | ||
IMAGE_SUFFIX= | ||
BUILD_TIME=`date +%s` | ||
|
||
REPO_PATH=$(pwd) | ||
VERSION="22.03" | ||
OPENWRT_PATH="openwrt" | ||
|
||
while getopts 'a:p:sh' OPTION | ||
do | ||
case $OPTION in | ||
a) | ||
AFLAG=1 | ||
APP="$OPTARG" | ||
;; | ||
p) OPENWRT_PATH="$OPTARG" | ||
;; | ||
|
||
s) SFLAG=1 | ||
;; | ||
|
||
h|?) printf "Build Image for Caipirinha\n\n" | ||
printf "Usage: %s [-p <openwrt_source_path>] [-a <application>] [-s] \n" $(basename $0) >&2 | ||
printf " -a: application file to build\n" | ||
printf " -s: build in singe thread\n" | ||
printf "\n" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
shift $(($OPTIND - 1)) | ||
|
||
|
||
BUILD=$APP-$VERSION | ||
|
||
BUILD_TIME="`date`" | ||
|
||
ARCH="bcm27xx" | ||
|
||
file_prefix="openwrt-caipirinha" | ||
target_path="bin/targets/bcm27xx/bcm2710" | ||
|
||
echo "" | ||
|
||
echo "Remove custom files from last build" | ||
|
||
rm -rf $OPENWRT_PATH/files | ||
|
||
echo "***Copy general_files to OpenWrt***" | ||
cp -r general_files $OPENWRT_PATH/files | ||
|
||
echo "***.config.$APP to OpenWrt/.config***" | ||
cp .config.$APP $OPENWRT_PATH/.config | ||
|
||
cd $REPO_PATH | ||
|
||
if [ -f .config.$APP ];then | ||
echo "" | ||
echo "***Find customized .config files***" | ||
echo "Replace default .config file with .config.$APP" | ||
echo "" | ||
cp .config.$APP $OPENWRT_PATH/.config | ||
else | ||
echo "" | ||
echo "***Can't find .config.$APP file***" | ||
echo "Use default .config.$DEFAULT_APP" | ||
echo "" | ||
fi | ||
|
||
echo "" | ||
|
||
echo "***Entering build directory***" | ||
|
||
cd $OPENWRT_PATH | ||
|
||
make defconfig | ||
|
||
#make sure fresh the luci-app on each build | ||
#rm -rf build_dir/target-mips_24kc_musl/luci-app-* | ||
|
||
echo "" | ||
|
||
echo "" | ||
echo "***Update build version and build date***" | ||
echo "Build: $BUILD" | ||
echo "Build time: $BUILD_TIME" | ||
echo "" | ||
|
||
|
||
[ -f ./$target_path/$file_prefix-squashfs-sysupgrade.bin ] && rm -rf ./$target_path/??* | ||
|
||
echo "" | ||
if [ ! -z $SFLAG ];then | ||
echo "***Run make for single thread ***" | ||
make -s V=99 | ||
else | ||
echo "***Run make" | ||
make -j $(($(nproc)+1)) download world | ||
fi | ||
|
||
if [ ! -f ./$target_path/$file_prefix-squashfs-sysupgrade.bin ];then | ||
echo "" | ||
echo "Build Fails, run below commands to build the image in single thread and check what is wrong" | ||
echo "**************" | ||
echo " ./build_image.sh -s V=99" | ||
echo "**************" | ||
exit 0 | ||
fi | ||
|
||
echo "Copy Image" | ||
echo "Set up new directory name with date" | ||
DATE=`date +%Y%m%d-%H%M` | ||
mkdir -p $REPO_PATH/image/$APP-build-v$VERSION | ||
IMAGE_DIR=$REPO_PATH/image/$APP-build-v$VERSION | ||
|
||
echo "" | ||
echo "***Move files to ./image/$APP-build--v$VERSION***" | ||
cp ./$target_path/$file_prefix-squashfs-sysupgrade.bin $IMAGE_DIR/caipirinha-$APP-squashfs-sysupgrade.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: '3' | ||
services: | ||
sindri: | ||
#user: "1001:1001" #"${UID}:${GID}" | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
USER_ID: ${UID} | ||
GROUP_ID: ${GID} | ||
volumes: | ||
- ./:/usr/local/src/custom_firmware/ | ||
ulimits: | ||
nofile: | ||
soft: 64000 | ||
hard: 64000 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src-git-full packages https://git.openwrt.org/feed/packages.git^d057936acbefd76b033e7c365baa68b48ccb9166 | ||
src-git-full luci https://git.openwrt.org/project/luci.git^0b38d70fbd47b0c702d5001de623213eb301a6fe | ||
src-git-full routing https://git.openwrt.org/feed/routing.git^1cc7676b9f32acc30ec47f15fcb70380d5d6ef01 | ||
src-git-full telephony https://git.openwrt.org/feed/telephony.git^36d9f2f962bd0aba2eef674eb265819609ea99ed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
______ _ _ _ __ ____ _____ | ||
/ ____/___ _(_)___ (_)____(_)___ / /_ ____ _ / __ \/ ___/ | ||
/ / / __ `/ / __ \/ / ___/ / __ \/ __ \/ __ `/_____/ / / /\__ \ | ||
/ /___/ /_/ / / /_/ / / / / / / / / / / / /_/ /_____/ /_/ /___/ / | ||
\____/\__,_/_/ .___/_/_/ /_/_/ /_/_/ /_/\__,_/ \____//____/ | ||
/_/ | ||
W i F i, L i n u x, M C U, E m b e d d e d | ||
|
||
OpenWRT 22.03 | ||
Version: VERSION | ||
Build TIME | ||
|
||
---------------------------------------------------- | ||
|
Oops, something went wrong.