1+ ifeq ($(OHOS_ARCH ) ,aarch64)
12PKGS =gettext \
23 bash \
34 binutils \
@@ -62,14 +63,81 @@ PKGS=gettext \
6263 libogg \
6364 libvorbis \
6465 ffmpeg
66+ else ifeq ($(OHOS_ARCH),x86_64)
67+ PKGS =gettext \
68+ bash \
69+ binutils \
70+ busybox \
71+ coremark \
72+ lz4 \
73+ make \
74+ ncurses \
75+ talloc \
76+ openssl \
77+ zstd \
78+ pcre2 \
79+ zlib \
80+ libarchive \
81+ proot \
82+ strace \
83+ tar \
84+ tree \
85+ vim \
86+ xxhash \
87+ libunistring \
88+ libidn2 \
89+ c-ares \
90+ curl \
91+ yyjson \
92+ fastfetch \
93+ sl \
94+ openssh \
95+ ncnn \
96+ readline \
97+ htop \
98+ vkpeak \
99+ libevent \
100+ tmux \
101+ fish \
102+ elf-loader \
103+ gmp \
104+ mpfr \
105+ mpc \
106+ gcc \
107+ expat \
108+ git \
109+ aria2 \
110+ xz \
111+ python \
112+ libusb \
113+ hdc \
114+ libffi \
115+ glib \
116+ qemu \
117+ qemu-vroot \
118+ libx264 \
119+ libx265 \
120+ libvpx \
121+ libsvt-av1 \
122+ libmp3-lame \
123+ libfdk-aac \
124+ libopus \
125+ libogg \
126+ libvorbis \
127+ ffmpeg
128+ else
129+ echo "Unsupported OHOS_ARCH=$(OHOS_ARCH)"
130+ exit 1
131+ endif
132+
65133STAMP =$(patsubst % ,% /.stamp,$(PKGS ) )
66134
67135all : copy
68136
69137copy : base.hnp
70- rm -f ../entry/hnp/arm64-v8a /* .hnp
71- cp $^ ../entry/hnp/arm64-v8a
72- cp $^ ../entry/hnp/arm64-v8a /base-public.hnp
138+ rm -f ../entry/hnp/$( OHOS_ABI ) /* .hnp
139+ cp $^ ../entry/hnp/$( OHOS_ABI )
140+ cp $^ ../entry/hnp/$( OHOS_ABI ) /base-public.hnp
73141
74142base.hnp : $(STAMP ) utils/pbcopy utils/pbpaste utils/empty.a Makefile
75143 # reduce size
@@ -80,15 +148,15 @@ base.hnp: $(STAMP) utils/pbcopy utils/pbpaste utils/empty.a Makefile
80148 cp utils/pbcopy sysroot/bin
81149 cp utils/pbpaste sysroot/bin
82150 # let gcc work out of box
83- mkdir -p sysroot/aarch64 -unknown-linux-musl/lib
84- cp $(OHOS_SDK_HOME ) /native/sysroot/usr/lib/aarch64 -linux-ohos/crt1.o sysroot/aarch64 -unknown-linux-musl/lib/crt1.o
85- cp $(OHOS_SDK_HOME ) /native/sysroot/usr/lib/aarch64 -linux-ohos/crti.o sysroot/aarch64 -unknown-linux-musl/lib/crti.o
86- cp $(OHOS_SDK_HOME ) /native/sysroot/usr/lib/aarch64 -linux-ohos/crtn.o sysroot/aarch64 -unknown-linux-musl/lib/crtn.o
87- cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/aarch64 -linux-ohos/clang_rt.crtbegin.o sysroot/aarch64 -unknown-linux-musl/lib/crtbegin.o
88- cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/aarch64 -linux-ohos/clang_rt.crtend.o sysroot/aarch64 -unknown-linux-musl/lib/crtend.o
89- cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/aarch64 -linux-ohos/libclang_rt.builtins.a sysroot/aarch64 -unknown-linux-musl/lib/libgcc.a
90- cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/aarch64 -linux-ohos/libclang_rt.builtins.a sysroot/aarch64 -unknown-linux-musl/lib/libgcc_s.a
91- cp utils/empty.a sysroot/aarch64 -unknown-linux-musl/lib/libgcc_eh.a
151+ mkdir -p sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib
152+ cp $(OHOS_SDK_HOME ) /native/sysroot/usr/lib/$( OHOS_ARCH ) -linux-ohos/crt1.o sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/crt1.o
153+ cp $(OHOS_SDK_HOME ) /native/sysroot/usr/lib/$( OHOS_ARCH ) -linux-ohos/crti.o sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/crti.o
154+ cp $(OHOS_SDK_HOME ) /native/sysroot/usr/lib/$( OHOS_ARCH ) -linux-ohos/crtn.o sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/crtn.o
155+ cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/$( OHOS_ARCH ) -linux-ohos/clang_rt.crtbegin.o sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/crtbegin.o
156+ cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/$( OHOS_ARCH ) -linux-ohos/clang_rt.crtend.o sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/crtend.o
157+ cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/$( OHOS_ARCH ) -linux-ohos/libclang_rt.builtins.a sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/libgcc.a
158+ cp $(OHOS_SDK_HOME ) /native/llvm/lib/clang/15.0.4/lib/$( OHOS_ARCH ) -linux-ohos/libclang_rt.builtins.a sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/libgcc_s.a
159+ cp utils/empty.a sysroot/$( OHOS_ARCH ) -unknown-linux-musl/lib/libgcc_eh.a
92160 # create hnp manually
93161 # $(OHOS_SDK_HOME)/toolchains/hnpcli pack -i sysroot -n base -v 1.0
94162 cp hnp.json sysroot
0 commit comments