fastboot 烧写内核

夏新N80手机,很久没用,今天想试试自己的kernel性能,插上进不了串口,问人才知道OBM关了开机进入串口模式,得开机时按下 向下键才能进入串口模式,而且N80的bug,还不能插上串口开机,
不如试试fastboot 烧 kernel记录如下,防止忘记:
先下载fastboot工具放在桌面上,然后:
b186@b186-desktop:~/桌面$ sudo ./fastboot erase boot
sudo: ./fastboot: command not found
b186@b186-desktop:~/桌面$ chmod +x fastboot
b186@b186-desktop:~/桌面$ sudo ./fastboot erase boot
< waiting for device >
erasing 'boot'... OKAY
b186@b186-desktop:~/桌面$ sudo ./fastboot flash boot ~/svn/lnx2632pxa/arch/arm/boot/zImage
sending 'boot' (1916 KB)... OKAY
writing 'boot'... OKAY
b186@b186-desktop:~/桌面$ sudo ./fastboot reboot
rebooting... 

顺便贴点公司共享服务器上的其他相关:

Uboot and Fastboot commands

From $1

Table of contents
No headers

erase command

command [offset] [size]
nand erase 0x920000 0x280000
onenand erase 0x920000 0x280000

write command

command [ddr address] [offset] [size]
nand write 0x1000000 0x920000 0x280000
onenand write 0x1000000 0x920000 0x280000

read command

command [ddr address] [offset] [size]
nand read 0x1000000 0xa40000 0x80000
onenand read 0x1000000 0xa40000 0x80000

Common commands

TTC_DKB>> tftp zImage
TTC_DKB>> w -k               // burn kernel
TTC_DKB>> tftp uboot
TTC_DKB>> w -u               // burn uboot
TTC_DKB>> tftp ramdisk
TTC_DKB>> nw_ramdisk -n //burn normal ramdisk
TTC_DKB>> nw_ramdisk  -r //burn recovery ramdisk
TTC_DKB>> nw_ramdisk  w 0x100000  //burn ramdisk to a special address

Fastboot burn image

1. download the attachment
2. enter uboot, input command "fb" to enable fastboot function.
   TTC_DKB>> fb
3. Input these commands on PC to burn image,
sudo ./fastboot burn [image name] [-z {raw image}|-y {yaffs}] [offset in NAND]
sudo ./fastboot burn erase 0x920000 0x280000   //earse zImage
sudo ./fastboot burn zImage -z 0x920000 //burn zImageif ramdisk.img size is 512K, we can use following command to burn ramdisk.
sudo ./fastboot burn erase 0xba0000 0x80000   //earse ramdisk
sudo ./fastboot burn ramdisk_len.img -z 0xba0000 //burn ramdisk


sudo ./fastboot erase system   //erase system
sudo ./fastboot flash system system.img  //burn system
sudo ./fastboot burn system.img -y 0xf20000 //burn system
sudo ./fastboot erase opl      //erase opl
sudo ./fastboot flash opl opl.img    //burn opl
sudo ./fastboot burn opl.img -y 0xcf20000 //burn opl
sudo ./fastboot erase userdata   //erase userdata
sudo ./fastboot flash userdata userdata.img   //erase userdata
sudo ./fastboot burn userdata.img -y 0x118a0000 //burn userdata

sudo fastboot burn erase 0x120000  0x800000 //erase the whole cp
sudo fastboot burn Arbel.bin -z 0x120000  //flash the arbel
sudo fastboot burn TTC1_M06_AI_A0_Flash.bin  -z 0x820000 //TTC

Total command

sudo fastboot burn erase 0x920000 0x280000 ; sudo fastboot burn zImage -z 0x920000;sudo fastboot burn erase 0xba0000 0x80000 ;sudo fastboot burn ramdisk_len.img -z 0xba0000;sudo fastboot erase system;sudo fastboot burn system.img -y 0xf20000;sudo fastboot erase opl;sudo fastboot burn opl.img -y 0xcf20000;sudo fastboot erase userdata;sudo fastboot burn userdata.img -y 0x118a0000;sudo fastboot burn erase 0x120000  0x800000;sudo fastboot burn Arbel.bin -z 0x120000;sudo fastboot burn TTC1_M06_AI_A0_Flash.bin  -z 0x820000;sudo fastboot reboot;

Fastboot HowTO (JIL: QCOM)

From $1

Table of contents
No headers

What is fastboot?
Fastboot is protocol used to update the flash filesystem in Android devices from a host over USB. It allows flashing of unsigned partition images.
=================================================================
File structrues of JIL fastboot(beta2 only):
.
|-- Makefile
|-- README
|-- legacy
|   |-- README
|   |-- arch_qsd8k
|   |   |-- Makefile
|   |   |-- clock.c              //set up the ARM core clock(to 998MHz)
|   |   |-- gpio.c               //gpio-setting functions
|   |   |-- hsusb.c              //usb controler driver.
|   |   |-- lcdc.c               //***LCDC driver, set the reslustion&color bit. (check the marcos)
|   |   |-- logo.h               //***define the logo in BMP format.
|   |   |-- mddi.c               //***MDDI driver, set the reslustion&color bit. (check mddi_set_caps())
|   |   |-- mddi_console.c       //console driver to display information on LCD during boot. call mddi_init() to initialize/config the panel/LCDC.
|   |   |-- nand.c               //***nand driver.
|   |   |-- shared.c             //share memory driver.
|   |   |-- smem.c               //share memory driver.
|   |   |-- uart.c               //uart driver.
|   |   `-- vic.c                //define the functions used to config the ISR.
|   |-- fastboot_protocol.txt
|   |-- include
|   |   |-- boot
|   |   |   |-- arm.h
|   |   |   |-- board.h
|   |   |   |-- boot.h
|   |   |   |-- bootimg.h
|   |   |   |-- flash.h
|   |   |   |-- font5x12.h
|   |   |   |-- gpio.h
|   |   |   |-- gpio_keypad.h
|   |   |   |-- tags.h
|   |   |   |-- uart.h
|   |   |   |-- usb.h
|   |   |   `-- usb_descriptors.h
|   |   `-- qsd8k
|   |       |-- dmov.h
|   |       |-- gpio.h
|   |       |-- gpt.h
|   |       |-- hsusb.h
|   |       |-- irqs.h
|   |       |-- lcdc.h
|   |       |-- mddi.h
|   |       |-- mdp.h
|   |       |-- nand.h
|   |       |-- shared.h
|   |       |-- uart.h
|   |       `-- vic.h
|   |-- libboot                             //helper functions used to bootup the phone.
|   |   |-- Makefile
|   |   |-- flash.c                         //handle patition info.
|   |   |-- gpio_keypad.c                   //implement keypad polling/initial logic.
|   |   |-- init.c                         
|   |   |-- poll.c                          //init poll framwork.
|   |   |-- tags.c                          // handle the tags SENT to bootloader
|   |   |-- tags_cmdline.c                 
|   |   |-- tags_partition.c
|   |   |-- tags_revision.c
|   |   `-- tags_serialno.c
|   |-- libc                                //common usage lib. HW independent.
|   |   |-- Makefile
|   |   |-- cprintf.c
|   |   |-- crypto.c
|   |   |-- dprintf.c
|   |   |-- inttypes.h
|   |   |-- libc_private.h
|   |   |-- malloc.c
|   |   |-- memcmp.c
|   |   |-- memcpy.c
|   |   |-- memset.c
|   |   |-- rsa.c
|   |   |-- rsa.h
|   |   |-- sha.c
|   |   |-- sha.h
|   |   |-- sprintf.c
|   |   |-- strcmp.c
|   |   |-- strcpy.c
|   |   |-- strlen.c
|   |   |-- strstr.c
|   |   `-- xprintf.c
|   `-- usbloader
|       |-- Makefile
|       |-- init.S                           //the entry of bootloader, setup the ARM core then jump to main.c 
|       |-- main.c                           //initialize the GPIO, keypad, LCD, NAND and USB etc. control flash SW/load kernel+ramdisk.
|       |-- usbl_off_chg.c
|       `-- usbloader.c                      //implement the fastboot protocol.
|-- setup.sh                                 //setup the building environment. run it before start new build.
|-- tools
|   `-- mkbootimg                            //tool used to generate the boot.img which is consist of hearder, zImage, and ramdisk.
|       |-- Android.mk
|       |-- bootimg.h
|       `-- mkbootimg.c
`-- vendor
    |-- qcom
    |   |-- qsd8250_bigcreek
    |       `-- boot
    |           |-- Makefile
    |           |-- board.c                  //***define partitions, default cmdline, and enable the URAT. depand on HW.
    |           |-- boot.ld
    |           |-- keypad.c                 //***GPIO configuration/mapping for keypad, depand on HW.
    |           |-- panel.c                  //***initialize the panal. FEATURE_BCK_COMMON for LCDC, FEATURE_DH970V_FIH for MDDI. lcdc_samsung_320x480_init_table[] is current setting.
    |           |-- tests
    |           |   |-- irqtest.c
    |           |   `-- timertest.c
    |           `-- tools
    |               `-- mkheader.c           //the bootloader have an 40-bytes header used to save the meta data. this is the generator.
    `-- qcom-proprietary
        `-- hardware
            `-- scorpion                     //these files are used to setup up the ARM A8 core, and we can get them from Qualcomm release.
                |-- sc_sa_fuse_ro.S
                |-- scorpion_armv7_macros_gas.h
                `-- scorpion_sysini_gas.h
=======================================================================================
How to change the partition setting:
change vendor/qcom/qsd8250_bigcreek/boot/board.c :: PTABLE[].
=====================================================
How to support new panel(LCDC):
1.reslustion&color:
    change marcos definition in legacy/arch_qsd8k/lcdc.c ::
    LCDC_FB_PHYS
    LCDC_FB_BPP
    LCDC_FB_WIDTH
    LCDC_FB_HEIGHT
    LCDC_HSYNC_PULSE_WIDTH_DCLK
    LCDC_HSYNC_BACK_PORCH_DCLK
    LCDC_HSYNC_FRONT_PORCH_DCLK
    LCDC_HSYNC_SKEW_DCLK
    LCDC_VSYNC_PULSE_WIDTH_LINES
    LCDC_VSYNC_BACK_PORCH_LINES
    LCDC_VSYNC_FRONT_PORCH_LINES
2.panel setting:
    create new init_table[]
======================================================
How to support new nand:
add new entry in legacy/arch_qsd8k/nand.c :: supported_flash[].
=====================================================
How to change the key used to enter the flash mode:
change vars in vendor/qcom/qsd8250_bigcreek/boot/keypad.c ::
    halibut_row_gpios[]
    halibut_col_gpios[]
    halibut_key_map[]
====================================================
How to support flashing new added partition:
change legacy/usbloader/usbloader.c ::
static void usb_rx_cmd_complete(struct usb_request *req, unsigned actual, int status)
{
..........
#ifdef BIGCREEK_QSD8K
        if (rx_length > (128*1024*1024)) {   //change the "128" to the bigest image size
#else
......... 
        if(!strcmp(ptn->name,"system") || !strcmp(ptn->name,"userdata") ||
           !strcmp(ptn->name,"opl")    || !strcmp(ptn->name,"local")    ||
           !strcmp(ptn->name,"cache")) {     //add new partitions image name to here if they are yaffs2 images.
            extra = 64;
        } else {
.........
}
===================================================
Known issue:
Some buffers(frame buffer .etc) use fixed address which may overlape with other(usb buffer .etc) then cause issues.
=======================================================================

****************************************************************************************************************************

Fastboot usage:

1) HowTO create boot.img:
==============================
./mkbootimg --kernel zImage-borqs --ramdisk ramdisk.img -o boot.img
2) HowTO flash:
==============================

i) Press power key + home key enter fastboot mode.

ii) Connect to PC via USB cable and flash mobile using below commands:
sudo ./fastboot flash boot boot.img
sudo ./fastboot flash system system.img
sudo ./fastboot flash opl opl.img

Log (mobile station side):

========================

USB FastBoot:  V0.5
Machine ID:    1008000 v0
Build Date:    Jun 30 2009, 09:20:37
...
boot_from_flash: 0
usb: online (highspeed)                <-- waiting for command/data from PC
> download:05bd2500                 <-- downloading
recv data addr=16008000 size=05bd2500
> flash:system                               <-- flashing
writing 96281856 bytes to 'system'
writing 'system' (96281856 bytes)skipping @ 753 (bad block)
flash_write_image: bad block @ 753
flash_write_image: success
partition 'system' updated
 - OKAY

Log (PC side):

========================

[leohe@4Q49B2X:~/work/device/kernel/branches/test/tiger]$ sudo ../fastboot flash system system-new.img
< waiting for device >
sending 'system' (93984 KB)... OKAY
writing 'system'... OKAY
[leohe@4Q49B2X:~/work/device/kernel/branches/test/tiger]$ sudo ../fastboot flash opl opl.img
< waiting for device >
sending 'opl' (47150 KB)... OKAY
writing 'opl'... OKAY
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
本火锅店点餐系统采用Java语言和Vue技术,框架采用SSM,搭配Mysql数据库,运行在Idea里,采用小程序模式。本火锅店点餐系统提供管理员、用户两种角色的服务。总的功能包括菜品的查询、菜品的购买、餐桌预定和订单管理。本系统可以帮助管理员更新菜品信息和管理订单信息,帮助用户实现在线的点餐方式,并可以实现餐桌预定。本系统采用成熟技术开发可以完成点餐管理的相关工作。 本系统的功能围绕用户、管理员两种权限设计。根据不同权限的不同需求设计出更符合用户要求的功能。本系统中管理员主要负责审核管理用户,发布分享新的菜品,审核用户的订餐信息和餐桌预定信息等,用户可以对需要的菜品进行购买、预定餐桌等。用户可以管理个人资料、查询菜品、在线点餐和预定餐桌、管理订单等,用户的个人资料是由管理员添加用户资料时产生,用户的订单内容由用户在购买菜品时产生,用户预定信息由用户在预定餐桌操作时产生。 本系统的功能设计为管理员、用户两部分。管理员为菜品管理、菜品分类管理、用户管理、订单管理等,用户的功能为查询菜品,在线点餐、预定餐桌、管理个人信息等。 管理员负责用户信息的删除和管理,用户的姓名和手机号都可以由管理员在此功能里看到。管理员可以对菜品的信息进行管理、审核。本功能可以实现菜品的定时更新和审核管理。本功能包括查询餐桌,也可以发布新的餐桌信息。管理员可以查询已预定的餐桌,并进行审核。管理员可以管理公告和系统的轮播图,可以安排活动。管理员可以对个人的资料进行修改和管理,管理员还可以在本功能里修改密码。管理员可以查询用户的订单,并完成菜品的安排。 当用户登录进系统后可以修改自己的资料,可以使自己信息的保持正确性。还可以修改密码。用户可以浏览所有的菜品,可以查看详细的菜品内容,也可以进行菜品的点餐。在本功能里用户可以进行点餐。用户可以浏览没有预定出去的餐桌,选择合适的餐桌可以进行预定。用户可以管理购物车里的菜品。用户可以管理自己的订单,在订单管理界面里也可以进行查询操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值