Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
# Work in progress.
#
############################################################
# ONL defaults to repo root when setup.env hasn't been sourced (for clean/modclean)
ONL ?= $(CURDIR)

.PHONY: all rebuild modclean clean docker docker-debug docker_check versions relclean

ifneq ($(MAKECMDGOALS),docker)
ifneq ($(MAKECMDGOALS),docker-debug)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),modclean)

ifndef ONL
$(error Please source the setup.env script at the root of the ONL tree)
Expand Down Expand Up @@ -36,14 +43,31 @@ all: $(BUILD_ARCHES_$(ONL_DEBIAN_SUITE))
rebuild:
$(ONLPM) --rebuild-pkg-cache

endif
endif
endif
endif

modclean:
rm -rf $(ONL)/make/modules/modules.*

endif
endif

.PHONY: docker
clean: modclean
@echo "Cleaning ONL build artifacts..."
rm -rf $(ONL)/RELEASE
rm -rf $(ONL)/.pkg-cache
find $(ONL)/REPO -mindepth 2 ! -name "Makefile" ! -name ".gitignore" -delete 2>/dev/null || true
cp -R $(ONL)/sm/build-artifacts/REPO/* $(ONL)/REPO 2>/dev/null || true
find $(ONL)/packages -name "*.deb" -delete 2>/dev/null || true
find $(ONL)/packages -name "*.cpio.gz" -delete 2>/dev/null || true
find $(ONL)/packages -name ".lock" -delete 2>/dev/null || true
find $(ONL)/packages -name "manifest.json" -delete 2>/dev/null || true
find $(ONL)/packages -type d -name "BUILD" -exec rm -rf {} + 2>/dev/null || true
find $(ONL)/packages -type d -name "rootfs-*" -exec sudo rm -rf {} + 2>/dev/null || true
find $(ONL)/builds -name "*.deb" -delete 2>/dev/null || true
find $(ONL)/builds -name "*.cpio.gz" -delete 2>/dev/null || true
find $(ONL)/builds -name ".lock" -delete 2>/dev/null || true
find $(ONL)/builds -type d -name "rootfs-*" -exec sudo rm -rf {} + 2>/dev/null || true
@echo "Clean complete!"

ifndef VERSION
VERSION := 9
Expand All @@ -55,7 +79,7 @@ docker_check:
docker: docker_check
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull --autobuild --non-interactive

# create an interative docker shell, for debugging builds
# create an interactive docker shell, for debugging builds
docker-debug: docker_check
@docker/tools/onlbuilder -$(VERSION) --isolate --hostname onlbuilder$(VERSION) --pull

Expand Down
6 changes: 6 additions & 0 deletions builds/any/rootfs/jessie/common/all-base-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@
- sysstat
- ipmitool
- lm-sensors
- curl
- autoconf
- libtool
- libc6-dev
- g++
- git
13 changes: 9 additions & 4 deletions builds/any/rootfs/stretch/common/all-base-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
- less
- sudo
- openssh-server
- iproute
- iproute2
- resolvconf
- vim-tiny
- zile
- nano
- lsof
- mingetty
- traceroute
- realpath
- rsyslog
- nfs-common
- netbase
Expand Down Expand Up @@ -53,7 +52,6 @@
- cpio
- util-linux
- dosfstools
- rssh
- u-boot-tools
- ntpdate
- onlp
Expand All @@ -63,7 +61,7 @@
- binutils
- file
- smartmontools
- realpath
- coreutils
- iptables
- onl-faultd
- onlp-snmpd
Expand All @@ -88,3 +86,10 @@
- tree
- memtester
- ipmitool
- curl
- libcurl3-nss
- autoconf
- libtool
- libc6-dev
- g++
- git
16 changes: 8 additions & 8 deletions docker/tools/onlbuilder
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/python3

import os
import sys
Expand All @@ -18,12 +18,12 @@ g_current_uid = os.getuid()
g_timestamp = datetime.datetime.now().strftime("%Y-%m-%d.%H%M%S")

g_builders = {
'default' : 8,
'default' : 12,
'builders' : {
7 : ('wheezy', 'opennetworklinux/builder7:1.2'),
8 : ('jessie', 'opennetworklinux/builder8:1.11'),
9 : ('stretch', 'dentproject/builder9:1.8' ),
10 : ('buster', 'opennetworklinux/builder10:1.2'),
10 : ('buster', 'opennetworklinux/builder10:1.2'),
12 : ('bookworm', 'opennetworklinux/builder12:1.0'),
},
}

Expand Down Expand Up @@ -126,10 +126,10 @@ logger.debug('arguments: %s\n' % vars(ops))

if ops.pull:
try:
print "Pulling %s..." % ops.image
print("Pulling %s..." % ops.image)
x = subprocess.check_output(('docker', 'pull', ops.image), stderr=subprocess.STDOUT)
print "done."
except subprocess.CalledProcessError, e:
print("done.")
except subprocess.CalledProcessError as e:
sys.stderr.write("** Failed to pull the docker image %s (%d):\n\n%s\n" % (ops.image, e.returncode, e.output))
sys.exit(1)

Expand Down Expand Up @@ -174,7 +174,7 @@ else:
g_docker_arguments = "docker run --privileged %(interactive)s -t -e DOCKER_IMAGE=%(image)s --name %(name)s %(ssh_options)s %(volume_options)s " % g_arg_d

if ops.isolate is not None:
if len(ops.isolate) is 0:
if len(ops.isolate) == 0:
ops.isolate.append(os.getcwd())

isolates = [ os.path.abspath(i) for i in ops.isolate ]
Expand Down
1 change: 1 addition & 0 deletions make/kbuild.mk
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ K_MAKE := $(MAKE) -C $(K_SOURCE_DIR)
# Build the kernel.
#
build: setup
+$(K_MAKE) olddefconfig
+$(K_MAKE) $(K_BUILD_TARGET)
+$(K_MAKE) modules
+$(K_MAKE) modules_install INSTALL_MOD_PATH=$(K_INSTALL_MOD_PATH)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4282,6 +4282,7 @@ CONFIG_KEYS_COMPAT=y
# CONFIG_KEYS_REQUEST_CACHE is not set
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_BIG_KEYS is not set
# CONFIG_TRUSTED_KEYS is not set
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEY_DH_OPERATIONS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
Expand Down
4 changes: 3 additions & 1 deletion packages/base/any/kernels/modules/ym2651y.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,9 @@ static ssize_t show_vout(struct device *dev, struct device_attribute *da,
return show_vout_by_mode(dev, da, buf);
}
else if ((strncmp(ptr, "DPS-850A", strlen("DPS-850A")) == 0)||
(strncmp(ptr, "YM-2851J", strlen("YM-2851J")) == 0)) {
(strncmp(ptr, "YM-2851J", strlen("YM-2851J")) == 0) ||
(strncmp(ptr, "UPD1501SA-1190G", strlen("UPD1501SA-1190G")) == 0) ||
(strncmp(ptr, "UPD1501SA-1290G", strlen("UPD1501SA-1290G")) == 0)) {
return show_vout_by_mode(dev, da, buf);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion packages/base/any/onlp-snmpd/builds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ GLOBAL_CFLAGS += -g

$(eval $(call onlpm_find_file,LIBONLP,onlp:$(ARCH),libonlp.so))

GLOBAL_LINK_LIBS += -lpthread $(LIBONLP)
GLOBAL_LINK_LIBS += -lm -lpthread $(LIBONLP)
GLOBAL_LINK_LIBS += -Wl,--unresolved-symbols=ignore-in-shared-libs

.DEFAULT_GOAL := onlp-snmpd
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
x86_64_accton_as9516_32d_INCLUDES := -I $(THIS_DIR)inc
x86_64_accton_as9516_32d_INTERNAL_INCLUDES := -I $(THIS_DIR)src
x86_64_accton_as9516_32d_DEPENDMODULE_ENTRIES := init:x86_64_accton_as9516_32d ucli:x86_64_accton_as9516_32d

GLOBAL_LINK_LIBS += -lcurl
4 changes: 2 additions & 2 deletions tools/mkinstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def build(self, name):
ap.add_argument("--initrd", nargs=2, help="The system initrd.")
ap.add_argument("--fit", nargs=2, help="The system FIT image.")
ap.add_argument("--boot-config", help="The boot-config source.")
ap.add_argument("--add-file", help="Add the given file to the installer package.", nargs='+', default=[])
ap.add_argument("--add-dir", help="Optional directory to include in the installer.", nargs='+', default=[])
ap.add_argument("--add-file", help="Add the given file to the installer package.", action='append', default=[])
ap.add_argument("--add-dir", help="Optional directory to include in the installer.", action='append', default=[])
ap.add_argument("--swi", help="Include the given SWI in the installer.")
ap.add_argument("--work-dir", help="Set work directory and keep intermediates for debugging.")
ap.add_argument("--verbose", '-v', help="Verbose output.", action='store_true')
Expand Down