WIP kernel and deps
This commit is contained in:
parent
92e0854916
commit
770a36cef6
1
Makefile
1
Makefile
|
@ -18,6 +18,7 @@ clean_logs := $(shell rm *.log 2>&1 >/dev/null || :)
|
|||
include src/macros.mk
|
||||
include src/bootstrap/build.mk
|
||||
include src/core/build.mk
|
||||
include src/kernel/build.mk
|
||||
include src/libs/build.mk
|
||||
include src/tools/build.mk
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
ARG REGISTRY=local
|
||||
FROM ${REGISTRY}/gcc:latest as gcc
|
||||
FROM ${REGISTRY}/binutils:latest as binutils
|
||||
FROM ${REGISTRY}/musl:latest as musl
|
||||
FROM ${REGISTRY}/make:latest as make
|
||||
FROM ${REGISTRY}/busybox:latest as busybox
|
||||
|
||||
FROM busybox as base
|
||||
ENV SRC_SITE https://ftp.gnu.org/gnu/bison
|
||||
ENV SRC_VERSION 3.8.2
|
||||
ENV SRC_HASH 06c9e13bdf7eb24d4ceb6b59205a4f67c2c7e7213119644430fe82fbd14a0abb
|
||||
ENV SRC_FILE bison-${SRC_VERSION}.tar.gz
|
||||
|
||||
FROM base as fetch
|
||||
RUN set -eux; \
|
||||
wget ${SRC_SITE}/${SRC_FILE}; \
|
||||
echo "${SRC_HASH} ${SRC_FILE}" | sha256sum -c
|
||||
|
||||
FROM fetch as build
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR bison-${SRC_VERSION}
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=musl . /
|
||||
ENV M4=/usr/bin/m4
|
||||
RUN set -eux; \
|
||||
./configure \
|
||||
--prefix=/usr; \
|
||||
make
|
||||
|
||||
from build as install
|
||||
USER 0:0
|
||||
RUN make DESTDIR=/rootfs install
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
||||
ENTRYPOINT ["/usr/bin/bison"]
|
||||
CMD ["--version"]
|
|
@ -272,3 +272,40 @@ out/rust1.73.tgz: out/rust1.72.tgz
|
|||
|
||||
out/rust.tgz: out/rust1.73.tgz
|
||||
$(call build,core,rust,1.74.0,package,--build-arg BUILD_VERSION=1.73.0 --build-arg LLVM_VERSION=16)
|
||||
|
||||
out/bison.tgz: \
|
||||
out/busybox.tgz \
|
||||
out/gcc.tgz \
|
||||
out/binutils.tgz \
|
||||
out/musl.tgz \
|
||||
out/make.tgz
|
||||
$(call build,core,bison)
|
||||
|
||||
out/gettext.tgz: \
|
||||
out/busybox.tgz \
|
||||
out/gcc.tgz \
|
||||
out/binutils.tgz \
|
||||
out/musl.tgz \
|
||||
out/make.tgz
|
||||
$(call build,core,gettext)
|
||||
|
||||
out/heirloom.tgz: \
|
||||
out/busybox.tgz \
|
||||
out/gcc.tgz \
|
||||
out/binutils.tgz \
|
||||
out/musl.tgz \
|
||||
out/make.tgz
|
||||
$(call build,core,heirloom)
|
||||
|
||||
out/flex.tgz: \
|
||||
out/heirloom.tgz \
|
||||
out/busybox.tgz \
|
||||
out/gcc.tgz \
|
||||
out/autoconf.tgz \
|
||||
out/libtool.tgz \
|
||||
out/binutils.tgz \
|
||||
out/gettext.tgz \
|
||||
out/bison.tgz \
|
||||
out/musl.tgz \
|
||||
out/make.tgz
|
||||
$(call build,core,flex)
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
ARG REGISTRY=local
|
||||
from ${REGISTRY}/binutils as binutils
|
||||
from ${REGISTRY}/m4 as m4
|
||||
from ${REGISTRY}/lex as lex
|
||||
from ${REGISTRY}/gcc as gcc
|
||||
from ${REGISTRY}/musl as musl
|
||||
from ${REGISTRY}/make as make
|
||||
from ${REGISTRY}/libtool as libtool
|
||||
from ${REGISTRY}/autoconf as autoconf
|
||||
from ${REGISTRY}/automake as automake
|
||||
from ${REGISTRY}/gettext as gettext
|
||||
from ${REGISTRY}/bison as bison
|
||||
from ${REGISTRY}/busybox as busybox
|
||||
|
||||
FROM busybox as base
|
||||
ENV SRC_VERSION=2.5.11
|
||||
ENV SRC_SITE=http://download.nust.na/pub2/openpkg1/sources/DST/flex/flex-2.5.11.tar.gz
|
||||
ENV SRC_HASH=bc79b890f35ca38d66ff89a6e3758226131e51ccbd10ef78d5ff150b7bd73689
|
||||
ENV SRC_FILE=flex-${SRC_VERSION}.tar.gz
|
||||
|
||||
FROM base as fetch
|
||||
RUN set -eux; \
|
||||
wget ${SRC_SITE}; \
|
||||
echo "${SRC_HASH} ${SRC_FILE}" | sha256sum -c
|
||||
|
||||
FROM fetch as build
|
||||
RUN tar -xzf ${SRC_FILE}
|
||||
WORKDIR flex-${VERSION}
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=m4 . /
|
||||
COPY --from=libtool . /
|
||||
COPY --from=autoconf . /
|
||||
COPY --from=automake . /
|
||||
COPY --from=bison . /
|
||||
COPY --from=gettext . /
|
||||
COPY --from=musl . /
|
||||
RUN set -eux; \
|
||||
./autogen.sh; \
|
||||
./configure \
|
||||
--build=x86_64-unknown-linux-musl \
|
||||
--host=x86_64-unknown-linux-musl \
|
||||
--prefix=/usr \
|
||||
--bindir=/bin \
|
||||
--mandir=/usr/share/man \
|
||||
--infodir=/usr/share/info \
|
||||
--disable-shared \
|
||||
--disable-static; \
|
||||
make
|
||||
|
||||
FROM build as install
|
||||
USER 0:0
|
||||
RUN make DESTDIR=/rootfs install
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
||||
ENTRYPOINT ["/bin/flex"]
|
||||
CMD ["--version"]
|
|
@ -0,0 +1,40 @@
|
|||
ARG REGISTRY=local
|
||||
FROM ${REGISTRY}/gcc:latest as gcc
|
||||
FROM ${REGISTRY}/binutils:latest as binutils
|
||||
FROM ${REGISTRY}/musl:latest as musl
|
||||
FROM ${REGISTRY}/make:latest as make
|
||||
FROM ${REGISTRY}/busybox:latest as busybox
|
||||
|
||||
FROM busybox as base
|
||||
ENV SRC_SITE https://ftp.gnu.org/gnu/gettext
|
||||
ENV SRC_VERSION 0.22.4
|
||||
ENV SRC_HASH c1e0bb2a4427a9024390c662cd532d664c4b36b8ff444ed5e54b115fdb7a1aea
|
||||
ENV SRC_FILE gettext-${SRC_VERSION}.tar.gz
|
||||
|
||||
FROM base as fetch
|
||||
RUN set -eux; \
|
||||
wget ${SRC_SITE}/${SRC_FILE}; \
|
||||
echo "${SRC_HASH} ${SRC_FILE}" | sha256sum -c
|
||||
|
||||
FROM fetch as build
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR gettext-${SRC_VERSION}
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=musl . /
|
||||
ENV M4=/usr/bin/m4
|
||||
RUN set -eux; \
|
||||
./configure \
|
||||
--prefix=/usr; \
|
||||
make
|
||||
|
||||
from build as install
|
||||
USER 0:0
|
||||
RUN make DESTDIR=/rootfs install
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
||||
ENTRYPOINT ["/usr/bin/gettext"]
|
||||
CMD ["--version"]
|
|
@ -0,0 +1,40 @@
|
|||
ARG REGISTRY=local
|
||||
FROM ${REGISTRY}/gcc:latest as gcc
|
||||
FROM ${REGISTRY}/binutils:latest as binutils
|
||||
FROM ${REGISTRY}/musl:latest as musl
|
||||
FROM ${REGISTRY}/make:latest as make
|
||||
FROM ${REGISTRY}/busybox:latest as busybox
|
||||
|
||||
FROM busybox as base
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=musl . /
|
||||
ENV SRC_VERSION 070527
|
||||
ENV SRC_FILE heirloom-devtools-${SRC_VERSION}.tar.bz2
|
||||
ENV SRC_SITE=http://downloads.sourceforge.net/project/heirloom/heirloom-devtools/${SRC_VERSION}/${SRC_FILE}
|
||||
ENV SRC_HASH=9f233d8b78e4351fe9dd2d50d83958a0e5af36f54e9818521458a08e058691ba
|
||||
|
||||
FROM base as fetch
|
||||
RUN wget ${SRC_SITE}
|
||||
RUN echo "${SRC_HASH} ${SRC_FILE}" | sha256sum -c
|
||||
|
||||
FROM fetch as build
|
||||
RUN tar -xjf ${SRC_FILE}
|
||||
WORKDIR heirloom-devtools-${SRC_VERSION}
|
||||
RUN set -eux; \
|
||||
make yacc/Makefile lex/Makefile; \
|
||||
make -C yacc LDFLAGS=-static; \
|
||||
make -C lex LDFLAGS=-static
|
||||
|
||||
FROM build as install
|
||||
USER 0:0
|
||||
RUN set -eux; \
|
||||
mkdir -p /rootfs/usr/bin; \
|
||||
install lex/lex /rootfs/usr/bin
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
||||
ENTRYPOINT ["/usr/bin/lex"]
|
||||
CMD ["-V"]
|
|
@ -0,0 +1,6 @@
|
|||
.PHONY: nitro
|
||||
nitro: \
|
||||
out/linux-nitro.tgz
|
||||
|
||||
out/linux-nitro.tgz: out/linux-nitro.tgz
|
||||
$(call build,kernel,linux-nitro)
|
|
@ -0,0 +1,29 @@
|
|||
ARG REGISTRY=local
|
||||
FROM ${REGISTRY}/musl:latest as musl
|
||||
FROM ${REGISTRY}/stage3:latest as stage3
|
||||
|
||||
FROM stage3 as base
|
||||
WORKDIR ${HOME}
|
||||
ENV SRC_SITE https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/
|
||||
ENV SRC_VERSION 6.6
|
||||
ENV SRC_HASH d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0
|
||||
|
||||
FROM base as fetch
|
||||
RUN wget ${SRC_SITE}/linux-${SRC_VERSION}.tar.xz
|
||||
RUN echo "${SRC_HASH} linux-${SRC_VERSION}.tar.xz" | sha256sum -c
|
||||
|
||||
FROM fetch as build
|
||||
RUN tar -xf linux-${SRC_VERSION}.tar.xz
|
||||
WORKDIR linux-${SRC_VERSION}
|
||||
RUN make oldconfig default
|
||||
|
||||
FROM build as package
|
||||
|
||||
#FROM build as install
|
||||
#USER 0:0
|
||||
#RUN set -eux; \
|
||||
# mkdir -p /rootfs/usr; \
|
||||
# find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
#
|
||||
#FROM scratch as package
|
||||
#COPY --from=install /rootfs /
|
Reference in New Issue