initramfs to also use merge-rootfs
This commit is contained in:
@@ -25,19 +25,18 @@ RUN make ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} defconfig \
|
||||
RUN make CROSS_COMPILE=${CROSS_COMPILE} -j"$(nproc)"
|
||||
RUN make CROSS_COMPILE=${CROSS_COMPILE} CONFIG_PREFIX=/out/initramfs install
|
||||
|
||||
WORKDIR /out/initramfs
|
||||
WORKDIR /build
|
||||
|
||||
COPY initramfs/init init
|
||||
RUN chmod +x init
|
||||
RUN mkdir -p bin sbin etc proc sys dev lib mnt usr/bin usr/sbin
|
||||
ARG BUILD_TAG
|
||||
|
||||
# Selective mods
|
||||
RUN mkdir -p /out/selected-mods /out/kernel
|
||||
COPY initramfs/selective-mods.sh /
|
||||
COPY alpine/*.sh ./
|
||||
COPY initramfs/*.sh ./
|
||||
COPY out/rootfs /out/rootfs
|
||||
RUN /selective-mods.sh /out/rootfs/lib/modules/$(ls /out/rootfs/lib/modules/) ./lib/
|
||||
COPY initramfs/rootfs-extra ./rootfs-extra
|
||||
COPY out/build-info ./rootfs-extra/etc/build-info
|
||||
|
||||
RUN find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../initramfs.cpio.gz
|
||||
WORKDIR /out/initramfs
|
||||
RUN /build/build-rootfs.sh
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /out/initramfs.cpio.gz /initramfs.cpio.gz
|
||||
|
||||
Reference in New Issue
Block a user