[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:hardware:arm:olinuxinoa10s [2013/10/23 21:59 (UTC)] – Fix the tags (all on one line). Add section headers and a ToC. Better alignment of code samples in bullet lists. alienbob | howtos:hardware:arm:olinuxinoa10s [2014/07/28 04:41 (UTC)] (current) – balky | ||
---|---|---|---|
Line 4: | Line 4: | ||
This document can also be found at [[http:// | This document can also be found at [[http:// | ||
- | ====Setup of development environment==== | + | NOTE: The documentation below needs updating. I recommend that you use the link I've just given above as it leads to updated documentation. I'll have the text below updated when time permits. |
- | | + | ====Setup of development environment==== |
- | * Download the Net Install ISO image for Debian 7.1.0 i386. Boot the mentioned ISO in the VirtualBox VM you've created. I used the " | + | |
+ | * Download the Net Install ISO image for Debian 7.2.0 i386. Boot the mentioned ISO in the VirtualBox VM you've created. I used the " | ||
* This set of instructions will work with everything deselected under " | * This set of instructions will work with everything deselected under " | ||
* After the installation, | * After the installation, | ||
- | * Install OpenSSH client and server software as root if this will make file transfers and access to your development environment convenient for you: < | + | |
- | apt-get install openssh-client openssh-server | + | < |
- | </ | + | # apt-get upgrade</ |
- | * You need to download a dependency and install it manually. Do these as root in your guest OS: < | + | |
- | cd ~ | + | < |
- | wget http://www.malaya-digital.org/libgmp3c2_4.3.2+dfsg-1_i386.deb | + | * As root in your guest OS: |
- | dpkg --install libgmp3c2_4.3.2+dfsg-1_i386.deb | + | < |
- | </ | + | # cd ~ |
- | * As root, append the following line to / | + | # wget https://launchpad.net/linaro-toolchain-binaries/ |
- | deb http://www.emdebian.org/debian squeeze main | + | # tar xjfv gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux.tar.bz2</ |
- | </code> | + | * Add toolchain directory |
- | * As root in your guest OS: < | + | < |
- | apt-get install emdebian-archive-keyring | + | * Restart your guest OS as root: |
- | apt-get update | + | < |
- | apt-get install | + | ====Compiling the kernel |
- | apt-get upgrade | + | * In the development environment you've made above, login as root. Then get the kernel source code: |
- | </ | + | < |
- | * Restart your development environment | + | # git clone https:// |
- | shutdown -r now | + | * Note that I'm using the revision below: |
- | </ | + | < |
- | + | # git rev-parse --verify HEAD | |
- | ====Compiling the kernel==== | + | 9ee9fc5f0988df5677f0f142b5b88a8988d283d7</ |
- | + | So, to checkout the mentioned revision: | |
- | * In the development environment you've made above, login as root. Then get the kernel source code: < | + | < |
- | cd ~ | + | # git checkout 9ee9fc5f0988df5677f0f142b5b88a8988d283d7</ |
- | git clone https:// | + | * Do a "make clean": |
- | </ | + | < |
- | * Download | + | # make clean</ |
- | wget http:// | + | * Download |
- | </ | + | < |
- | * Move this file to linux-sunxi/ | + | # wget http:// |
- | mv a10s_olinuxino_defconfig | + | * Move this file to ~/linux-sunxi/ |
- | </ | + | < |
- | * Execute the following under the linux-sunxi directory in your development environment as root: < | + | * Execute the following under the linux-sunxi directory in your development environment as root: |
- | cd ~/ | + | < |
- | make ARCH=arm | + | # make ARCH=arm |
- | </ | + | * Configure the kernel in your development environment as root: |
- | * Configure the kernel in your development environment as root: < | + | < |
- | make ARCH=arm menuconfig | + | * HINT: If you're having problems with Logitech wireless keyboards and mice, don't build the following (for Linux 3.4.61): |
- | </ | + | * Device Drivers-> |
- | * HINT: To enable | + | * HINT: To verify |
- | * Under Kernel Configuration, | + | * Under Kernel Configuration, |
* Device Drivers-> | * Device Drivers-> | ||
- | * Then build this in the kernel, too: | + | * Also, this must be built in the kernel, too: |
* Device Drivers-> | * Device Drivers-> | ||
* And make sure of the following: | * And make sure of the following: | ||
- | *Device Drivers-> | + | * Device Drivers-> |
- | * HINT: To enable | + | * HINT: To verify |
- | *Under Kernel Configuration, | + | * Under Kernel Configuration, |
- | *Device Drivers-> | + | * Device Drivers-> |
- | * Edit ~/ | + | * Note that before compiling kernel, you have to patch it: |
- | #define I2C0_TRANSFER_SPEED (400000) | + | * Download the patch hcd_axp-md.patch from http:// |
+ | < | ||
+ | # wget http:// | ||
+ | * Copy files: | ||
+ | < | ||
+ | # cp drivers/ | ||
+ | * Apply the patch: | ||
+ | < | ||
+ | * Copy a file again: | ||
+ | < | ||
+ | * Edit ~/ | ||
+ | < | ||
#define I2C1_TRANSFER_SPEED (100000) | #define I2C1_TRANSFER_SPEED (100000) | ||
#define I2C2_TRANSFER_SPEED (100000) | #define I2C2_TRANSFER_SPEED (100000) | ||
#define I2C3_TRANSFER_SPEED (100000) | #define I2C3_TRANSFER_SPEED (100000) | ||
- | #define I2C4_TRANSFER_SPEED (100000) | + | #define I2C4_TRANSFER_SPEED (100000)</ |
- | </ | + | * You can now compile the kernel and its modules in your development environment as root. |
- | * You can now compile the kernel and its modules in your development environment as root. < | + | < |
- | cd ~/ | + | # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 uImage |
- | make clean | + | # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=out modules |
- | make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage | + | # make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=out modules_install</ |
- | make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=out modules | + | |
- | make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=out modules_install | + | |
- | </ | + | |
* In your development environment, | * In your development environment, | ||
+ | ====Compiling Uboot (Copied from http:// | ||
+ | * Note: The Allwinner Linux-Sunxi community uboot is maintained by Henrik Nordstrom aka hno on Freenode irc. You can find him in # | ||
+ | * Download the uboot sources from GitHub repository. | ||
+ | < | ||
+ | # git clone https:// | ||
+ | * After the download, you should have a new directory. | ||
+ | < | ||
+ | * Note that I'm using the revision below: | ||
+ | < | ||
+ | 8a4621c488f33089d831168bfa5bae210a5684c8</ | ||
+ | * Edit ~/ | ||
+ | < | ||
+ | "if test -z \\\\\" | ||
+ | " if test \\\\\" | ||
+ | " root=\"/ | ||
+ | " else" \ | ||
+ | " root=\"/ | ||
+ | " fi;"\ | ||
+ | " fi;" | ||
+ | * Change " root=\"/ | ||
+ | * " root=\"/ | ||
+ | * With the following command, you can start the uboot build: | ||
+ | < | ||
+ | # make distclean CROSS_COMPILE=arm-linux-gnueabihf- | ||
+ | # make a10s-olinuxino-m CROSS_COMPILE=arm-linux-gnueabihf-</ | ||
+ | * At the end of the process, you can check if everything is OK by: | ||
- | ====Compiling Uboot==== | + | < |
- | + | * If you got this file, well done so far. | |
- | (Copied from http:// | + | ====Format and setup the SD-card (Copied from http:// |
- | + | * We suggest that you use a 4GB class 10 micro SD card. But you can use any micro SD card between 2GB and 16GB. | |
- | * The Allwinner Linux-Sunxi community uboot is maintained by Henrik Nordstrom aka hno on Freenode irc. You can find him in # | + | |
- | * Download the uboot sources from GitHub repository. Note that there are a lot of branches. You have to use the sunxi branch. | + | |
- | cd ~ | + | |
- | git clone -b sunxi https:// | + | |
- | </ | + | |
- | * After the download, you should have a new directory. < | + | |
- | cd ~/ | + | |
- | </ | + | |
- | + | ||
- | * Edit ~/ | + | |
- | " | + | |
- | "if test -z \\\\\" | + | |
- | " if test \\\\\" | + | |
- | " root=\"/ | + | |
- | " else" \ | + | |
- | " root=\"/ | + | |
- | " fi;" | + | |
- | " fi;" | + | |
- | </ | + | |
- | * Change " root=\"/ | + | |
- | " root=\"/ | + | |
- | </ | + | |
- | * With the following command, you can start the uboot build: < | + | |
- | cd ~/ | + | |
- | make distclean CROSS_COMPILE=arm-linux-gnueabi- | + | |
- | make A10s-OLinuXino-M_config | + | |
- | make CROSS_COMPILE=arm-linux-gnueabi- | + | |
- | </ | + | |
- | * At the end of the process, you can check if everything is OK by: < | + | |
- | ls u-boot-sunxi-with-spl.bin | + | |
- | </ | + | |
- | * If you got this file, well done so far. | + | |
- | + | ||
- | ====Format and setup the micro SD-card==== | + | |
- | + | ||
- | (Copied from http:// | + | |
- | + | ||
- | * We suggest that you use a 4GB class 10 micro SD card. But you can use micro SD any card between 2GB and 16GB. | + | |
* First, we have to make the correct card partitions. This is done with fdisk. | * First, we have to make the correct card partitions. This is done with fdisk. | ||
- | * Plug the micro SD card into your SD card reader. Then, enter in the terminal: < | + | * Plug the micro SD card into your SD card reader. Then, enter in the terminal: |
- | ls /dev/sd | + | < |
- | </ | + | * Then press TAB twice. You will see a list of your sd devices like sda, sdb, sdc, etc. Note that some of these devices may be your hard disk, so make sure you know which one is your micro SD card before you proceed. You can damage your HDD if you choose the wrong sd device. You can do this by unplugging your micro SD card reader, and identify which ?sd? devices was removed from the list. |
- | * Then press TAB twice. You will see a list of your sd devices like sda, sdb, sdc, etc. Note that some of these devices may be your hard disk, so make sure you know which one is your micro SD card before you proceed. You can damage your HDD if you choose the wrong sd device. You can do this by unplugging your SD card reader, and identify which “sd” devices was removed from the list. | + | * Once you know which device is your micro SD card, use this text instead of the sdX name in the references below: |
- | * Once you know which device is your micro SD card, use this text instead of the sdX name in the references below: < | + | < |
- | fdisk -u=sectors /dev/sdX | + | |
- | </ | + | |
* Then do these steps: | * Then do these steps: | ||
- | | + | |
- | * p | + | * p |
- | * If there are already partitions on your card, do: | + | * If there are already partitions on your card, do: |
- | * d 1 | + | * d 1 |
- | * If you have more than one partitition, | + | * If you have more than one partitition, |
- | * Create the first partition. It should start from 2048 and end at 34815: | + | * Create the first partition. It should start from 2048 and end at 34815: |
- | * n p 1 | + | * n p 1 |
- | * Create the second partition: | + | * Create the second partition: |
- | * n p 2 enter enter | + | * n p 2 enter enter |
- | * List the created partitions: | + | * List the created partitions: |
- | * p | + | * p |
- | * If you did everything correctly on a 4GB card, you should see something like: < | + | * If you did everything correctly on a 4GB card, you should see something like: |
- | Disk /dev/sdX: 3980 MB, 3980394496 bytes | + | < |
123 heads, 62 sectors/ | 123 heads, 62 sectors/ | ||
Units = sectors of 1 * 512 = 512 bytes | Units = sectors of 1 * 512 = 512 bytes | ||
Line 145: | Line 140: | ||
I/O size (minimum/ | I/O size (minimum/ | ||
Disk identifier: 0x00000000 | Disk identifier: 0x00000000 | ||
+ | |||
Device Boot Start End Blocks Id System | Device Boot Start End Blocks Id System | ||
/dev/sdg1 2048 34815 16384 83 Linux | /dev/sdg1 2048 34815 16384 83 Linux | ||
- | /dev/sdg2 34816 7774207 3869696 83 Linux | + | /dev/sdg2 34816 7774207 3869696 83 Linux</ |
- | </ | + | |
- | * Write changes to the micro SD card. | + | |
- | * w | + | |
- | * Now, we have to format the file system on the card: | + | |
- | * The first partition should be vfat as this is the FS which the Allwinner bootloader understands. < | + | |
- | mkfs.vfat /dev/sdX1 | + | |
- | </ | + | |
- | * The second partition should be a normal Linux EXT4 FS: < | + | |
- | mkfs.ext4 /dev/sdX2 | + | |
- | </ | + | |
+ | * Write changes to the micro SD card. | ||
+ | * w | ||
+ | * Now, we have to format the file system on the card: | ||
+ | * The first partition should be vfat as this is the FS which the Allwinner bootloader understands. | ||
+ | < | ||
+ | * The second partition should be a normal Linux EXT4 FS: | ||
+ | < | ||
====Installing the kernel, Slackware ARM 14.0 mini root filesystem, and kernel modules==== | ====Installing the kernel, Slackware ARM 14.0 mini root filesystem, and kernel modules==== | ||
- | * Copy the " | + | * Proceed to copy the " |
- | Mount the first partition: < | + | |
- | mkdir / | + | < |
- | mount /dev/sdX1 / | + | # mount /dev/sdX1 / |
- | </ | + | * Then copy the kernel uImage to the first filesystem of the micro SD card. |
- | * Then copy the kernel uImage to the first filesystem of the micro SD card. < | + | < |
- | cp uImage / | + | * Copy the script.bin file in / |
- | </ | + | * Or iff you need to compile your own script.bin, you can get the fex files here in a scripts_A10s.7z archive: https:// |
- | * Unmount | + | * Unmount |
- | umount | + | < |
- | </code> | + | * Mount the second partition: |
- | * Extract this file in / | + | < |
- | * Mount the second partition: < | + | # mount /dev/sdX2 / |
- | mkdir / | + | * Extract the Slackware ARM 14.0 mini root filesystem in / |
- | mount /dev/sdX2 / | + | |
- | </ | + | |
- | * Extract the Slackware ARM 14.0 mini root filesystem in / | + | |
* Delete all contents of / | * Delete all contents of / | ||
* Extract this file in / | * Extract this file in / | ||
* Proceed to copy the generated kernel modules (" | * Proceed to copy the generated kernel modules (" | ||
- | *If the / | + | * If the / |
- | mkdir / | + | < |
- | cp -rf 3.x.xx+ / | + | # cp -rf 3.x.xx+ / |
- | </ | + | * Append the following in / |
- | * Append the following in / | + | < |
- | / | + | * Unmount / |
- | </ | + | < |
- | * Unmount / | + | ====Write Uboot (Copied from http:// |
- | umount / | + | * Note that you have to write u-boot-sunxi-with-spl.bin in /dev/sdX (not sdX1 or sdX2). |
- | </ | + | < |
- | + | # sync</ | |
- | ====Write Uboot==== | + | ====NB: When you boot OLinuXino using the micro SD card with Slackware 14.0 for ARM, the " |
- | + | ||
- | (Copied from http:// | + | |
- | + | ||
- | * Note that you have to write u-boot-sunxi-with-spl.bin in /dev/sdX (not sdX1 or sdX2). < | + | |
- | dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 | + | |
- | sync | + | |
- | </ | + | |
- | + | ||
- | **NB: When you boot OLinuXino using the micro SD card with Slackware 14.0 for ARM, the " | + | |
====== Sources ====== | ====== Sources ====== | ||
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> | ||
* Original source: [[http:// | * Original source: [[http:// | ||
* Original source: [[https:// | * Original source: [[https:// | ||
+ | * Original source: [[http:// | ||
<!-- Authors are allowed to give credit to themselves! --> | <!-- Authors are allowed to give credit to themselves! --> | ||
* Originally written by [[wiki: | * Originally written by [[wiki: |