SchOS/ports/lwip/Makefile
Nexoniarz 26bca020b6 licence: SchOS is GPL-2.0-or-later, no longer Apache-2.0
Nexoniarz is the sole author and SchOS was never published under
Apache-2.0, so this is a straight relicence. LICENSE is the FSF GPLv2 text,
every first-party SPDX header moves to GPL-2.0-or-later, and NOTICE,
README.md, docs/licensing.md and the site say so. projects/schfs-linux
follows the rest of the tree.

The GPL gives copyleft: a fork has to ship its source. It also lifts the
old "Linux drivers, never" rule, since GPL-2.0-only code combines with
GPL-2.0-or-later. "Or later" leaves room for GPLv3, but one binary still
has to pick one version, so docs/licensing.md now keeps Apache-2.0 and
GPLv3 code out of the kernel to keep Linux code possible there. BSD
4-clause code goes from "avoid" to "no", because the advertising clause
is GPL-incompatible.

LDLS still ships no .ko. That boundary is now project policy rather than
a legal requirement, and ldls.md, devices.md and licensing.md section 6
say so. refmod declares license=GPL, and ldls-check passes (27 checks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:48:45 +02:00

44 lines
1.5 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# lwIP — the TCP/IP stack. BSD-3-clause (no advertising clause); see COPYING in
# the tarball and docs/licensing.md.
#
# Unlike every other port here, nothing is installed into the sysroot: lwIP is
# *kernel* code. This directory only fetches and unpacks it, and the top-level
# Makefile compiles the files it wants straight into the kernel, against the
# port headers in kernel/net/lwip/. That is why there is no build or install
# rule below and no dependency on musl.
#
# Chosen over taking a BSD kernel's netinet, and the reason is not licensing --
# FreeBSD's is BSD-3 too. It is that FreeBSD's stack is not a library: it reaches
# into mbufs, epoch(9), netisr, VNET and uma(9), so adopting it means porting
# FreeBSD's kernel infrastructure first. lwIP was written for precisely this
# situation, a small OS with a raw Ethernet driver, and its port layer is a
# handful of files. See docs/roadmap.md phase 2.
include ../mk/port.mk
LWIP_VERSION := 2.2.0
LWIP_URL := https://download.savannah.nongnu.org/releases/lwip/lwip-$(LWIP_VERSION).zip
TARBALL := $(DISTDIR)/lwip-$(LWIP_VERSION).zip
$(TARBALL): | $(DISTDIR)
curl -fsSL -o $@ $(LWIP_URL)
download: $(TARBALL)
$(SRCDIR): $(TARBALL)
mkdir -p $(PORTDIR)
cd $(PORTDIR) && unzip -q $(abspath $<)
mv $(PORTDIR)/lwip-$(LWIP_VERSION) $@
# The kernel build depends on this directory existing, nothing more.
all: | $(SRCDIR)
install:
clean:
rm -rf $(PORTDIR)
distclean: clean
rm -f $(TARBALL)