Skip to content

Commit 87c243e

Browse files
committed
ARC: Correction of uImage target build.
"uImage" target now have proper dependency on "loader". "make uImage" works properly. Add a GitHub CI test builds to ci.yml for automated testing of uImage building.
1 parent 9ad9f9c commit 87c243e

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
libelf-dev \
7272
libncurses5-dev \
7373
libssl-dev \
74+
u-boot-tools \
7475
make
7576
7677
- name: Download toolchain
@@ -146,16 +147,15 @@ jobs:
146147
;;
147148
esac
148149
150+
make -j $(nproc) uImage
151+
149152
if [[ "${{ matrix.targets.cpu }}" =~ ^(hs5x|hs6x) ]]; then
150-
image_name="loader"
151-
image_path=${{ github.workspace }}/arch/arc/boot/loader
153+
cp ${{ github.workspace }}/arch/arc/boot/loader vmlinux-${{ matrix.targets.cpu }}
152154
else
153-
image_name="vmlinux"
154-
image_path="${{ github.workspace }}/vmlinux"
155+
cp ${{ github.workspace }}/vmlinux vmlinux-${{ matrix.targets.cpu }}
155156
fi
156157
157-
make -j $(nproc) ${image_name}
158-
cp $image_path vmlinux-${{ matrix.targets.cpu }}
158+
cp ${{ github.workspace }}/arch/arc/boot/uImage uImage-${{ matrix.targets.cpu }}
159159
shell: bash
160160

161161
- name: Upload ${{ matrix.targets.cpu }} vmlinux
@@ -165,6 +165,13 @@ jobs:
165165
path: vmlinux-${{ matrix.targets.cpu }}
166166
retention-days: 5
167167

168+
- name: Upload ${{ matrix.targets.cpu }} uImage
169+
uses: actions/upload-artifact@v3
170+
with:
171+
name: uImage-${{ matrix.targets.cpu }}
172+
path: uImage-${{ matrix.targets.cpu }}
173+
retention-days: 5
174+
168175
test:
169176
needs: [build]
170177
runs-on: nsim

arch/arc/boot/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
3535
$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
3636
$(call if_changed,lzma)
3737

38+
ifeq ($(CONFIG_ISA_ARCV3),y)
39+
$(obj)/uImage.bin: $(obj)/vmlinux.bin $(obj)/loader FORCE
40+
else
3841
$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
42+
endif
3943
$(call if_changed,uimage,none)
4044

45+
ifeq ($(CONFIG_ISA_ARCV3),y)
46+
$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz $(obj)/loader FORCE
47+
else
4148
$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
49+
endif
4250
$(call if_changed,uimage,gzip)
4351

52+
ifeq ($(CONFIG_ISA_ARCV3),y)
53+
$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma $(obj)/loader FORCE
54+
else
4455
$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
56+
endif
4557
$(call if_changed,uimage,lzma)
4658

4759
$(obj)/loader.o: $(src)/loader.S $(obj)/vmlinux.bin

0 commit comments

Comments
 (0)