This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
972 lines (919 loc) · 46 KB
/
busybox_builder.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
name: Build Busybox Binaries
#MAX_RUNTIME: 60 Minutes 15 20 * * * [20:15 (08:15 PM) UTC --> (05H+45M) 02:00 AM NPT ]
on:
workflow_dispatch:
schedule:
- cron: "15 20 * * *"
# https://crontab.guru
# https://savvytime.com/converter/utc-to-nepal-kathmandu
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
filter: "blob:none" #https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- name: Check Version
id: check_version
run: |
# Get latest version
#export VERSION=$(echo "https://git.busybox.net$(curl -qfsSL "https://git.busybox.net/busybox/" | grep -Po "(?<=href=')[^']*\.tar\.bz2" | sort | tail -n 1)" | sed 's/.*busybox-\(.*\)\.tar\.bz2/\1/')
cd $(mktemp -d) && git clone https://git.busybox.net/busybox && cd busybox
export VERSION=$(git tag --sort=-creatordate | head -n 1)
echo "VERSION=$VERSION" >> $GITHUB_ENV
# Get stored version
export STORED_VERSION=$(cat $GITHUB_WORKSPACE/main/busybox/version.txt)
if [ "$VERSION" == "$STORED_VERSION" ]; then
echo "Version $VERSION is already Built & Compiled"
echo "versions_same=true" >> $GITHUB_ENV
else
echo "Building... --> $VERSION (from <-- $STORED_VERSION)"
echo "versions_same=false" >> $GITHUB_ENV
fi
shell: bash
- name: Compare Versions
if: env.versions_same != 'true'
run: |
# Update version.txt with the latest version
echo $VERSION > $GITHUB_WORKSPACE/main/busybox/version.txt
echo "Updated version.txt with the latest version $VERSION"
- name: Download Latest Source Code (Hacky Scraping)
if: env.versions_same != 'true'
run: |
# Get latest Source Code
export BUSYBOX_URL="https://git.busybox.net$(curl -qfsSL "https://git.busybox.net/busybox/" | grep -Po "(?<=href=')[^']*\.tar\.bz2" | sort | tail -n 1)"
echo "BUSYBOX_URL=$BUSYBOX_URL" >> $GITHUB_ENV
curl -qfLJ "$BUSYBOX_URL" -o "$HOME/busybox.tar.bz2"
continue-on-error: true
- name: Clone repository if curl fails and tar
if: env.versions_same != 'true'
run: |
if [ ! -f "$HOME/busybox.tar.bz2" ]; then
cd $(mktemp -d) && git clone "https://git.busybox.net/busybox"
pushd ./busybox && git checkout "${{ env.VERSION }}" && popd
tar -cjvf ./busybox.tar.bz2 ./busybox && mv "./busybox.tar.bz2" "$HOME/"
fi
continue-on-error: false
- name: Setup Env
if: env.versions_same != 'true'
run: |
# Create Output Dir
mkdir -p "$GITHUB_WORKSPACE/main/busybox"
#RISCV32
export RISCV32_TOOLCHAIN_URL=$(curl -qfsSL "https://api.github.com/repos/riscv-collab/riscv-gnu-toolchain/releases/tags/$(curl -qfsSL "https://api.github.com/repos/riscv-collab/riscv-gnu-toolchain/releases" | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -n 1)" | jq -r '.assets[] | .browser_download_url' | grep -i 'riscv32-glibc-ubuntu-22.04-gcc')
echo "RISCV32_TOOLCHAIN_URL=$RISCV32_TOOLCHAIN_URL" >> $GITHUB_ENV
- name: Install CoreUtils
if: env.versions_same != 'true'
run: |
sudo apt-get update -y
sudo apt-get install b3sum build-essential ca-certificates ccache '*glibc*' 'libssl*' lzip jq musl musl-dev musl-tools 'openssl*' p7zip-full '*tls*' wget -y
- name: Install Build Dependencies
if: env.versions_same != 'true'
run: "\
sudo apt-get update\n
sudo apt-get install -y --no-install-recommends \
file qemu-user-static \
g++-aarch64-linux-gnu \
g++-arm-linux-gnueabi \
g++-arm-linux-gnueabihf \
g++-i686-linux-gnu \
g++-m68k-linux-gnu \
g++-mips-linux-gnu \
g++-mipsel-linux-gnu \
g++-mips64-linux-gnuabi64 \
g++-mips64el-linux-gnuabi64 \
g++-powerpc-linux-gnu \
g++-powerpc64-linux-gnu \
g++-powerpc64le-linux-gnu \
g++-riscv64-linux-gnu \
g++-s390x-linux-gnu \
g++-sh4-linux-gnu libc6-dev-sh4-cross\n
sudo mkdir -p /usr/local/rv32\n
wget -O- -q $RISCV32_TOOLCHAIN_URL | sudo tar -C /usr/local/rv32 --strip-components=1 -xzf -\n
sudo ln -s /usr/local/rv32/sysroot /usr/riscv32-linux-gnu\n
sudo ln -s /usr/local/rv32/bin/riscv32-unknown-linux-gnu-ar /usr/bin/riscv32-linux-gnu-ar\n
sudo ln -s /usr/local/rv32/bin/riscv32-unknown-linux-gnu-strip /usr/bin/riscv32-linux-gnu-strip\n
echo '/usr/local/rv32/bin/riscv32-unknown-linux-gnu-gcc -L/usr/riscv32-linux-gnu \"$@\"' | sudo tee /usr/bin/riscv32-linux-gnu-gcc > /dev/null\n
sudo chmod +x /usr/bin/riscv32-linux-gnu-gcc\n
mkdir busybox\n"
##Linux
- name: Build busybox for aarch64_arm64_gcc (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=aarch64
export CROSS_COMPILE=aarch64-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_aarch64_arm64_gcc_Linux"
cd "$GITHUB_WORKSPACE/busybox" && rm -rf "$GITHUB_WORKSPACE/busybox/build"
continue-on-error: true
# - name: Build busybox for aarch64 (MUSL-Docker: blackdex/musl-toolchainCross)
# if: env.versions_same != 'true'
# run: |
# cd $(mktemp -d) && curl -qfLOJ "$BUSYBOX_URL"
# find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
# cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# # Build
# docker run --privileged -v $(pwd):/work dockcross/linux-arm64-musl bash -c "make defconfig"
# sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
# sed 's/^\(CONFIG_CROSS_COMPILER_PREFIX\)=""/\1="musl-"/' -i .config
# docker run --privileged -v $(pwd):/work dockcross/linux-arm64-musl bash -c "make -j$(($(nproc)+1))"
# cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_aarch64_arm64_musl_Linux"
# continue-on-error: true
- name: Build busybox for aarch64_arm64_musl #(MUSL-Docker: blackdex/musl-toolchain)
if: env.versions_same != 'true'
run: |
docker run --privileged --name aarch64_arm64_musl \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
blackdex/musl-toolchain:aarch64-musl \
bash -c '
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=aarch64
export CROSS_COMPILE=aarch64-unknown-linux-musl-
export PATH="$PATH:/usr/local/musl/aarch64-unknown-linux-musl/bin"
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"aarch64-unknown-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_aarch64_arm64_musl_Linux"
'
#Copy
docker cp "aarch64_arm64_musl:/busybox_aarch64_arm64_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
#amd_x86_64
- name: Build busybox for amd_x86_64 (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_amd_x86_64_gcc_Linux"
cd "$GITHUB_WORKSPACE/busybox" && rm -rf "$GITHUB_WORKSPACE/busybox/build"
continue-on-error: true
- name: Build busybox for amd_x86_64_musl #(MUSL-Docker: blackdex/musl-toolchain)
if: env.versions_same != 'true'
run: |
docker run --privileged --name amd_x86_64_musl \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
blackdex/musl-toolchain:x86_64-musl \
bash -c '
curl -qfLJO "$BUSYBOX_URL"
export PATH="$PATH:/usr/local/musl/x86_64-unknown-linux-musl/bin"
export ARCH=x86_64
export CROSS_COMPILE=x86_64-unknown-linux-musl-
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"x86_64-unknown-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_amd_x86_64_musl_Linux"
'
#Copy
docker cp "amd_x86_64_musl:/busybox_amd_x86_64_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for arm_abi_gcc (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_arm_abi_gcc_Linux"
continue-on-error: true
- name: Build busybox for arm_abi_musl #(MUSL-Docker: blackdex/musl-toolchain)
if: env.versions_same != 'true'
run: |
docker run --privileged --name arm_abi_musl \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
blackdex/musl-toolchain:arm-musleabi \
bash -c '
curl -qfLJO "$BUSYBOX_URL"
export PATH="$PATH:/usr/local/musl/arm-unknown-linux-musleabi/bin"
export ARCH=arm
export CROSS_COMPILE=arm-unknown-linux-musleabi-
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"arm-unknown-linux-musleabi-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_arm_abi_musl_Linux"
'
#Copy
docker cp "arm_abi_musl:/busybox_arm_abi_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for arm_abihf_gcc (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_arm_abihf_gcc_Linux"
continue-on-error: true
- name: Build busybox for arm_abihf_musl #(MUSL-Docker: blackdex/musl-toolchain)
if: env.versions_same != 'true'
run: |
docker run --privileged --name arm_abihf_musl \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
blackdex/musl-toolchain:arm-musleabihf \
bash -c '
curl -qfLJO "$BUSYBOX_URL"
export PATH="$PATH:/usr/local/musl/arm-unknown-linux-musleabihf/bin"
export ARCH=arm
export CROSS_COMPILE=arm-unknown-linux-musleabihf-
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"arm-unknown-linux-musleabihf-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_arm_abihf_musl_Linux"
'
#Copy
docker cp "arm_abihf_musl:/busybox_arm_abihf_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
# - name: Build busybox for armv5te_abi_musl #(MUSL-Docker: blackdex/musl-toolchain)
# if: env.versions_same != 'true'
# run: |
# docker run --privileged --name armv5te_abi_musl \
# -e "BUSYBOX_URL=${BUSYBOX_URL}" \
# blackdex/musl-toolchain:armv5te-musleabi \
# bash -c '
# curl -qfLJO "$BUSYBOX_URL"
# export PATH="$PATH:/usr/local/musl/armv5te-unknown-linux-musleabi/bin"
# export ARCH=arm
# export CROSS_COMPILE=armv5te-unknown-linux-musleabi
# find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
# cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
# make defconfig
# sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
# sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"armv5te-unknown-linux-musleabi\"/" -i .config
# make
# sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
# cp "./busybox" "/busybox_armv5te_abi_musl_Linux"
# '
# #Copy
# docker cp "armv5te_abi_musl:/busybox_armv5te_abi_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
# #Delete Containers
# docker rm $(docker ps -a -q)
# #Del Docker Images
# docker rmi -f $(docker images -q) >/dev/null 2>&1
# continue-on-error: true
# - name: Build busybox for arm-linux-gnueabihf_armv7l (MUSL-Docker: blackdex/musl-toolchainCross)
# if: env.versions_same != 'true'
# run: |
# cd $(mktemp -d) && curl -qfLOJ "$BUSYBOX_URL"
# find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
# cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# # Build
# docker run --privileged -v $(pwd):/work dockcross/linux-armv7l-musl bash -c "make defconfig"
# sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
# sed 's/^\(CONFIG_CROSS_COMPILER_PREFIX\)=""/\1="musl-"/' -i .config
# docker run --privileged -v $(pwd):/work dockcross/linux-armv7l-musl bash -c "make -j$(($(nproc)+1))"
# cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_arm_gnueabihf_armv7l_musl_Linux"
# continue-on-error: true
- name: Build busybox for armv7l_abihf_musl_Linux #(MUSL-Docker: blackdex/musl-toolchain)
if: env.versions_same != 'true'
run: |
docker run --privileged --name armv7l_abihf_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
blackdex/musl-toolchain:armv7-musleabihf \
bash -c '
curl -qfLJO "$BUSYBOX_URL"
export PATH="$PATH:/usr/local/musl/armv7-unknown-linux-musleabihf/bin"
export ARCH=arm
export CROSS_COMPILE=armv7-unknown-linux-musleabihf-
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"armv7-unknown-linux-musleabihf-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_armv7l_abihf_musl_Linux"
'
#Copy
docker cp "armv7l_abihf_musl_Linux:/busybox_armv7l_abihf_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for i686_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=i686
export CROSS_COMPILE=i686-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_i686_x86_gcc_Linux"
continue-on-error: true
- name: Build busybox for m68k_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=m68k
export CROSS_COMPILE=m68k-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_m68k_gcc_Linux"
continue-on-error: true
- name: Build busybox for m68k_linux_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name m68k_linux_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:m68k-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=m68k
export CROSS_COMPILE=m68k-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"m68k-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_m68k_linux_musl_Linux"
'
#Copy
docker cp "m68k_linux_musl_Linux:/busybox_m68k_linux_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for mips_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=mips
export CROSS_COMPILE=mips-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_mips_gcc_Linux"
continue-on-error: true
- name: Build busybox for mips_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name mips_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:mips-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq nano pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=mips
export CROSS_COMPILE=mips-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"mips-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_mips_musl_Linux"
'
#Copy
docker cp "mips_musl_Linux:/busybox_mips_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for mipsel_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=mips
export CROSS_COMPILE=mipsel-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_mipsel_gcc_Linux"
continue-on-error: true
- name: Build busybox for mipsel_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name mipsel_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:mipsel-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=mipsel
export CROSS_COMPILE=mipsel-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"mipsel-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_mipsel_musl_Linux"
'
#Copy
docker cp "mipsel_musl_Linux:/busybox_mipsel_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for mips64_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=mips64
export CROSS_COMPILE=mips64-linux-gnuabi64-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_mips64_gcc_Linux"
continue-on-error: true
- name: Build busybox for mips64_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name mips64_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:mips64-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=mips64
export CROSS_COMPILE=mips64-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"mips64-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_mips64_musl_Linux"
'
#Copy
docker cp "mips64_musl_Linux:/busybox_mips64_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for mips64el_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=mips64
export CROSS_COMPILE=mips64el-linux-gnuabi64-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_mips64el_gcc_Linux"
continue-on-error: true
- name: Build busybox for mips64el_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name mips64el_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:mips64el-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=mips64el
export CROSS_COMPILE=mips64el-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"mips64el-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_mips64el_musl_Linux"
'
#Copy
docker cp "mips64el_musl_Linux:/busybox_mips64el_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for powerpc_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=powerpc
export CROSS_COMPILE=powerpc-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_powerpc_gcc_Linux"
continue-on-error: true
- name: Build busybox for powerpc_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name powerpc_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:powerpc-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=powerpc
export CROSS_COMPILE=powerpc-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"powerpc-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_powerpc_musl_Linux"
'
#Copy
docker cp "powerpc_musl_Linux:/busybox_powerpc_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for powerpc64_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=powerpc64
export CROSS_COMPILE=powerpc64-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_powerpc64_gcc_Linux"
continue-on-error: true
- name: Build busybox for powerpc64_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name powerpc64_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:powerpc64-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=powerpc64
export CROSS_COMPILE=powerpc64-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"powerpc64-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_powerpc64_musl_Linux"
'
#Copy
docker cp "powerpc64_musl_Linux:/busybox_powerpc64_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for powerpc64le_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=powerpc64
export CROSS_COMPILE=powerpc64le-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_powerpc64le_gcc_Linux"
continue-on-error: true
- name: Build busybox for powerpc64le_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name powerpc64le_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:powerpc64le-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=powerpc64le
export CROSS_COMPILE=powerpc64le-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"powerpc64le-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_powerpc64le_musl_Linux"
'
#Copy
docker cp "powerpc64le_musl_Linux:/busybox_powerpc64le_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for riscv32_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=riscv
export CROSS_COMPILE=riscv32-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_riscv32_gcc_Linux"
continue-on-error: true
# - name: Build busybox for riscv32_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
# if: env.versions_same != 'true'
# run: |
# docker run --privileged --name riscv32_musl_Linux \
# -e "BUSYBOX_URL=${BUSYBOX_URL}" \
# abcfy2/muslcc-toolchain-ubuntu:riscv32-linux-musl \
# bash -c '
# export DEBIAN_FRONTEND=noninteractive
# apt update -y
# apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
# curl -qfLJO "$BUSYBOX_URL"
# find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
# cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
# export ARCH=riscv
# export CROSS_COMPILE=riscv32-linux-musl-
# make defconfig
# sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
# sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"riscv32-linux-musl-\"/" -i .config
# make
# sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
# cp "./busybox" "/busybox_riscv32_musl_Linux"
# '
# #Copy
# docker cp "riscv32_musl_Linux:/busybox_riscv32_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
# #Delete Containers
# docker rm $(docker ps -a -q)
# #Del Docker Images
# docker rmi -f $(docker images -q) >/dev/null 2>&1
# continue-on-error: true
- name: Build busybox for riscv64_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=riscv
export CROSS_COMPILE=riscv64-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_riscv64_gcc_Linux"
continue-on-error: true
- name: Build busybox for riscv64_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name riscv64_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:riscv64-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=riscv
export CROSS_COMPILE=riscv64-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"\"/CONFIG_CROSS_COMPILER_PREFIX=\"riscv64-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_riscv64_musl_Linux"
'
#Copy
docker cp "riscv64_musl_Linux:/busybox_riscv64_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
- name: Build busybox for s390x_gcc_Linux (GCC-Native)
if: env.versions_same != 'true'
run: |
cd $(mktemp -d) && cp "$HOME/busybox.tar.bz2" .
find . -type f -name '*.tar.bz2*' -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d | grep -v '^.$')
# Build
export ARCH=s390x
export CROSS_COMPILE=s390x-linux-gnu-
make defconfig
sed -e 's/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/' -i .config
make -j$(($(nproc)+1))
cp "./busybox" "$GITHUB_WORKSPACE/main/busybox/busybox_s390x_gcc_Linux"
continue-on-error: true
- name: Build busybox for s390x_musl_Linux #(MUSL-Docker: abcfy2/muslcc-toolchain-ubuntu)
if: env.versions_same != 'true'
run: |
docker run --privileged --name s390x_musl_Linux \
-e "BUSYBOX_URL=${BUSYBOX_URL}" \
abcfy2/muslcc-toolchain-ubuntu:s390x-linux-musl \
bash -c '
export DEBIAN_FRONTEND=noninteractive
apt update -y
apt install -y autoconf automake autopoint curl file g++ make libtool jq pkgconf tcl patch wget unzip
curl -qfLJO "$BUSYBOX_URL"
find . -type f -name "*.tar.bz2*" -exec tar -xjvf {} \;
cd $(find . -maxdepth 1 -type d -name "*busybox*" | grep -v "^.$")
export ARCH=s390x
export CROSS_COMPILE=s390x-linux-musl-
make defconfig
sed -e "s/.*\<CONFIG_STATIC\>.*/CONFIG_STATIC=y/" -i .config
sed -e "s/CONFIG_CROSS_COMPILER_PREFIX=\"musl-\"/CONFIG_CROSS_COMPILER_PREFIX=\"s390x-linux-musl-\"/" -i .config
make
sha256sum "./busybox" && file "./busybox" && ls -lah "./busybox"
cp "./busybox" "/busybox_s390x_musl_Linux"
'
#Copy
docker cp "s390x_musl_Linux:/busybox_s390x_musl_Linux" "$GITHUB_WORKSPACE/main/busybox/"
#Delete Containers
docker rm $(docker ps -a -q)
#Del Docker Images
docker rmi -f $(docker images -q) >/dev/null 2>&1
continue-on-error: true
#Cleanup
- name: Cleanup >> Strip >> chmod
if: env.versions_same != 'true'
run: |
#Strip All Linux Bins
find "$GITHUB_WORKSPACE/main/busybox/" -type f -name '*_Linux' -exec strip {} \; >/dev/null 2>&1
#chmod +xwr everything
find "$GITHUB_WORKSPACE/main/busybox/" -type f -name 'busybox*' -exec chmod +xwr {} \; >/dev/null 2>&1
continue-on-error: true
- name: Update README.md
if: env.versions_same != 'true'
run: |
cd "$GITHUB_WORKSPACE/main"
sudo chmod +xwr ./busybox/busy*
cat ./busybox/INFO.md > ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '---' >> ./busybox/README.md
echo '```console' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo -e "--> METADATA" >> ./busybox/README.md
/bin/bash -c 'PS4="$ "; file ./busybox/busybox* | grep -v '.txt' ' &>> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo -e "--> SHA256SUM" >> ./busybox/README.md
/bin/bash -c 'PS4="$ "; sha256sum ./busybox/busybox* | grep -v '.txt' ' &>> ./busybox/README.md
echo -e '```\n' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '---' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '- #### Sizes' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '```console' >> ./busybox/README.md
/bin/bash -c 'PS4="$ ";ls -lh ./busybox/busybox* | grep -v '.txt' | awk "{print \$5, \$9}" | column -t' &>> ./busybox/README.md
echo '```' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '---' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '- #### Bundled Commands' >> ./busybox/README.md
echo '```console' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
/bin/bash -c 'PS4="$ "; set -x; ./busybox/busybox_amd_x86_64_gcc_Linux' &>> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '```' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
echo '---' >> ./busybox/README.md
echo -e "" >> ./busybox/README.md
working-directory: main
continue-on-error: true
- name: Git Pull
run: |
cd "$GITHUB_WORKSPACE/main" && git pull origin main
continue-on-error: true
- name: Get DateTime
if: env.versions_same != 'true'
run: |
# Date Time
NEPALI_TIME=$(TZ='Asia/Kathmandu' date +'%Y-%m-%d (%I:%M:%S %p)')
echo "NEPALI_TIME=$NEPALI_TIME" >> $GITHUB_ENV
#https://github.com/stefanzweifel/git-auto-commit-action
- uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./main
commit_user_name: Azathothas # defaults to "github-actions[bot]"
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
commit_message: "✅ Cross-Compile Busybox Binaries 📦 <-- ${{ env.VERSION }} at ${{ env.NEPALI_TIME }} ⌚"
#push_options: '--force'
#Create a new Release & Publish
# Repo: https://github.com/softprops/action-gh-release
# Market-Place: https://github.com/marketplace/actions/gh-release
- name: Releaser
if: env.versions_same != 'true'
uses: softprops/[email protected]
with:
name: "busybox ${{ env.VERSION }}"
tag_name: "busybox_${{ env.VERSION }}"
prerelease: false
draft: false
generate_release_notes: false
token: "${{ secrets.GITHUB_TOKEN }}"
body: |
`Changelog`: _https://git.busybox.net/busybox/log/?h=${{ env.VERSION }}_
`Install`: _https://github.com/Azathothas/Static-Binaries/tree/main/busybox#install-busybox_
files: |
${{github.workspace}}/main/busybox/*_Linux