Skip to content

docker sonic-slave's kernel source and headers is incorrect? #1317

@fillmorechen0928

Description

@fillmorechen0928

fillmore@LAN2SDD5CMPL01:~/sonic-buildimage$ make sonic-slave-bash
fillmore@3448213a9424:/sonic$ ls /lib/mod
modprobe.d/ modules/
fillmore@3448213a9424:/sonic$ ls /lib/mod
modprobe.d/ modules/
fillmore@3448213a9424:/sonic$ ls /lib/modules/ -al
total 4
drwxr-xr-x 3 root root 27 Jan 17 08:45 .
drwxr-xr-x 12 root root 4096 Jan 17 09:14 ..
drwxr-xr-x 2 root root 31 Jan 17 08:45 3.16.0-5-amd64
fillmore@3448213a9424:/sonic$ ls /lib/modules/3.16.0-5-amd64/ -al
total 0
drwxr-xr-x 2 root root 31 Jan 17 08:45 .
drwxr-xr-x 3 root root 27 Jan 17 08:45 ..
lrwxrwxrwx 1 root root 37 Jan 9 11:40 build -> /usr/src/linux-headers-3.16.0-5-amd64
lrwxrwxrwx 1 root root 38 Jan 9 11:40 source -> /usr/src/linux-headers-3.16.0-5-common
fillmore@3448213a9424:/sonic$

It cause build code error.

[ FAIL LOG START ] [ target/debs/igb.ko ]
make[1]: Entering directory '/sonic/src/igb'
rm -rf ./igb-5.3.5.4
wget -O igb-5.3.5.4.tar.gz "https://sonicstorage.blob.core.windows.net/packages/igb-5.3.5.4.tar.gz?sv=2015-04-05&sr=b&sig=Y7pO2Y%2FLTdQe1XucyRhMZdbHV5duAdvRYOqgJ5D7l4c%3D&se=2031-03-08T08%3A31%3A39Z&sp=r"
tar xzf igb-5.3.5.4.tar.gz

Patch

pushd ./igb-5.3.5.4
patch -p1 < ../patch/0001-add-PHY-support-for-Broadcom-54616.patch
##Build the package
pushd src
export BUILD_KERNEL=3.16.0-4-amd64
make
popd
popd
mv ./igb-5.3.5.4/src/igb.ko /sonic/target/debs/
converted 'https://sonicstorage.blob.core.windows.net/packages/igb-5.3.5.4.tar.gz?sv=2015-04-05&sr=b&sig=Y7pO2Y%2FLTdQe1XucyRhMZdbHV5duAdvRYOqgJ5D7l4c%3D&se=2031-03-08T08%3A31%3A39Z&sp=r' (ANSI_X3.4-1968) -> 'https://sonicstorage.blob.core.windows.net/packages/igb-5.3.5.4.tar.gz?sv=2015-04-05&sr=b&sig=Y7pO2Y/LTdQe1XucyRhMZdbHV5duAdvRYOqgJ5D7l4c=&se=2031-03-08T08:31:39Z&sp=r' (UTF-8)
--2018-01-15 03:21:37-- https://sonicstorage.blob.core.windows.net/packages/igb-5.3.5.4.tar.gz?sv=2015-04-05&sr=b&sig=Y7pO2Y/LTdQe1XucyRhMZdbHV5duAdvRYOqgJ5D7l4c=&se=2031-03-08T08:31:39Z&sp=r
Connecting to 172.19.176.119:5865... connected.
Proxy request sent, awaiting response... 200 OK
Length: 323590 (316K) [application/octet-stream]
Saving to: 'igb-5.3.5.4.tar.gz'

 0K .......... .......... .......... .......... .......... 15%  216K 1s
50K .......... .......... .......... .......... .......... 31%  216K 1s

100K .......... .......... .......... .......... .......... 47% 218K 1s
150K .......... .......... .......... .......... .......... 63% 217K 1s
200K .......... .......... .......... .......... .......... 79% 21.2M 0s
250K .......... .......... .......... .......... .......... 94% 217K 0s
300K .......... ...... 100% 28.6M=1.2s

2018-01-15 03:21:40 (273 KB/s) - 'igb-5.3.5.4.tar.gz' saved [323590/323590]

/sonic/src/igb/igb-5.3.5.4 /sonic/src/igb
patching file src/e1000_82575.c
patching file src/e1000_defines.h
patching file src/e1000_hw.h
/sonic/src/igb/igb-5.3.5.4/src /sonic/src/igb/igb-5.3.5.4 /sonic/src/igb
make[2]: Entering directory '/sonic/src/igb/igb-5.3.5.4/src'
Makefile:69: *** Kernel header files not in any of the expected locations.
Makefile:70: *** Install the appropriate kernel development package, e.g.
Makefile:71: *** kernel-devel, for building kernel modules and try again. Stop.
make[2]: Leaving directory '/sonic/src/igb/igb-5.3.5.4/src'
Makefile:8: recipe for target '/sonic/target/debs/igb.ko' failed
make[1]: *** [/sonic/target/debs/igb.ko] Error 2
make[1]: Leaving directory '/sonic/src/igb'
[ FAIL LOG END ] [ target/debs/igb.ko ]
slave.mk:184: recipe for target 'target/debs/igb.ko' failed
make: *** [target/debs/igb.ko] Error 1
Makefile:77: recipe for target 'all' failed
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions