@Payoon
"Can I use develeoper.xzm from the original porteus 4 kernel in case I have to compile something?"
Yes, you can.
[HowTo 1]
======== Preparation: ========
1. develeoper.xzm from the original porteus 4
For 64 bit:
http://dl.porteus.org/x86_64/Porteus-v4 ... -devel.xzm
2. kernel source from Linux Kernel site
4.18.6:
https://www.kernel.org/pub/linux/kernel ... 8.6.tar.xz
4.19-rc2:
https://git.kernel.org/pub/scm/linux/ke ... rc2.tar.gz
3. Aufs patch from Aufs site
4.18.6:
Code: Select all
mkdir auf
cd auf
git clone https://github.com/sfjro/aufs4-standalone.git aufs4-standalone.git
cd aufs4-standalone.git
if ! ( git checkout origin/aufs4.18 )
then
echo "get aufs4.x-rcN"
git checkout origin/aufs4.x-rcN
fi
mkdir ../a ../b
cp -r {Documentation,fs,include} ../b
rm ../b/include/uapi/linux/Kbuild 2>/dev/null || rm ../b/include/linux/Kbuild
cd ..
diff -rupN a/ b/ > ../aufs.patch
cat aufs4-standalone.git/*.patch >> ../aufs.patch
cd ../
rm -r auf
4.19-rc2:
Maybe, it is not yet updated.
4. Original build config
In the space running Porteus-XFCE-v4.0-x86_64-18.09.06.iso/OV.Porteus-XFCE-v4.0-x86_64-18.09.06.iso,
Code: Select all
su
modprobe configs
zcat /proc/config.gz > org.config
5. firmware package from a distro data base (slackware/debian/arch etc.,)
from arch packages:
http://www.mediafire.com/file/a5mv4p1sm ... -1plus.xzm
======== Operation: for the 4.18.6 case ========
in the environment after boot including 05-devel.xzm
1. expand kernel source
Code: Select all
% su
# pwd
/buildWork
# ls
aufs.patch linux-4.18.6.tar.xz linux-firmware-20180717.8d69bab-noarch-1plus.xzm org.config
# mkdir -p v4.18.6/64
# cd v4.18.6/64
# xz -dc ../../linux-4.18.6.tar.xz | tar -x
# cd linux-4.18.6
# cp ../../../org.config .config
2. adapt aufs patch
Code: Select all
# cd /buildWork/v4.18.6/64/linux-4.18.6
# patch -p1 < ../../../aufs.patch
3. modify source/config
"make menuconfig" command may be used to modify .config.
4. build
Code: Select all
# cd /buildWork/v4.18.6/64/linux-4.18.6
# make oldconfig
# make -j4; cp arch/x86/boot/bzImage ../vmlinuz; make modules_install INSTALL_MOD_PATH=../;
# cp .config ../64bit.config;
# cd ../; DIR=`/bin/ls lib/modules/`; rm lib/modules/$DIR/build lib/modules/$DIR/source; ln -sf /usr/src/linux lib/modules/$DIR/build; ln -sf /usr/src/linux lib/modules/$DIR/source
5. setup firmware
(1) make 2 scripts.
getFWlist
Code: Select all
#!/bin/sh
#
# get firmware list from kernel modules (.ko) depend list.
#
# getFWlist PATH/lib
#
# PATH/lib/modules/*/modules.dep
# *:kernel version name. ex: 4.15.0-rc1-porteus
#
# [OUTPUT: ./FW.list]
# KO=with-relative-path.ko
# firmware-name-with-relative-path
# firmware-name-with-relative-path
# ...
# firmware-name-with-relative-path
# KO=with-relative-path.ko
# ...
#
#==== argument check ====#
if [ $# -ne 1 ]
then
echo "argumet error (not only one)" >/dev/stderr
exit 1
fi
BLIB=${1%/}
BLIB=${BLIB##*/}
if [ "$BLIB" != "lib" ]
then
echo "argumet error (not .../lib or ..../lib/)" >/dev/stderr
exit 1
fi
MODDEP=`/bin/ls $1/modules/*/modules.dep`
if [ -z "$MODDEP" ]
then
echo "argumet error (not include modules/*/modules.dep)" >/dev/stderr
exit 1
fi
#==== get firmare list ====#
SOPATH=${MODDEP%/modules.dep}
WORK=getFMlist$$
mkdir $WORK
for i in `cat $MODDEP | cut -d':' -f1 | sort -u`
do
modinfo -F firmware $SOPATH/$i | sort -u > $WORK/FW
FW=`cat $WORK/FW`
if [ -z "$FW" ]
then
continue
fi
echo "====$i"
echo "====$i" >> $WORK/FW.list
cat $WORK/FW >> $WORK/FW.list
done
if [ -f FW.list ]
then
rm -f old.FW.list
mv FW.list old.FW.list
fi
mv $WORK/FW.list .
rm -fr $WORK
exit 0
getFW
Code: Select all
#!/bin/sh
#
# pick up firmwares of FW-list from PATH/lib directory
# and set these into the firmware directory.
#
# getFW FW-list PATH/lib
#
# PATH/lib/firmware
#
# [FW-list]
# KO=with-relative-path.ko
# firmware-name-with-relative-path
# firmware-name-with-relative-path
# ...
# firmware-name-with-relative-path
# KO=with-relative-path.ko
# ...
#
# [OUTPUT directory]
# firmware
# repo_getFW$$
#
#==== argument check ====#
if [ $# -ne 2 ]
then
echo "argumet error (not FM-list PATH/lib)" >/dev/stderr
exit 1
fi
FWS=${2%/}
BLIB=${FWS##*/}
if [ "$BLIB" != "lib" ]
then
echo "2nd argumet error (not .../lib or ..../lib/)" >/dev/stderr
exit 1
fi
if [ ! -d $2/firmware ]
then
echo "2nd argumet error (not include firmware directory)" >/dev/stderr
exit 1
fi
#==== function [copydirect] ====#
copydirect()
{
local RELATIVE=firmware/$2
RELATIVE=${RELATIVE%/*}
mkdir -p $RELATIVE
cp -a $1/firmware/$2 $RELATIVE/
}
#==== function [copysymlink] ====#
copysymlink()
{
local HPT=`readlink -f $1`
#local HPT=$(cd $1 && pwd) #NG: because use symbolic name ##
local SYMORG=`readlink -f $HPT/firmware/$2`
local SYMPT=${SYMORG%/*}
local SYMRELATIVE=${SYMPT#$HPT/}
mkdir -p $SYMRELATIVE
cp -a $SYMORG $SYMRELATIVE/
}
#==== get firmare ====#
WORK=repo_getFW$$
mkdir $WORK
if [ -e firmware ]
then
rm -fr old.firmware
mv firmware old.firmware
fi
mkdir firmware
for i in `cat $1` "====AtEnd"
do
if [ ${i:0:4} = "====" ]
then
if [ -f $WORK/ko ]
then
#==== at end ====#
cat $WORK/ko >> $WORK/all
if [ -f $WORK/find ]
then
cat $WORK/ko >> $WORK/findS
cat $WORK/find >> $WORK/findS
cat $WORK/find >> $WORK/all
fi
if [ -f $WORK/link ]
then
cat $WORK/ko >> $WORK/linkS
cat $WORK/link >> $WORK/linkS
cat $WORK/link >> $WORK/all
fi
if [ -f $WORK/empty ]
then
cat $WORK/ko >> $WORK/emptyS
cat $WORK/empty >> $WORK/emptyS
cat $WORK/empty >> $WORK/all
fi
fi
echo $i
echo $i > $WORK/ko
rm -fr $WORK/find $WORK/empty $WORK/link
continue
fi
if [ ! -e $FWS/firmware/$i ]
then
echo "[1;31m"$i"[0m" >> $WORK/empty
continue
fi
copydirect $FWS $i
if [ ! -h $FWS/firmware/$i ]
then
echo $i >> $WORK/find
continue
fi
copysymlink $FWS $i
echo "[1;36m"$i"[0m" >> $WORK/link
done
rm -f $WORK/ko
exit 0
(2) setup firmware
Code: Select all
# cd /buildWork
# ls
aufs.patch getFW getFWlist linux-4.18.6.tar.xz linux-firmware-20180717.8d69bab-noarch-1plus.xzm org.config v4.18.6
# ./getFWlist v4.18.6/64/lib
# mkdir mntFW
mount -t squashfs -o loop linux-firmware-20180717.8d69bab-noarch-1plus.xzm mntFW
# ./getFW FW.list mntFW/lib
# mv firmware v4.18.6/64/lib/
# umount mntFW
# rm -fr mntFW
[HowTo 2]
In the environment after boot including 05-devel.xzm and mkKernel-18.09.06-noarch-1.xzm
you can use "
Porteus Kernel Buider" tool.
Please refer to
Porteus Kernel Builder
Thanks.