Hikey960 UEFI切回FASTBOOT(针对那些刷了liunx的刷不回android的板子)
有一些客户反馈,hikey 960想刷机,发现不了fastboot设备,寄回来我们检测发现,客户刷了UEFI的boot,应该是按96board论坛里的贴子刷了内测版ubuntu,也就是刷了UEFI 的boot的缘故。
解决方法:
=======
OVERVIEW
1.Debian 系统使用的UEFI的bootloader
2.对于Hikey960而言,ANDROID最好使用fastboot的bootloader,其稳定度比UEFI要好。
=======
由于UEFI和fastboot差异非常大,所以需要通过recovery模式和工具进行切换,出货的的Android版本和Linaro的Android daily build版本都是基于fastboot的bootloader。
=======
RECOVERY
=======
请先阅读https://github.com/96boards-hikey/tools-images-hikey960,下载相应的代码和工具,
由于原厂没有释放recovery mode的windows usb驱动,一些操作需要在Linux的机器上完成
1)将板子设置成recoverymode
2)板子上电后在Linux机器上会多出一个usb tty 设备
3)基础代码刷入,执行recovery脚本,本示例中的/dev/ttyUSB0需要根据您本机的实际情况传入
红框中的错误是已知问题,请参考Linaro的文档
手动完成recovery-flash.sh 中因为红框中的错误而阻塞未能执行完成的部分
sudo fastboot flash nvme hisi-nvme.img
sudo fastboot flash fw_lpm3 hisi-lpm3.img
sudo fastboot flash trustfirmware hisi-bl31.bin
本过程完成的log如下
4)将板子的状态为fastbootmode,并将板子重新上电
5)通刷全版本
看这里
http://smartfire.cn/thread-752-1-1.html
6)板子恢复为正常启动状态,重新上电启动
特别鸣谢 润和-关工,感谢他写的教程。
你好,我按照你的教程执行到5)通刷全版本这一步时还是失败
log如下
"hikey960 Updating:"
C:\Users\tooan>fastboot flash xloader hisi-sec_xloader.img
error: cannot open 'hisi-sec_xloader.img'
C:\Users\tooan>fastboot flash ptable hisi-ptable.img
error: cannot open 'hisi-ptable.img'
"Update Failed!"
请按任意键继续. . . 风火轮用户43165 发表于 2018-6-25 16:42
你好,我按照你的教程执行到 这一步时还是失败
log如下
到这步了,你可以手动刷了,按原来的fastboot的方法,要拨码开关的 peter 发表于 2018-6-25 18:26
到这步了,你可以手动刷了,按原来的fastboot的方法,要拨码开关的
你好,我按照你的教程执行到5)通刷全版本 这一步时 前面刷入正常, 刷入 system.img提示失败
C:\Users\tooan\Desktop\share\hikey960_hynix_fw_201805_ufs\hikey960>fastboot flash system system.img
target reported max download size of 471859200 bytes
sending sparse 'system' (460796 KB)...
OKAY [ 10.704s]
writing 'system'...
FAILED (status read failed (Too many links))
finished. total time: 10.901s
"Update Failed!"
请按任意键继续. . . 本帖最后由 风火轮用户43165 于 2018-6-26 12:01 编辑
风火轮用户43165 发表于 2018-6-26 11:42
你好,我按照你的教程执行到5)通刷全版本 这一步时 前面刷入正常, 刷入 system.img提示失败
C:%user ...
这个问题解决了, 按照提示换个usb插口就好了, 可是刷完机后还是不停的重启 , log如下
\0hikey960 boarid:5301 xloader use UART6
scsysstat_value.
clear reset source
last_keypoint0,reboot_type0
secdbg not DCU.
SecDbgVer exit
xloader chipid is: 0x36600110, start at 370ms.
Build Date: Dec6 2017, 15:31:59
++
hikey960
hi3660
--
storage type is UFS
ufs retry: 6 count v_tx:0 v_rx:0
ufs set v_tx:0 v_rx:0
Hikey960 no need avs_init.
ddr ft:0xf20332a3,mode:1 target:4
UceLdOk
density: 0x08080808,0x08080808,0x08080808,0x08080808,0x08080808,0x08080808,0x08080808,0x08080808
ddr info 0x000004ff
400M
685M
1067M
C1R,V0x0000002f e:113
C0R,V0x00000030 e:66
C1R,V0x00000030 e:66
C0R,V0x00000031 e:66
C1R,V0x00000031 e:66
C3R,V0x00000031 e:113
C0R,V0x00000032 e:66
C1R,V0x00000032 e:66
C2R,V0x00000031 e:66
C3R,V0x00000032 e:66
C0R,V0x00000033 e:66
C1R,V0x00000033 e:65
C2R,V0x00000032 e:66
C3R,V0x00000033 e:66
C0R,V0x00000031 e:113
C1R,V0x00000031 e:66
C3R,V0x00000031 e:66
C0R,V0x00000032 e:66
C1R,V0x00000032 e:66
C2R,V0x00000031 e:66
C3R,V0x00000032 e:66
C0R,V0x00000033 e:66
C1R,V0x00000033 e:66
C2R,V0x00000032 e:66
C3R,V0x00000033 e:66
C0R,V0x00000034 e:66
C1R,V0x00000034 e:65
C2R,V0x00000033 e:65
C3R,V0x00000034 e:66
1244M
1866M
pack0Idx0Dcc:0
pack1Idx0Dcc:1
pack2Idx0Dcc:0
pack3Idx0Dcc:0
iomcu_subsys_init
boot_c0 PROFILE 4
slave1 irq0:0x00000004
main: ******** Fastboot for Kirin *****************
main: ******** Build Date: Jun2 2017, 17:34:24 **
main: ******** Fastboot start at 1870 ms **********
main: print soc_id computed in xloader phase, is below:
main: 00000000main: 00000000main: 00000000main: 00000000main:
main: 00000000main: 00000000main: 00000000main: 00000000main:
led_alwayson: can't get dtb operators
bbox: bbox_register_module_ops success.
bfm: : >>>>>enter bfm_init
bfm: : boot_fail_system state is 0
clock: PLL Stat
clock: PLL2 ctrl0=0x04909604,ctrl1=0x02000000
clock: PLL2 acpu en_stat:0x00000008, acpu gt_stat:0x00040000
clock: PLL2 final en_stat:0x00100000, final gt_stat:0x00020000
clock: PLL3 ctrl0=0x04904005,ctrl1=0x07000000
clock: PLL3 acpu en_stat:0x00000000, acpu gt_stat:0x00000000
clock: PLL3 final en_stat:0x00200000, final gt_stat:0x00040000
clock: clock init OK
ufs: ufs start on platformufs: ufs current mode: 0x00000011
ufs: ufs current gear: 0x00000003
ufs: ufs mphy reg 0x4A = 0x00000000
ufs: bUD0BaseOffset: 0x00000010, bUDConfigPLength: 0x00000010
ufs: UFS device manufacturerid = 0x000001ad
ufs: UFS device: H****
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02000001, mntnStageCode is 27
bfm: : <<<<<exit set_boot_stage.
storage: emmc_ops invalid
storage: storage type is UFS
bfm: : bfm system is disabled!
storage: emmc_init: BL2_STAGE_EMMC_OK is 33554435!
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02000003, mntnStageCode is 29
bfm: : <<<<<exit set_boot_stage.
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010001, mntnStageCode is 30
bfm: : <<<<<exit set_boot_stage.
ddr: current logic version is lpddr4 verison !!!
ddr: ddr size is 4096MB
bbox: register modid
bbox: register exception succeed.
bbox: register modid
bbox: register exception succeed.
bbox: register modid
bbox: register exception succeed.
watchdog: Enable watchdog start
boardid: boardid: 5301
gpio: hikey960_gpio_init: GPIO 46 202 206 ouput low, GPIO 219 pullup.
load_kernel: register_update_dt_ops for usb!
usb: random_serial: fastboot serial: 2131073001000000
secureboot: Enter secboot_init: set pll efuse flag!
secureboot: pll efuse flag has been succ set!bbox: register modid
bbox: register exception succeed.
secureboot: SECBOOT_DEV_INFO_DADDR = 0x1d7fff00, SECBOOT_DEV_INFO_SIZE = 0x00000040!
dtimage: number of dtb = 1
dtimage: =========uncompress_dtb_addr=,====vrl_addr=====
dtimage: Verify Not Exist
dtimage: fdt_init success!
dtimage: -----can not find hisilicon,fastboot node by compatible
dtimage: -----can not find hisilicon,fastboot node by compatible
load_kernel: register_update_dt_ops for led!
reboot_reason: scsysstat_value is 0x00000000
pmu: can not find fastboot,hisi-pmic-mntn node1
pmu: pmu_property_read_u32 fastboot,hisi-pmic-mntn, hisilicon,data-width, failed
pmu: pmu_mntn_record_dts_parse failed!
bbox: save_tempbuffer_to_loop_area():727:storage_read fail[-1]
reboot_reason: reboot_reason is AP_S_COLDBOOT
reboot_reason: clear_reset_source in!
reboot_reason: tmp =0x0effcc70
dtimage: -----can not find fastboot,charger node by compatible
power: get_chargerIC_type: getU32byCompatible fastboot,charger, hw_charger_type failed!
dtimage: -----can not find fastboot,coul node by compatible
power: get_coul_type: getcoul_type failed!
power: getcoul_type failed!
power: hi6421v500 register coulometer ops fail!
dtimage: -----can not find huawei,hisi_bci_battery node by compatible
no_module: : can't get battery board type
dtimage: -----can not find fastboot,charger node by compatible
no_module: get hi6523 i2c reg num fail!
dtimage: -----can not find fastboot,charger node by compatible
no_module: : get ichrg_pre_limit fail
dtimage: -----can not find huawei,hi6523_charger node by compatible
no_module: : get reg fail
dtimage: -----can not find fastboot,buckboost node by compatible
max77813: get_buckboost_type: getU32byCompatible fastboot,buckboost, hw_buckboost_type failed!
max77813: get dts buckboost type fail!
cpu_buck: pmu type3 not registered
cpu_buck: Bad cpu buck info:1
bbox: Could not find path /rdr
bbox: Could not find status property.
mntn: tele_mntn_stat_point_init: can not bbox_ops !
dtimage: -----can not find hisilicon,fastboot node by compatible
mntn: : getU32byCompatible(hisilicon,fastboot, lpm3-board-type) error!
mntn: mntn init
mntndump: enable_reserved_ddr_dts: Could not find path /reserved-memory/mntndump
mntndump: mntn_dump_init failed
mntndump: get_mntn_dump_addr:mid is not init
mntn: kernel dump is not available
mntn: reboot_type is 0
mntn:
no need to dump_mem...
mntn: enter
mntndump: get_mntn_dump_addr:mid is not init
mntn: no mdump_pstore info
mntn: M3_RDR_SYS_CONTEXT_BASE_ADDR is null
uart_cfg: :Could not find node.
uart_cfg: set_default_uart_cfg: uart_from_dts_read failed!
uart_cfg: module_idx 2, uart_no 6
uart_cfg: odule_idx 11, uart_no 15
uart_cfg: module_idx 2, uart_no 6
uart_cfg: getU32byCompatible(hisilicon,fastboot, uart-board-type) error!
uart_cfg: boardid: 5301 use uart port: 6
pasr: in pasr_init-43 ...ddr: current logic version is lpddr4 verison !!!
ddr: current logic version is lpddr4 verison !!!
dtimage: -----can not find huawei,lcd_panel_type node by compatible
display: get_detect_type: huawei,lcd_panel_type: get detect_type fail
display: lcd:no lcd detect_type
no_module: get_logo_buffer_from_dtsi: Could not find path /reserved-memory/logo-buffer.
no_module: logo_init: logo init failed!!! used the default fb addr.
display: jdi_nt35696_panel_init: lcd type is not JDI_NT35696_5P5_LCD.
display: jdi_otm2503b_panel_init: lcd type is not JDI_OTM2503B_5P5_LCD.
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010002, mntnStageCode is 31
bfm: : <<<<<exit set_boot_stage.
dtimage: -----can not find huawei,lcd_panel_type node by compatible
display: get_dts_value: can not get huawei,lcd_panel_type, bl_bus_id=4!
dtimage: -----can not find ti,lm36923 node by compatible
display: get_dts_value: can not get ti,lm36923, support=0!
display: get lm36923_support failed!
Audio_codec: :Could not find "hisilicon,codec-controller" node.
load_teeos: can not find fb node fingerprint
load_teeos: failed to find fb node ese_config
display: hisi_get_disp_info: hisifb_data is NULL pointer, return!
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010003, mntnStageCode is 32
bfm: : <<<<<exit set_boot_stage.
misc: mmc_read failed
preboot: : check_unlock_misc_info,line:1273 :get misc message failed.
preboot: : check_powerkey_misc_info,line:1242 :!!!!CAUTION!!!!:get keypad_operator FAIL!
preboot: : check_volumekey_state,line:943 :!!!!CAUTION!!!!:get keypad_operator FAIL!
misc: mmc_read failed
preboot: : comm_read_misc_cmd,line:501 :get misc message failed.
power: :g_coulometer_ops is null
power: :g_coulometer_ops is null
power: :initial coulometer fail!
preboot: : preboot_init,line:1480 :Hikey960 stub: set bootmode to normal_mode!
rescue: ^^^^^^^^^ ok !
usbloader: bootmode is 1
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010004, mntnStageCode is 33
bfm: : <<<<<exit set_boot_stage.
load_lpm3: start lpm3 loading
load_lpm3: load lpmcu image
tm: cluster0 prof0 trim result check fail:0,00000000,00000000
tm: cluster0 prof1 trim result check fail:0,00000000,00000000
tm: cluster0 prof2 trim result check fail:0,00000000,00000000
tm: cluster0 prof3 trim result check fail:0,00000000,00000000
tm: cluster0 prof4 trim result check fail:0,00000000,00000000
tm: cluster1 prof0 trim result check fail:0,00000000,00000000
tm: cluster1 prof1 trim result check fail:0,00000000,00000000
tm: cluster1 prof2 trim result check fail:0,00000000,00000000
tm: cluster1 prof3 trim result check fail:0,00000000,00000000
tm: cluster1 prof4 trim result check fail:0,00000000,00000000
tm: cluster1 prof5 trim result check fail:0,00000000,00000000
tm: cluster2 prof0 trim result check fail:0,00000000,00000000
tm: cluster2 prof1 trim result check fail:0,00000000,00000000
tm: cluster2 prof2 trim result check fail:0,00000000,00000000
tm: cluster2 prof3 trim result check fail:0,00000000,00000000
tm: cluster2 prof4 trim result check fail:0,00000000,00000000
tm: cluster2 prof5 trim result check fail:0,00000000,00000000
tm: cluster2 prof6 trim result check fail:0,00000000,00000000
tm: cluster2 prof7 trim result check fail:0,00000000,00000000
tm: C0
tm: p4
tm: path adjust:00000018
tm: svfd2:00000012
tm: svfd1:00000012
tm: svfd0:00000012
tm: p3
tm: svfd2:00000012
tm: svfd1:00000013
tm: svfd0:00000013
tm: C1
tm: p4
tm: path adjust:00000018
tm: svfd2:00000014
tm: svfd1:00000014
tm: svfd0:00000014
tm: p3
tm: svfd2:00000018
tm: svfd1:00000018
tm: svfd0:00000018
tm: p2
tm: svfd2:0000001a
tm: svfd1:0000001a
tm: svfd0:0000001a
tm: p1
tm: svfd2:0000001a
tm: svfd1:0000001a
tm: svfd0:0000001a
load_lpm3: do_lpnv_acpufreq_papa_option
load_lpm3: modify_pmu6422_para no bugfix
load_lpm3: LPM3 load success 0x89c80000
load_lpm3: SCPERRSTSTAT4_SEC fffffffc
load_lpm3: SCOCBCRSTCTRL 00000000
load_lpm3: SCPERCLKEN2 43e00001
load_lpm3: SCPERSTAT2 c7fa4c4f
load_lpm3: SCOCBCSTAT 00007250
load_lpm3: AOCLK_CTRL 00000725
load_lpm3: SCPERSTAT3 000014c7
load_lpm3: SCOCBCSTAT 00007250
load_lpm3: AOCLK_CTRL 00000725
load_lpm3: AOCLK_CTRL 00000225
load_lpm3: CFG_M3_RST_STA 00000000
load_lpm3: load ocbc success!
load_kernel: 0xC5 = 00000032
load_kernel: 0xCC = 00000003
bfm: : bfm system is disabled!
load_kernel: load_kernel CONFIG_WITHOUT_SECURE_OS is open
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010005, mntnStageCode is 34
bfm: : <<<<<exit set_boot_stage.
bfm: : bfm system is disabled!
load_kernel: is_system_damaged, the system verify is 1 in nvme!
mntn_err: can not get gui_ops!
dtimage: -----can not find gpio-leds_v2 node by compatible
led: ERROR: Cannot update gpio-leds_v2 info
load_kernel: update dt for led err
load_kernel: update dt for led suc
usb: usb update hisilicon,gpio_hubv2 info success
load_kernel: update dt for usb suc
load_kernel: Hikey960: Enable all ip regulator
pmu_ip: Hikey960:switch from PPLL0 to PPLL3
pmu_ip: Hikey960:Enable ispfunc
pmu_ip: Hikey960:Enable clock-gating
pmu_ip: all IP regulator is power on!
load_kernel: set ISP_CORE_CTRL_S to unsec, val = 0x00000007
load_kernel: set ISP_SUB_CTRL_S to unsec, val = 0x0000000f
bfm: : >>>>>enter set_boot_stage
bfm: : bootStageCode is 0x02010006, mntnStageCode is 35
bfm: : <<<<<exit set_boot_stage.
load_kernel: __get_cmdline: can not get audio_codec_ops!
power: :g_coulometer_ops is null
power: :g_coulometer_ops is null
display: hisi_get_disp_info: hisifb_data is NULL pointer, return!
cmdline: can not get display_info!
display: hisi_get_disp_info: hisifb_data is NULL pointer, return!
cmdline: can not get display_info!
display: hisi_get_disp_info: hisifb_data is NULL pointer, return!
pasr: info: ddr_die=2048M@0M ddr_die=2048M@2048M
cmdline: create_last_bootup_keypoint_cmdline,last_bootup_keypoint is invalid
cmdline: g_memdump_addr is 0
dtimage: -----can not find hisilicon,fastboot node by compatible
cmdline: bsp_need_loadmodem: getU32byCompatible hisilicon,fastboot, is_fpga failed!
cmdline: : cmdline add ddr_density 0x00000002!
no_module: create_mdmlog_cmdline: ret = 0 or nve bit = 48, would't create cmdline!!
display: hisi_get_disp_info: hisifb_data is NULL pointer, return!
cmdline: can not get display_info!
reboot_reason: set_reboot_type is 0x000000ff.
dtimage: -----can not find hisilicon,fastboot node by compatible
mntn: : getU32byCompatible error!
mntn: apwatchdog_status_is_ok: cannot find amba/watchdog0, ret=-1
watchdog: Disable watchdog start
ddr: current logic version is lpddr4 verison !!!
mem_cfg: memory section - 0000000000000000 : 0000000080000000 -
mem_cfg: memory section + 0000000000000000 : 0000000080000000 +
mem_cfg: memory section - 0000000080000000 : 0000000080000000 -
mem_cfg: memory section + 0000000080000000 : 0000000060000000 +
mem_cfg: memory section + 0000000200000000 : 0000000020000000 +
mem_cfg: Could not find /reserved-memory/ddr-training2.
mem_cfg: update_bl31_ddrc_info: secmem return wrong,may not a failure.
mem_cfg: update_fastboot_cma_bl31_ddrc_info: base 0x0000000016c00003 size 0x0000000004000000
usbloader: iddq is 0x0000000000000000
usbloader: hpm is 0x0000000000000000
usbloader: dieid is 0x0a04a0096f86060a37a2c49220c0341417884593
load_kernel: Hikey960: Enable all ip regulator
pmu_ip: Hikey960:switch from PPLL0 to PPLL3
pmu_ip: Hikey960:Enable ispfunc
pmu_ip: Hikey960:Enable clock-gating
pmu_ip: all IP regulator is power on!
load_kernel: set ISP_CORE_CTRL_S to unsec, val = 0x00000007
load_kernel: set ISP_SUB_CTRL_S to unsec, val = 0x0000000f
load_kernel:
----boot time is 3661 ms----
load_kernel: boot_from_bl31: boot to trusted firmware. addr=0x00000000
peter 发表于 2018-6-25 18:26
到这步了,你可以手动刷了,按原来的fastboot的方法,要拨码开关的
刷完机后还是不停的重启 , 帮忙看看
页:
[1]