This post is to show a real example for cross compiling SDL library for target arm board and include all necessary steps from downloading the library to installation of the compiled package to the root file system for target board.


For this real example, I worked with below settings.


Host machine: Ubuntu 12.04 x86-64 bit

HW: Beaglebone black(BBB) with 4GB uSD card

OS: Ubuntu 13.04 (http://rcn-ee.net/deb/rootfs/raring/ubuntu-13.04-console-armhf-2013-07-22.tar.xz)

Toolchain for cross compile: Refer to below Step 0.






For the first time you need to get prebuilt image for Ubuntu 13.04 version and prepare bootable SD card.


Step 0: Preparing toolchain and building Linux kernel for BBB


git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev
git checkout origin/am33x-v3.8 -b tmp
./build_kernel.sh

After running ./build_kernel.sh , there will be toolchain installed at linux-dev/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux and also linux kernel binary can be found.


Step 1. For flashing uSD card with Ubuntu 13.04 image, refer to the following link

http://elinux.org/BeagleBoardUbuntu


If you follow the guide in the above link without any error, u can have the uSD burned with bootable image and with it in uSD card slot, you can boot Ubuntu 13.04 on BBB.


Step 2. Now its time to do cross compile SDL.


For this, you need to prepare root file system for BBB before compilation of SDL and you can find the prebuild root file system file in the above file.


Unpack image:

tar xJf ubuntu-13.04-console-armhf-2013-07-22.tar.xz
cd ubuntu-13.04-console-armhf-2013-07-22
sudo tar xfv armhf-rootfs-ubuntu-raring.tar -C ~/rootfs/

Ok. root file system is ready. 


Step 3. Next step is downloading SDL package.

cd ~/rootfs/home/ubuntu
wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar xvfz SDL-1.2.15.tar.gz
cd SDL-1.2.15

For proper compilation and installation, you need to make sure that proper toolchain for BBB (refer to step 0) and inform path to tool chain to Configure script.


Step 4. Configuring and compiling SDL

Below is a script doing configuration and make for my setting. Some modification of this script may be needed to different setting.

Write down a shell script with below content and run it.

Note: Need to replace <user> in the above box with proper name to your system.



Step 5: Installation SDL to target root file system

Now if there is no error after running this script than you can install SDL package to target root file system running below command:


sudo make install


All setup is completed. As like this, you can install other libraries too, for example SDL_image library. 

End.


Next post will be how to make a sample SDL project which will run on target board with help of CMake.




Posted by kevino
,

This is extended from my previous post: http://kevino.tistory.com/entry/CMakeqt5-Simple-example-for-CMake-QT5-package.


The source files in the above link is intended to be built on Host system and run on local machine. Here I will explain how to cross compile the same source codes  with almost same environment.


In order to develop QT app targeted for Arm embedded system, you need to first prepare Qt5 framework suitable for target board.


For i.MX6 Sabre SDB, refer to the following link: https://community.freescale.com/docs/DOC-94066. If you dont see any error in completing procedures described in the above link, you can find many example binaries created in $(TARGET_rootfs)/opt/qt5/examples and verify by running several examples.


Note. You may not see examples compiled even though you followed all steps. In this case, you can compile the examples manually by running below commands on Host system. If compilation is successful, then verify examples by running those on target board.


$ cd $(QTdir)/qtbase

$ make sub-examples


For now, before running cross compile commands, make sure that the following conditions are all met.


1. Target system is booted via nfs and "/" is mounted on ${TARGET_rootfs) of host system.

2. Qt5 for target board is installed at $(TARGET_rootfs)/opt/qt5 and examples at $(TARGET_rootfs)/opt/qt5/examples.

3. Need to verify whether Qt5 works by running example files and checking QT logo moving in 3D screen.

Target> cd /opt/qt5/examples

Target> ./opengl/hellogl_es2/hellogl_es2


If Qt5 is installed, then lets reuse the project source code which will be converted app for target board.


First we need to inform CMake that we will use cross compile and CMake dev team already made this solution since Cmake 2.6 version. 


For this, we can create a new cmake module similar to the below and remember its path.


Toolchain-freescale-imx6q.cmake


Now you can run cmake with crosscompile options to build the source codes. Assuming the above setup,


$ cd /home/<userid>/utils/ltib/rootfs/root

$ 7za x sample1.7z

$ cd sample1

$ mkdir build

$ cd build

$ cmake -DCMAKE_TOOLCHAIN_FILE=$(PATH_to_)/Toolchain-freescale-imx6q.cmake ..

$ make



Note. While running cmake, if you notice an error "Failed to find GLESv2 in "", then you can fix this error by modifying Qt5GuiConfigExtras.cmake at /home/<userid>/utils/ltib/rootfs/opt/qt5/lib/cmake/Qt5Gui/.


At 50 lines

- _qt5gui_find_extra_libs(OPENGL "GLESv2;GLESv2;EGL;GAL" "" "")

+ _qt5gui_find_extra_libs(OPENGL "GLESv2;GLESv2;EGL;GAL" ${CMAKE_FIND_ROOT_PATH}/usr/lib/ "")


I dont think this patch is good but it works for me so you can use this until official patch is ready. At least Qt 5.1.0 has this problem.


You can examine the exe file in target machine whether this Qt5 app can be run. If successful, now you are ready to develop Qt5 application running on Target board.




Posted by kevino
,

This post describes what I did to run ltib from L3.0.35_4.0.0_130424_source.tar.gz on Linux host machine version Ubuntu 12.04 64bit Precise.


Actually I referred the following https://community.freescale.com/message/314151#314151 and added minor things.



Steps I did


1. Download L3.0.35_4.0.0_130424_source.tar.gz and install it.

2. Download this patch-ltib-ubuntu12.04.sh and copy the script file in the <LTIB_root_dir> and execute it. Make sure this update complete without error.

3. Run ltib in <LTIB_root_dir>


While running ltib, you will be asked to configure build options for kernel, For me, I just selected "mx6qsabre_nand" platform and did not touched other thing. 


If you choose u-boot-v2009.08 as boot loader, then you may pass compilation of uboot with success. At least it was successful for me.


In case of error complaining "arm-fsl-linux-gnueabi/bin/ld: cannot find /lib/libc.so.6", then apply the suggestion in this  link.

Hi John,

 

I just noticed that my earlier note was cryptic, but in this case, you're seeing the same problem as I had: LTIB is trying to find libraries in your host system directories. In other words, it's trying to load /lib/libc.so.6 instead of finding the library within the LTIB tree.

 

The answer seems to be simple. Go into ltib/dist/lfs/base_libs/base_libs.spec and find these lines:

     # remove absolute paths from text search files (if they exist)

     perl -w -e '

         @ARGV = grep { `file $_` =~ m,ASCII C program text, } @ARGV;

         exit(0) unless @ARGV;

 

Remove the last two (the lines beginning with "@ARGV" and "exit(0)" and you should be good to go.


4. If ltib run correctly, you can see rootfs.jffs2 is created in <LTIB_root_dir>if you chose NAND image in configuration stage.




Posted by kevino
,

How to make ubuntu 32 bit environment using chroot on Ubuntu 12.04 64 bit


1. Setup basic chroot


$ sudo apt-get install debootstrap
$ sudo apt-get install schroot
$ sudo mkdir /var/chroot/
$ sudo editor /etc/schroot/schroot.conf

Fill /etc/schroot/schroot.conf with below (Assuming your account is king)

[lucid]

description=Ubuntu Lucid

#location=/var/chroot

directory=/var/chroot/

personality=linux32

priority=3

users=king

root-users=king

groups=sbuild

root-groups=root

Note:

  • personality: Enable this line if the host system is 64-bit running on an amd64/x64 computer and the chroot is 32-bit for i386. Otherwise, leave it disabled.


After modifying schroot.conf, donwload lucid data from the Ubuntu repository


$ sudo debootstrap --variant=buildd --arch i386 lucid /var/chroot/ http://kr.archive.ubuntu.com/ubuntu/


Useful settings


$ sudo mount -o bind /proc /var/chroot/proc
$ sudo ln -f /etc/apt/sources.list /var/chroot/etc/apt/sources.list

2. Entering chroot envrinment


After basic installation of Ubuntu Lucid completion, run below command to change to chroot environment with root account.


$ $ sudo chroot /var/chroot
or
$ schroot -c lucid -u root


In chroot, install basic ubuntu package by running below command


# apt-get install ubuntu-minimal # apt-get update


If you notice any error somthing like "GPG error ... public key is not available: KEY_VALUE", then you can run below command to add the public key so that make "apt-get update" end with no such error and rerun "apt-get update" to complete all setup.


# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY_VALUE>

Now you are ready to use full 32 bit app development in Ubuntu Lucid version.


Posted by kevino
,

In the official online document for QT5, qt5 guys say that there is JSON support in Qt5 and all the related API description are listed so any programmer can seek them but no useful example or tutorials are there. I believe they should put more guides how to read and write JSON data sooner or later. For those who seeks any one tutorial, here comes very basic and little code snippet below to show how to read a JSON data.







If you run the above code, then u will see something like as below


QJsonValue(object, QJsonObject({"Alter": 42,"Hobbys": ["Reiten","Golfen","Lesen"],"Kinder": [],"Name": "Mustermann","Partner": null,"Vorname": "Max","männlich": true}) )

"QJsonObject of Inhaber: " QJsonObject({"Alter": 42,"Hobbys": ["Reiten","Golfen","Lesen"],"Kinder": [],"Name": "Mustermann","Partner": null,"Vorname": "Max","männlich": true})

"QJsonObject[Hobbys] of Inhaber: " QJsonValue(array, QJsonArray(["Reiten","Golfen","Lesen"]) )

"QJsonObject of Inhaber/Hobbys: " "Reiten"


Description:

The above JSON document has 5 QJsonObject and each object has a key&value pair. 

To retrieve an object with key "Inhaber" from the QJsonDocument, then we can use d.object().value(QString("Inhaber")).toObject().

if an object have only value without key, then you can refer it as QJsonArray and use the operator [] to access its array.


Hope this will give you any hint how to use JSON support with Qt5.

 

Posted by kevino
,

이번에도 CMake를 이용한 Qt5 용 프로젝트를 구성하는 방법에 대해 소개한다.


새롭게 이전 Qt 4.8버전하고 Qt5버전에서 Cmake 사용방법이 많이 바뀌어서 유의해야 할 부분을 중점으로 보여주기위한 글이므로 실제 프로젝트의 내용은 별거 없고 CmakeLists.txt파일 작성하는 부분을 중점적으로 보면 되겠다. 기본적인 정보는 다음의 링크를 참조해서 만들었다.


http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html#imported-targets


우선 시험 환경은 다음과 같다.


OS: Windows 7

CMake: version 2.8.11

Qt5: version 5.0.2


다른 내용은 별다른 것 없고 CMakeLists.txt를 주목해서 보는데 아래에 전체 소스를 표시하고 있다.


CMakeLists.txt



지금까지 연재해온 Cmake 시리즈와 다른 것은 별로 없고 눈여겨봐야 할 부분은 Visual Studio에서 디버깅시 보통의 경우 Qt5Widgetd.dll파일이 없다면서 실행에 실패할 것인데 이 경우 전역 변수 PATH에 Qt5 디렉토리를 추가해주면 문제가 해결될 것이나, 그렇지 않은 경우 VS용 프로젝트 파일의 설정값을 건드려서 정상동작하도록 만든 부분으로 그 설정은 아래와 같이 해주면 된다.


include(CreateLaunchers)

create_target_launcher(sample1 ENVIRONMENT  "PATH=${QTDIR}/bin")


실제로 동작가능한 프로젝트 파일은 아래에 올려두니 유용하게 쓰시기 바란다.


<추가> Linux에서 Qt5Widgets.cmake를 못찾는다는 오류가 나올때 해결방법

해당 qt5관련 cmake 모듈을 못찾는 경우에 발생한다. 이런 경우 CMAKE_PREFIX_PATH에 해당 위치를 지정해줘야 하는데 형식은 다음과 같다

if(UNIX)

set (CMAKE_PREFIX_PATH  <PATH_to_CmakeModules>)

endif(UNIX)


본인의 경우 다음과 같이 지정해주었다

set (CMAKE_PREFIX_PATH "/home/<userid>/Qt/5.1.0/gcc_64/lib/cmake")



sample1.7z


Posted by kevino
,

이번은 opencv를 이용하여 이미지 프로세싱을 하는 예제하나를 소개한다.


미리 얘기하지만 이글은 opencv와 cmake를 연동하는 방법에 중점을 둔 것으로 여기에 소개하는 opencv의 기능은 주된 관심대상이 아니고 예제를 보이기 위한 목적으로 타사이트에서 가져온 것이다. 제목에 나와 있다시피 이미지속의 사각형의 기울진 원근각을 자동으로 잡아주는 기능을 하는 예제로 원글의 주소는 다음과 같으니 좀더 자세한 내용을 확인하고 싶은 경우 도움이 될 것이다.


http://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/


본 글에서 전달하고자 하는 본론으로 들어간다.


1. 윈도우에서 CMake를 이용하여 컴파일하고자 하는 경우 대개 visual studio 20xx버전을 이용할텐데 한가지 애로사항이 visual studio 디버깅때에 사용될 기본 디렉토리 설정이 힘들다는 점이었다. 물론 프로젝트파일이 생성되고 나서 사용자가 직접 지정하면 되지만 여기에서는 CMakeFiles.txt에서 직접 설정할 수 있는 방법을 알아내어 여기에 소개한다.


일단 이것을 가능하게 하려면 다음 링크에서 제공하는 파일들이 필요하다.


https://github.com/rpavlik/cmake-modules


여기에 있는 파일들을 받아서 저장하자. 그럼 다음과 같은 디렉토리 구조가 되었는지 확인하자


:bin/

:${BASE_DIR} /cmake  /launcher-templates/

    +- quadrilateral.cpp

    +- CMakeLists.txt

                       +- CreateLaunchers.cmake

                       +- CleanDirectoryList.cmake


위와 같이 폴더 구조가 되었다고 가정할때 기본 작업 디렉토리를 설정하려면 CMakeLists.txt에 다음의 구절을 넣어야 한다.


SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

include(CreateLaunchers)


create_target_launcher(quadrilateral WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../bin/")


위에서는 기본 작업 디렉토리가 CMakeLists.txt파일이 있는 위치에서 ../bin/으로 설정되었다. 여기에 opencv관련 dll파일들을 넣어놓으면 된다.


이용상 편의를 위해 위와 관련한 프로젝트를 아래 파일로 제공한다.


quadrilateral.7z



Posted by kevino
,

이 글은 MD3 model의 소개와 해당 소스코드를 제공하기 위해 작성되었다. 기존에 있는 소스코드를 그대로 사용하고 멀티플랫폼에서도 돌아갈수 있게 CMake를 이용한 컴파일이 가능하도록 환경을 추가한 것임을 밝힌다.


최근에 Skeleton Animation자료를 찾고 있던 와중에 괜찮은 사이트를 하나 발견했다.


해당사이트 가기

http://3dgep.com/?p=1053


MD5란 유명한 게임 DOOM3에서 사용된 모델들의 포맷인데 모델들의 Mesh정보와 함께 Skeleton animation 데이타도 같이 들어가 있고 관련된 소스및 기술자료도 많이 공개되어 있어 3D 엔진을 공부하는 개발자들에게 유용한 자료를 제공해주고 있다.


해당사이트에서는 소스 공개와 함께 설명까지 들어가 있어서 골격 에니메이션이 어떻게 동작하는지 공부할수 있게끔 도와주고 있는데 한가지 문제가 제공되는 소스코드가 윈도우즈용 비주얼 스튜디오에서만 돌아가게끔되어 있어서 이글을 작성하는 맥에서는 컴파일이 안된다는 점이었다. 해서 CMake를 이용하여 윈도우즈뿐만 아니라 맥에서도 컴파일 할 수 있게끔 소스를 추가하여 아래에서 제공한다.

관련 동영상은 원사이트에 나와 있으니 여기에서 생략한다.


[English]


Recently, I have searched for skeleton animation and found a very good introductive(?), actually not that super easy introductive to me, posting about MD5 model viewer. In that site, the original author wrote about MD5 model format and providing the model viewer source code what I wanted to find so desperately. 


The one problem is what I am using MAC for now and the only available build environment to compile the sources is visual studio project which is not available in MAC. So in order to make it compile even on MAC, I made some change into the original files and that is CMake integration.


So here I put cmake version below and someone who want other platform version such as Linux and MAC can use happily this version. Please find the below link for download.


Thanks for the original great posting to Jeremiah van Oosten.

Original link: http://3dgep.com/?p=1053


Original source code download :

https://docs.google.com/leaf?id=0B9NpHNF2In_uZDViNGM0MTYtNmQzNS00Zjg4LTgwMjItODkzNjE4ZWQ4M2Qx&sort=name&layout=list&num=50


CMake integrated version. Download here.

MD5Loader.tar.bz2






Posted by kevino
,

하나의 소스로 윈도우즈, 리눅스, 맥과 같은 다른 운영체제에서 돌아가는 그래픽 관련 애플리케이션을 작성할때 가장 좋은 구성을 개인적으로 QT 와 cmake패키지의 조합으로 본다. 이와 같은 구성으로 OpenGL이나 OpenCL까지 포함하는 패키지를 구성할 수 있으니 괜찮은 조합으로 생각되어 실제 작성해본 경험을 살려 실제 구동 가능한 소스를 짜는 방법에 대해 설명한다.


본 예제를 컴파일하기 위해 필요한 패키지를 적으면 다음과 같다.


1. CMake v2.8

2. QT 4.8


또한 이 예제는 Windows7과 MAC에서 작성되었다. 그리고 주의할점은 이글의 목적은 어느정도 QT와 Cmake를 사용해본 경험이 있는 사람들을 대상으로 한 것으로 중간에 도움이 될 부분이 필요한 사람들이 읽으면 좋은 수준으로 작성되었슴을 알린다.


애플리케이션 목표기능은 다음과 같다.

OpenGL을 이용하여 화면에 삼각형 출력. 대략 아래와 같은 화면을 출력하는 앱을 작성한다.




작업진행 순서

1. 소스 준비: 소스파일과 헤더 파일 그리고 ui파일을 준비한다.

2-1. qt project생성해서 컴파일 하는 방법

2-2. cmake를 이용한 컴파일 방법



우선 폴더를 하나 만들고 아래의 3개 소스를 작성한다.


main.cpp

GLWidget.h

GLWidget.cpp



다 작성했으면 main.cpp, GLWidget.cpp GLWidget.h 이렇게 세개의 파일이 생겼을 것이다.


그러면 두가지 컴파일 방법이 있는데 우선 쉬운 QT Project를 만드는 방법에 대해 설명한다.


1. QT project 작성


qt를 설치할때 같이 설치되는 qmake를 이용해서 프로젝트 파일을 만드는데 이때 옵션으로 필요한 부분을 추가할수 있는데 여기에서는 OpenGL를 이용하므로 이를 포함시킬수 있는 옵션을 같이 준다.

> qmake -project QT+="core gui opengl"


이렇게 하고 나면  .pro파일이 하나 생길 것인데 이를 QTCreator에서 불러서 컴파일 하면 된다.

이때 부가적으로 Makefile를 생성할 수도 있는데 다음의 명령어를 주면된다.


For MAC: > qmake -spec macx-g++ app.pro

For Window: > qmake app.pro


2. CMake를 이용한 빌드 방법

CMakeLists파일을 작성해야 하는데 문법을 미리 숙지할 필요가 있다. 필자의 여유부족으로 여기에서는 완성된 소스만 보여주고 넘어가기로 한다. 다음 파일을 작성한다.


CMakeLists.txt

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)


SET(TARGET qtglTest)

PROJECT(${TARGET})

SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)


SET(${TARGET}_HEADERS GLWidget.h)

SET(${TARGET}_SOURCES main.cpp GLWidget.cpp)


# Qt4

set(QT_USE_QTOPENGL TRUE)

#FIND_PACKAGE(Qt4 4.6.0 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)

FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED)


FIND_PACKAGE(OpenGL)

FIND_PACKAGE(GLUT)

FIND_PACKAGE(GLEW)



QT4_WRAP_CPP(${TARGET}_HEADERS_MOC ${${TARGET}_HEADERS})



INCLUDE(${QT_USE_FILE})

ADD_DEFINITIONS(${QT_DEFINITIONS})


#ADD_DEFINITIONS(-DOBJ_SOURCE_DIR="${${TARGET}_SOURCES}")

MESSAGE ("-- ${TARGET}_SOURCES: ${${TARGET}_SOURCES}")

MESSAGE ("-----------------------------------------")

MESSAGE ("-- QT_INCLUDE_DIR: ${QT_INCLUDE_DIR}")

MESSAGE ("-- QT_LIBRARIES: ${QT_LIBRARIES}")


INCLUDE_DIRECTORIES(

    ${QT_INCLUDE_DIR}

    ${GLUT_INCLUDE_DIR}

    ${OPENGL_INCLUDE_DIR}

    ${GLEW_INCLUDE_PATH}

)



ADD_EXECUTABLE( ${TARGET} ${${TARGET}_SOURCES} ${${TARGET}_HEADERS_MOC})

TARGET_LINK_LIBRARIES ( ${TARGET}

    ${QT_LIBRARIES}

    ${GLUT_LIBRARIES}

    ${OPENGL_LIBRARIES}

    ${GLEW_LIBRARY}

)

#TARGET_LINK_LIBRARIES(clTut ${OPENCL_LIBRARY})



작성이 되었으면 다음의 순서를 진행하여 컴파일 한다.

> mkdir build
> cd build
> cmake ..
> make


이 결과로 생긴 앱을 실행하면 위의 화면을 볼 수 있다.


여기서 필요한 몇가지 cmake 스크립트 파일에 대한 설명을 하지 않았는데 다음의 파일을 받아서 소스폴더에 cmake이름의 폴더를 만들고 집어넣고 위의 명령어를 실행해야 오류가 생기지 않음을 언급해둔다.


전체 소스 파일 받기


qtglTest.zip




Posted by kevino
,

Will be updated if any tip is founded in Unix area.


1. GCC


a. How to check gcc default settings

    >> echo "" | g++ - -xc -v -E


b. How to see a full list of compiler defined macro.

>> gcc -dM -E - < /dev/null


2. Ubuntu

a. Installation of 32 bits libraries which enable to run 32 bit app on Ubuntu 64 bits ( Simpler method than b)

$ echo foreign-architecture i386 | sudo tee /etc/dpkg/dpkg.cfg.d/multiarch
$ sudo apt-get update
$ sudo apt-get install ia32-libs


b. Installation of 32 bits libraries which enable to run 32 bit app on Ubuntu 12.04 64 bits( I recommend use above way instead of this because a is much simpler. )



Answer: Refer to below description

(Original source: http://askubuntu.com/a/190419)


I had a similar problem with broken dependencies when trying to install wine and acroread, and a complaint when trying to install ia32-libs-multiarch, just after upgrading to 12.04 from 11.04 (passing over 11.10). It seems that some ppa's I had in 11.04 installed newer versions of applications in the system. After upgrading, the remains of these apps seemed to do some mess in the dependencies.

The solution that seems to work (until now), was found on a german ubuntu board (http://forum.ubuntuusers.de, posts from user Lasall):

First a downgrade is required and done with the following: create the 'preferences' file:

sudo vi /etc/apt/preferences

and insert the following lines:

Package: *       
Pin: release a=precise*
Pin-Priority: 2012

enter:wq to write the file. Pin-Priority must be greater than 1000.

Then you may downgrade the offending applications with:

sudo apt-get dist-upgrade

Then you may install packages that complained about dependencies, like sudo apt-get install ia32-libs-multiarch, or sudo apt-get install ia32-libs.

Finally, you should remove the file you just created:

sudo rm /etc/apt/preferences

because else no new updates would be found.

Hope this helps you too!



3. Continuous dmesg output (from: http://www.backtrack-linux.org/forums/showthread.php?t=35966)

Run dmesg | tail first so that you can see the end then run the following and it will update whenever/ if something changes from the above. 

Code:
 root@nerd:~#  watch --differences dmesg | tail

4. git usage

    - Create archive in zip format from repository.

       git archive --format zip --output /full/path/to/zipfile.zip master


5. cat multiple files into single file


cat $(ls frame-*.raw | sort -n -t - -k 2) > full.file


explanation


-n: sorts numerically
-t: field separator '-'
-k: sort on second field, in your case the numbers after the first '-'

$() : The standard output of command in $() is fed to cat.

Posted by kevino
,