Skip to content

Commit 55044b7

Browse files
committed
ALL HAIL OUR BUILDROOT OVERLORDS!!
Thus begins the root of our build farm.
0 parents  commit 55044b7

File tree

9 files changed

+125
-0
lines changed

9 files changed

+125
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/output
2+
/dl
3+
/.auto.deps
4+
/.config.cmd
5+
/.config.old
6+
/..config.tmp
7+
/.config
8+
*.depend
9+
*.o
10+
/*.patch
11+
/*.diff
12+
*.orig
13+
*.rej
14+
*~
15+
*.pyc

Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source "$BR2_EXTERNAL/package/Config.in"

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# CoreOS Buildroot Addons
2+
3+
## About
4+
5+
Buildroot is an SDK for building embedded Linux distributions. It handles the
6+
removal of man pages, shared files, and many pieces not germaine to running
7+
on an embedded platform. At CoreOS we use Buildroot for the generation of
8+
[minimal containers](https://github.com/brianredbeard/minimal_containers) for
9+
use with [rkt](https://github.com/coreos/rkt) and Docker.

configs/corebox_defconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
BR2_x86_64=y
2+
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
3+
BR2_TOOLCHAIN_BUILDROOT_CXX=y
4+
BR2_ENABLE_LOCALE_PURGE=y
5+
BR2_ENABLE_LOCALE_WHITELIST="C POSIX"
6+
BR2_TARGET_GENERIC_HOSTNAME="corebox"
7+
BR2_TARGET_GENERIC_ISSUE="Welcome to CoreBox"
8+
BR2_TARGET_GENERIC_PASSWD_SHA512=y
9+
BR2_INIT_NONE=y
10+
BR2_SYSTEM_BIN_SH_BASH=y
11+
# BR2_TARGET_GENERIC_GETTY is not set
12+
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
13+
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
14+
BR2_PACKAGE_COREUTILS=y

external.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))

package/Config.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
menu "Networking applications"
2+
source "package/openresty/Config.in"
3+
endmenu

package/openresty/Config.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
config BR2_PACKAGE_OPENRESTY
2+
bool "openresty"
3+
depends on !BR2_PACKAGE_NGINX
4+
select BR2_PACKAGE_PCRE
5+
select BR2_PACKAGE_PCRE_UTF
6+
select BR2_PACKAGE_OPENSSL
7+
help
8+
OpenResty NGINX Variant
9+
10+
http://github.com/openresty/openresty

package/openresty/openresty.hash

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Locally computed:
2+
sha256 aa5dcae035dda6e483bc1bd3d969d7113205dc2d0a3702ece0ad496c88a653c5 openresty-1.9.7.4.tar.gz

package/openresty/openresty.mk

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
################################################################################
2+
#
3+
# openresty
4+
#
5+
################################################################################
6+
7+
OPENRESTY_VERSION = 1.9.7.4
8+
OPENRESTY_SITE = https://openresty.org/download
9+
OPENRESTY_DEPENDENCIES += pcre openssl
10+
OPENRESTY_LICENSE = BSD-2c
11+
OPENRESTY_LICENSE_FILES = LICENSE
12+
OPENRESTY_CFLAGS = "-v"
13+
OPENRESTY_CPP_FLAGS = "-E"
14+
OPENRESTY_CONF_OPTS = \
15+
--crossbuild=Linux::$(BR2_ARCH) \
16+
--with-cc="$(TARGET_CC)" \
17+
--with-cpp="$(TARGET_CPP)" \
18+
--with-cc-opt="-pipe -O -W -Wall -g -O2" \
19+
--with-ld-opt="$(TARGET_LDFLAGS)" \
20+
--with-ipv6
21+
22+
23+
24+
# disable external libatomic_ops because its detection fails.
25+
OPENRESTY_CONF_ENV += \
26+
ngx_force_c_compiler=yes \
27+
ngx_force_c99_have_variadic_macros=yes \
28+
ngx_force_gcc_have_variadic_macros=yes \
29+
ngx_force_gcc_have_atomic=yes \
30+
ngx_force_have_libatomic=no \
31+
ngx_force_have_epoll=yes \
32+
ngx_force_have_sendfile=yes \
33+
ngx_force_have_sendfile64=yes \
34+
ngx_force_have_pr_set_dumpable=yes \
35+
ngx_force_have_timer_event=yes \
36+
ngx_force_have_map_anon=yes \
37+
ngx_force_have_map_devzero=yes \
38+
ngx_force_have_sysvshm=yes \
39+
ngx_force_have_posix_sem=yes
40+
41+
# prefix: nginx root configuration location
42+
OPENRESTY_CONF_OPTS += \
43+
--pid-path=/var/run/nginx.pid \
44+
--lock-path=/var/run/lock/nginx.lock \
45+
--user=www-data \
46+
--group=www-data \
47+
--error-log-path=/var/log/nginx/error.log \
48+
--http-log-path=/var/log/nginx/access.log \
49+
--http-client-body-temp-path=/var/tmp/nginx/client-body \
50+
--http-proxy-temp-path=/var/tmp/nginx/proxy \
51+
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
52+
--http-scgi-temp-path=/var/tmp/nginx/scgi \
53+
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi
54+
55+
56+
define OPENRESTY_CONFIGURE_CMDS
57+
cd $(@D); $(OPENRESTY_CONF_ENV) $(@D)/configure $(OPENRESTY_CONF_OPTS)
58+
endef
59+
60+
define OPENRESTY_BUILD_CMDS
61+
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
62+
endef
63+
64+
define OPENRESTY_INSTALL_TARGET_CMDS
65+
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
66+
$(RM) $(TARGET_DIR)/usr/sbin/nginx.old \
67+
$(TARGET_DIR)/usr/local/openresty/luajit/share/man/man1/luajit.1
68+
endef
69+
70+
$(eval $(generic-package))

0 commit comments

Comments
 (0)