Giter VIP home page Giter VIP logo

2ndboot-ng's Introduction

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-<suffix>.config in .config
XVilka-uClibc-<suffix>.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"

2ndboot-ng's People

Contributors

xvilka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.