Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Modifying and Flashing Kernel Image [Edited]

60

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
60

Modifying and Flashing Kernel Image [Edited]

Posted at 9/28/2015 02:34:15      View:6206 | Replies:2        Print      Only Author   [Copy Link] 1#
Last edited by sweckhoff In 9/28/2015 02:51 Editor

Hello,

I am trying to setup a workflow for modifying kernel sources and flashing them to the device. Initially, I am just doing some verification that the workflow is correct by placing a print statement in one of the probe methods.

Steps that I am following:
0. sudo upgrade_tool uf FirePrime_Ubuntu15.04_201508071519.img (This is to start from a know point.)
1. Modify kernel source in the SDK's kernel directory
2. make fireprime-linux_defconfig [1]
3. make -j8 rk3128-fireprime.img [1]
4. git clone -b fireprime https://github.com/TeeFirefly/initrd.git [1]
5. make -C initrd [1]
6. mkbootimg --kernel arch/arm/boot/zImage --ramdisk initrd.img -o linux-boot.img [1]
7. sudo upgrade_tool di -b linux-boot.img [1][2]

After resetting the device I get the following:

DDR Version 2.04 20150121
In
1A1A2A2B   0
1A1A2929   3
LPDDR2
29292929   F
Bus Width=32 Col=10 Bank=8 Row=14 CS=2 Die Bus-Width=32 Size=1024MB
mach:14
OUT
Boot1 Release Time: 2015-05-25, version: 2.25
ChipType = a 1374
No.1 FLASH ID:ad de 14 a7 42 4a
ECC:60
*Y[[�R+�W���j�4E�Ʌ��%��сz������Š�j��theLC�C�UK����&�LM�LLK���L&NKL��(Jun 12 2015 - 09:11:25)

CPU: rk3128
CPU's clock information:
    arm pll = 300000000HZ
    periph pll = 594000000HZ
    ddr pll = 600000000HZ
    codec pll = 400000000HZ
Board:        Rockchip platform Board
Uboot as second level loader
DRAM:  Found dram banks:1
Adding bank:0000000060000000(0000000040000000)
128 MiB
rk dma�.]KW�V�-+��j*RH��W-�V�V��R��WK�˫���5Rj�t��U,�X[C�,ZY�-H\X�X[Y�Y��success
Unknow param: MACHINE_MODEL:rk312x!
Unknow param: MACHINE_ID:007!
Unknow param: MANUFACTURER:RK30SDK!
failed to prepare fdt from boot!
power key: bank-3 pin-23
can't find dts node for ricoh619
can't find dts node for act8846
can't find dts node for rk808
++++ LDO3 write 0x03 to regular
cpu_det GPIO pull up
pmic:rk818
Can't find dts node for fuel guage cw201x
can't find dts node for ADC
SecureBootEn = 0, SecureBootLock = 0

#Boot ver: 2015-06-12#2.25
empty serial no.
checkKey
vbus = 1
use dc chg rk818_charger_setting iset1:0x79 chgiset:0x75 current 1
read logo_on switch from dts [1]
can't find power_ctr node for lcdc0
failed to find part:logo
Hit any key to stop autoboot:  0
boot/recovery image sha mismatch!
Unable to boot:boot
try to start recovery
failed to find part:recovery
'recovery' does not seem to be a partition nor an address
Unable to boot:recovery
try to start backup
failed to find part:kernel
ERROR: [rk_load_image_from_storage]: bootrk: bad boot or kernel image
Unable to boot:backup
try to start rockusb

I think this line is the issue:

boot/recovery image sha mismatch!
Unable to boot:boot

I am not sure though. I have also checked the partition sizes and everything should fit.

Any help would be appreciated. The Rockchip way is unfamiliar to me and I am failing to grasp what is wrong with my workflow.

Thanks!

[1] http://wiki.t-firefly.com/index.php/FirePrime/Build_kernel/en
[2] http://wiki.t-firefly.com/index.php/FirePrime/Flash_image/en
Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 9/28/2015 14:42:11        Only Author  2#
http://wiki.t-firefly.com/index.php/FirePrime/Build_kernel/en has been updated.
You need to do a truncate before mkbootimg:

  truncate -s "%4" initrd.img
  mkbootimg --kernel arch/arm/boot/zImage --ramdisk initrd.img -o linux-boot.img
Reply

Use props Report

60

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
60
Posted at 10/1/2015 09:48:48        Only Author  3#
Thank you that got it working.
Reply

Use props Report

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

This forum Credits Rules

Quick Reply Back to top Back to list