Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
33
target/linux/uml/image/Makefile
Normal file
33
target/linux/uml/image/Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
define Image/Prepare
|
||||
cp $(LINUX_DIR)/linux $(KDIR)/vmlinux.elf
|
||||
endef
|
||||
|
||||
define Image/Build/squashfs
|
||||
dd if=/dev/zero of=$(KDIR)/root.squashfs bs=1024k count=0 seek=$(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
||||
endef
|
||||
|
||||
define Image/Build
|
||||
$(call Image/Build/$(1))
|
||||
cp $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
|
||||
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux
|
||||
endef
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
|
||||
# UML requires linking against several glibc static libraries: libutil, librt
|
||||
# and libpthread, check that here. We do not check against libpthread
|
||||
# specifically because getting something to build that references a libpthread
|
||||
# symbol is pretty involved and Linux distributions package these 3 libraries
|
||||
# in the same package.
|
||||
|
||||
$(eval $(call TestHostCommand,glibc-static, \
|
||||
Please install a static glibc package. (Missing libutil.a, librt.a or libpthread.a), \
|
||||
echo 'int main(int argc, char **argv) { login(0); timer_gettime(0, 0); return 0; }' | \
|
||||
gcc -include utmp.h -include time.h -x c -o $(TMP_DIR)/a.out - -static -lutil -lrt))
|
||||
Reference in New Issue
Block a user