Coder Social home page Coder Social logo

psachin / linux-sunxi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linux-sunxi/linux-sunxi

0.0 2.0 0.0 881.7 MB

Linux source for Allwinner/Boxchip F20 (sun3i), A10 (sun4i) and A12/A13 (sun5i) SoCs

Home Page: http://linux-sunxi.org/Linux

License: Other

linux-sunxi's Introduction

STEPS TO BUILD KERNEL FOR AAKASH

For Kernel documentation please find README_kernel

COMPILING KERNEL

  1. Clone the repository by

    git clone https://github.com/androportal/linux-sunxi.git
    
  2. cd into linux-sunxi

    cd linux-sunxi
    
  3. Checkout to desired branch, it this case sunxi-3.0:

    git checkout sunxi-3.0
    
  4. Compile the a13_configuration

    make ARCH=arm a13_defconfig
    
  5. A13-OLinuXino customization can be done using

    make ARCH=arm menuconfig
    
  6. Install u-boot-tools:

    sudo apt-get install u-boot-tools
    
  7. To compile kernel download and install Sourcery CodeBench Lite Edition, then issue:

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage
    
  8. To make kernel modules

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- INSTALL_MOD_PATH=out modules
    
  9. To install modules in right path

    make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- INSTALL_MOD_PATH=out modules_install
    
  10. After successful compilation uImage will be available at arch/arm/boot/uImage and also find script.bin in the root of the directory(This section is subject to change)

KERNEL ON SDCARD

  1. Insert sdcard in card reader or MMC reader available in laptops/netbooks

  2. Backup all your sdcard data, and issue the following commands carefully, replace X in /dev/sdX with suitable letter(a lower case alphabet) alloted for your sdcard, remember X will never be a if you have a hard disk installed, so keep in mind it must be something like /dev/sdb or /dev/sdc etc. Please check twice and if you are still unsure leave this README right now otherwise you may end up with non bootable machine:

    sudo fdisk -u=sectors /dev/sdX
    
  3. Then create partition for kernel and filesystem in your sdcard, from inside fdisk prompt type p to list all partitions

    Command (m for help): p
    
  4. Now press d to delete your partition. If you have multiple partitions use partition number to delete each partition as shown by fdisk utility:

    Command (m for help): d
    
  5. Type n for new partion(hit enter) and then mention p for primary partition, hit enter to continue with default starting sector(2048), enter again for last sector and mention +16M, this partition will be later formatted with vfat for kernel:

    Command (m for help): n
    Partition type:
       p   primary (0 primary, 0 extended, 4 free)
       e   extended
    Select (default p): p
    Partition number (1-4, default 1):
    Using default value 1
    First sector (2048-7744511, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-7744511, default 7744511): +16M
    
  6. The sdcard is assumed to be 4gb size, similarly create 2nd primary partition using remaining disk space which will serve as filesystem:

    Command (m for help): n
    Partition type:
       p   primary (1 primary, 0 extended, 3 free)
       e   extended
    Select (default p): p
    Partition number (1-4, default 2):
    Using default value 2
    First sector (34816-7744511, default 34816):
    Using default value 34816
    Last sector, +sectors or +size{K,M,G} (34816-7744511, default 7744511):
    Using default value 7744511
    
  7. Now as we have created 2 primary partitions now let's write(w) the changes to disk. For that issue:

    Command (m for help): w
    
  8. As partition is completed, we need to format them respectively, the first partition must be vfat so that uboot can read kernel:

    sudo mkfs.vfat /dev/sdX1
    

    For rootfs, create ext4 partition:

    sudo mkfs.ext4  /dev/sdX2
    
  9. Now mount vfat partition to some mount point(directory):

    sudo mount -t vfat /dev/sdX1 /mnt/boot
    

    copy kernel to /mnt/boot, assuming that you are still in linux-sunxi directory:

    sudo cp arch/arm/boot/uImage /mnt/boot
    

    Also copy script.bin to same directory:

    sudo cp script.bin /mnt/boot
    

    Now, umount /mnt/boot, before that you may want to sync so that any remaining buffers are written to disks:

    sudo sync
    

    Finally unmount:

    sudo umount /mnt/boot
    

At this point we have a sdcard readly with kernel. Burn uboot and copy rootfs to make a usuable Linux for your tablet.

linux-sunxi's People

Contributors

torvalds avatar tiwai avatar davem330 avatar pmundt avatar htejun avatar kaga-koko avatar bzolnier avatar adrianbunk avatar gregkh avatar ralfbaechle avatar broonie avatar rddunlap avatar joeperches avatar kaber avatar jmberg avatar hverkuil avatar herbertx avatar ozbenh avatar avikivity avatar lenb avatar chrismason-xx avatar alanstern avatar neilbrown avatar dhowells avatar heicarst avatar sfrothwell avatar alan-cox avatar ickle avatar rustyrussell avatar acmel avatar

Watchers

Sachin 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.