Skip to content

Commit 8de26b7

Browse files
antony-rheneuslguohan
authored andcommitted
[Makefile/slave docker] ARM arch doesn't support few packages (#3273)
* [Makefile/slave docker] ARM arch doesn't support few packages iproute2 is missing for ARM sonic-slave docker Signed-off-by: Antony Rheneus <[email protected]>
1 parent e7af346 commit 8de26b7

File tree

6 files changed

+30
-10
lines changed

6 files changed

+30
-10
lines changed

build_debian.sh

+15-6
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,11 @@ sudo LANG=C chroot $FILESYSTEM_ROOT useradd -G sudo,docker $USERNAME -c "$DEFAUL
214214
## Create password for the default user
215215
echo "$USERNAME:$PASSWORD" | sudo LANG=C chroot $FILESYSTEM_ROOT chpasswd
216216

217-
## Pre-install hardware drivers
218-
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install \
219-
firmware-linux-nonfree
217+
if [[ $CONFIGURED_ARCH == amd64 ]]; then
218+
## Pre-install hardware drivers
219+
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install \
220+
firmware-linux-nonfree
221+
fi
220222

221223
## Pre-install the fundamental packages
222224
## Note: gdisk is needed for sgdisk in install.sh
@@ -268,9 +270,14 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
268270
tcptraceroute \
269271
mtr-tiny \
270272
locales \
273+
cgroup-tools
274+
275+
if [[ $CONFIGURED_ARCH == amd64 ]]; then
276+
## Pre-install the fundamental packages for amd64 (x86)
277+
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
271278
flashrom \
272-
cgroup-tools \
273279
mcelog
280+
fi
274281

275282
#Adds a locale to a debian system in non-interactive mode
276283
sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
@@ -403,8 +410,10 @@ set /files/etc/sysctl.conf/net.core.rmem_max 2097152
403410
set /files/etc/sysctl.conf/net.core.wmem_max 2097152
404411
" -r $FILESYSTEM_ROOT
405412

406-
# Configure mcelog to log machine checks to syslog
407-
sudo sed -i 's/^#syslog = yes/syslog = yes/' $FILESYSTEM_ROOT/etc/mcelog/mcelog.conf
413+
if [[ $CONFIGURED_ARCH == amd64 ]]; then
414+
# Configure mcelog to log machine checks to syslog
415+
sudo sed -i 's/^#syslog = yes/syslog = yes/' $FILESYSTEM_ROOT/etc/mcelog/mcelog.conf
416+
fi
408417

409418
## docker-py is needed by Ansible docker module
410419
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install pip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
et6448m t1

installer/armhf/install.sh

100644100755
+1-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ umount $demo_mount
9090

9191
echo "Updating U-Boot environment variables"
9292
#global uboot enviroment settings
93-
#FW_ENV='/dev/mtd0 \t\t 0x00500000 \t 0x80000 \t 0x100000 \t 8'
94-
FW_ENV='/dev/mtd0 \t\t 0x00500000 \t 0x80000 \t 0x100000 \t 2'
93+
FW_ENV='/dev/mtd0 \t\t 0x00500000 \t 0x80000 \t 0x100000 \t 8'
9594

9695
kernel_addr=0x1100000
9796
fdt_addr=0x1000000

platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN dpkg -i \
2626
debs/{{ deb }}{{' '}}
2727
{%- endfor %}
2828

29-
COPY ["start.sh", "syncd.sh", "/usr/bin/"]
29+
COPY ["start.sh", "/usr/bin/"]
3030
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
3131

3232
## Clean up

slave.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
612612
$(LIBNSS_TACPLUS)) \
613613
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
614614
$$(addprefix $(FILES_PATH)/,$$($$*_FILES)) \
615-
$(addprefix $(STRETCH_FILES_PATH)/,$(IXGBE_DRIVER)) \
615+
$(addprefix $(STRETCH_FILES_PATH)/, $(if $(filter $(CONFIGURED_ARCH),amd64), $(IXGBE_DRIVER))) \
616616
$(addprefix $(PYTHON_DEBS_PATH)/,$(SONIC_UTILS)) \
617617
$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \
618618
$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2)) \

sonic-slave-stretch/Dockerfile.j2

+11
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,17 @@ RUN apt-get update && apt-get install -y \
249249
cmake \
250250
# For pam_tacplus build
251251
autoconf-archive \
252+
# For iproute2
253+
cm-super-minimal \
254+
libatm1-dev \
255+
libelf-dev \
256+
libmnl-dev \
257+
libselinux1-dev \
258+
linuxdoc-tools \
259+
lynx \
260+
texlive-latex-extra \
261+
texlive-latex-recommended \
262+
iproute2 \
252263
# For python-click build
253264
python-sphinx \
254265
python-docutils \

0 commit comments

Comments
 (0)