Firefly Open Source Community

Title: Kernel 3.14 or above for ubuntu 14.04 is required [Print This Page]

Author: tedd77    Time: 2/1/2016 02:46
Title: Kernel 3.14 or above for ubuntu 14.04 is required
Hello,

My device is Firefly-RK3288 running ubuntu  flashed from:
Firefly-RK3288_Ubuntu14.04_201501271612.img

Is there a build for UBUNTU image with a newer kernel than 3.10 ? I am working on an application where it requires to update according to the kernel version.
output of the following command :  

apt-get install -y linux-headers-`uname -r`

Returns the following errors :
E: Unable to locate package linux-headers-3.10.0
E: Couldn't find any package by regex 'linux-headers-3.10.0'

I would really appreciate if someone can help.
Author: tedd77    Time: 3/3/2016 00:56
Hello,

Unfortunately I lost interest into Firefly and moved to NUC from Intel.
It is really sad not to see linux development for the Firefly, while the the focus is on Android only.

Well could not wait longer and I am happy with the NUC, more versatile and flexible.

Good luck Firefly while I see you need more than luck though.
Author: busybee    Time: 3/4/2016 15:35
Sorry @tedd77 .  We'd like to listen to your advice about Linux development for Firefly.

Would you like the mainline kernel running on the board and more recent Linux distribution?
Or something else?
Author: FesterBester38    Time: 3/4/2016 17:49
busybee Posted at 3/4/2016 15:35
Sorry @tedd77 .  We'd like to listen to your advice about Linux development for Firefly.

Would yo ...

Hello,

I¡¯d like this kind of stuff me too. Also if you have the time to evaluate the RT patches on the RK3288 it would be great for me. I don¡¯t feel confident enough in my linux skills to do that kind of work myself

I also share the feeling of tedd77 about the linux support vs the android one. I can easily understand why this is the case because the commercial applications of the RK3288 have been mainly TV boxes for which the android OS is good. My projects on the contrary are focused on usage where the main concern is the real time behaviour, the CPU efficiency (I need to do  a lot of computation), and my GUI needs are rather limited.

The CPU is the main point for me, that¡¯s why I posted a question on this forum concerning the RK3399 (based on 2 Cortex-A72 cores).

To finish on a positive note, I want to say that I greatly appreciate that you have made available such boards for anyone. Thank you for that.

Author: tedd77    Time: 3/10/2016 02:34
Hello busybee,

I am ready to give it a chance, but to be honest I am not a geek in linux.
If you are ready to guide me through then please let us proceed.
I read about mainline and it was not advisable to use it, I do not care about the version as much as I care about supported Kernels. I searched everywhere on the internet for the Kernel 3.10 that you currently have and it is not available.
I am unable to compile some softwares due to the lack of kernel headers and that is why I had to move to NUC since everything was available.
Your board is not cheaper than NUC by the way however it is smaller and that is why I am ready to give it another try if you are serious about your offer to help.
Please let me know at your earliest.
Finally my other disappointment was the time t-firefly took to consider my post and to react to it.

Author: tedd77    Time: 3/10/2016 18:50
busybee Posted at 3/4/2016 15:35
Sorry @tedd77 .  We'd like to listen to your advice about Linux development for Firefly.

Would yo ...

Hello busybee,

I am waiting for your reply.

Author: busybee    Time: 3/12/2016 11:27
Please read the wiki page here:

http://wiki.t-firefly.com/index. ... 288/Build_kernel/en

Feel free to post any problem you meet here.

Author: tedd77    Time: 3/15/2016 07:35
busybee Posted at 3/12/2016 11:27
Please read the wiki page here:

http://wiki.t-firefly.com/index.php/Firefly-RK3288/Build_kernel/e ...

Hello,

I am having an issue.
Do I have to replace the /path/to/prebuilts with something else ?
If not then the command
make -j8 firefly-rk3288.img is failing with path not found

Please advise
Author: busybee    Time: 3/15/2016 14:11
Yes, you have to replace it with the directory of your compiling toolchain.

Things will be easier if you have our Android SDK, which contains the toolchain.
Author: tedd77    Time: 3/15/2016 19:47
the link to get it from please ?
Author: Asuuga    Time: 3/15/2016 21:22
You can follow this wiki page to get the Android SDK : http://wiki.t-firefly.com/index.php/Firefly-RK3288/Build_android_lollipop/en#Download_Android_SDK
Author: busybee    Time: 3/16/2016 09:36
Last edited by busybee In 3/16/2016 09:41 Editor

As stated in the build kernel wiki page, you can go to

  https://android.googlesource.com ... s/android-4.4.2_r1/

to download the toolchain by:

  cd /PATH/TO/kernel
  cd ..
  mkdir prebuilts
  wget "https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/+archive/refs/tags/android-4.4.2_r1.tar.gz"
  tar xvf android-4.4.2_r1.tar.gz -C prebuilts/






Author: tedd77    Time: 3/17/2016 01:40
Last edited by tedd77 In 3/17/2016 01:43 Editor
busybee Posted at 3/16/2016 09:36
As stated in the build kernel wiki page, you can go to

  https://android.googlesource.com/platfor ...

I followed your instructions however I have errors


Should I run the command with sudo make -j8 firefly-rk3288.img
the error is : gcc: error: unrecognized argument in option ¡®-mabi=aapcs-linux¡¯
gcc: note: valid arguments to ¡®-mabi=¡¯ are: ms sysv
gcc: error: unrecognized command line option ¡®-mlittle-endian¡¯
gcc: error: unrecognized command line option ¡®-mno-thumb-interwork¡¯
make[2]: *** [scripts/mod/empty.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/selinux/genheaders/genheaders
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
gcc: error: unrecognized argument in option ¡®-mabi=aapcs-linux¡¯
gcc: note: valid arguments to ¡®-mabi=¡¯ are: ms sysv
gcc: error: unrecognized command line option ¡®-mlittle-endian¡¯
gcc: error: unrecognized command line option ¡®-mno-thumb-interwork¡¯
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/dtc-parser.tab.o
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/util.o
  HOSTLD  scripts/dtc/dtc
make: *** [scripts] Error 2


Should I run it without sudo the error is
make: home/admin1/prebuilts/bin/arm-eabi-gcc: Command not found
  CHK     include/generated/uapi/linux/version.h
  HOSTCC  scripts/conmakehash
  CC      scripts/mod/empty.o
  HOSTCC  scripts/sortextable
/bin/sh: 1: home/admin1/prebuilts/bin/arm-eabi-gcc: not found
make[2]: *** [scripts/mod/empty.o] Error 127
make[2]: *** Waiting for unfinished jobs....
  CC      scripts/mod/devicetable-offsets.s
/bin/sh: 1: home/admin1/prebuilts/bin/arm-eabi-gcc: not found
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 127
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CC      kernel/bounds.s
/bin/sh: 1: home/admin1/prebuilts/bin/arm-eabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2



My directory structure is :
admin1@ubuntu64b:~$ ls -l
total 79288
-rw-rw-r--  1 admin1 admin1 81172055 Mar 16 17:15 android-4.4.2_r1.tar.gz
drwxrwxr-x  9 admin1 admin1     4096 Mar 16 18:16 arm-eabi-4.6
drwxrwxr-x 29 admin1 admin1     4096 Mar 16 18:31 firefly-rk3288-kernel
drwxrwxr-x  8 admin1 admin1     4096 Mar 16 18:00 prebuilts
drwxrwxr-x  3 admin1 admin1     4096 Mar 16 17:32 rockchip-mkbootimg

the prebuilts directory structure is
drwxr-xr-x 4 admin1 admin1 4096 Mar 16 17:08 arm-eabi
drwxr-xr-x 2 admin1 admin1 4096 Mar 16 17:08 bin
drwxr-xr-x 2 admin1 admin1 4096 Mar 16 17:08 include
drwxr-xr-x 3 admin1 admin1 4096 Mar 16 17:08 lib
drwxr-xr-x 3 admin1 admin1 4096 Mar 16 17:08 libexec
drwxr-xr-x 6 admin1 admin1 4096 Mar 16 17:12 share
-rw-r--r-- 1 admin1 admin1 1577 Mar 16 17:08 SOURCES

and the bin directory inside the prebuilts, structure is :
-rwxr-xr-x 1 admin1 admin1  626840 Mar 16 17:08 arm-eabi-addr2line
-rwxr-xr-x 1 admin1 admin1  655232 Mar 16 17:08 arm-eabi-ar
-rwxr-xr-x 1 admin1 admin1 1198816 Mar 16 17:08 arm-eabi-as
-rwxr-xr-x 1 admin1 admin1  332792 Mar 16 17:08 arm-eabi-c++
-rwxr-xr-x 1 admin1 admin1  622296 Mar 16 17:08 arm-eabi-c++filt
-rwxr-xr-x 1 admin1 admin1  328696 Mar 16 17:08 arm-eabi-cpp
-rwxr-xr-x 1 admin1 admin1   27456 Mar 16 17:08 arm-eabi-elfedit
-rwxr-xr-x 1 admin1 admin1  332792 Mar 16 17:08 arm-eabi-g++
-rwxr-xr-x 1 admin1 admin1  328696 Mar 16 17:08 arm-eabi-gcc
-rwxr-xr-x 1 admin1 admin1  328696 Mar 16 17:08 arm-eabi-gcc-4.6.x-google
-rwxr-xr-x 1 admin1 admin1  105088 Mar 16 17:08 arm-eabi-gcov
-rwxr-xr-x 1 admin1 admin1 4122744 Mar 16 17:08 arm-eabi-gdb
-rwxr-xr-x 1 admin1 admin1 4122744 Mar 16 17:08 arm-eabi-gdbtui
-rwxr-xr-x 1 admin1 admin1  693624 Mar 16 17:08 arm-eabi-gprof
-rwxr-xr-x 1 admin1 admin1  942848 Mar 16 17:08 arm-eabi-ld
-rwxr-xr-x 1 admin1 admin1  942848 Mar 16 17:08 arm-eabi-ld.bfd
-rwxr-xr-x 1 admin1 admin1  635672 Mar 16 17:08 arm-eabi-nm
-rwxr-xr-x 1 admin1 admin1  806296 Mar 16 17:08 arm-eabi-objcopy
-rwxr-xr-x 1 admin1 admin1  989784 Mar 16 17:08 arm-eabi-objdump
-rwxr-xr-x 1 admin1 admin1  655232 Mar 16 17:08 arm-eabi-ranlib
-rwxr-xr-x 1 admin1 admin1  326904 Mar 16 17:08 arm-eabi-readelf
-rwxr-xr-x 1 admin1 admin1  854968 Mar 16 17:08 arm-eabi-run
-rwxr-xr-x 1 admin1 admin1  626744 Mar 16 17:08 arm-eabi-size
-rwxr-xr-x 1 admin1 admin1  626744 Mar 16 17:08 arm-eabi-strings
-rwxr-xr-x 1 admin1 admin1  806296 Mar 16 17:08 arm-eabi-strip

I even did git clone for the eabi4.6 same error.
donno hat is wrong please assist !!

Author: busybee    Time: 3/17/2016 17:55
There's no need to use sudo to compile the kernel.

I suggest you to start with the clean kernel source code, and run these commands in the new kernel directory:

export ARCH=arm
export CROSS_COMPILE=$HOME/prebuilts/bin/arm-eabi-
make firefly-rk3288-linux_defconfig
make -j8 firefly-rk3288.img

The kernel needs to locate "${CROSS_COMPILE}gcc" to compile source codes.
Author: tedd77    Time: 3/17/2016 22:42
Thank you . At least I am back on the right track. need to carry on with the rest of the list
Author: tedd77    Time: 3/17/2016 22:58
busybee Posted at 3/17/2016 17:55
There's no need to use sudo to compile the kernel.

I suggest you to start with the clean kernel s ...

Hello

I am now stuck at the following step: Modify Parameter File

Modify Parameter File

The root file system can reside on different partitions in different storage devices (eMMC, TF card or USB disk, etc). It must be specified in the kernel's command line. There is a CMDLINE in the paramter file:

<<my board is running on the eMMC only I have no usb nor tf card>>>>> please provide correct command

CMDLINE:console=ttyFIQ0 ... mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),...,-@0x00394000(user)

Add one of below according to your need: (# and contents after are comments, no need to enter):

root=/dev/block/mtd/by-name/linuxroot        # flash partition named "linuxroot"
root=/dev/mmcblk0p1          # First partition of TF card
root=/dev/sda1               # First partition of USB disk
root=LABEL=linuxroot         # Partition whose label is "linuxroot"


Not sure what to do here and what parameters to use in the command line.
The 2 last steps are vague for me if you can help.
As for flashing the board that has been done many time so there should be no issue.
Author: busybee    Time: 3/18/2016 09:30
I suggest that you extract the parameter file from your working board.

First install rkflashkit following this link:
  http://wiki.t-firefly.com/index. ... image/en#rkflashkit

Then:
   sudo rkflashkit backup @parameter parameter.txt

The info in parameter partition is saved as parameter.txt.

Edit parameter.txt as you pleased.  Generally speaking, you only need
to modify the partition layout prefixed with 'mtdparts='.

To flash back the parameter.txt to the board, run:
  sudo rkflashkit flash @parameter parameter.txt

Author: tedd77    Time: 3/20/2016 01:53
busybee Posted at 3/18/2016 09:30
I suggest that you extract the parameter file from your working board.

First install rkflashkit f ...

Hello Busybee,

My parameters are below :
FIRMWARE_VER:4.4.2
MACHINE_MODEL:rk30sdk
MACHINE_ID:007
MANUFACTURER:RK30SDK
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
#KERNEL_IMG: 0x62008000
#FDT_NAME: rk-kernel.dtb
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=tty0 console=ttyS2 earlyprintk root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00008000@0x00002000(resource),0x00008000@0x0000A000(boot),0x00002000@0x00012000(misc),0x0001a000@0x00014000(backup),-@0x0002e000(linuxroot)


In my case I assume that I only need to do the kernel image. I tried with androidtool to download image for kernel
The default Kernel address in Androidtool is 0x0000E000 and this address does not exist in my parameters file.

Thank you for your continuous help and assistance.
Author: busybee    Time: 3/21/2016 09:45
It seems that androidtool did not read the address from parameter info on board. You need to manully edit that address to match your parameter file.

Or you can use rkflashkit. It has both gui and command line, and it'll fetch the parition first from your board.

Simply run:
   sudo rkflashkit

to launch gui, or:
   sudo rkflashkit flash @boot /PATH/TO/boot.img
   sudo rkflashkit flash @resource /PATH/TO/resource.img

to update the boot.img(kernel+initramfs) and resource.img(logo+kernel dtb).



Author: tedd77    Time: 3/22/2016 19:45
busybee Posted at 3/21/2016 09:45
It seems that androidtool did not read the address from parameter info on board. You need to manully ...

Hello Busybee,
I succeeded to flash it to the board however I still have kernel 3.10.

I also noticed the following after running the command :
make INSTALL_MOD_PATH=./modules_install modules_install

INSTALL drivers/gpu/arm/midgard/mali_kbase.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  DEPMOD  3.10.0

Kernel 3.10.0 is of no use to me. Could you please investigate and let me know?
Author: busybee    Time: 3/24/2016 15:37
Hi @tedd77, what specific feature you'd like from kernel newer than 3.10 ?
Author: tedd77    Time: 3/24/2016 20:19
busybee Posted at 3/24/2016 15:37
Hi @tedd77, what specific feature you'd like from kernel newer than 3.10 ?

I wanted to compile some voice codecs and for that I should be able to run the following command without getting any errors.
apt-get install -y linux-headers-`uname -r`

I thought the purpose of the topic is to get a newer or a supported kernel version. The version 3.10 seems to be very old and not supported anymore.
Author: busybee    Time: 3/25/2016 18:03
According to https://www.kernel.org/ ,  version 3.10 is the LTS version, and it is the vendor version which is feature rich and stable.

We did not pack a linux-headers-xxx package, and you can not apt-get that from official repository.
This package only contains the linux kernel headers.

Since you have the kernel source code. It is farely easy build the module from it, by speicifying the kernel source directory in the command line. Please see the module readme.

Author: tedd77    Time: 3/25/2016 18:45
busybee Posted at 3/25/2016 18:03
According to https://www.kernel.org/ ,  version 3.10 is the LTS version, and it is the vendor versio ...

Hello ,
I am not a linux guru as I told you from the beginning, I would really appreciate if you can help me complete this task.
My goal is to be able to compile on your board without having issues related to linux headers.
Could you please send me the commands in order to overcome this obstacle?
----
Since you have the kernel source code. It is farely easy build the module from it, by speicifying the kernel source directory in the command line.  <<< do this on the firefly board or on my linux machine ? and what is the command ? >>>>>

Please see the module readme. <<<<< what module readme ? where is it ?>>>>>>
--------------
Thank you in advance
Author: busybee    Time: 3/30/2016 15:30
In your prevous post, you mention that
I wanted to compile some voice codecs and for that I should be able to run the following command without getting any errors.
"

The compiling is very specific. The readme should be in  doc of the voice codecs.
Author: tedd77    Time: 3/30/2016 16:51
Last edited by tedd77 In 3/30/2016 17:38 Editor
busybee Posted at 3/30/2016 15:30
In your prevous post, you mention that
"

Hello Busybee,

After letting me struggle for over a month, you finally realized that your image/board does not come with linux headers package. I am now more disappointed.
I do not regret giving you the benefit of the doubt, at least now I know that your board has a major handicap when it comes to linux. therefore I consider the time wasted a contribution from me towards those who are thinking of buying your board.

Today your board is a pure android oriented device so people trying to use it with Linux must understand that there are obstacles that cannot be overcome.

What does it take you to build an image with linux headers packed ? I am very confident that a huge community is looking for a powerful board like yours with  full fledged linux. At this point unfortunately I regret to say that it is not the case of your board.

Finally I do not expect a positive answer and I consider this case closed. I hope my experience will help Linux fans to think twice before making a decision.





Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1