Firefly Open Source Community

   Login   |   Register   |
New_Topic
123
New Topic

Kernel 3.14 or above for ubuntu 14.04 is required

87

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
87
Posted at 3/15/2016 21:22:35     
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 3/16/2016 09:36:24     
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/





Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 3/17/2016 01:40:27     
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 !!
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 3/17/2016 17:55:41     
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.
Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 3/17/2016 22:42:35     
Thank you . At least I am back on the right track. need to carry on with the rest of the list
Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 3/17/2016 22:58:48     
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.
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 3/18/2016 09:30: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
Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 3/20/2016 01:53:30     
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.
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 3/21/2016 09:45:58     
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).


Reply

Use props Report

175

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
175
Posted at 3/22/2016 19:45:47     
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?
Reply

Use props Report

Return to List
123
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list