2018-11-24

Next -- blender-2.79b



blender-2.79b

# tazpkg -gi glu




blenderKeyboardShortcuts

blendervisualhotkeys

Next -- vblank_mode=0 glxgears


vblank_mode=0 glxgears

root@slitaz:~# glxinfo | egrep 'render|version'

direct rendering: Yes
server glx version string: 1.4
client glx version string: 1.4
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX version: 1.4
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
Max core profile version: 4.5
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop x86/MMX/SSE2
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.3.4
OpenGL core profile shading language version string: 4.50
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_MESA_texture_signed_rgba, GL_NV_conditional_render, GL_NV_depth_clamp,
OpenGL version string: 3.0 Mesa 17.3.4
OpenGL shading language version string: 1.30
GL_ARB_compute_shader, GL_ARB_conditional_render_inverted,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_light_max_exponent,
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.3.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
GL_OES_fbo_render_mipmap, GL_OES_geometry_point_size,
root@slitaz:~#

root@slitaz:~# uname -a
Linux slitaz 4.17.7-slitaz #2 SMP Sat Jul 21 08:34:51 Europe 2018 i686 GNU/Linux

root@slitaz:~#

root@slitaz:~# vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
37499 frames in 5.0 seconds = 7499.718 FPS
40807 frames in 5.0 seconds = 8161.307 FPS
40792 frames in 5.0 seconds = 8158.356 FPS
41047 frames in 5.0 seconds = 8209.256 FPS
root@slitaz:~#





root@slitaz:~# grep -i glx /var/log/Xorg.0.log

[ 146.808] (II) LoadModule: "glx"
[ 146.808] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 146.810] (II) Module glx: vendor="X.Org Foundation"
[ 147.074] (II) Initializing extension GLX
[ 147.080] (II) AIGLX: Loaded and initialized i965
[ 147.080] (II) GLX: Initialized DRI2 GL provider for screen 0

Next -- lxpanel Segmentation fault


lxpanel Segmentation fault

root@slitaz:~# lxpanel -p slitaz
Segmentation fault

root@slitaz:~# tazpkg info lxpanel


TazPkg information
================================================================================
Package : lxpanel
State : installed package
Version : 0.9.3.postgit20180412
Category : x-window
Short desc : LXDE panel
Maintainer : pankso@slitaz.org
License : GPL2
Depends : alsa-lib cairo gdk-pixbuf glib gtk2 libfm libfm-gtk keybinder
libwnck2 libxml2 menu-cache pango wireless_tools xorg-libX11
slitaz-menus
Suggested : lxde lxsession slitaz-icon
Web site : https://wiki.lxde.org/en/LXPanel
Size : 196K/824K
Tags : LXDE gtk2 panel
================================================================================

2018-11-22

Next -- tazpkg upgrade




tazpkg upgrade

(EE) intel: module ABI major version (23) doesn't match the server's version (24)
(EE) Failed to load module "intel" (module requirement mismatch, 0)

1. upgrade slitaz-next-170930.iso
tux@slitaz:~$ uname -a
Linux slitaz 4.9.30-slitaz #2 SMP Fri Jun 16 13:58:14 Europe 2017 i686 GNU/Linux
tux@slitaz:~$ sudo tazpkg upgrade
Password:

Recharging repository "Main"
================================================================================
Checking... [ Done ]
Database timestamp: 11/12/2018 04:43
================================================================================
Repository "Main" is up to date.
[..]

You have 277 available upgrades (0 blocked)

322 installed packages scanned in 2s
Do you wish to install them now? (y/N) y
915resolution-0.5.3. 100% |*******************************| 8064 0:00:00 ETA
[..]


2. reboot
root@slitaz:~# uname -a
Linux slitaz 4.17.7-slitaz #2 SMP Sat Jul 21 08:34:51 Europe 2018 i686 GNU/Linux

root@slitaz:~# X -version

X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
Build Operating System: SliTaz GNU/Linux
Current Operating System: Linux slitaz 4.17.7-slitaz #2 SMP Sat Jul 21 08:34:51 Europe 2018 i686
Kernel command line: root=/dev/null autologin
Build Date: 02 September 2018 10:59:13PM
Current version of pixman: 0.34.0
Before reporting problems, check http://www.slitaz.org/
to make sure that you have the latest version.

root@slitaz:~# grep -A 25 intel /var/log/Xorg.0.log
[ 27.182] (==) Matched intel as autoconfigured driver 0
[ 27.182] (==) Matched modesetting as autoconfigured driver 1
[ 27.182] (==) Matched fbdev as autoconfigured driver 2
[ 27.182] (==) Matched vesa as autoconfigured driver 3
[ 27.182] (==) Assigned the driver to the xf86ConfigLayout
[ 27.182] (II) LoadModule: "intel"
[ 27.182] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 27.182] (II) Module intel: vendor="X.Org Foundation"
[ 27.182] compiled for 1.19.3, module version = 2.99.917
[ 27.182] Module class: X.Org Video Driver
[ 27.182] ABI class: X.Org Video Driver, version 23.0
[ 27.182] (EE) intel: module ABI major version (23) doesn't match the server's version (24)
[ 27.182] (EE) Failed to load module "intel" (module requirement mismatch, 0)

[ 27.182] (II) LoadModule: "modesetting"
[ 27.182] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 27.182] (II) Module modesetting: vendor="X.Org Foundation"
[ 27.182] compiled for 1.20.1, module version = 1.20.1
[ 27.182] Module class: X.Org Video Driver
[ 27.182] ABI class: X.Org Video Driver, version 24.0
[ 27.182] (II) LoadModule: "fbdev"
[ 27.182] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 27.183] (II) Module fbdev: vendor="X.Org Foundation"
[ 27.183] compiled for 1.19.3, module version = 0.5.0
[ 27.183] Module class: X.Org Video Driver
[ 27.183] ABI class: X.Org Video Driver, version 23.0
[ 27.183] (EE) fbdev: module ABI major version (23) doesn't match the server's version (24)
[ 27.183] (EE) Failed to load module "fbdev" (module requirement mismatch, 0)

[ 27.183] (II) LoadModule: "vesa"
[ 27.183] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 27.183] (II) Module vesa: vendor="X.Org Foundation"
[ 27.183] compiled for 1.19.3, module version = 2.4.0
[ 27.183] Module class: X.Org Video Driver
[ 27.183] ABI class: X.Org Video Driver, version 23.0
[ 27.183] (EE) vesa: module ABI major version (23) doesn't match the server's version (24)
[ 27.183] (EE) Failed to load module "vesa" (module requirement mismatch, 0)

[ 27.183] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 27.183] (++) using VT number 7

Next - libglx.so: undefined symbol: glxServer



slitaz-next-170930.iso

/lib/libc.so.6: version `GLIBC_2.26' not found (required by /usr/lib/xorg/modules/extensions/libglx.so)

/usr/lib/xorg/modules/extensions/libglx.so: undefined symbol: glxServer


1.

tux@slitaz:~$ uname -a
Linux slitaz 4.9.30-slitaz #2 SMP Fri Jun 16 13:58:14 Europe 2017 i686 GNU/Linux

tux@slitaz:~$ tazpkg
SliTaz package manager - Version: 950
================================================================================
Installed packages:    322
Installed files:       7509
Blocked packages:      0
Upgradeable packages:  0

Repository:            Main
Last recharge:         Today at 20:55.
Database timestamp:    11/12/2018 04:43
Mirrored packages:     6186
================================================================================

$ sudo tazpkg -gi xorg-server-module-glamor
$ sudo tazpkg -gi mesa-dri mesa-demos libatomic mesa-libegl


2. relogin
tux@slitaz:~$ grep glx /var/log/Xorg.0.log
[ 737.926] (EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: /lib/libc.so.6: version `GLIBC_2.26' not found (required by /usr/lib/xorg/modules/extensions/libglx.so)

tux@slitaz:~$ tazpkg -l | grep glibc
glibc-base 2.25 base-system

tux@slitaz:~$ sudo tazpkg -gi glibc-base --forced


3. relogin - glibc-2.26
tux@slitaz:~$ glxinfo
name of display: :0.0
Error: couldn't find RGB GLX visual or fbconfig

tux@slitaz:~$ grep -i glx /var/log/Xorg.0.log
[ 915.450] (II) LoadModule: "glx"
[ 915.451] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 915.454] (EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: /usr/lib/xorg/modules/extensions/libglx.so: undefined symbol: glxServer
[ 915.454] (II) UnloadModule: "glx"
[ 915.454] (II) Unloading glx
[ 915.454] (EE) Failed to load module "glx" (loader failed, 7)


4.
tux@slitaz:~$ tazpkg -l | egrep 'glibc|xorg-server'

glibc-base                         2.26              base-system
xorg-server                        1.19.3            x-window
xorg-server-module-glamor          1.20.1            x-window
tux@slitaz:~$

2018-11-05

Radxa - SD Images


SD Images

SD images for the rock are images booting and running on the uSD card completely. This is good when you want to try different OS or new version of the firmware without touching the nand flash.

Downloading SD Images

Check your hardware revision (Pro or Full/Lite), then download image "for SD card" from here

Writing SD image to SD card

Windows

See the readme in the individual image zip file for additional information on which tool to use.
Before beginning, you will need to prepare a high quality SD card of at least 8GB. A poor quality SD card will result in boot failures.
  • Download the Win32DiskImager from here.
  • Download the image from above link.
  • Use the Win32DiskImager to Write the image into SD card

 Win32DiskImager.png


Linux

We use dd in Linux to write the image:
   sudo dd if=radxa_rock_xxxx_sdcard.img of=/dev/sdx              # x is the disk name of your uSD card on your PC

Mac OS X

We use dd and Apple's diskutil utility to write the image:
  1. Run diskutil list to determine the drive associated the SD card (ex: /dev/disk4)
  2. Unmount the existing disk sudo diskutil unmountDisk /dev/diskX where X is the disk name of your uSD card on your PC
  3. Write the image file to the uSD card sudo dd if=radxa_rock_xxxx_sdcard.img of=/dev/diskX where X is the disk name of your uSD card on your PC

Booting to SD Card

  1. Power off the Rock
  2. Insert the SD card
  3. Power on the Rock and it will boot to the SD card 

Radxa - U-Boot

U-Boot

Features

  • both Rockchip proprietary USB protocol and fastboot USB protocol are supported (Rockchip USB tools works)
  • format of partitions (images) are compatible to Rockchip proprietary bootloader (rkcrc, mkbootimg works)
  • (need more investigation...)

For NAND flash

Build

Refer install toolchain if you don't have arm-eabi- on your system. Other toolchain(Linaro arm-linux-gnueabihf-gcc 4.9) may cause data abort errors.
git clone -b u-boot-rk3188 https://github.com/radxa/u-boot-rockchip.git
cd u-boot-rockchip
make rk30xx
The binary we need for nand flash are RK3188Loader_miniall.bin and uboot.img.

Flash

refer flash image page
use the new u-boot to erase the old loader
   sudo upgrade_tool ef RK3188Loader_miniall.bin
flash new loader
   sudo upgrade_tool ul RK3188Loader_miniall.bin
format NAND (first time only)
   sudo upgrade_tool lf
flash parameter
   upgrade_tool di -p parameter
paramter file
   FIRMWARE_VER:4.2.2
   MACHINE_MODEL:radxa_rock
   MACHINE_ID:007
   MANUFACTURER:RADXA
   MAGIC: 0x5041524B
   ATAG: 0x60000800
   MACHINE: 3066
   CHECK_MASK: 0x80
   KERNEL_IMG: 0x60408000
   CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x00800000  mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00008000@0x00004000(boot),-@0x000c0000(linuxroot)
flash U-Boot
   sudo upgrade_tool wl 0x2000 uboot.img
   sudo upgrade_tool rd
flash kernel + ramdisk
   upgrade_tool di -b boot-linux.img
flash root fs
   upgrade_tool di linuxroot rootfs.img
Booting log can be found at: http://paste.ubuntu.com/9623598/

For SD card

Build

Refer install toolchain if you don't have arm-eabi- on your system. Other toolchain(Linaro arm-linux-gnueabihf-gcc 4.9) may cause data abort errors.
git clone -b u-boot-rk3188-sdcard https://github.com/radxa/u-boot-rockchip.git
cd u-boot-rockchip
make rk30xx
./pack-sd.sh
The binary we need for sdcard is u-boot-sd.img.

Flash

sudo dd if=u-boot-sd.img of=/dev/sdx seek=64
Insert the uSD card to rock pro, it will boot from u-boot on uSD card.

Develop

Some important files and directories related to the Rockchip platform:
 * UserManual - documentation
 * include/configs/rk30xx.h - configuration file
 * tools/rk_tools
 * board/rockchip
    ├── common
    │   ├── armlinux
    │   ├── common
    │   │   ├── A8MMU
    │   │   ├── crc
    │   │   ├── emmc
    │   │   ├── fat
    │   │   ├── rc4
    │   │   ├── rockusb
    │   │   ├── serial_p9
    │   │   └── SPI
    │   └── platform
    │       ├── rk2928
    │       └── rk30
    └── rk30xx
 * arch/arm/cpu/armv7/rk30xx
 * arch/arm/include/asm/arch-rk30xx

Unbrick

If something goes wrong and your device doesn't boot anymore, read Unbrick Rock.

External links

Radxa - Make SD booting images



Make SD booting images

http://wiki.radxa.com/Rock/make_sd_image


Rock/pro/lite has on board NAND flash, but can also boot from exteranl uSD card. uSD card has a higher booting priority. This page introduce how to make a completely off NAND bootable image for sd card.

Introduction

To boot from uSD card and run the system on uSD card, we need the following
  • bootloader for booting from uSD card - u-boot-sd.img
  • parameter for uSD card layout and kernel cmdline - parameter.img
  • kernel+ramdisk - boot.img
  • a rootfs - rootfs.ext4

Prepare images

u-boot for sdcard

Follow the instruction at Make u-boot for sdcard to create the u-boot-sd.img for sd card.

get the parameter

Download the parameter from dl.radxa.com
wget http://dl.radxa.com/rock/images/parameter/parameter_linux_sd
rkcrc -p parameter_linux_sd parameter.img                                      #where to get rkcrc, refer to http://radxa.com/Rock/flash_the_image "Flash with rkflashtool"

build the kernel

Follow the Booting Linux(3.0.36) or build mainline kernl page to make the boot.img.

make the roofts

Follow the instructions here to make the Ubuntu or Debian rootfs - rootfs.ext4.

Write to the sdcard

First, let's clean the uSD card.
sudo dd if=/dev/zero of=/dev/sdx bs=1M count=1

Then, create the partitions with fdisk
export START_SECTOR=65536              

why the start sector is 65536(32MB offset) is we need reserve some sectors # for boot.img/parameter/bootloader before the filesystem starts.
 
sudo fdisk /dev/sdx  << EOF
n
p
1
$START_SECTOR

w
EOF

Now we have a new partition for rootfs starting at START_SECTOR. It's time to write the images to the sdcard.
 
sudo dd if=u-boot-sd.img of=/dev/sdx conv=sync seek=64 
sudo dd if=parameter.img of=/dev/sdx conv=sync seek=$((0x2000))
sudo dd if=boot.img of=/dev/sdx conv=sync seek=$((0x2000+0x2000))
sudo dd if=rootfs.ext4 of=/dev/sdx1 conv=sync

Insert the uSD card to rock/pro/lite, you can boot from uSD card now.

Rockchip Boot flow


Here is Rockchip pre-released binaries which may be mentioned later:
https://github.com/rockchip-linux/rkbin
And Rockcip Linux GPT partition here.

Boot flow

Here is a table show the detail what we may use in Rockchip platform, for 2 boot stage:
- use U-Boot SPL;
- use Rockchp idbLoader which is combinded by Rockchip ddr init bin and miniloader bin;



Then when we talking about boot from eMMC/SD/U-Disk/net, they are in different concept:
  • Stage 1 is always in boot rom, it loads stage 2 and may load stage 3(when SPL_BACK_TO_BROM option enabled).
  • Boot from SPI flash means firmware for stage 2 and 3(SPL and U-Boot only) in SPI flash and stage 4/5 in other place;
  • Boot from eMMC means all the firmware(including stage 2, 3, 4, 5) in eMMC;
  • Boot from SD card means all the firmware(including stage 2, 3, 4, 5) in SD card;
  • Boot from U-Disk means firmware for stage 4 and 5(not including SPL and U-Boot) in Disk, optionally only including stage 5;
  • Boot from net/tftp means firmeware for stage 4 and 5(not including SPL and U-Boot) on the network;




Boot Flow 1 is typical Rockchip boot flow with Rockchip miniloader;
Boot Flow 2 is used for most SoCs with U-Boot TPL for ddr init and SPL for trust(ATF/OP-TEE) load and run into next stage;
Boot Flow 3 is use only for RK3399 with SPL ATF support;
Boot Flow 4 is used for armv7 SoCs which do not support trust;

Note 1. If loader1 have more than 1 stage, program will back to bootrom and bootrom load and run into next stage. eg. If loader1 is tpl and spl, the bootrom will run into tpl first, tpl init ddr and back to bootrom, bootrom then load and run into spl.
Note 2. If trust is enabled, loader1 need to load both trust and u-boot, and then run into trust in secure mode(EL3 in armv8), trust do the initialize and run into U-Boot in non-secure mode(EL2 in armv8).
Note 3. For trust(in trust.img or u-boot.itb), armv7 has only one tee.bin with or without ta, armv8 has bl31.elf and option with bl32.
Note 4. In boot.img, content can be zImage and its dtb for Linux, and can optionally be grub.efi, and can be AOSP boot.img, ramdisk is option;  



SliTaz (and GRUB2) with SSD disks


SliTaz (and GRUB2) with SSD disks


And finally only NVMe support was usefull; setting
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set and
CONFIG_BLK_DEV_NVME=y
SliTaz can now see the disk :)

# fdisk -l
Found valid GPT with protective MBR; using GPT

Disk /dev/nvme0n1: 500118192 sectors, 2534M
Logical sector size: 512
Disk identifier (GUID): 324ef864-7efa-45be-b0b0-c70122bdf99c
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 500118158

Number  Start (sector)    End (sector) Size Name
    1        2048 534527  260M EFI system partition
    2      534528     796671 128M Microsoft reserved partition
    3      796672  500117503 238G Basic data partition



full support fat32
# tazpkg -gi dosfstools mtools

GParted --> View --> File System Support

 

Microsoft reserved partition (MSR) - msftres

The Linux kernel configuration item CONFIG_BLK_DEV_PCIESSD_MTIP32XX:

$ grep mtip32xx /lib/modules/3.16.55-slitaz/modules.builtin
kernel/drivers/block/mtip32xx/mtip32xx.ko

Dell Latitude E5470 SATA SSD
Micron SSD 1100 (MTFDDAV256TBN), 256 GB, M.2 2280, 190 GB free

 


Lenovo E480 PCIe NVMe x2 SSD
Lenovo LENSE20256GMSP34MEAT2TA, 256 GB, M.2 2280 PCIe NVMe x2, 210 GB free