Jump to content

ASUS Transformer Pad (asus-tf300t): Difference between revisions

From postmarketOS Wiki
Rudloff (talk | contribs)
m U-Boot: source -> syntaxhighlight
 
(86 intermediate revisions by 15 users not shown)
Line 1: Line 1:
[[Category:Not booting]]
{{Infobox device
{{Infobox device
| manufacturer = ASUS
| manufacturer = Asus
| name = Transformer Pad
| name = Transformer Pad
| codename = tf300t
| codename = asus-tf300t
| image = File:ASUS Transformer Pad.jpg
| image = File:ASUS Transformer Pad.jpg
| imagecaption = ASUS Transformer Pad
| imagecaption = ASUS Transformer Pad
| releaseyear = 2012
| releaseyear = 2012
| originalsoftware = Android 4.0 on Linux 3.1
| category = community
| chipset = Nvidia Tegra 3 T30
| originalsoftware = Android
| cpu = Quad-core 1.2 GHz Cortex-A9
| originalversion = 4.0 on Linux 3.1
| gpu = ULP GeForce
| chipset = Nvidia Tegra 3 (T30L)
| cpu = Quad-core 1.3 GHz Cortex-A9
| gpu = NVIDIA ULP GeForce GPU 12 cores
| storage = 16/32 GB
| storage = 16/32 GB
| display = 1280x800 IPS
| display = 1280x800 IPS
| memory = 1 GB
| memory = 1 GB
}}
| architecture = armv7
| type = detachable
| genericdevice=Nvidia Tegra armv7 (nvidia-tegra-armv7)
| booting = yes
| status_usbnet = Y
| status_flashing = Y
| status_touch = Y
| status_screen = Y
| status_wifi = Y
| status_xwayland = Y
| status_fde = Y
| status_mainline = Y
| status_battery = Y
| status_3d = P
| status_audio = Y
| status_bluetooth = Y
| status_camera = N
| status_gps = P
| status_nfc = -
| status_mobiledata = -
| status_sms = -
| status_calls = -
| status_otg = -
| status_usba = Y
| status_hdmidp = Y
| status_keyboard = Y
| status_touchpad = Y
<!-- Sensors -->
| status_accel = Y
| status_magnet = Y
| status_light = Y
| status_proximity = -
| status_hall = Y
| status_barometer = -
| status_powersensor = -
<!-- Misc -->
| status_irtx = -
| status_trustzone = Y
| status_fossbootloader = Y
| status_uboot = yes
| status_uboot_primary = Y
| status_uboot_secondary = Y
| status_uboot_mainline = Y
| status_uboot_internalstorage = Y
| status_uboot_sd = Y
| status_uboot_usbhost = Y
| status_uboot_usbperipheral = Y
| status_uboot_screen = Y
| status_uboot_keyboard = N
| status_uboot_buttons = Y
| pmoskernel = mainline grate
}}{{Based on SoC|Nvidia_Tegra_3_(tegra30)|Tegra 3}}


None of this work has been merged upstream. Check out the work-in-progress [https://github.com/jonty-comp/pmbootstrap/tree/device-asus-tf300t here] or contact jonty-comp on IRC.
== Contributors ==
* osctobe (Michał Mirosław)
* Clamor
* Ion Agorria
 
== Device owners ==
{{Device owners}}
 
== Variants ==
* '''TF300T''' - regular wifi only tablet, currently has support both in pmaports and grate Linux kernel fork.
* '''TF300TG''' - 3G version of TF300T with some slight differences. Modem is very close to Nexus 7 2012 cellular (tilapia).
* '''TF300TL''' - LTE version of TF300T with differences similar to TF300TG. Uses Asus custom modem setup and doesn't have mainline driver for it.
 
''Note: TF300TL has experimental support in [https://github.com/clamor95/linux/tree/master this grate fork]. TF300T and TF300TG are officially supported.''


There is a rebased version of jonty-comp's branch on [https://github.com/postmarketOS/pmbootstrap/tree/device-asus-tf300t postmarketos/device-asus-tf300t]
== Unlocking ==
{{Note|This is only needed if you do not want to use U-boot}}
The first step to do anything with the device is unlocking, with this device its done by sideloading [http://dlcdnet.asus.com/pub/ASUS/EeePAD/TF300T/Unlock_v8.rar the unlock apk from asus] and clicking a few buttons in the app. In case you get a network connection error, you will need to [https://forum.xda-developers.com/t/howto-unlock-tf700t-in-2020.4157143/ patch the unlocker].


== Contributors ==
== Compiling a kernel ==
=== Android kernel ===
 
* 3.1 kernel based on ASUS sources with updates till Oreo support ([https://github.com/clamor95/morpheus_kernel_asus_tf201 Morpheus kernel])
* 3.4 kernel as a part of Unlegacy Android Project ([https://github.com/clamor95/android_kernel_nvidia_tegra3 Unlegacy kernel])
 
=== Mainline (Grate) ===
 
* Baseline kernel sources on master: https://github.com/grate-driver/linux
* Proper dts for TF300T is added
* Version: 6.0.6
* Status: Boots. Almost full support.
 
== Hardware status (mainline) ==
{|class="wikitable feature-colors"
! Status
! Hardware
! Info
|-
| Y
|Booting
|boot.img has restriction of approx 8MB, which is /boot partition size.
|-
| Y
|Bootloader
|Open source bootloader [https://github.com/clamor-s/u-boot U-Boot] is available as alternative for stock Asus bootloader and can replace it. U-Boot can not boot downstream kernel due to TrustZone problem.
|-
| Y
|Panel
|Innolux G101ICE-L01 WXGA (1280x800) LCD IPS panel through LVDS controller.
|-
| Y
|HDMI output
|HDMI works, but maximum output is 1080p due to Tegra 3 limitations.
|-
| Y
|Touchscreen
|Used Elantech EKTH1036 touchscreen.
|-
| Y
|USB
|One full size USB 2.0 in dock or via 40pin adapter.
|-
| Y
|SD cards
|MicroSD card and full sized SD card (recognized as USB drive) in dock.
|-
| Y
|Internal memory
|Hynix emmc, works.
|-
| P
|GPS
|Broadcom GPS [https://redmine.replicant.us/projects/replicant/wiki/BCM4751 BCM4751] is used. Needs more attention.
|-
| Y
|WiFi
|Uses Azurewave AW-NH615 BCM4329. Wi-Fi works and firmwares are included.
|-
| Y
|Bluetooth
|Uses Azurewave AW-NH615 BCM4329B1. Works fine out of the box.
|-
| Y
| GPIO keys
|There is 3 keys on GPIO: Power, Volume up, Volume down.
Additionally GPIO-keys like are LID sensor and Audio dock line-out detect.
|-
| Y
| Dock Keyboard
| Both pad and dock have Nuvoton NPCE795LA0BX embedded controller which handles battery data, charging, leds, keyboard and touchpad. Driver of this EC is mainlined and is fully functional. Keyboard and Touchpad work.
Alt Gr can be used for alternate multimedia keys instead of escape, fn keys, volumes and delete. Alt GR + Lock changes the default key mode.
|-
| Y
| Battery/Charger
|Driver is based on Texas Instruments bq24725 SMBus Charge Controller driver and GPIO charger but works through pad/dock EC. Charging and charge level of both batteries are shown correctly.
|-
| Y
| PMIC
|Transformers use Texas Instruments TPS659110 PMIC and TPS62361 core regulator.
|-
| Y
|Sound
|Sound codec is WM8903 on TF300T and RT5631 on cellular models. Kernel driver and tegra_wm8903/tegra_rt5631 glue drivers are present. UCMs are ready. Audio through HDMI works.
|-
| Y
|Voice processor
|Transformers use separate Fortemedia FM34NE voice processor. Mainline driver prototype is available but kernel lacks way to get mic status (dsp is internal mic dependent), set into constant bypass mode.
|-
| Y
|Thermal sensor
|NCT1008 ON Semiconductor LM90 series thermometer.
|-
| Y
|Orientation sensors
|Include Invensense mpu3050 gyroscope with Kionix KXTF9 accelerometer and Aichi AMI306 3-axis digital compass.
|-
| Y
|Light sensor
|Driver Dyna-Image AL3010. Brightness regulation [https://floss.social/@okias/103371284828595026 works], install iio-sensor-proxy . It's slightly [https://gitlab.com/alpine-mobile/pmaports/issues/3 oversensitive].
|-
| N
|Front camera
|Aptina mi1040 camera sensor. Grate kernel doesn't support VI yet. Mainline linux driver exists (authored by Okias) and proper nodes are added to device tree.
|-
| N
|Rear camera
|Is not planned to be added to support list. If you have such a need, development is welcome. Mainline driver doesn't exist.
|-
| P
|ULP GeForce
| [[Nvidia_Tegra_2_(tegra20)#Graphics|GPU Acceleration]] partially works.
|-
| N
|Modem
|TF300TG uses XMM6260. TF300TL in downstream uses some Asus implementation of modem driver. Contributions are welcome, no work done yet.
|-
|}


* jonty-comp
== Usability ==
* Jasper (working on [[ASUS Transformer Pad Infinity]])
=== Desktop environment ===
* MartijnBraam
Since 3D acceleration is not available yet, all DE which use it will be painfully slow and laggy.


== What works ==
Currently [https://wiki.postmarketos.org/wiki/Xfce4 xfce4] or [https://wiki.postmarketos.org/wiki/MATE mate] are recommended.


* Compiling CM13 kernel ([https://github.com/LineageOS/android_kernel_asus_tf300t GitHub])
== U-Boot ==
* Compiling 4.14-rc3 with tf300t specific patches
{{Warning|This part is HIGHLY EXPERIMENTAL! DO NOT USE THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING.}}
* Flashing via Android recovery zip (Boot image included)
* System boots
* Most sensors/cameras/devices seem to be detected (e.g. accelerometer values can be read from <code>/sys</code> etc)


== What does not work ==
{{note|Further procedure needs pre-made nvflash. Files blob.bin and bricksave.img are only thing that will save you from full brick and allow replace/restore Asus bootloader.}}


* Flashing via fastboot (device appears to write successfully but then locks up and does not apply the uploaded image)
=== Installing PMOS with U-Boot on eMMC ===
* Framebuffer (stuck on ASUS bootloader graphic)
1. Primary, we need to compile a u-boot on legacy branch:
<syntaxhighlight lang="shell-session">
$ git clone https://github.com/clamor-s/u-boot -b legacy
$ cd ~/legacy
$ export CROSS_COMPILE=arm-linux-gnueabi-
$ make transformer_t30_defconfig tf300tg.config # Make sure to use the correct model number
$ make all
</syntaxhighlight>
Copy '''u-boot-dtb-tegra.bin''' file to nvflash folder.
Now, flash new bootloader with nvflash tool. Go to nvflash folder and do (Make sure to flash to EBT partition):
<syntaxhighlight lang="shell-session">
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 4 u-boot-dtb-tegra.bin
</syntaxhighlight>


The framebuffer issue is an interesting one as it works without issue on CM13-based Android ROMs with the same kernel and defconfig.  Possible toolchain issue or patch needed for GCC6.
2. Secondary, during the Installation process add --split option then export:
Devices with a working framebuffer output modesetting information in <code>dmesg</code> after loading the tegradc driver, but the PMOS compiled kernel does not.  Common fixes including setting values in <code>/sys</code> have no effect yet.
<syntaxhighlight lang="shell-session">
$ pmbootstrap pull
$ pmbootstarp init
$ pmbootstrap install --split # --fde (optional)
$ pmbootstrap export
</syntaxhighlight>


== Unlocking ==
3. Finally, set /boot partition:
The first step to do anything with the device is unlocking, with this device its done by sideloading the unlock apk from asus and clicking a few buttons in the app. The apk can be found on [https://www.asus.com/Tablets/ASUS_Transformer_Pad_TF300T/HelpDesk_Download/ the asus support page].
Mount pm_boot, copy dtb from dtbs folder to root directory (NOT rootfs), make uInitrd:
<syntaxhighlight lang="shell-session">
# mount /tmp/postmarketOS-export/asus-tf300tg-boot.img /mnt/tmp/
# cd /mnt/tmp/
# cp /mnt/tmp/dtbs/tegra30-asus-tf300tg.dtb /mnt/tmp/
# mkimage -n "Ramdisk Image" -A arm -O linux -T ramdisk -C gzip -d initramfs uInitrd
# umount  /mnt/tmp
</syntaxhighlight>
Go to nvflash folder and flash /root and /boot to tablet (Make sure to flash /root to UDA and /boot to APP):
<syntaxhighlight lang="shell-session">
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 17 /tmp/postmarketOS-export/asus-tf300tg-root.img
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 10 /tmp/postmarketOS-export/asus-tf300tg-boot.img
</syntaxhighlight>


== Fastboot issue ==
=== Issue with rootfs size ===
It seems like the bootloader doesn't handle flashing the boot and userdata partition correctly, the official firmware package flashes an "Android blob" to the staging partition with fastboot which triggers an flashing screen on the tablet which copies the data to the correct partitions.
When install with --fde option (Maybe without encryption issue the same. It's not tested yet), the rootfs size less than Data partition on tablet. To fix it, we'll need sdcard as Live boot (just install PMOS on it). Load from sdcard, unlock crypt_LUKS and do:
<syntaxhighlight lang="shell-session">
# parted /dev/mapper/luks-xxxxx
(parted) print all # Look at max size partition
(parted) resizepart 1 <max size partition>
</syntaxhighlight>
Then lock crypt_LUKS and reboot to eMMC. The rootfs size must to be changed.


After unlocking the device the blobs still needs to have some signature which can be generated by [https://github.com/drwowe/BlobTools drwowe/BlobTools]. This repository adds the -s option to sign the generated blobs.
== Disassembly ==
=== Dock ===
* Remove 2 torx screws on the bottom
* Remove 4 Philips screws under the glued pads on the bottom
* Remove 3 Philips screws near the mouse buttons. Be careful with removing and adding back the top plastic piece, it has small clips


<source lang="shell-session">$ ./pmbootstrap.py export /example
=== Tablet ===
...
* [https://www.ifixit.com/Guide/Disassembling+Asus+Transformer+Pad+TF300/11794 See iFixit]
$ blobpack -s output.blob LNX /example/boot.img-asus-tf300t APP asus-tf300t.img
Found 2 partitions as commandline arguments
Partname: LNX Filename: boot.img-asus-tf300t
Partname: APP Filename: asus-tf300t.img
Size: 60
2 partitions starting at offset 0x3C
Offset: 92
$ fastboot flash staging output.blob
target didn't report max-download-size
sending 'staging' (680522 KB)...
OKAY [113.288s]
writing 'staging'...
FAILED (remote: (InvalidSize))
finished. total time: 116.623s</source>


The update doesn't get updated yet with this code but at least the bootloader doesn't freeze anymore after the flashing command.
== See also ==
* Asus Transformer device family on Tegra 3 includes also [[ASUS_Transformer_Prime_(asus-tf201)|Transformer Prime TF201]] and [[Asus_Transformer_Pad_Infinity_TF700T_(asus-tf700t)|Transformer Pad Infinity TF700T]]
* [https://rere.qmqm.pl/git/?p=linux;a=shortlog;h=refs/heads/tf300t Michał Mirosław latest kernel]
* [https://github.com/jonty-comp/pmbootstrap/tree/device-asus-tf300t jonty-comp's pld kernel] [https://github.com/postmarketOS/pmbootstrap/tree/device-asus-tf300t jonty-comp's old pmbootstrap]

Latest revision as of 11:12, 4 September 2024

Note This device is supported as part of a generic port. Refer to Nvidia Tegra armv7 (nvidia-tegra-armv7) for installation instructions and more information.
Asus Transformer Pad
ASUS Transformer Pad
ASUS Transformer Pad
Manufacturer Asus
Name Transformer Pad
Codename asus-tf300t
Released 2012
Type detachable
Hardware
Chipset Nvidia Tegra 3 (T30L)
CPU Quad-core 1.3 GHz Cortex-A9
GPU NVIDIA ULP GeForce GPU 12 cores
Display 1280x800 IPS
Storage 16/32 GB
Memory 1 GB
Architecture armv7
Software
Original software Android
Original version 4.0 on Linux 3.1
FOSS bootloader yes
postmarketOS
Category community
Pre-built images yes
postmarketOS kernel mainline grate
Generic port Nvidia Tegra armv7 (nvidia-tegra-armv7)
Features
Flashing
Works
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
Works
Screen
Works
Touchscreen
Works
Keyboard
Works
Touchpad
Works
Multimedia
3D Acceleration
Partial
Audio
Works
Camera
Broken
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
Works
Ethernet
No data
GPS
Partial
Miscellaneous
FDE
Works
USB-A
Works
SATA/eSATA
No data
HDMI/DP
Works
Sensors
Accelerometer
Works
Magnetometer
Works
Ambient Light
Works
Hall Effect
Works
Haptics
No data
U-Boot
Primary Bootloader
Works
Secondary Bootloader
Works
Mainline
Works
Internal Storage
Works
SD card
Works
USB Host
Works
USB Peripheral
Works
Display
Works
Keyboard
Broken
Buttons
Works

Contributors

  • osctobe (Michał Mirosław)
  • Clamor
  • Ion Agorria

Device owners


Variants

  • TF300T - regular wifi only tablet, currently has support both in pmaports and grate Linux kernel fork.
  • TF300TG - 3G version of TF300T with some slight differences. Modem is very close to Nexus 7 2012 cellular (tilapia).
  • TF300TL - LTE version of TF300T with differences similar to TF300TG. Uses Asus custom modem setup and doesn't have mainline driver for it.

Note: TF300TL has experimental support in this grate fork. TF300T and TF300TG are officially supported.

Unlocking

Note This is only needed if you do not want to use U-boot

The first step to do anything with the device is unlocking, with this device its done by sideloading the unlock apk from asus and clicking a few buttons in the app. In case you get a network connection error, you will need to patch the unlocker.

Compiling a kernel

Android kernel

Mainline (Grate)

Hardware status (mainline)

Status Hardware Info
Y Booting boot.img has restriction of approx 8MB, which is /boot partition size.
Y Bootloader Open source bootloader U-Boot is available as alternative for stock Asus bootloader and can replace it. U-Boot can not boot downstream kernel due to TrustZone problem.
Y Panel Innolux G101ICE-L01 WXGA (1280x800) LCD IPS panel through LVDS controller.
Y HDMI output HDMI works, but maximum output is 1080p due to Tegra 3 limitations.
Y Touchscreen Used Elantech EKTH1036 touchscreen.
Y USB One full size USB 2.0 in dock or via 40pin adapter.
Y SD cards MicroSD card and full sized SD card (recognized as USB drive) in dock.
Y Internal memory Hynix emmc, works.
P GPS Broadcom GPS BCM4751 is used. Needs more attention.
Y WiFi Uses Azurewave AW-NH615 BCM4329. Wi-Fi works and firmwares are included.
Y Bluetooth Uses Azurewave AW-NH615 BCM4329B1. Works fine out of the box.
Y GPIO keys There is 3 keys on GPIO: Power, Volume up, Volume down.

Additionally GPIO-keys like are LID sensor and Audio dock line-out detect.

Y Dock Keyboard Both pad and dock have Nuvoton NPCE795LA0BX embedded controller which handles battery data, charging, leds, keyboard and touchpad. Driver of this EC is mainlined and is fully functional. Keyboard and Touchpad work.

Alt Gr can be used for alternate multimedia keys instead of escape, fn keys, volumes and delete. Alt GR + Lock changes the default key mode.

Y Battery/Charger Driver is based on Texas Instruments bq24725 SMBus Charge Controller driver and GPIO charger but works through pad/dock EC. Charging and charge level of both batteries are shown correctly.
Y PMIC Transformers use Texas Instruments TPS659110 PMIC and TPS62361 core regulator.
Y Sound Sound codec is WM8903 on TF300T and RT5631 on cellular models. Kernel driver and tegra_wm8903/tegra_rt5631 glue drivers are present. UCMs are ready. Audio through HDMI works.
Y Voice processor Transformers use separate Fortemedia FM34NE voice processor. Mainline driver prototype is available but kernel lacks way to get mic status (dsp is internal mic dependent), set into constant bypass mode.
Y Thermal sensor NCT1008 ON Semiconductor LM90 series thermometer.
Y Orientation sensors Include Invensense mpu3050 gyroscope with Kionix KXTF9 accelerometer and Aichi AMI306 3-axis digital compass.
Y Light sensor Driver Dyna-Image AL3010. Brightness regulation works, install iio-sensor-proxy . It's slightly oversensitive.
N Front camera Aptina mi1040 camera sensor. Grate kernel doesn't support VI yet. Mainline linux driver exists (authored by Okias) and proper nodes are added to device tree.
N Rear camera Is not planned to be added to support list. If you have such a need, development is welcome. Mainline driver doesn't exist.
P ULP GeForce GPU Acceleration partially works.
N Modem TF300TG uses XMM6260. TF300TL in downstream uses some Asus implementation of modem driver. Contributions are welcome, no work done yet.

Usability

Desktop environment

Since 3D acceleration is not available yet, all DE which use it will be painfully slow and laggy.

Currently xfce4 or mate are recommended.

U-Boot

Warning WARNING: This part is HIGHLY EXPERIMENTAL! DO NOT USE THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING.
Note Further procedure needs pre-made nvflash. Files blob.bin and bricksave.img are only thing that will save you from full brick and allow replace/restore Asus bootloader.

Installing PMOS with U-Boot on eMMC

1. Primary, we need to compile a u-boot on legacy branch:

$ git clone https://github.com/clamor-s/u-boot -b legacy
$ cd ~/legacy
$ export CROSS_COMPILE=arm-linux-gnueabi-
$ make transformer_t30_defconfig tf300tg.config # Make sure to use the correct model number
$ make all

Copy u-boot-dtb-tegra.bin file to nvflash folder. Now, flash new bootloader with nvflash tool. Go to nvflash folder and do (Make sure to flash to EBT partition):

# ./wheelie --blob blob.bin
# ./nvflash --resume --download 4 u-boot-dtb-tegra.bin

2. Secondary, during the Installation process add --split option then export:

$ pmbootstrap pull
$ pmbootstarp init
$ pmbootstrap install --split # --fde (optional)
$ pmbootstrap export

3. Finally, set /boot partition: Mount pm_boot, copy dtb from dtbs folder to root directory (NOT rootfs), make uInitrd:

# mount /tmp/postmarketOS-export/asus-tf300tg-boot.img /mnt/tmp/
# cd /mnt/tmp/
# cp /mnt/tmp/dtbs/tegra30-asus-tf300tg.dtb /mnt/tmp/
# mkimage -n "Ramdisk Image" -A arm -O linux -T ramdisk -C gzip -d initramfs uInitrd
# umount  /mnt/tmp

Go to nvflash folder and flash /root and /boot to tablet (Make sure to flash /root to UDA and /boot to APP):

# ./wheelie --blob blob.bin
# ./nvflash --resume --download 17 /tmp/postmarketOS-export/asus-tf300tg-root.img
# ./wheelie --blob blob.bin
# ./nvflash --resume --download 10 /tmp/postmarketOS-export/asus-tf300tg-boot.img

Issue with rootfs size

When install with --fde option (Maybe without encryption issue the same. It's not tested yet), the rootfs size less than Data partition on tablet. To fix it, we'll need sdcard as Live boot (just install PMOS on it). Load from sdcard, unlock crypt_LUKS and do:

# parted /dev/mapper/luks-xxxxx
(parted) print all # Look at max size partition
(parted) resizepart 1 <max size partition>

Then lock crypt_LUKS and reboot to eMMC. The rootfs size must to be changed.

Disassembly

Dock

  • Remove 2 torx screws on the bottom
  • Remove 4 Philips screws under the glued pads on the bottom
  • Remove 3 Philips screws near the mouse buttons. Be careful with removing and adding back the top plastic piece, it has small clips

Tablet

See also