forked from embeddedTS/linux-2.6.35.3-imx28
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish
executable file
·66 lines (57 loc) · 1.7 KB
/
publish
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
#!/bin/bash
LOCALPATH=publish_$(date +%Y%m%d_%H%M%S)
mkdir $LOCALPATH &&\
(
echo "Installing kernel modules to $LOCALPATH"
INSTALL_MOD_PATH=$LOCALPATH/ make modules_install >/dev/null 2>&1
if [ $? -ne "0" ] ; then
echo "Failed to install modules to $LOCALPATH"
exit 1
fi
) &&\
(
echo "Installing kernel headers to $LOCALPATH"
INSTALL_HDR_PATH=$LOCALPATH/ make headers_install >/dev/null 2>&1
if [ $? -ne "0" ] ; then
echo "Failed to install kernel headers to $LOCALPATH"
exit 1
fi
) &&\
(
cd compat-drivers-3.8.3-2-snpu &&\
echo "Installing external wireless modules to $LOCALPATH"
KLIB_BUILD=`pwd`/../ ARCH=arm CROSS_COMPILE=`pwd`/../cross-toolchain/arm-fsl-linux-gnueabi/bin/arm-linux- INSTALL_MOD_PATH=$LOCALPATH/ make install-modules >/dev/null 2>&1
if [ $? -ne "0" ] ; then
echo "Failed to install external wireless modules to $LOCALPATH"
exit 1
fi
) &&\
(
echo "Copying SPI and NAND bootstreams to $LOCALPATH"
cp imx-bootlets-src-10.12.01/imx28_ivt_linux.s* $LOCALPATH/lib/modules/
if [ $? -ne "0" ] ; then
echo "Failed to failed to copy bootstream files to $LOCALPATH"
exit 1
fi
) &&\
(
if [ -e arch/arm/boot/uImage ] ; then
echo "Copying U-Boot kernel to $LOCALPATH"
cp arch/arm/boot/uImage $LOCALPATH/boot
if [ $? -ne "0" ] ; then
echo "Failed to failed to copy U-Boot kernel to $LOCALPATH"
exit 1
fi
else
echo "U-Boot kernel does not exist, skipping"
fi
) &&\
(
echo "$LOCALPATH" > publish.version
echo "Creating compressed tarball"
cd $LOCALPATH
tar cf $LOCALPATH.tar lib
bzip2 -z $LOCALPATH.tar
md5sum $LOCALPATH.tar.bz2 > $LOCALPATH.tar.bz2.md5
cp ../docker/buildlog.txt ./$LOCALPATH-buildlog.txt
)