2017-01-20

Slitaz -- UUID="2017-01-19-08-32-05-00" LABEL="SliTaz preinit"


UUID="2017-01-19-08-32-05-00" LABEL="SliTaz preinit"

slitaz64:
No kernel modules.


UPDATE: 20170121

pushed http://hg.slitaz.org/wok/rev/1fe20f9ae3ad
and http://hg.slitaz.org/wok/rev/29a6d4caed7a
 
http://forum.slitaz.org/topic/uuid2017-01-15-02-37-20-00-labelslitaz-core64#post-43920


wok     changeset 19638:1fe20f9ae3ad
linux64: update deps

diff -r cde5f1326cbc -r 1fe20f9ae3ad linux64/receipt
--- a/linux64/receipt    Fri Jan 20 11:51:22 2017 +0100
+++ b/linux64/receipt    Fri Jan 20 16:14:12 2017 +0100
@@ -13,7 +13,7 @@
# We want it regenerated on each kernel/module install
#CONFIG_FILES="/lib/modules/$VERSION-slitaz64/modules.dep"

-DEPENDS="depmod"
+DEPENDS="kmod"

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()

wok     changeset 19639:29a6d4caed7a
slitaz-boot-scripts: update deps

diff -r 1fe20f9ae3ad -r 29a6d4caed7a slitaz-boot-scripts/receipt
--- a/slitaz-boot-scripts/receipt    Fri Jan 20 16:14:12 2017 +0100
+++ b/slitaz-boot-scripts/receipt    Fri Jan 20 16:19:33 2017 +0100
@@ -18,7 +18,7 @@
/etc/network.conf"

# Needed to fetch the keymaps and test the filesystem.
-DEPENDS="kbd-base e2fsprogs busybox"
+DEPENDS="kbd-base e2fsprogs busybox slitaz-tools"

# Rules to gen a SliTaz package suitable for Tazpkg.
#


wok     changeset 19640:13daef3b4658
kmod: also provides depmod

diff -r 29a6d4caed7a -r 13daef3b4658 kmod/receipt
--- a/kmod/receipt    Fri Jan 20 16:19:33 2017 +0100
+++ b/kmod/receipt    Fri Jan 20 16:40:06 2017 +0100
@@ -9,7 +9,7 @@
TARBALL="$PACKAGE-$VERSION.tar.xz"
WEB_SITE="https://www.kernel.org/pub/linux/utils/kernel/kmod/"
WGET_URL="$WEB_SITE$TARBALL"
-PROVIDE="modules-init-tools"
+PROVIDE="modules-init-tools depmod"
HOST_ARCH="i486 arm"

DEPENDS="zlib liblzma"

2017-01-16

Slitaz64 -- UUID="2017-01-15-02-37-20-00" LABEL="SliTaz core64" -2



Distro: rolling-core64
http://cook.slitaz.org/cookiso.cgi?distro=rolling-core64

Installing package: linux64-wireless Unable to find package "linux64-cryptolinux-libre-crypto" in the mirrored packages list.
Unable to find package "get-linux64-cryptolinux-libre-crypto" in the mirrored packages list. [ Done ]

Installing package: firmware-rt2x00 Unable to find package "linux64-wirelesslinux-libre-wireless" in the mirrored packages list.
Unable to find package "get-linux64-wirelesslinux-libre-wireless" in the mirrored packages list. [ Done ]
Installing package: firmware-rtlwifi Unable to find package "linux64-wirelesslinux-libre-wireless" in the mirrored packages list.
Unable to find package "get-linux64-wirelesslinux-libre-wireless" in the mirrored packages list. [ Done ]

Installing package: locale-it Checksum error for "locale-it-5.0.tazpkg" [ Done ]

Installing package: xorg-server Unable to find package "linux64-drmlinux-libre-drm" in the mirrored packages list.
Unable to find package "get-linux64-drmlinux-libre-drm" in the mirrored packages list. [ Done ]

Installing package: yad Checksum error for "yad-gtk3-0.28.1.tazpkg" [ Done ]


Distro statistics: /home/slitaz/distro
================================================================================
Build time : 842s ~ 14m
Build date : 20170115
Packages : 288
Rootfs size : 184.6M
Initramfs size : 45.3M
ISO image size : 50.0M
================================================================================
Image is ready: slitaz-core64.iso

Moving ISO to: /home/slitaz/iso/slitaz-rolling-core64.iso
Cookiso ended: 2017-01-15 02:37

Slitaz64 -- UUID="2017-01-15-02-37-20-00" LABEL="SliTaz core64"




ifconfig: SIOCGIFFLAGS: No such device

tux@slitaz:~$ grep -A5 network /var/log/boot.log
Processing: /etc/init.d/network.sh
Loading network settings from /etc/network.conf
Setting hostname to: slitaz [ Done ]
Configuring loopback... [ Done ]
ifconfig: SIOCGIFFLAGS: No such device
Starting udhcpc client on: eth0...
udhcpc: SIOCGIFINDEX: No such device

tux@slitaz:~$ lsmod
Module Size Used by Not tainted

tux@slitaz:~$ blkid
/dev/sr0: UUID="2017-01-15-02-37-20-00" LABEL="SliTaz core64" TYPE="iso9660" PTUUID="587ad259" PTTYPE="dos"

2017-01-05

Slitaz64 -- Stack Protector buffer overflow detection


Stack Protector buffer overflow detection

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
Makefile:1066: recipe for target 'prepare-compiler-check' failed

root@slitaz:/usr/src/linux-4.9# grep STACKPROTECTOR .config
CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_CC_STACKPROTECTOR_NONE is not set
# CONFIG_CC_STACKPROTECTOR_REGULAR is not set
CONFIG_CC_STACKPROTECTOR_STRONG=y


Stack Protector buffer overflow detection

This option turns on the "stack-protector" GCC feature. This
feature puts, at the beginning of functions, a canary value on
the stack just before the return address, and validates
the value just before actually returning. Stack based buffer
overflows (that need to overwrite this return address) now also
overwrite the canary, which gets detected and the attack is then
neutralized via a kernel panic.

Prompt: Stack Protector buffer overflow detection
Location:
-> General setup
Defined at arch/Kconfig:417
Depends on: HAVE_CC_STACKPROTECTOR [=y]
Selected by: HAVE_CC_STACKPROTECTOR [=y] && m

Strong (CC_STACKPROTECTOR_STRONG)

CONFIG_CC_STACKPROTECTOR_STRONG:

Functions will have the stack-protector canary logic added in any
of the following conditions:

- local variable's address used as part of the right hand side of an
assignment or function argument
- local variable is an array (or union containing an array),
regardless of array type or length
- uses register local variables

This feature requires gcc version 4.9 or above, or a distribution
gcc with the feature backported ("-fstack-protector-strong").


On an x86 "defconfig" build, this feature adds canary checks to
about 20% of all kernel functions, which increases the kernel code
size by about 2%.

Symbol: CC_STACKPROTECTOR_STRONG [=n]
Type : boolean
Prompt: Strong
Location:
-> General setup
-> Stack Protector buffer overflow detection ( [=y])
Defined at arch/Kconfig:449
Depends on:
Selects: CC_STACKPROTECTOR [=y]

Regular (CC_STACKPROTECTOR_REGULAR)

CONFIG_CC_STACKPROTECTOR_REGULAR:


Functions will have the stack-protector canary logic added if they
have an 8-byte or larger character array on the stack.

This feature requires gcc version 4.2 or above, or a distribution
gcc with the feature backported ("-fstack-protector").


On an x86 "defconfig" build, this feature adds canary checks to
about 3% of all kernel functions, which increases kernel code size
by about 0.3%.

Symbol: CC_STACKPROTECTOR_REGULAR [=n]
Type : boolean
Prompt: Regular
Location:
-> General setup
-> Stack Protector buffer overflow detection ( [=y])
Defined at arch/Kconfig:435
Depends on:
Selects: CC_STACKPROTECTOR [=y]

Slitaz -- LINUX_VERSION_CODE / dec2hex / hex2dec



LINUX_VERSION_CODE / dec2hex / hex2dec


tux@slitaz:~$ cat /usr/src/linux-3.16.36/include/generated/uapi/linux/version.h

#define LINUX_VERSION_CODE 200740

#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))


dec2hex / hex2dec

tux@slitaz:~$ printf "%X\n" 200740

31024


tux@slitaz:~$ echo $((0x31024))

200740

tux@slitaz:~$


31024 ⇒ 3.10.24 (hex) ⇒ 3.16.36

2017-01-04

Slitaz -- Handle cross compilation


Handle cross compilation
>checking for arm-slitaz-linux-gnueabi-ranlib... no
>make CC=arm-slitaz-linux-gnueabi-gcc
Handle cross compilation
http://hg.slitaz.org/wok/file/c76d35a1ca0b/linux/receipt#l162
# Handle cross compilation
case "$ARCH" in
    arm)
        echo "Compiling: $ARCH Kernel"
        make mrproper
        patch -Np1 < $stuff/$ARCH/linux-arm.patch || exit 1
        cp -f $stuff/$ARCH/linux-arm.config .config
        yes '' | make ARCH=$ARCH oldconfig
        make ARCH=$ARCH CROSS_COMPILE=${HOST_SYSTEM}- bzImage &&
        make ARCH=$ARCH CROSS_COMPILE=${HOST_SYSTEM}- modules &&
        make ARCH=$ARCH CROSS_COMPILE=${HOST_SYSTEM}- \
            INSTALL_MOD_PATH=$DESTDIR modules_install &&
OR
export PATH=$PATH:/cross/arm/tools/bin
export ARCH=arm
export CROSS_COMPILE=arm-slitaz-linux-gnueabi-

./configure
make
make install

>checking for arm-slitaz-linux-gnueabi-ranlib... no
>So, I think we haven't the package with the cross-compiler for the RPi.
>BTW, the precise citation of your link: arm-linux-gnueabihf.

slitaz-arm-toolchain-20140304.tar.bz2
http://mirror1.slitaz.org/arm/cross/slitaz-arm-toolchain-20140304.tar.bz2

tux@slitaz:~$ tar -tjvf slitaz-arm-toolchain-20140304.tar.bz2 | grep ranlib
-rwxr-xr-x root/root 52304 2014-03-03 23:35 slitaz-arm-toolchain-20140304/arm/tools/bin/arm-slitaz-linux-gnueabi-ranlib
hrwxr-xr-x root/root 0 2014-03-03 23:35 slitaz-arm-toolchain-20140304/arm/tools/arm-slitaz-linux-gnueabi/bin/ranlib link to slitaz-arm-toolchain-20140304/arm/tools/bin/arm-slitaz-linux-gnueabi-ranlib
tux@slitaz:~$

SliTaz Cross Toolchain configuration file
http://hg.slitaz.org/cookutils/file/0ade59078977/data/cross-arm.conf
# SliTaz Cross Toolchain configuration file
#
# ARM v6
#
# Main settings
ARCH=arm
BUILD_SYSTEM=i486-slitaz-linux
TARGET=$ARCH-slitaz-linux-gnueabi
WORK=/cross/$ARCH
SRC=/home/slitaz/src

2017-01-03

Slitaz64 -- cross-compile VS native-compile


cross-compile VS native-compile
>Do you used "uclibc-cross-compiler-x86_64" or do you compile
>using native x64 toolchain?

Never used uclibc-cross-compiler-x86_64

1. slitaz-x86_64-2014 (glibc-2.13): cross-compile
http://forum.slitaz.org/topic/slitaz-50-release-date/page/2#post-29501
root@slitaz:~# uname -a
Linux slitaz 3.2.53-slitaz #1 SMP Wed Jan 1 18:22:13 UTC 2014 x86_64 GNU/Linux
[ 0.000000] Linux version 3.2.53-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP Wed Jan 1 18:22:13 UTC 2014
root@slitaz:~# file /lib/libc-2.13.so
/lib/libc-2.13.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped

2. slitaz-x86_64-2016 (glibc-2.19): native-compile
http://forum.slitaz.org/topic/slitaz-x86_64#post-43349
tux@slitaz:~$ uname -a
Linux slitaz 3.16.36-slitaz64 #2 SMP Mon Sep 12 07:26:30 UTC 2016 x86_64 GNU/Linux
tux@slitaz:~$ file /lib64/libc-2.19.so
/lib64/libc-2.19.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.30, stripped
Compiled by GNU CC version 4.9.2.
Compiled on a Linux 3.16.36 system on 2016-09-08.
http://forum.slitaz.org/topic/slitaz-x86_64#post-43358
root@slitaz:/home/tux# gcc -v
Target: x86_64-slitaz-linux
--build=x86_64-slitaz-linux --host=x86_64-slitaz-linux
root@slitaz:/home/tux# cat /usr/share/doc/slitaz/toolchain.txt
SliTaz GNU/Linux toolchain
================================================================================
Build date : 2016-09-03
Architecture : x86_64
Build system : x86_64-slitaz-linux
Host system : x86_64-slitaz-linux

3. Docker-Tag
http://forum.slitaz.org/topic/slitaz-x86_64/page/2#post-43544
tux@slitaz:~$ docker run -it slitaz/slitaz-base:2.13
root@09ae98ea7ee0:/# /lib64/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.2.14 system on 2013-12-28.
tux@slitaz:~$ docker run -it slitaz/slitaz-base:2.19
root@2b3c5287b346:/# /lib64/libc.so.6
GNU C Library (GNU libc) stable release version 2.19, by Roland McGrath et al.
Compiled by GNU CC version 4.9.2.
Compiled on a Linux 3.16.36 system on 2016-09-08.

Slitaz64 -- Linux-4.9.0


Linux 4.9.0 - uClibc

>Config seems outdated, too many "(NEW)" items. And this config >looks interesting.
Oops, you have same link.
>uclibc-cross-compiler-x86_64-20160111.tazpkg
GCC / uClibc version?
Do you have try “normal cross-compile”, without cook/cooker and aufs ?

Latest News
15 May 2012, uClibc 0.9.33.2 Released


tux@slitaz:~$ uclibc-x86_64-gcc -v
Invoked as uclibc-x86_64-gcc
Reference path: /usr/share/uclibc-cross-compiler-x86_64/bin/..
arg[ 0] = rawcc
arg[ 1] = -U__nptl__
arg[ 2] = -v
Using built-in specs.
Target: x86_64-unknown-linux
Configured with: /home/landley/work/ab7/build/temp-x86_64/gcc-core/configure --target=x86_64-unknown-linux --prefix=/home/landley/work/ab7/build/cross-compiler-x86_64 --disable-multilib --disable-nls --enable-c99 --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --program-prefix=x86_64- --enable-threads=posix --enable-shared --build=x86_64-walrus-linux --host=x86_64-unknown-linux
Thread model: posix
gcc version 4.2.1
tux@slitaz:~$

----

cross-compile with glibc:
tux@slitaz:~$ uname -a
Linux slitaz 4.9.0-slitaz64 #1 SMP PREEMPT Mon Jan 2 11:37:34 UTC 2017 x86_64 GNU/Linux

tux@slitaz:~$ dmesg | grep gcc
[ 0.000000] Linux version 4.9.0-slitaz64 (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Mon Jan 2 11:37:34 UTC 2017

tux@slitaz:~$ modinfo kvm
filename: /lib/modules/4.9.0-slitaz64/kernel/arch/x86/kvm/kvm.ko.gz
license: GPL
author: Qumranet
depends: irqbypass
intree: Y
vermagic: 4.9.0-slitaz64 SMP preempt mod_unload modversions
parm: allow_unsafe_assigned_interrupts:Enable device assignment on platforms without interrupt remapping support. (bool)
parm: ignore_msrs:bool
parm: min_timer_period_us:uint
parm: kvmclock_periodic_sync:bool
parm: tsc_tolerance_ppm:uint
parm: lapic_timer_advance_ns:uint
parm: vector_hashing:bool
parm: halt_poll_ns:uint
parm: halt_poll_ns_grow:uint
parm: halt_poll_ns_shrink:uint
tux@slitaz:~$