[WIP/DEV/GUIDE] Debian Linux armhf

Search This thread

alatnet

Senior Member
Oct 16, 2012
143
19
So following a couple of tuts that I've found on the forums I've been able to install debian linux wheezy armhf build on my tablet in a dual boot configuration with it booting off of a second ext4 partition on the microsd card along with getting the drivers/codecs from Linux4Tegra to be installed and somewhat used on debian linux.

What works:
-Wifi
-USB
-Display (doesnt use tegra drivers)
-Buttons (power, vol, rot switch [acts as wifi switch])
-Touchscreen

What doesnt work:
-Bluetooth (Untested but apparently it finds it and sets it up.)
-Audio (Detects it in the kde info center. System Settings program only says that there's a dummy output. Playing any form of audio crashes the program.)
-HDMI (with the Tegra gfx drivers it finds it but says it's disconnected even when connected.)
-Cameras
-GPS
-Motion Sensing
-Light Sensor

With the display, whenever the tegra drivers are used, it finds HDMI (as HDMI-1) and the LCD screen (as LVDS-1) but says that there is no device on the lcd screen. With that being said, it is using the fbdev driver instead which shows pink and/or inverted colors in some instances but at least it shows a gui.

Guides used:
{HOW TO} Native Debian on A500 and building your own rootfs
[BOOTLOADER][DUALBOOT + RECOVERY][BOOTMENU] Patched ICS bootloader V8 (07/06/2012)
[Dev] Native linux on Iconia

Requirements:
-an A500.
-a 16+GB microsd.
-Linux OS (Debian, Ubuntu, etc.)
-Linux 4 Tegra: Download the Ventana files under "Additional Information" and "Driver Packages"/"Codec Packages".

Ok, so here's how I've done it.
1) Make sure you have a multiboot loader and have flashed the appropriate bootloader image to the second boot partition. get the boot image from the 3rd guide under "precompiled kernel image" and flash that to the second boot partition. (be sure to check the dualboot guide above on flashing the image if you are using the bootloader that is in the guide.)
2) Have a microsd card partitioned with two partitions, one for normal data (can be any format) and a second one that is in ext4. you can do 3 partitions by adding a swap partition but the ext4 partition must be the second partition.
3) Install qemu on the host system.
Code:
For Ubuntu - sudo apt-get install qemu-user-static
4) Mount the microsd's ext4 partition.
Code:
sudo mount -t ext4 /dev/<microsd 2nd partition> /mnt/Linux
5) Run:
Code:
sudo qemu-debootstrap --arch armhf wheezy /mnt/Linux
6) Chroot into the installed environment.
Code:
chroot /mnt/Linux /bin/bash
7) Add sources to /mnt/Linux/etc/apt/sources.list. you can get debian sources from http://debgen.simplylinux.ch/. Be sure to choose "Testing (wheezy)" and all the sources check boxes along with where you live to find the nearest repository.
8) Install the wifi drivers pt1.
Code:
apt-get update ; apt-get install broadcom-sta-common broadcom-sta-source firmware-b43-installer firmware-b43legacy-installer b43-fwcutter
9) Install the wifi drivers p2. In the "{HOW TO} Native Debian on A500 and building your own rootfs" guide, there is a download from mediafire for the firmware files for the drivers. Extract that and put it into /lib/firmware. I dont know if the individual files in the brcm should be in the /lib/firmware or not so i just copied the folder into it and the files within it into /lib/firmware.
10) Install the GUI:
Code:
apt-get install <gui>
List of GUI's (that i know of):
Code:
KDE (takes a long time to install): kde-full
XFCE: xfce4
11) extract the ventana_Tegra-Linux-R16.1.0_armhf.tbz2 file and the ventana_Tegra-Linux-codecs-R16.1.0_armhf.tbz2. you should get a folder called "Linux_For_Tegra" and a file called "restricted_codecs.tbz2". go into the "Linux_For_Tegra/nv_tegra" folders and extract the nvidia_drivers.tbz2 file. from there you should get 3 folders: etc, lib, usr. copy those to "/mnt/Linux" (you are going to have to do this as root). back out of those folders and extract the restricted_codecs.tbz2. you should get a folder called "lib" copy that to "/mnt/Linux". after that, it's time to make a hard link so that the X11 can find the tegra driver:
Code:
ln /usr/lib/xorg/modules/drivers/tegra_drv.abi12.so /usr/lib/xorg/modules/drivers/tegra_drv.so
Note: without using an xorg.conf file, by default it will use fbdrv instead of the tegra driver.
12) set the root password:
Code:
passwd root
13) add a normal user:
Code:
adduser <username>
14) exit chroot by typing "exit" and unmount /mnt/Linux:
Code:
sudo umount /mnt/Linux
15) pop that sucker into the the tablet and boot into it by holding power and vol down to get into the boot menu. select "boot into second partiton".
If everything went ok, you should be presented with a gui, if not and you are at a command line, log into root and type "startx". if that doesnt work then something wrong must have happened.

Untested easy script:
Code:
#! /bin/sh
set -e

#if there is a tegra_install.deb file.
hasTegraDeb=0
tegraDeb=acer-iconia-tab-a500+tegra+brcm+wheezy_1.0-1_armhf.deb

#change these if you do not like default install of kde.
arch=armhf
build=wheezy
rootDir=/mnt/Linux
guiEnv=kde-full
newUser=User

#setup the basics of debian linux using armhf and wheezy build.
qemu-debootstrap --arch $arch $build $rootDir

#copy the tegra_install.deb file for the tegra specific drivers.
if ["$hasTegraDeb" = "1"] then
  cp $tegraDeb $rootDir/$tegraDeb
fi

#setup sources.list for apt-get.
echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" >> $rootDir/etc/apt/sources.list
echo "deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free" >> $rootDir/etc/apt/sources.list
echo "deb http://security.debian.org/ wheezy/updates main contrib non-free" >> $rootDir/etc/apt/sources.list

#create the chroot_install.sh script and set it up.
echo "#! /bin/sh" > $rootDir/chroot_install.sh
echo "set -e" >> $rootDir/chroot_install.sh

#update apt-get inside the chroot.
echo "apt-get update" >> $rootDir/chroot_install.sh

#install the wireless card drivers inside the chroot.
echo "apt-get install broadcom-sta-common broadcom-sta-source firmware-b43-installer firmware-b43legacy-installer b43-fwcutter" >> $rootDir/chroot_install.sh

#install the desktop in the chroot. (note: this will take a long time)
echo "apt-get install $guiEnv" >> $rootDir/chroot_install.sh

#install the tegra specific drivers inside the chroot
if ["$hasTegraDeb" = "1"] then
  #install the tegra drivers.
  echo "dpkg -i $tegraDeb" >> $rootDir/chroot_install.sh
  #hard link the tegra_drv.abi12.so as tegra_drv.so in /usr/lib/xorg/modules/drivers/ to enable X11 to find the display driver.
  echo "ln /usr/lib/xorg/modules/drivers/tegra_drv.abi12.so /usr/lib/xorg/modules/drivers/tegra_drv.so" >> $rootDir/chroot_install.sh
fi

#set the root password in the chroot.
echo "passwd root" >> $rootDir/chroot_install.sh

#add normal user in the chroot.
echo "adduser $newUser" >> $rootDir/chroot_install.sh

#execute the final stage of the install.
chroot $rootDir /chroot_install.sh

#cleanup
rm $rootDir/chroot_install.sh
if ["$hasTegraDeb" = "1"] then
  rm $rootDir/$tegraDeb
fi
Script sets up everything along with installing kde window manager. Please note that the tegra_install.deb file does not exist, it is something that i am thinking of making in the future that has all the drivers and what not needed that is from the Linux 4 Tegra site. you are still going to have to manually install the tegra drivers in step 11.
Edit: Experimental copies of the deb files that has all the files needed from Linux 4 Tegra and the wifi drivers can be found at the bottom of the post.


xorg.conf to enable tegra driver (found in the Linux_for_Tegra/nv_tegra/config.tbz2/etc/X11 folder):
Code:
# This is the minimal configuration necessary to use the Tegra driver.
# Please refer to the xorg.conf man page for more configuration
# options provided by the X server, including display-related options
# provided by RandR 1.2 and higher.

# Disable extensions not useful on Tegra.
Section "Module"
    Disable     "dri"
    Disable     "dri2"
    Disable     "glx"
    SubSection  "extmod"
        Option  "omit xfree86-dga"
    EndSubSection
EndSection

Section "Device"
    Identifier  "Tegra"
    Driver      "tegra"

# OverlayDepth is a 32-bit integer which is used to control overlay
# stacking order.  The overlay with the lowest depth is in front of
# all others.  This value has meaning only when multiple overlays are
# present on a display.

#    Option      "OverlayDepth" "255"

# ARGBHWCursor controls whether the X driver uses an overlay to
# display 32-bit "true-color" cursors, or whether such cursors are
# emulated in software.  Valid values are "true" to enable hardware
# cursors, and "false" (default) to disable them.

#    Option      "ARGBHWCursor"
EndSection

At the moment, I have looked through the config.tbz2 file and may have to stick the stuff in there into the tablet's linux filesystem. will test this later.

NOTE:
I am not a linux developer, I have no idea how to create linux drivers. All I can do is mash things together and hope things work out.
In theory, this should work for all tegra2 and tegra3 (using cardhu drivers instead of ventana) devices with some minor differences.

Edit:
Apparently it is using kernel version 2.6.38. I'm going to see if I can update the kernel to 3.2.23-1 which is the latest version for armhf in the debian package list (http://packages.debian.org/wheezy/kernel/linux-headers-3.2.0-3-all-armhf).
Edit2:
Looks like updating the kernel from apt-get doesn't necessarily enable the kernel to load as it seems that the boot loader loads a prepackaged kernel that has been flashed into mmcblk0p7. Tried out kexec and the kernel doesn't support it so adding it to the /dev/inittab script is useless for loading up new kernels. I tried making the new kernel into a flashable image using mkbootimg that is found within the Linux 4 Tegra folder but it doesn't do anything and the image apparently isn't valid when i tried booting it from fastboot (black screen). along with that, apparently it changed my password on my encrypted /data partition's password (when i flashed it within linux using dd) so a word of caution with that. If anyone can help me out, i would like to try to create something similar to grub (or even port it) where it loads up new kernels from the microsd or a specified place based on a boot list.

deb Files (Install using "dpkg -i acer-iconia-tab-a500+tegra+brcm+wheezy_<version>_armhf.deb" within the linux environment of the tablet.):
1.0-1: acer-iconia-tab-a500+tegra+brcm+wheezy_1.0-1_armhf.deb
--takes care of steps 9 and 11 sans hard linking the X11 tegra drivers.
1.0-2: acer-iconia-tab-a500+tegra+brcm+wheezy_1.0-2_armhf.deb
--has pre-depends for the first part of the wifi driver installation so this should, in theory, install both part 1 and 2 of the wifi drivers.
--takes care of steps 8, 9, and 11 sans hard linking the X11 tegra drivers.

Update log:
10/17/2012: added updated version of the deb package.
10/16/2012: first version.
 
Last edited:

alatnet

Senior Member
Oct 16, 2012
143
19
Ok, so since I cant post anything including into ongoing threads in the android development forum due to the 10 post required thing i'll just have to ask development questions here till i reach the 10 post requirement.

Can anyone point me into the direction for how the second boot image that you flash for the dual boot bootloader is created? Trying to figure out how to create an image so that it boots everything off the microsd card including the kernel. It seems that the kernel used in the guide is locked to 2.6.38 and if you update the kernel within the tablet's linux environment it doesnt load it up. so i need to figure out how to create a boot image so that it loads it up or create a boot image that has grub (or other bootloaders) installed on it to boot different linux images.
 

themechaniac

Member
May 5, 2012
29
4
Kamloops B.C.
Ok, so since I cant post anything including into ongoing threads in the android development forum due to the 10 post required thing i'll just have to ask development questions here till i reach the 10 post requirement.

Can anyone point me into the direction for how the second boot image that you flash for the dual boot bootloader is created? Trying to figure out how to create an image so that it boots everything off the microsd card including the kernel. It seems that the kernel used in the guide is locked to 2.6.38 and if you update the kernel within the tablet's linux environment it doesnt load it up. so i need to figure out how to create a boot image so that it loads it up or create a boot image that has grub (or other bootloaders) installed on it to boot different linux images.
You are on the right track with mkbootimg. I have not figured it all out myself yet.
You have to compile your arm linux kernel then make a bootable image with mkboot

I don't know if you have seen this or if. this will help---Nethams kernel compile commands are;

make ARCH=arm menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueable--j16
./mkbootimg --ramdisk dev/zero --kernel arch/arm/zimage -o ../recovery.img

I believe these are the commands he uses to compile his recovery image (boot.img)

It is my understanding that mkboot combines the kernel with a ram disk to make an image file that will boot the system
That image file can be placed in several places 1-primary boot position 2 recovery position 3 and if you have Skrilax dual boot secboot position
So it depends on what mkboot compiled as to what happens when that boot point is activated.

I am still trying to work out how Spdev and Netham combine or configure the kernel + initramfs+ ramdisk to create their bootable images.

I know these images boot and point to the file system which can be stored on internal or external sd card or even usb drive it all depends on how the boot image is configured.

Still learning myself :)

Here is a link I found explanes about Linux ram disk and initram

http://www.ibm.com/developerworks/linux/library/l-initrd/index.html


And more info here downloads a PDF presentation on how to.

http://www.google.com/url?sa=t&rct=...poCoAw&usg=AFQjCNHLTHE3DaroC71FAjOjQWU2A61qEQ

All about that mkbooting after you get your kernel:)

http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
 
Last edited:

alatnet

Senior Member
Oct 16, 2012
143
19
snip (freaking 10 post limit...)
Yea, i did find some stuff with mkbootimg including the last link that you posted.
The kernel was already compiled when i downloaded it using apt-get and it is placed in /boot folder.
I did make a boot.img from that kernel using mkbootimg and looking at "/proc/cmdline" at the arguments that were passed to the kernel in the other kernel image and it made it, flashed it to secboot and it didnt do anything except use the same kernal as before, though i did flash the image via dd in linux. Apparently this sorta screwed up my /data partition or something in where it wouldnt recognize my password for de-encryption to mount it. (fixing it by just erasing "/data" [bye bye data... TT.TT]) So i tried booting it using "fastboot boot <kernel>" and it didnt boot, only showing a black screen, but using the other boot.img it would boot linux up.
So I'm thinking of somehow creating a kernel image that can use kexec to make a grub like bootloader kernel that you flash onto the secboot partition that has something similer to grub.cfg in which you can easily select which kernel to load.
As for looking for a grub.cfg file, it would look in a few different places:
-in internal storage (probably recovery partition or the "/system" partition as the "/data" partition can potentially be encrypted and not mountable.)
-sd card (has to be in first partition and in fat32 format)
-usb drive (same as sd card)
from these places it will load each grub.cfg. that way it'll make the grub like bootloader kernel extendable in which kernel to load (i.e. have a linux system on usb that you want to boot from.)
 
  • Like
Reactions: themechaniac

themechaniac

Member
May 5, 2012
29
4
Kamloops B.C.
I may be wrong but it is my understanding that the compiled kernel is in the boot image packed by mkbootimg.
The kernel is compiled to look for the compatible root file system in a particular place.
So when you change or use a boot image you change the kernel you are using.

So we have a system that;

Has a modified Linux kernel that selects the Android file system from internal memory installed in the first boot position.
We can put a Linux kernel compiled to find a compatible root file system say on external sd card in the second boot position.
We can replace the recovery image with a Linux kernel that finds a compatible root file system on the internal sd card.

That gives us a hardware selective three different systems (triple boot)
With fastboot on the PC we can quickly change any of the Three boot images, replace the recovery image or repair system.

I think all we need is a 3.2.23 kernel compiled thee separate ways and packaged with mkbootimg.
1st find root file system internel, 2nd find file system externel 3rd find file system usb
We already have two 2.6.38 kernels. One from Spdev (external root file system)and One from Netham {internal file system)
They are different kernels as Nethams has added modules.
I believe the were both compiled from the same Git.
I have tried switching the two boot images in second boot position with both root file systems installed and when you boot the second position
it switches to it's own file system.
I haven't tried swapping the root file positions yet.
 
Last edited:

alatnet

Senior Member
Oct 16, 2012
143
19
I may be wrong but it is my understanding that the compiled kernel is in the boot image packed by mkbootimg.
The kernel is compiled to look for the compatible root file system in a particular place.
So when you change or use a boot image you change the kernel you are using.

So we have a system that;

Has a modified Linux kernel that selects the Android file system from internal memory installed in the first boot position.
We can put a Linux kernel compiled to find a compatible root file system say on external sd card in the second boot position.
We can replace the recovery image with a Linux kernel that finds a compatible root file system on the internal sd card.

That gives us a hardware selective three different systems (triple boot)
With fastboot on the PC we can quickly change any of the Three boot images, replace the recovery image or repair system.

I think all we need is a 3.2.23 kernel compiled thee separate ways and packaged with mkbootimg.
1st find root file system internel, 2nd find file system externel 3rd find file system usb
We already have two 2.6.38 kernels. One from Spdev (external root file system)and One from Netham {internal file system)
They are different kernels as Nethams has added modules.
I believe the were both compiled from the same Git.
I have tried switching the two boot images in second boot position with both root file systems installed and when you boot the second position
it switches to it's own file system.
I haven't tried swapping the root file positions yet.

Interesting. Though i think it needs to be a specific type of kernel (i.e bzImage or uImage instead of vmlinuz) to actually run. also, the precompiled kernel in the guide that i had used in the opening post had a command line where one option was "root=/dev/mmcblk1p2" which pretty much says for the kernel to look for the linux file system in the second partition on the sd card.
 

themechaniac

Member
May 5, 2012
29
4
Kamloops B.C.
Yes with the way the system is formatted you cannot change out the kernel on the fly. It is basically hard coded in the boot image. Skrilax has given us a way to change boot positions so we don't have to sacrifice recovery position to boot second kernel. I have not seen any pre configured 3.2.23 kernels yet. The one that Netham posted boots from internal SD but causes problems for some people as not all a500 have their internal SD card formatted in the same memory block. It works great for me:) I prefer to have my root file system on a fast external SD so would like to modify or compile a kernel like Netham's. I find I run out of space when I have it internal. Netham's kernel has USB sound and seems to boot differt than Spdev's.
 
Last edited:

alatnet

Senior Member
Oct 16, 2012
143
19
Yes with the way the system is formatted you cannot change out the kernel on the fly. It is basically hard coded in the boot image. Skrilax has given us a way to change boot positions so we don't have to sacrifice recovery position to boot second kernel. I have not seen any pre configured 3.2.23 kernels yet. The one that Netham posted boots from internal SD but causes problems for some people as not all a500 have their internal SD card formatted in the same memory block. It works great for me:) I prefer to have my root file system on a fast external SD so would like to modify or compile a kernel like Netham's. I find I run out of space when I have it internal. Netham's kernel has USB sound and seems to boot differt than Spdev's.

Right, but this is how the linux boot loader is going to go with, instead of loading the linux system (sans kernel and initrd) from the sd card, we create a boot.img that has a linux system built in that has a sole purpose of loading other linux systems using kexec.

Edit:
Here's how the path is going to go:
Startup-->Bootloader-->Linux Bootloader (loads linux on external drives)-->Linux (on external drives)
 
Last edited:

themechaniac

Member
May 5, 2012
29
4
Kamloops B.C.
Well I am happy with Ubuntu on my external SD card, I even ran a kernel compile on it and it ran pretty fast. I am stuck on the mkbootimg part. It can't be done on the tablet, has to be a PC. I tried unpacking the Two ready made boot images to see how they are configured but they don't seem to have a ram disk. Still working on that. It is learning how the system is put together that is half the fun, Getting it to work the way you want is the goal. When it is all squared away it will be time to move on to the next puzzle. :) I have enough computers that I could just put a system on each one and be done with it. Where's the fun in that. Most of them are dual booted already.
 
Last edited:

alatnet

Senior Member
Oct 16, 2012
143
19
Well I am happy with Ubuntu on my external SD card, I even ran a kernel compile on it and it ran pretty fast. I am stuck on the mkbootimg part. It can't be done on the tablet, has to be a PC. I tried unpacking the Two ready made boot images to see how they are configured but they don't seem to have a ram disk. Still working on that. It is learning how the system is put together that is half the fun, Getting it to work the way you want is the goal. When it is all squared away it will be time to move on to the next puzzle. :) I have enough computers that I could just put a system on each one and be done with it. Where's the fun in that. Most of them are dual booted already.

Well, even though mkbootimg is suppose to be run on linux, i don't think it was compiled for arm so you are going to have to use a pc for that program. as for the initrd, i did find a website that may help in creating an A.L.B.L. (Android Linux Boot Loader): http://www.thewireframecommunity.com/node/14
Essentially what is needed to create the A.L.B.L. is to create a kernel with kexec in it and an initrd that mounts the external drives along with an easy to use interface to be loaded before loading any kernels to allow for selecting kernels. with that said, how do you figure out how to use the volume buttons and the power button within linux using a c\c++ program?
 

HazardousWish

New member
Mar 8, 2013
1
0
BUMP!

any progress?

also
-Audio (Detects it in the kde info center. System Settings program only says that there's a dummy output. Playing any form of audio crashes the program.)

But
Code:
cat /any/file/for/ex/bin/bash > /dev/dsp
works properly
 

HardlyAbelson

New member
Mar 24, 2013
2
1
Louisvile
tegra driver

I have ubuntu 12.10 armf runing on my a500 thanks to the "Linux on A500: The Future" thread. I am using the ferrariforzaleo mod of rogro82's kernel.
The problem I had was getting the xorg tegra module to load. I fixed this by getting the "https://launchpad.net/ubuntu/quantal/armhf/nvidia-tegra/16.0-0ubuntu1"]https://launchpad.net/ubuntu/quantal/armhf/nvidia-tegra/16.0-0ubuntu1 and installing with
sudo dpkg -i
after I rebooted it started using the tegra video driver.

Cheers
 
  • Like
Reactions: sfahadzb

Forzaferrarileo

Senior Member
Apr 16, 2012
424
434
Rome
I have ubuntu 12.10 armf runing on my a500 thanks to the "Linux on A500: The Future" thread. I am using the ferrariforzaleo mod of rogro82's kernel.
The problem I had was getting the xorg tegra module to load. I fixed this by getting the "https://launchpad.net/ubuntu/quantal/armhf/nvidia-tegra/16.0-0ubuntu1"]https://launchpad.net/ubuntu/quantal/armhf/nvidia-tegra/16.0-0ubuntu1 and installing with
sudo dpkg -i
after I rebooted it started using the tegra video driver.

Cheers

can you explain me the steps you done ? I also want ubuntu 12.10 running but I can't install any desktop on it ( show error and other error )
 

HardlyAbelson

New member
Mar 24, 2013
2
1
Louisvile
ubuntu 12.10

can you explain me the steps you done ? I also want ubuntu 12.10 running but I can't install any desktop on it ( show error and other error )

Hi, I used the debootstrap and and qemu / chroot to setup my rootfs. i found post #61 in the "Linux on A500: future" very helpful.
Also, make sure you have a usb keyboard handy. After you run "apt-get install -d ubuntu-desktop" (assuming you have a pc running ubuntu to use) in a qemu chroot, you can move to the a500 and boot up and login as root and run "apt-get install ubuntu-destop". since the stuff is cached. I found this faster than installing the desktop while in the chroot. After that finishes, you should boot up with a desktop available. If something is wrong and you can't login, try doing "ctrl-alt-f1" to get to the getty command line login and look at the /var/log/ folder for clues in the logs.
 

renzenicolai

Senior Member
Aug 13, 2012
125
181
www.rnplus.nl
How to compile the kernel?

I succesfully got debian running on my iconia a500 :laugh:
Building my own rootfs and getting the wifi to work were not that hard, but I still don't know how to compile the Linux kernel for the a500 from source.

I already found the git repository of rogru82 (https://github.com/rogro82/picasso-kernel) and I downloaded the source to my pc (running ubuntu 13.04). Can someone point me to a tutorial explaining how to compile this source?

Also, can someone explain what sort of partition table the internal memory uses? I am running the 3.0 kernel and I can see a block memory device in the /dev folder but there are no partitions. How can I mount the internal memory?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    So following a couple of tuts that I've found on the forums I've been able to install debian linux wheezy armhf build on my tablet in a dual boot configuration with it booting off of a second ext4 partition on the microsd card along with getting the drivers/codecs from Linux4Tegra to be installed and somewhat used on debian linux.

    What works:
    -Wifi
    -USB
    -Display (doesnt use tegra drivers)
    -Buttons (power, vol, rot switch [acts as wifi switch])
    -Touchscreen

    What doesnt work:
    -Bluetooth (Untested but apparently it finds it and sets it up.)
    -Audio (Detects it in the kde info center. System Settings program only says that there's a dummy output. Playing any form of audio crashes the program.)
    -HDMI (with the Tegra gfx drivers it finds it but says it's disconnected even when connected.)
    -Cameras
    -GPS
    -Motion Sensing
    -Light Sensor

    With the display, whenever the tegra drivers are used, it finds HDMI (as HDMI-1) and the LCD screen (as LVDS-1) but says that there is no device on the lcd screen. With that being said, it is using the fbdev driver instead which shows pink and/or inverted colors in some instances but at least it shows a gui.

    Guides used:
    {HOW TO} Native Debian on A500 and building your own rootfs
    [BOOTLOADER][DUALBOOT + RECOVERY][BOOTMENU] Patched ICS bootloader V8 (07/06/2012)
    [Dev] Native linux on Iconia

    Requirements:
    -an A500.
    -a 16+GB microsd.
    -Linux OS (Debian, Ubuntu, etc.)
    -Linux 4 Tegra: Download the Ventana files under "Additional Information" and "Driver Packages"/"Codec Packages".

    Ok, so here's how I've done it.
    1) Make sure you have a multiboot loader and have flashed the appropriate bootloader image to the second boot partition. get the boot image from the 3rd guide under "precompiled kernel image" and flash that to the second boot partition. (be sure to check the dualboot guide above on flashing the image if you are using the bootloader that is in the guide.)
    2) Have a microsd card partitioned with two partitions, one for normal data (can be any format) and a second one that is in ext4. you can do 3 partitions by adding a swap partition but the ext4 partition must be the second partition.
    3) Install qemu on the host system.
    Code:
    For Ubuntu - sudo apt-get install qemu-user-static
    4) Mount the microsd's ext4 partition.
    Code:
    sudo mount -t ext4 /dev/<microsd 2nd partition> /mnt/Linux
    5) Run:
    Code:
    sudo qemu-debootstrap --arch armhf wheezy /mnt/Linux
    6) Chroot into the installed environment.
    Code:
    chroot /mnt/Linux /bin/bash
    7) Add sources to /mnt/Linux/etc/apt/sources.list. you can get debian sources from http://debgen.simplylinux.ch/. Be sure to choose "Testing (wheezy)" and all the sources check boxes along with where you live to find the nearest repository.
    8) Install the wifi drivers pt1.
    Code:
    apt-get update ; apt-get install broadcom-sta-common broadcom-sta-source firmware-b43-installer firmware-b43legacy-installer b43-fwcutter
    9) Install the wifi drivers p2. In the "{HOW TO} Native Debian on A500 and building your own rootfs" guide, there is a download from mediafire for the firmware files for the drivers. Extract that and put it into /lib/firmware. I dont know if the individual files in the brcm should be in the /lib/firmware or not so i just copied the folder into it and the files within it into /lib/firmware.
    10) Install the GUI:
    Code:
    apt-get install <gui>
    List of GUI's (that i know of):
    Code:
    KDE (takes a long time to install): kde-full
    XFCE: xfce4
    11) extract the ventana_Tegra-Linux-R16.1.0_armhf.tbz2 file and the ventana_Tegra-Linux-codecs-R16.1.0_armhf.tbz2. you should get a folder called "Linux_For_Tegra" and a file called "restricted_codecs.tbz2". go into the "Linux_For_Tegra/nv_tegra" folders and extract the nvidia_drivers.tbz2 file. from there you should get 3 folders: etc, lib, usr. copy those to "/mnt/Linux" (you are going to have to do this as root). back out of those folders and extract the restricted_codecs.tbz2. you should get a folder called "lib" copy that to "/mnt/Linux". after that, it's time to make a hard link so that the X11 can find the tegra driver:
    Code:
    ln /usr/lib/xorg/modules/drivers/tegra_drv.abi12.so /usr/lib/xorg/modules/drivers/tegra_drv.so
    Note: without using an xorg.conf file, by default it will use fbdrv instead of the tegra driver.
    12) set the root password:
    Code:
    passwd root
    13) add a normal user:
    Code:
    adduser <username>
    14) exit chroot by typing "exit" and unmount /mnt/Linux:
    Code:
    sudo umount /mnt/Linux
    15) pop that sucker into the the tablet and boot into it by holding power and vol down to get into the boot menu. select "boot into second partiton".
    If everything went ok, you should be presented with a gui, if not and you are at a command line, log into root and type "startx". if that doesnt work then something wrong must have happened.

    Untested easy script:
    Code:
    #! /bin/sh
    set -e
    
    #if there is a tegra_install.deb file.
    hasTegraDeb=0
    tegraDeb=acer-iconia-tab-a500+tegra+brcm+wheezy_1.0-1_armhf.deb
    
    #change these if you do not like default install of kde.
    arch=armhf
    build=wheezy
    rootDir=/mnt/Linux
    guiEnv=kde-full
    newUser=User
    
    #setup the basics of debian linux using armhf and wheezy build.
    qemu-debootstrap --arch $arch $build $rootDir
    
    #copy the tegra_install.deb file for the tegra specific drivers.
    if ["$hasTegraDeb" = "1"] then
      cp $tegraDeb $rootDir/$tegraDeb
    fi
    
    #setup sources.list for apt-get.
    echo "deb http://ftp.us.debian.org/debian testing main contrib non-free" >> $rootDir/etc/apt/sources.list
    echo "deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free" >> $rootDir/etc/apt/sources.list
    echo "deb http://security.debian.org/ wheezy/updates main contrib non-free" >> $rootDir/etc/apt/sources.list
    
    #create the chroot_install.sh script and set it up.
    echo "#! /bin/sh" > $rootDir/chroot_install.sh
    echo "set -e" >> $rootDir/chroot_install.sh
    
    #update apt-get inside the chroot.
    echo "apt-get update" >> $rootDir/chroot_install.sh
    
    #install the wireless card drivers inside the chroot.
    echo "apt-get install broadcom-sta-common broadcom-sta-source firmware-b43-installer firmware-b43legacy-installer b43-fwcutter" >> $rootDir/chroot_install.sh
    
    #install the desktop in the chroot. (note: this will take a long time)
    echo "apt-get install $guiEnv" >> $rootDir/chroot_install.sh
    
    #install the tegra specific drivers inside the chroot
    if ["$hasTegraDeb" = "1"] then
      #install the tegra drivers.
      echo "dpkg -i $tegraDeb" >> $rootDir/chroot_install.sh
      #hard link the tegra_drv.abi12.so as tegra_drv.so in /usr/lib/xorg/modules/drivers/ to enable X11 to find the display driver.
      echo "ln /usr/lib/xorg/modules/drivers/tegra_drv.abi12.so /usr/lib/xorg/modules/drivers/tegra_drv.so" >> $rootDir/chroot_install.sh
    fi
    
    #set the root password in the chroot.
    echo "passwd root" >> $rootDir/chroot_install.sh
    
    #add normal user in the chroot.
    echo "adduser $newUser" >> $rootDir/chroot_install.sh
    
    #execute the final stage of the install.
    chroot $rootDir /chroot_install.sh
    
    #cleanup
    rm $rootDir/chroot_install.sh
    if ["$hasTegraDeb" = "1"] then
      rm $rootDir/$tegraDeb
    fi
    Script sets up everything along with installing kde window manager. Please note that the tegra_install.deb file does not exist, it is something that i am thinking of making in the future that has all the drivers and what not needed that is from the Linux 4 Tegra site. you are still going to have to manually install the tegra drivers in step 11.
    Edit: Experimental copies of the deb files that has all the files needed from Linux 4 Tegra and the wifi drivers can be found at the bottom of the post.


    xorg.conf to enable tegra driver (found in the Linux_for_Tegra/nv_tegra/config.tbz2/etc/X11 folder):
    Code:
    # This is the minimal configuration necessary to use the Tegra driver.
    # Please refer to the xorg.conf man page for more configuration
    # options provided by the X server, including display-related options
    # provided by RandR 1.2 and higher.
    
    # Disable extensions not useful on Tegra.
    Section "Module"
        Disable     "dri"
        Disable     "dri2"
        Disable     "glx"
        SubSection  "extmod"
            Option  "omit xfree86-dga"
        EndSubSection
    EndSection
    
    Section "Device"
        Identifier  "Tegra"
        Driver      "tegra"
    
    # OverlayDepth is a 32-bit integer which is used to control overlay
    # stacking order.  The overlay with the lowest depth is in front of
    # all others.  This value has meaning only when multiple overlays are
    # present on a display.
    
    #    Option      "OverlayDepth" "255"
    
    # ARGBHWCursor controls whether the X driver uses an overlay to
    # display 32-bit "true-color" cursors, or whether such cursors are
    # emulated in software.  Valid values are "true" to enable hardware
    # cursors, and "false" (default) to disable them.
    
    #    Option      "ARGBHWCursor"
    EndSection

    At the moment, I have looked through the config.tbz2 file and may have to stick the stuff in there into the tablet's linux filesystem. will test this later.

    NOTE:
    I am not a linux developer, I have no idea how to create linux drivers. All I can do is mash things together and hope things work out.
    In theory, this should work for all tegra2 and tegra3 (using cardhu drivers instead of ventana) devices with some minor differences.

    Edit:
    Apparently it is using kernel version 2.6.38. I'm going to see if I can update the kernel to 3.2.23-1 which is the latest version for armhf in the debian package list (http://packages.debian.org/wheezy/kernel/linux-headers-3.2.0-3-all-armhf).
    Edit2:
    Looks like updating the kernel from apt-get doesn't necessarily enable the kernel to load as it seems that the boot loader loads a prepackaged kernel that has been flashed into mmcblk0p7. Tried out kexec and the kernel doesn't support it so adding it to the /dev/inittab script is useless for loading up new kernels. I tried making the new kernel into a flashable image using mkbootimg that is found within the Linux 4 Tegra folder but it doesn't do anything and the image apparently isn't valid when i tried booting it from fastboot (black screen). along with that, apparently it changed my password on my encrypted /data partition's password (when i flashed it within linux using dd) so a word of caution with that. If anyone can help me out, i would like to try to create something similar to grub (or even port it) where it loads up new kernels from the microsd or a specified place based on a boot list.

    deb Files (Install using "dpkg -i acer-iconia-tab-a500+tegra+brcm+wheezy_<version>_armhf.deb" within the linux environment of the tablet.):
    1.0-1: acer-iconia-tab-a500+tegra+brcm+wheezy_1.0-1_armhf.deb
    --takes care of steps 9 and 11 sans hard linking the X11 tegra drivers.
    1.0-2: acer-iconia-tab-a500+tegra+brcm+wheezy_1.0-2_armhf.deb
    --has pre-depends for the first part of the wifi driver installation so this should, in theory, install both part 1 and 2 of the wifi drivers.
    --takes care of steps 8, 9, and 11 sans hard linking the X11 tegra drivers.

    Update log:
    10/17/2012: added updated version of the deb package.
    10/16/2012: first version.
    1
    snip (freaking 10 post limit...)
    Yea, i did find some stuff with mkbootimg including the last link that you posted.
    The kernel was already compiled when i downloaded it using apt-get and it is placed in /boot folder.
    I did make a boot.img from that kernel using mkbootimg and looking at "/proc/cmdline" at the arguments that were passed to the kernel in the other kernel image and it made it, flashed it to secboot and it didnt do anything except use the same kernal as before, though i did flash the image via dd in linux. Apparently this sorta screwed up my /data partition or something in where it wouldnt recognize my password for de-encryption to mount it. (fixing it by just erasing "/data" [bye bye data... TT.TT]) So i tried booting it using "fastboot boot <kernel>" and it didnt boot, only showing a black screen, but using the other boot.img it would boot linux up.
    So I'm thinking of somehow creating a kernel image that can use kexec to make a grub like bootloader kernel that you flash onto the secboot partition that has something similer to grub.cfg in which you can easily select which kernel to load.
    As for looking for a grub.cfg file, it would look in a few different places:
    -in internal storage (probably recovery partition or the "/system" partition as the "/data" partition can potentially be encrypted and not mountable.)
    -sd card (has to be in first partition and in fat32 format)
    -usb drive (same as sd card)
    from these places it will load each grub.cfg. that way it'll make the grub like bootloader kernel extendable in which kernel to load (i.e. have a linux system on usb that you want to boot from.)
    1
    tegra driver

    I have ubuntu 12.10 armf runing on my a500 thanks to the "Linux on A500: The Future" thread. I am using the ferrariforzaleo mod of rogro82's kernel.
    The problem I had was getting the xorg tegra module to load. I fixed this by getting the "https://launchpad.net/ubuntu/quantal/armhf/nvidia-tegra/16.0-0ubuntu1"]https://launchpad.net/ubuntu/quantal/armhf/nvidia-tegra/16.0-0ubuntu1 and installing with
    sudo dpkg -i
    after I rebooted it started using the tegra video driver.

    Cheers
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone