M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# LSB initscript functions, as defined in the LSB Spec 1.1.0
#
# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
# Updated to the latest LSB 3.1 spec
# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
start_daemon () {
/etc/core-lsb/lsb_start_daemon "$@"
}
killproc () {
/etc/core-lsb/lsb_killproc "$@"
}
pidofproc () {
/etc/core-lsb/lsb_pidofproc "$@"
}
log_success_msg () {
/etc/core-lsb/lsb_log_message success "$@"
}
log_failure_msg () {
/etc/core-lsb/lsb_log_message failure "$@"
}
log_warning_msg () {
/etc/core-lsb/lsb_log_message warning "$@"
}
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
. /etc/init.d/functions
LSB=LSB-1.1 killproc $*
exit $?
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
. /etc/init.d/functions
ACTION=$1
shift
case "$ACTION" in
success)
echo -n $*
success "$*"
echo
;;
failure)
echo -n $*
failure "$*"
echo
;;
warning)
echo -n $*
warning "$*"
echo
;;
*)
;;
esac
exit 0
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
. /etc/init.d/functions
pidofproc $*
exit $?
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
. /etc/init.d/functions
nice=
force=
pidfile=
user=
check=
RETVAL=
while [ "$1" != "${1##[-+]}" ]; do
case $1 in
-f)
force="--force"
shift
;;
-n)
nice=$2
shift 2
;;
-p)
pidfile="--pidfile $2"
shift 2
;;
-u)
user="--user $2"
shift 2
;;
-c)
check="--check $2"
shift 2
;;
*)
echo "Unknown Option $1"
echo "Options are:"
echo "-f"
echo "-p {pidfile}"
echo "-n [+/-nicelevel]"
echo "-u {user}"
echo "-c {base}"
exit 1;;
esac
done
LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
exit $?
@@ -0,0 +1,102 @@
DESCRIPTION = "LSB support for Poky Linux"
SECTION = "console/utils"
HOMEPAGE = "http://prdownloads.sourceforge.net/lsb"
LICENSE = "GPLv2+"
PR = "r2"
LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/${PV}/lsb-release-${PV}.tar.gz \
file://init-functions \
file://lsb_killproc \
file://lsb_log_message \
file://lsb_pidofproc \
file://lsb_start_daemon \
"
SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
S = ${WORKDIR}/lsb-release-${PV}
do_install(){
oe_runmake install prefix=${D} mandir=${D}/${datadir}/man/ DESTDIR=${D}
mkdir -p ${D}/bin
mkdir -p ${D}/${baselib}
mkdir -p ${D}/etc/lsb-release.d
echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}/etc/lsb-release
if [ "${TARGET_ARCH}" == "i586" ];then
echo -n "core-4.1-ia32" >> ${D}/etc/lsb-release
else
echo -n "core-4.1-${TARGET_ARCH}" >> ${D}/etc/lsb-release
fi
echo "\"" >> ${D}/etc/lsb-release
if [ "${TARGET_ARCH}" == "i586" ];then
mkdir -p ${D}/etc/lsb-release.d
touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
touch ${D}/etc/lsb-release.d/graphics-${PV}-noarch
touch ${D}/etc/lsb-release.d/desktop-${PV}-noarch
touch ${D}/etc/lsb-release.d/graphics-4.1-ia32
touch ${D}/etc/lsb-release.d/graphics-${PV}-ia32
touch ${D}/etc/lsb-release.d/desktop-${PV}-ia32
elif [ "${TARGET_ARCH}" == "x86_64" ];then
touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
touch ${D}/etc/lsb-release.d/graphics-4.1-amd64
touch ${D}/etc/lsb-release.d/graphics-${PV}-amd64
touch ${D}/etc/lsb-release.d/desktop-${PV}-amd64
fi
if [ "${TARGET_ARCH}" = "powerpc" ];then
touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
touch ${D}/etc/lsb-release.d/graphics-4.1-ppc32
touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc32
touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc32
elif [ "${TARGET_ARCH}" = "powerpc64" ];then
touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
touch ${D}/etc/lsb-release.d/graphics-4.1-ppc64
touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc64
touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc64
fi
}
do_install_append(){
install -d ${D}/etc/core-lsb
install -d ${D}/${baselib}/lsb
for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
do
install -m 0755 ${WORKDIR}/${i} ${D}/etc/core-lsb
done
install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
if [ "${TARGET_ARCH}" == "x86_64" ];then
cd ${D}
if [ "${baselib}" != "lib64" ]; then
ln -sf ${baselib} lib64
fi
cd ${D}/${baselib}
ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
fi
if [ "${TARGET_ARCH}" == "i586" ];then
cd ${D}/${baselib}
ln -sf ld-linux.so.2 ld-lsb.so.2
ln -sf ld-linux.so.2 ld-lsb.so.3
fi
if [ "${TARGET_ARCH}" == "powerpc64" ];then
cd ${D}
if [ "${baselib}" != "lib64" ]; then
ln -sf ${baselib} lib64
fi
cd ${D}/${baselib}
ln -sf ld64.so.1 ld-lsb-ppc64.so.2
ln -sf ld64.so.1 ld-lsb-ppc64.so.3
fi
if [ "${TARGET_ARCH}" == "powerpc" ];then
cd ${D}/${baselib}
ln -sf ld.so.1 ld-lsb-ppc32.so.2
ln -sf ld.so.1 ld-lsb-ppc32.so.3
fi
}
FILES_${PN} += "/lib64 \
${base_libdir}/lsb/* \
"
@@ -0,0 +1,222 @@
#!/bin/bash
# Copyright (C) 2010-2011 Wind River Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##Prepare Steps
#Steps 0; Confirm the installed LSB Packages
ARCH=`uname -m`
APP_FILE=`ls /lsb-Application/*.rpm`
if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
then
if [ -d /lsb-dist-testkit ];then
if [ ${ARCH} == i686 ];then
echo "i486-suse" >> /etc/rpm/platform
echo "i486-noarch" >> /etc/rpm/platform
echo "i486-pc" >> /etc/rpm/platform
echo "noarch-suse" >> /etc/rpm/platform
else
echo "${ARCH}-suse" >> /etc/rpm/platform
echo "${ARCH}-noarch" >> /etc/rpm/platform
echo "${ARCH}-pc" >> /etc/rpm/platform
echo "noarch-suse" >> /etc/rpm/platform
fi
cd /lsb-dist-testkit && sh install.sh && cd ../lsb-Application
for i in ${APP_FILE}
do
echo "$i" |grep -q "apache"
if [ $? -eq 0 ]
then
rpm -ivh $i --noscripts --nodeps --force
else
rpm -ivh $i --nodeps --force
fi
done
mkdir -p /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/snapshots/appbat/tests/
mkdir -p /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/app-battery/tests/
cp expect-tests.tar test1.pdf test2.pdf /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/app-battery/tests/
cp raptor-tests.tar tcl-tests.tar /var/opt/lsb//test/manager/packages/ftp.linuxfoundation.org/pub/lsb/snapshots/appbat/tests/
cd ..
else
echo "Please install the realted LSB Packages"
exit 1
fi
fi
#Steps 1; Deleted existed user tester
id tester
if [ $? -eq 0 ]
then
echo "User tester was existed"
sleep 1
userdel -rf tester
if [ $? -eq 0 ] || [ $? -eq 6 ]
then
echo "Success to delete user tester"
else
echo "Fail to delete user tester"
fi
else
echo "There was not User tester"
fi
##Funs
check ()
{
if [ $? -eq 0 ]
then
echo "PASS"
else
echo "FAIL"
exit 1
fi
}
###Start
#Step 1:Add tester group
echo ""
echo "---------------------------------"
echo "Step 1:Add Group tester"
groupadd tester
check
#Step 2:Add User tester
echo ""
echo "---------------------------------"
echo "Step 2:Add User tester"
useradd -g tester tester
check
echo "Check the tester user"
id tester
check
#Step 3;Stop Boa server
#echo ""
#echo "---------------------------------"
#echo "Step 3:Stop BOA server"
#/etc/init.d/boa stop
#check
#Step 4:Create Dirnames file for RPM
echo ""
echo "---------------------------------"
echo "Step 4:Create the Dirnames on target"
mkdir -pv /etc/rpm/sysinfo
cat > /etc/rpm/sysinfo/Dirnames << EOF
/etc/opt/lsb
/home/tet/LSB.tools
/opt/lsb-tet3-lite/lib/ksh
/opt/lsb-tet3-lite/lib/perl
/opt/lsb-tet3-lite/lib/posix_sh
/opt/lsb-tet3-lite/lib/tet3
/opt/lsb-tet3-lite/lib/xpg3sh
/opt/lsb/appbat/lib/python2.4/site-packages/qm
/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
/opt/lsb/test/doc
/opt/lsb/test/lib
/opt/lsb/test/qm/diagnostics
/opt/lsb/test/qm/doc
/opt/lsb/test/qm/doc/test/html
/opt/lsb/test/qm/doc/test/print
/opt/lsb/test/qm/dtml
/opt/lsb/test/qm/dtml/test
/opt/lsb/test/qm/messages/test
/opt/lsb/test/qm/tutorial/test/tdb
/opt/lsb/test/qm/tutorial/test/tdb/QMTest
/opt/lsb/test/qm/web
/opt/lsb/test/qm/web/images
/opt/lsb/test/qm/web/stylesheets
/opt/lsb/test/qm/xml
/opt/lsb/test/share
/usr/share/doc/lsb-runtime-test
/var/opt/lsb
/opt/lsb/test/desktop
/opt/lsb/test/desktop/fontconfig
/opt/lsb/test/desktop/freetype
/opt/lsb/test/desktop/gtkvts
/opt/lsb/test/desktop/libpng
/opt/lsb/test/desktop/qt3
/opt/lsb/test/desktop/xft
/opt/lsb/test/desktop/xml
/opt/lsb/test/desktop/xrender
EOF
if [ -f /etc/rpm/sysinfo/Dirnames ]
then
echo "Success to creat Dirnames file"
else
echo "Fail to creat Dirnames file"
fi
#Step 5;
echo ""
echo "---------------------------------"
echo "Step 5:"
ldconfig -v
check;
#Step 6;
echo ""
echo "---------------------------------"
echo "Step 6:Check with link to ftp.linux-foundation.org"
echo "140.211.169.59 ftp.linux-foundation.org ftp.linuxfoundation.org" >> /etc/hosts
ping -c 5 ftp.linux-foundation.org
check
#Step 7
insmod /lib/modules/2.6.*/kernel/drivers/block/loop.ko
if [ $? != 0 ];then
echo "Please insmod loop.ko manully"
fi
#Step 8
echo ""
if [ -f /opt/lsb/test/manager/bin/dist-checker-start.pl ];then
/opt/lsb/test/manager/bin/dist-checker-start.pl
fi
#Step 9 get ip address for target platform
addr=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}'|sed s/[[:space:]][[:space:]]Bcast//g`
echo -e "you should input ${addr}:8888 on your browser"
#workaround to add part of locales for LSB test
localedef -i ja_JP -f EUC-JP ja_JP.eucjp
localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
localedef -i en_US -f UTF-8 en_US.UTF-8
localedef -i se_NO -f UTF-8 se_NO.UTF-8
localedef -i de_DE -f ISO-8859-1 de_DE
localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1
localedef -i fr_FR -f ISO-8859-1 fr_FR
#resolve localhost
LOCALHOST=`hostname`
if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then
echo "127.0.0.1 $LOCALHOST" >> /etc/hosts
fi
#Step 10
echo "Done!!"
###End
@@ -0,0 +1,26 @@
DESCRIPTION = "auto-setup environment for lsb test"
SECTION = "console/utils"
LICENSE = "GPLv2"
PR = "r3"
LIC_FILES_CHKSUM = "file://LSB_Setup.sh;beginline=3;endline=16;md5=97451c7c0786ce5bbe9ac58042945583"
SRC_URI = "file://LSB_Setup.sh"
S=${WORKDIR}
do_install() {
# Only install file if it has a contents
install -d ${D}/usr/bin
install -d ${D}/${sysconfdir}
install -m 0755 ${S}/LSB_Setup.sh ${D}/usr/bin
install -d ${D}/${libdir}/lsb
ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd
ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd
ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
ln -sf ${datadir}/zoneinfo/Asia/Hong_Kong ${D}${sysconfdir}/localtime
}
FILES_${PN} += "${libdir}/lsb \
${libdir}/* \
"