Skip to content

Commit b5dd4d3

Browse files
committed
Fixed errors detected when trying to build with Docker
Dockerfile: Due to many incompatibilities, changed version from SID to Trixie. Removed "python3-distuitls" due to no longer being available. Makefile: Git clones with full depth due to commits being further back in history. Upgraded from apt-key to basic keyring format. - Should be updated to only be applicable source. scripts/setup_rootfs.sh Propagated keyring changes to also be applicated to the running system.
1 parent aa713be commit b5dd4d3

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

scripts/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:sid as builder
1+
FROM debian:trixie as builder
22

33
ARG DEBIAN_FRONTEND=noninteractive
44

@@ -14,8 +14,8 @@ RUN apt-get update \
1414
git gperf kmod libexpat-dev \
1515
libgmp-dev libmpc-dev libmpfr-dev libssl-dev \
1616
libtool mmdebstrap openssl parted \
17-
patchutils python3 python3-dev python3-distutils \
1817
python3-setuptools swig gnupg \
18+
patchutils python3 python3-dev \
1919
systemd-container texinfo zlib1g-dev wget arch-test \
2020
linux-image-generic genimage joe mc zip \
2121
fakeroot git kernel-wedge quilt ccache flex bison \

scripts/Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ NPROCS := $(shell nproc)
3838
$(BUILDDIR)/linux-prepare-checkout-stamp:
3939
@echo "$(COLOUR_GREEN)Checking out Kernel for $(BOARD)$(END_COLOUR)"
4040
@mkdir -p $(BUILDDIR)
41-
@git clone -b sg200x-dev --depth 7 https://github.com/sophgo/linux_5.10.git /build/kernel
41+
@git clone -b sg200x-dev https://github.com/sophgo/linux_5.10.git $(BUILDDIR)/kernel
4242
@cd $(BUILDDIR)/kernel && git checkout 8b8fbf8
4343
@touch $@
4444

@@ -79,7 +79,7 @@ linux-clean:
7979
$(BUILDDIR)/uboot-prepare-checkout-stamp:
8080
@echo "$(COLOUR_GREEN)Checking out U-Boot for $(BOARD)$(END_COLOUR)"
8181
@mkdir -p $(BUILDDIR)
82-
@git clone --depth 1 https://github.com/sophgo/u-boot-2021.10.git $(BUILDDIR)/u-boot
82+
@git clone https://github.com/sophgo/u-boot-2021.10.git $(BUILDDIR)/u-boot
8383
@cd $(BUILDDIR)/u-boot && git checkout 4a21b6b
8484
@touch $@
8585

@@ -122,7 +122,7 @@ uboot-clean:
122122
$(BUILDDIR)/opensbi-prepare-checkout-stamp:
123123
@echo "$(COLOUR_GREEN)Checking out OpenSBI for $(BOARD)$(END_COLOUR)"
124124
@mkdir -p $(BUILDDIR)
125-
@git clone -b sg200x-dev --depth 4 https://github.com/sophgo/opensbi.git $(BUILDDIR)/opensbi
125+
@git clone -b sg200x-dev https://github.com/sophgo/opensbi.git $(BUILDDIR)/opensbi
126126
@cd $(BUILDDIR)/opensbi && git checkout 216793f
127127
# git clone https://github.com/riscv-software-src/opensbi.git $(BUILDDIR)/opensbi
128128
# @cd $(BUILDDIR)/opensbi && git checkout a2b255b
@@ -151,7 +151,7 @@ opensbi-clean:
151151
$(BUILDDIR)/fsbl-prepare-checkout-stamp:
152152
@echo "$(COLOUR_GREEN)Checking out FSBL for $(BOARD)$(END_COLOUR)"
153153
@mkdir -p $(BUILDDIR)
154-
@git clone -b sg200x-dev --depth 1 https://github.com/sophgo/fsbl.git $(BUILDDIR)/fsbl
154+
@git clone -b sg200x-dev https://github.com/sophgo/fsbl.git $(BUILDDIR)/fsbl
155155
@cd $(BUILDDIR)/fsbl && git checkout 15a84c5
156156
@touch $@
157157

@@ -198,8 +198,12 @@ $(BUILDDIR)/image-prepare-stamp:
198198
@-rm $(addon-targets)
199199
@mkdir -p /rootfs/
200200
@curl -v -L https://sophgo.my-ho.st:8443/public-key.asc -o $(BUILDDIR)/public-key.asc
201-
@apt-key add $(BUILDDIR)/public-key.asc
202-
@mmdebstrap -v --architectures=riscv64 --include="$(_PACKAGES)" sid "/rootfs/" "deb http://deb.debian.org/debian/ sid main" "deb https://sophgo.my-ho.st:8443/ debian sophgo"
201+
@rm -f /etc/apt/trusted.gpg.d/fishwaldo.gpg
202+
@gpg --no-default-keyring --keyring $(BUILDDIR)/temp-keyring.gpg --import $(BUILDDIR)/public-key.asc
203+
@gpg --no-default-keyring --keyring $(BUILDDIR)/temp-keyring.gpg --export --output /etc/apt/trusted.gpg.d/fishwaldo.gpg
204+
@gpg --no-default-keyring --keyring $(BUILDDIR)/temp-keyring.gpg --export --output $(BUILDDIR)/fishwaldo.gpg
205+
@rm $(BUILDDIR)/temp-keyring.gpg
206+
@mmdebstrap -v --architectures=riscv64 --include="$(_PACKAGES)" sid "$(BUILDDIR)/bootstrap" "deb http://deb.debian.org/debian/ sid main" "deb https://sophgo.my-ho.st:8443/ debian sophgo"
203207
@touch $@
204208

205209
$(BUILDDIR)/image-addons-stamp: $(BUILDDIR)/image-prepare-stamp $(BUILDDIR)/fsbl-package-stamp $(BUILDDIR)/linux-compile-stamp $(addon-targets)
@@ -214,6 +218,7 @@ $(BUILDDIR)/image-addons-stamp: $(BUILDDIR)/image-prepare-stamp $(BUILDDIR)/fsbl
214218
$(BUILDDIR)/image-customize-stamp: $(BUILDDIR)/image-addons-stamp $(BUILDDIR)/linux-compile-stamp $(BUILDDIR)/fsbl-package-stamp
215219
@echo "$(COLOUR_GREEN)Customizing Image for $(BOARD)$(END_COLOUR)"
216220
@mkdir -p /rootfs/tmp/install/
221+
@cp $(BUILDDIR)/fishwaldo.gpg /rootfs/tmp/install/
217222
@echo $(BOARD) > /rootfs/tmp/install/hostname
218223
@echo $(BOARD) > /rootfs/tmp/install/board
219224
@echo $(STORAGE_TYPE) > /rootfs/tmp/install/storage

scripts/setup_rootfs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ fi
144144

145145
rm -rf /etc/apt/sources.list.d/multistrap-debian.list
146146

147-
apt-key add /tmp/install/public-key.asc
147+
#apt-key add /tmp/install/public-key.asc
148+
cp /tmp/install/fishwaldo.gpg /etc/apt/trusted.gpg.d/fishwaldo.gpg
148149

149150
cat > /etc/apt/sources.list <<EOF
150151
deb http://deb.debian.org/debian sid main non-free-firmware

0 commit comments

Comments
 (0)