Atlas - Makefile

Home / systems / linux / kernel / vega Lines: 1 | Size: 1404 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1# SPDX-License-Identifier: GPL-3.0 2# V/UX 3# 4# Makefile 5# 6# COPYRIGHT NOTICE 7# Copyright (C) 2025 0x4248 and contributors 8# Redistribution and use in source and binary forms, with or without 9# modification, are permitted provided that the license is not changed. 10# 11# This software is free and open source. Licensed under the GNU general 12# public license version 3.0 as published by the Free Software Foundation. 13 14DIR := $(shell pwd) 15BUSYBOX_DIR := $(DIR)/busybox 16BUILD_DIR := $(DIR)/build 17ROOTFS_TMP := /tmp/busybox 18 19INITRAMFS := $(BUILD_DIR)/initramfs.cpio.gz 20QCOW_IMG := $(BUILD_DIR)/busybox.qcow2 21 22all: $(INITRAMFS) $(QCOW_IMG) 23 24$(BUILD_DIR): 25 mkdir -p $(BUILD_DIR) 26 27busybox: $(BUILD_DIR) 28 cd $(BUSYBOX_DIR) && make && make install 29 30$(ROOTFS_TMP): busybox 31 rm -rf $(ROOTFS_TMP) 32 mkdir -p $(ROOTFS_TMP) 33 cp -r $(BUSYBOX_DIR)/_install/* $(ROOTFS_TMP) 34 chmod +x fs/init 35 cp fs/* $(ROOTFS_TMP) 36 37 # device nodes 38 cd $(ROOTFS_TMP) && \ 39 mkdir -p dev && \ 40 mknod dev/console c 5 1 && \ 41 mknod dev/ram b 1 0 && \ 42 mknod dev/tty c 5 0 && \ 43 mknod dev/tty1 c 4 1 && \ 44 mknod dev/fb0 c 29 0 45 46$(INITRAMFS): $(ROOTFS_TMP) 47 cd $(ROOTFS_TMP) && \ 48 find . -print0 | cpio -0oH newc | gzip -9 > $(INITRAMFS) 49 50$(QCOW_IMG): busybox 51 qemu-img create -f qcow2 $(QCOW_IMG) 1G 52 @echo "# QCOW2 created. You must manually copy files into it." 53 54clean: 55 rm -rf $(BUILD_DIR) 56 rm -rf $(ROOTFS_TMP) 57 58.PHONY: all busybox clean 59
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.