User:Icenowy/AOSC A33 Build

From linux-sunxi.org
Jump to: navigation, search

Contents

Note

The author went to make a general new-generation sunxi kernel tree. Go ask MoeIcenowy on #linux-sunxi for more infomation.

Description

This is for an AOSC OS ARM build on A33 devices, and suitable for building other GNU/Linux distros.

A33 do not have official GNU/Linux support, so the build is hacky. In addition, the source tree used is specified for AOSC OS.

Build

Detect infomation from the official ROM

Usually, A33 devices are built with ro.secure=0, and you can gain root access by just using
adb shell
If the result is like
[email protected]:/ # 

('ococci' may change, as vendors like)

then it has root access, and usually it has busybox shipped.\

You can get some useful infomation by running
[email protected]:/ # lsmod

(If you want the information of the WiFi chip, please enable WiFi before running this)

Note to the modules:

'esp8089', '8723bs', '8188eu', or others may be the WiFi chip.

'gslX680', 'gt9xxf_ts', or others may be the Touchscreen chip.

In addition, you should run
[email protected]:/ # cat /proc/cmdline

to get the partition table.

Prerequisite

This method requires a SDcard to contain /.

An arm targeted toolchain is required to build the kernel. (gcc-linaro and aosc-abcross toolchains are tested, version 4.6 and 4.9)

(In addition, I assume the devices use an internal NAND (not eMMC) to provide the stock system.

Build the kernel

The kernel is at [1].

You can download it and enter it by using
git clone https://github.com/Icenowy/linux-kernel-lichee-a33
cd linux-kernel-lichee-a33

Some branches are already made for Aoson M751s and an unknown devices with "U978L1B1" in its scripts.fex (seems to be compatible with Onda V975s Core4 v7.

If your device do not have a customized branch, you can create a new one (or directly use master), and run
make menuconfig

(Please ensure that you acquired the module infomation above)

Then enable the drivers of your Touchscreen and WiFi chip. (Note: Touchscreen driver is recommended to be builtin, and WiFi is recommended to be seperated module)

Now you can build the kernel by run
make CROSS_COMPILE=/xxx/bin/armv7a-hardfloat-linux-gnueabi- && make uImage

(Please replace /xxx/bin/armv7a-hardfloat-linux-gnueabi- with your tool prefix, for example, /opt/abcross/armel/armv7a-hardfloat-linux-gnueabi using AOSC Toolchain)

After this, bootable kernel Images are in arch/arm/boot.

Image and uImage is what we care about.

Test the kernel

You will need a modified version of fastboot.

In fastboot/fastboot.c, after

       (info->dev_vendor != 0x18d1) &&  // Google

, add

       (info->dev_vendor != 0x1f3a) &&  // Allwinner

A pre-compiled amd64 version is at [2].

Prepare the SD card

Partition the SD card to 2 partitions.

The first one is a vfat partition, to satisfy the Android system.

The second one is a ext4 partition, to keep the /.

(Note: the initramfs in this A33 kernel will only search / at /dev/mmcblk0p2, so please make / the second partition)

Extract the rootfs

Get a working rootfs, and then extract it to the second partition of the SD card.

(You can do it either by using a card reader on computer, or by using the busybox shipped.)

Personal tools
Namespaces

Variants
Actions
Navigation
Tools