android 2ndboot,GitHub - XVilka/2ndboot-ng: Motorola Milestone second bootloader from running kernel...

2ndboot-ng – this is a bootloader, which can boot custom boot image (including custom kernel + initrd) from any place/file.

It consists from:

- small kernel module, for creating device for booting/controlling boot

- small userspace program, which give for module boot image and flags

- universal bootloader, which can uses many places for booting: boot image file from nand flash, boot image from SD card, USB booting, and network booting

!!! FIRST YOU NEED THIS !!!

OMAP3430 Reference Manual http://www.xvilka.org/files/SWPU117D_FinalEPDF_02_18_2010.pdf

Linux Kernel Programming Book http://www.xvilka.org/files/ldd3_pdf.tar.bz2

For creating this program we need read thease resorses:

http://wiki.davincidsp.com/index.php/Secondary_Bootloaders_on_OMAP-L1x

http://wiki.omap.com/index.php/Main_Page

https://gforge.ti.com/gf/project/omapzoom/wiki/?pagename=FAQ-7%3A+Zoom-II+Android+NAND+booting

http://elinux.org/Kernel_XIP_Instructions_For_OMAP

http://lists.infradead.org/pipermail/barebox/2009-December/000162.html

http://209.85.135.132/search?q=cache:etUMZlUjOZkJ:not.freedsoftware.org/lemote-misc/git-mirror/linux_loongson.git/arch/arm/plat-mxc/include/mach/mx31.h+L2CC_BASE_ADDR&cd=5&hl=ru&ct=clnk&gl=ru

http://omappedia.org/wiki/Main_Page

http://omappedia.org/wiki/Bootloader_Project

http://elinux.org/OMAP_Power_Management

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:example_on-chip_sram

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:porting

http://omappedia.org/wiki/Linux_OMAP_Kernel_Project

http://omappedia.org/wiki/Linux_Getting_Started

http://git.openinkpot.org/contrib/reloaded-2.6.git/tree/

-----------------------------------BUILDING 2NDBOOT-NG------------------------

This is small reaceipts how you can build 2ndboot-ng

1. Download your device kernel, unpack this and create configs and headers:

make mapphone_defconfig

make headers_install ARCH=arm INSTALL_HDR_PATH=~/build/kern_h/

We have Motorola Milestone - so processor chip is TI OMAP3430 - ARM Cortex a8 (armv7-a arch)

(http://en.wikipedia.org/wiki/ARM_architecture). So you need use configs with -omap3430 suffix.

Set enviroment variable for building options:

export _XXCFLAGS=" -march=armv7-a -mtune=cortex-a8 -mfpu=neon"

2. Download crosstool-ng (http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool),

Unpack, build (you need for: make,install,bash,cut,sed,grep,gcc,awk,bison,flex,automake,libtool,stat,

wget,cvs,patch,tar,gzip,bzip2,lzma,readlink,ncurses, mpfr-dev, gmp-dev)

.configure

make

make install

3. Create dir toolchain-android, cd to it and copy files:

XVilka-crosstool-.config in .config

XVilka-uClibc-.config in uClibc.config

and then run:

ct-ng menuconfig

change anything, if you need, and save to .config

then exec:

ct-ng build

4. Done! We have toolchain in build/x-tools.

All tools have this triplet: arm-android-linux-uclibsgnueabi-*

just add them in PATH

export PATH=$HOME/build/x-tools/arm-android-linux-uclibcgnueabi/bin:$PATH

export CROSS_COMPILE=arm-android-linux-uclibcgnueabi-

export KERNEL_CROSS_COMPILE=arm-android-linux-uclibcgnueabi-

export CFLAGS=" -march=armv7-a -mtune=cortex-a8 -mfpu=neon"

So we can run:

arm-android-linux-uclibcgnueabi-gcc

Also we have system root directory in:

$HOME/build/x-tools/arm-android-linux-uclibcgnueabi/arm-android-linux-uclibcgnueabi/sys-root

For some reasons we just copy it in $HOME/build/cross/sys-root

chmod +w sys-root

chmod +w sys-root/usr

chmod +w sys-root/usr/lib

6. Build kernel

make mapphone_defconfig

make

7. Building module

In directory hbootmod run:

make -C $HOME/build/kernel M=`pwd` modules

or simply "make"

You can clean directory by command:

make -C $HOME/build/kernel M=`pwd` clean

or simply "make clean"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值