[Kernel] KernelfoX (2015-05-26) - NFS / Samba / NTFS / Lirc - Nexus Player Android Development

Features​
Code:
Enable loadable module support
- Module unloading
Forced module unloading
Multimedia Support
- Digital TV support
- DVB Network support
- Remote controller decoders
LIRC + all protocols
- Remote Controller devices
Windows Mediacenter IR
Loopback driver
Media USB adapters
- Dibcom DiB0700
File systems
- CD-ROM/DVD Filesystems
ISO9660 / UDF
- DOS/FAT/NT Filesystems
NTFS+write support
- Network File Systems
NFS v2/v3
CIFS + SMB2 + client caching
This is my first attempt at building an Android Kernel, last time I did it was for Ubuntu Gutsy, so please bear with me.
This is a stock AOSP kernel for Fugu, 3.10.20. All I did for now was a make menuconfig enabling some features I miss. I'm testing what I enabled, so far I've been able to mount an smb share from both windows 7 and my D-Link DNS-320 NAS running alt-f. Tried to mount nfs but it failed against my NAS. Haven't tested it yet with an NTFS formatted drive, will report back once I do. NFS mounting worked after I disabled SELinux enforcing, will try to figure what's needed to get it going without turning it off. I've been able to move apps to external storage using bind mounts over an ext2 formatted micro SD card, and on an NTFS formatted HD. This didn't work on a FAT formatted card, I'm mostly sure it's because of lack of extended attributes needed by SELinux.
All the features enabled on the kernel are built-in for now, but module loading is enabled in case you want to compile some.
I have a powered OTG USB hub, connected an old Microsoft MCE receiver and got the direction keys on the remote working, no other key worked, so I guess some kind of keymap is needed, will dig into it soon.
Also, I've built with support for my ISDB-T receiver (digital TV standard used in Japan and most of South America). It's seen by the kernel but fails to load firmware. My receiver is a Mygica S870, don't know how involved will be the process to get it working, it's not my main focus as I use it with a Raspberry Pi running tvheadend, but would be nice to get OTA tv on the nexus player with just an USB tuner. If you'd like me to add your tuner, let me know the HW / USB:ID.
For now, the kernel is provided as a zipped image, download, extract and test before flashing:
Code:
adb reboot bootloader
fastboot boot boot.kernelfox.img
If you decide to install it, you can do it with:
Code:
adb reboot bootloader
fastboot flash boot boot.kernelfox.img
or you can use TWRP to flash it. Remember, this is not an update zip, so you should copy the extracted .img file to your player (not the zip), and select Images... on TWRP to see it. There's a kernel.config file in the zip, it's what I used to build this one, if you want to try compiling it yourself, copy it as x86_64/.config on your git root.
I've been running it for the last few hours, but as my gf is using the player, I'm limited to testing from a remote adb. I'll be trying to build support for some type of unionfs for apps2sd, I'm evaluating the available options and would love suggestions about this, again, last time this was an issue for me was on the Motorola Milestone (ie Droid) days.

[Reserved]Really?

Since this is AOSP based, I'm assuming it won't work with CM?

Ambious said:
Since this is AOSP based, I'm assuming it won't work with CM?
Click to expand...
Click to collapse
I'm almost sure it shouldn't, but you can do a one time boot without flashing it, so I'd love to hear if it does. My player gets a lot of use here so I can't mess that much with it right now. I'm targeting rooted stock, as I really like it and would love it with just some tweaks.

@FaberfoX is this for 5.1.1

Toneman07 said:
@FaberfoX is this for 5.1.1
Click to expand...
Click to collapse
Yes, haven't had time to dig more into it, but I've been running it on LMY47V since I built it with no issues.

Thanks man going to flash it this week

Related

Booting Ubuntu on the O2X

I've spent some (much) time this week with trying to get ubuntu running on the optimus 2x. I have succeeded to boot and get the wifi, X11 and the touch screen sort-of working.
The ramdisk is completely replaced with a busybox executable, some symlinks to it and a shell script that mounts the necessary stuff (/dev/block/mmcblk1p2 as ext3), changes root directory and calls /sbin/init.
USING THE FOLLOWING WILL VOID ANY WARRANTY YOU MIGHT HAVE LEFT AND MIGHT ALSO BRICK YOUR PHONE!
Seriously, don't do this if you don't wish to risk the data on your phone.
I will be providing some demo images for people who don't have a build environment up and running. These images will not work particularly well, don't get your hopes up .
If you want to have a big linux installation (more than 3 GB) you can flash the images to the second partition on your external sd (obviously you have to create this yourself first). You can use the following boot image (which assumes that linux is on /dev/block/mmcblk1p2 with ext3:
https://ha.xxor.net/o2x/boot-20110813.img
I have also targzipped the modifications to the file system that were required to get stuff going here:
https://ha.xxor.net/o2x/o2x-20110813.tar.gz
This should be extracted directly to the root file system.
The kernel source code is up at https://github.com/ergoen/LG-Optimus-2x-linux-kernel
Things that have been done to get this to "work":
1. Boot partition
Apart from grabbing the busybox stuff from some nexus one boot image (I'm sorry whoever fixed it, I don't remember where I got it from ) the boot command line had to be modified a bit, changing stuff from the default usually ends up in a phone that won't boot, but I discovered that it's possible to append new arguments to the default ones. So the following have been appended:
console=tty0 root=/dev/mmcblk1p2 init=/sbin/init
The console=tty0 makes sure that you see stuff on the screen while ubuntu get's running. The last two are not necessary to boot, but ubuntu seem to like (need?) them (or at least the init=/sbin/init), since otherwise you never get to the login prompt on the screen.
2. The Ubuntu installation
To make it possible to communicate with the phone at all adbd was put into the /sbin/ folder and a symlink was created /system/ -> /. Also the "/sbin/adbd recovery &" command was added to rc.local to make it autostart.
2.1. Modules and wifi
We need the /lib/modules/2.6.32.9 directory. Most files inside that were generated using the "depmod" command, the exception is wireless.ko which was taken from android, the firmware and nvram files needed for the wifi chip to work were placed in the /lib/firmware/wl/ folder. To make the wifi module autoload with the proper firmware "wireless" was added to /etc/modules and the file /etc/modprobe.d/wireless.conf was created with the contents describing the location of the firmware and nvram.
To make the wifi autoconnect on boot the /etc/network/interfaces file was modified with the following contents:
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
(To make the wifi autoconnect to your wireless you need to run the command "wpa_passphrase networkname networkpassword > /etc/wpa_supplicant.conf using adb or chroot)
2.2. X11
Getting X up by running xinit produces a simple black screen on the phone. At first I thought the problem was that the refresh rate was set to 106 Hz, indeed changing it with xrandr and pushing a new mode got me a visible xterm on Kubuntu 11.04:
https://ha.xxor.net/o2x/xterm.jpg.
On Ubuntu 10.10 it even gave me a nice colored gdm screen:
https://ha.xxor.net/o2x/gdm.jpg
But the image I got there was static and wasn't being updated. Turns out the reason the screen was black earlier with the 106 Hz rate and the reason why the screen is now just showing an image is that the framebuffer device doesn't update the screen like it should..
By modifying the kernel source to redraw the screen every 50 ms (~20 Hz) it's possible to get a scren that works. This is an ugly hack in the tegra-fb driver though, so I'm open for suggestions on how to solve it in a better way!
2.3. Touchscreen
By default the only thing the touchscreen does is force the mouse up in the left corner, I think this is due to some multitouch thing. Some more kernel hacking (basically half-disabling multitouch) makes the touchscreen work.
Pictures:
https://ha.xxor.net/o2x/SAM_0671.jpg
https://ha.xxor.net/o2x/SAM_0672.jpg
Video:
http://vimeo.com/27662093
Thans to RaYmAn and lilstevie on #tegralinux for all their help this far!
3. Misc
(K)Ubuntu 11.04 uses a new version of libc which crashes with the current nvidia kernel (2.6.32.9) on this hardware (http://developer.nvidia.com/tegra/forum/errata-657451-tls-bit-20-cp15-c13-3), so I'm going back to Ubuntu 10.10 until someone ports a newer kernel to the Optimus 2x or this problem can be solved in another way.
edit 1: Ubuntu 10.10 with much more working X11 noted in section 2.2.1.
edit 2: X11 working even more, touchscreen works aswell!
edit 3: Landscape mode works with both X11 and the touchscreen now, getting ready for alpha 1!
Current status:
Working:
- adb (best way of controlling device currently)
- X11 (only framebuffer with hardcoded refresh rate of ~20Hz)
- landscape mode fixed! =D
- touchscreen (probably only single touch)
- wifi (only when running things from console, ubuntus network manager does not recognize it)
Not working:
- Basically everything else
Alpha 1:
EDIT: Seems that multiupload has screwed up and this link was going to some crap, anyway this is not relevant anymore
Username 'ubuntu', password 'ubuntuxda'. Don't use this if you don't know how to restore the boot partition! (Or else you won't be able to boot back into android!)
Experiments:
Tried disabling the CONFIG_TEGRA_ERRATA_657451 switch in the kernel to make newer linux versions boot. This might be a bad idea in the long run, but this far things are working better than with the switch enabled..
I tried Ubuntu via chroot method posted in other thread, but I'm a noob.. Can you please explain what is different about your ubuntu?? Does it boot without Android and doesn't need VNC stuff?
Yes, it boots instead of android when turning on the phone, but it doesn't work completely, so I mostly put it up here so that people could help test and fix/hack things.
You rock! Unfortunately I'm no dev, so can't help but hopefully others will, so we'll get a fully working linux on our phone, and maybe later even meego. Is there btw drivers for the gpu? Because hdmi, with usb host ofc, would be really useful!
Anyway, good job, really!
This looks great ergoen! I'm no dev either but I can't wait until it's available to everyone, I would love to have Ubuntu running on my O2x.
Best of luck!
gpu drivers are closed source, and the ones released by nvidia require a newer kernel (2.6.38), so thats not really possible yet.
Newer kernel will be necessary anyway though, since the crashes I'm getting seems to be due to a bug in tegra which gets worked around in 2.6.36. I'm not skilled enough to perform that port though. I will of course give it a try, but most likely I'll go for some older version of ubuntu and/or perhaps meego instead.
Håller med tidigare poster. Would be awesome with native Ubuntu and Meego on the phone... keep up the good work, can't wait to follow this development.
Sent from my Optimus 2X using XDA Premium App
ergoen said:
... I realized that it tried to run the screen at [email protected], which is hmm, wrong . So setting up a script at /etc/xprofile, which makes sure the refresh rate is 60Hz...
Click to expand...
Click to collapse
What would happen if you changed this to 72Hz instead? I saw that info when I was browsing System Information in some app. Im not a dev At. All. But tell me what you think it's probably a stupid question
Sent from my Optimus 2X using XDA Premium App
I can give it a try later, not that it would make any difference .
edit: 72 Hz also seems to work, cool, that's higher refresh rate than my computer screen...
ergoen said:
I've spent some (much) time this week with trying to get ubuntu running on the optimus 2x. I have succeeded to boot and get the wifi working, also X sort-of works (software fb). I have only slightly modified the kernel (built with CONFIG_SIGNALFD=y so that Meego wont complain in a related attempt to get that os booting). The ramdisk is completely replaced with a busybox executable, some symlinks to it and a shell script that mounts the necessary stuff (/dev/block/mmcblk1p2 as ext3), changes root directory and calls /sbin/init.
USING THE FOLLOWING WILL VOID ANY WARRANTY YOU MIGHT HAVE LEFT AND MIGHT ALSO BRICK YOUR PHONE!
Seriously, don't do this if you don't wish to risk the data on your phone.
I will not provide a complete root file system for two reasons:
1. It's pretty easy to make yourself, grab the omap3 kubuntu mobile image from the kubuntu site, or use rootstock from an ubuntu installation to build one yourself.
2. My upload sucks, and putting several hundred MB onto the interwebz would hurt me.
However, I have placed an image of my boot partition here (assumes you've got ubuntu on the second partition of the external memory card formatted with ext3):
https://ha.xxor.net/o2x/boot.img
I have also targzipeed the modifications to the file system that were required to get stuff going here:
https://ha.xxor.net/o2x/o2x.tar.gz
This should be extracted directly to the root file system you aquired earlier.
Things that have been done to get this to "work":
1. Boot partition
Apart from grabbing the busybox stuff from some nexus one boot image (I'm sorry whoever fixed it, I don't remember where I got it from ) the boot command line had to be modified a bit, changing stuff from the default usually ends up in a phone that won't boot, but I discovered that it's possible to append new arguments to the default ones. So the following have been appended:
console=tty0 root=/dev/mmcblk1p2 init=/sbin/init
The console=tty0 makes sure that you see stuff on the screen while ubuntu get's running. The last two are not necessary to boot, but ubuntu seem to like (need?) them (or at least the init=/sbin/init), since otherwise you never get to the login prompt on the screen.
2. The Ubuntu installation
To make it possible to communicate with the phone at all adbd was put into the /sbin/ folder and a symlink was created /system/ -> /. Also the "/sbin/adbdb recovery &" command was added to rc.local to make it autostart.
2.1. Modules and wifi
We need the /lib/modules/2.6.32.9 directory. Most files inside that were generated using the "depmod" command, the exception is wireless.ko which was taken from android, the firmware and nvram files needed for the wifi chip to work were placed in the /lib/firmware/wl/ folder. To make the wifi module autoload with the proper firmware "wireless" was added to /etc/modules and the file /etc/modprobe.d/wireless.conf was created with the contents describing the location of the firmware and nvram.
To make the wifi autoconnect on boot the /etc/network/interfaces file was modified with the following contents:
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
(To make the wifi autoconnect to your wireless you need to run the command "wpa_passphrase networkname networkpassword > /etc/wpa_supplicant.conf using adb or chroot)
2.2. X11
Getting X up by running xinit produces a simple black screen on the phone. After some troubleshooting and voodoo magic I realized that it tried to run the screen at [email protected], which is hmm, wrong . So setting up a script at /etc/xprofile, which makes sure the refresh rate is 60Hz, and running it after xinit gets you a xterm!!!
https://ha.xxor.net/o2x/xterm.jpg
Telling /etc/X11/xinit/xinitrc to run it makes sure that it gets set up properly by the startx script, unfortunately startx doesn't go through for me on kubuntu because of some weird error caused by a hardware problem in tegra: (http://developer.nvidia.com/tegra/forum/errata-657451-tls-bit-20-cp15-c13-3).
Unfortunately this (probably) means that either we'll have to stay with old versions of libc or get a newer kernel (2.6.36 contains fix). Old libc seems backwards, but porting a new kernel requires a bit more skill than I possess.
2.2.1. Ubuntu 10.10
Grabbed the image ubuntu-netbook-10.10-preinstalled-netbook-armel+omap.img.gz from http://cdimage.ubuntu.com/ubuntu-netbook/ports/releases/maverick/release/ . After first unpacking the tgz, then unpacking the raw disk image to partition images (with 7zip on windows) and then flashing the 1.img file to the second partition on my sdcard I managed to run a much more bug free ubuntu than before.
Ubuntu 10.10 (Maverick) uses an older version of som libraries that don't crash with the old o2x kernel.
This has lead to the following:
https://ha.xxor.net/o2x/gdm.jpg
Obviously touch screen isn't working properly (pressing it puts the pointer into the upper left corner :S) so can't get further than this currently.
3. Misc
avahi-daemon and cups seems to be crashing all the time and restarting, so removing them (apt-get purge if ubuntu/kubuntu) will make the boot much cleaner. Also I get lots of alignment trap kind of errors that shouldn't be there for different kinds of services, (due to tegra bug mentioned earlier).
edit 1: Ubuntu 10.10 with much more working X11 noted in section 2.2.1
Click to expand...
Click to collapse
Its good you got it to work.Saves me some work.I was gonna begin this project my self after the 19th when my exams end.Maybe i could help you.
ergoen said:
I can give it a try later, not that it would make any difference .
edit: 72 Hz also seems to work, cool, that's higher refresh rate than my computer screen...
Click to expand...
Click to collapse
Most computer screens usually support atleast 72hz also, it's just that it only works with d-sub, and sometimes only at a lower resolution.. It's possible to make special drivers to some screens to enable higher refresh rate through dvi also.
Anyway, it's good the screen on the phone refreshes at 72hz instead of 60 for android, but in linux I really don't see the benefit.. Doesn't hurt to have though. Btw, if we would stay on this kernel, can we use the drivers from android then? Shouldn't gpu also work? Or are the drivers limited and don't allow xorg for example? Sorry if it's stupid question, don't have that much knowledge how android works yet.
Update: X11 and touchscreen work on Ubuntu 10.10 Maverick with new kernel (just a few hacks )!
manasgirdhar: sure! Lot's of things to do new kernel is needed for anything newer than ubuntu 10.10, and even here things like sound etc (cpu scaling maybe too) don't work.
kruppin: actually i removed the xorg.conf now, the phone thinks its running at 106 Hz and it works. Unfortunately in practice it goes at more like 20 Hz because of the hack I made to enable the fbdev output in the kernel. Android doesn't use X11, so those drivers wont be of any use. (I will post the kernel modifications to github soon)
edit: kernel source up on https://github.com/ergoen/LG-Optimus-2x-linux-kernel
A List of Things working at 2nd Post would be nice.
So anybody could fast see Updates,...
Edit:
Have you tried some "cleaner" Linux like Debian?
Alpha 1 is up in the second post for anyone who wants to test it (don't ^^).
I have not tried debian no, I thought ubuntu would be the easiest to google errors and bugs for .
You are great! i was hopin' for this since I have mine. You should try to make usb(otg) work to get some devices going i will try to test it soon
That's amazing We have to test USB OTG function. If it works by default, I'll try this right now
It is possible to make a dual-boot: ubuntu and android?
I don't think usb otg works since I am basically using the android version of the kernel, I also won't be able to try since I don't have a cable... (will buy one sooner or later).
Dual boot probably works if you flash the boot.img onto the recovery partition instead of the boot partition (/dev/block/mmcblk0p7 instead of /dev/block/mmcblk0p5). I have not tried this though. That way regular booting would give android and booting while holding volume down would give ubuntu, only problem with this is that cwm will be gone and the only way to fix broken things would be to flash with nvflash.
well it is not a major deal if have cifs avail needs kernel support as well. Benee mentioned (might) some otg support, mayb u could ask.
also, you might give E17 a try, it is butter-fast, and has a touch module for keyboard (letter zooming.!..) LINK
this can be compiled on a lot of hw, and gives good response with fbdev non-accel drivers also.
and most linux apps work on it fine. ofc until we have 2d/3d accel and might try compiz/fusion as well
LINK
Great job ergoen!
I've worked on exactly the same some weeks ago but i never accomplished it. because i stuck creating a working ramdisk. Which toolchain do you use?
MfG

[OtherOS] [Gentoo] [Native] SGT-OtherOS for Enthusiasts (GT-P7510)

Want to run an alternate OS on your SGT? Perhaps use it as a Linux Server? Or want to help develop? You may be interested in this 'ROM'.
Lame Video Demo: SGT-OtherOS Gentoo Milestone 1 (m1) Demo Boot GT-P7510 - YouTube
Quick Touchscreen Demo Video: SGT-OtherOS zefie kernel touchscreen driver usability demo - YouTube
(Please watch in 720p HD Full Screen! You will be able to read the screen then.)
SGT-OtherOS Gentoo armv7l vfpv3-d16 for GT-7510
Warning!
Do NOT attempt to flash this on any other SGT besides the GT-7510. DO NOT FLASH on the 3G and LTE models!
This has not been tested on models with mobile radio, which usually have a different partition map, and more locked down (aka easier to brick) secure bootloader. You have been warned!
This is not ready for production use. This is an enthusiasts' OS.
Just a note, flashing these partititons (then subsequently wiping /system with mkswap) is not as harmful as it may sound. I have successfully flashed back to Stock with Odin to test this before posting it.
Features:
Based off of TABUNTU Project
OpenRC Gentoo System
CWM v5.5.0.4 recovery for flashing Kernel Updates, or accessing ADB to debug (OtherOS is under /data/ in recovery)
Customized kernel with some driver updates, and all kernel modules (GitHub Source)
Imported pershoot modifications (Overclocking, USB Charging, ect)
Linux Shell (no gui yet)
Custom scripts
Uses /dev/mmcblk0p4 (/system) for compcache swap space
Current Hardware Status:
Basics (Display, NAND, RAM, CPU, yadda yadda)
Full USB and Charging
Battery Status
Wifi support (WEP)
Sound support including jack detection
Touchscreen (with Kernel Update m1-2012.03.24)
Known Issues:
The backlight does not turn off when linux power saving turns on
It is impossible to turn the device off while plugged into a charger (this is due to how the charging animation works. Unfortunately this may never work. /sbin/init on ramdisk is the key/reason)
Pressing CAPS-LOCK (or any other led-lighting key) on USB keyboard will kernel panic.
Kernel Updates:
m1-2012-03-24
Patched touchscreen driver to be evdev and tslib compatible
Anything not listed assumed not working
How to install
WARNING!
You will lose ALL CURRENT DATA stored on your tab, including /sdcard! I did not brick my tab doing this, but cannot guarantee anything for you. Try this as your own risk!
Each time you flash the kernel for OtherOS, your "Custom Binary" "Flash Count" flag in Odin increases. AFAIK, this just means your warranty is VOID, and has no ill effects on the tablet.
This is not dual boot and REPLACES Android, but it is easy to revert back. However, there will be no Android OS while OtherOS is installed!
Download SGT_OtherOS_Gentoo_m1.tar.7z
Flash via Odin
Root password is gentoo, change it.
The image has an auto-resizer, so when you flash data.img, it will auto-resize on first boot, and give you a 13gb partition for your OtherOS.
How to Restore Android
When you restore to Android via Odin, it leaves /data un-formatted. Because of this, there are a few extra steps to restore back Android completely.
Download p4_16G_32G.pit and an Odin stock dump of UEKMP
Flash them as you normally would to restore to stock.
Wait for reboot, you will get an error in the stock recovery app
When the menu appears, choose Wipe data/cache
Reboot and choose one of:
A. To go back to stock: Reflash the Odin tar without the .pit file this time
B. To go back to custom: Reflash CWM and either restore nandroid, or format /system and install a custom ROM.
Tips and Tricks:
Gentoo Knowledge
The use of this OS assumes you know how to use Gentoo on a Desktop PC. If not, or you would like a refresher, please read the Gentoo Handbook. Please read this prior to asking any non-SGT specific configuration questions. Please skip the "Installing Gentoo" section. I've got that covered for you
Accessing Clockwork MOD Recovery
You cannot 'reboot recovery' in linux. So, to access recovery, simply reboot. When the screen backlight turns off, hold VOL DOWN until you get the fastboot menu. It's that simple
Accessing your Gentoo install from Recovery
You can access the root partition of your Gentoo install in Clockwork Recovery. You can mount /data quickly by choosing 'Install from SD Card', 'Choose update.zip'. When CWM says 'no file found', /data is mounted.
Future Kernel Updates
As time passes, I may release a new kernel, with additional modules, features, scripts, or workarounds. These can be installed via CWM like an Android Update ZIP. While running Gentoo, update zips are stored in /media. While running recovery, updates are available under /data/media. Be sure to mount your Gentoo install as stated above before attempting to adb push any update zip files. You can also install kernel updates from the OtherOS environment using this script.
Future Update Possiblities
Right now I only have plans to update the kernel via CWM update.zip. OtherOS primary releases will likely be in Odin format. However, enthusiasts, or devs branching off into their own project may like to know that, since you have access to the entire root partition (ext4) via CWM, you can basically patch anything. Store your rootfs in a tar, and extract it via /tmp in your update.zip to preserve permissions. Your only limitation is the RAMDisk of recovery (or not, if you are tactical).
Disable Overclocking from CWM
If you are having problems with your SGT crashing, your SGT may not support 1.4ghz. Simply access your root partition via CWM as explained above, and remove the file /data/etc/local.d/SGT_cpu_oc_1400.start
Set up Wifi without USB OTG
As it stands, you will need a USB input adapter to use your Gentoo system, because I cannot possibly auto-configure your wifi. I know for most people, this is a setback, however you can configure your Wifi manually and push the file back in CWM. Access root from CWM, as explained above, and pull the following file: /data/etc/conf.d/net
Edit it as necessary and push it back, be sure to set its permissions to 0644 before attempting to reboot back into Gentoo.
Change your Wifi MAC Address
There is a hidden file the Wifi Driver uses, /data/.mac.info (/data/data/.mac.info via CWM). Inside this file you will find a MAC address. Once this file is changed, the next time the dhd module (wifi) is loaded, it will use the MAC Address specified in the file.
Recovering from a crash
This is still in alpha status. There may come a time (for example, if you hit Caps-Lock on an external keyboard) where your system will hard lock. You do not have to let the battery drain, you can force the system to reboot by holding the power button for approximately 10 seconds. Release the power button when the screen backlight turns off. Please be advised this is not suggested for normal shutdown, and only for use if the system is not responding.
Touchscreen Guide (requires kernel update m1-2012-03-24 or newer)
Light Single Touch = Move Mouse
Hard Touch = Left Mouse Button
Light Two-finger Touch = Right Mouse Button (from left finger position)
Is this rom natively boot on gentoo? Can you upload a video or pics? And when this will be get available for p7500?
leventccc said:
Is this rom natively boot on gentoo? Can you upload a video or pics? And when this will be get available for p7500?
Click to expand...
Click to collapse
1) Yes, this is native, like the Tabuntu project
2) I am working on a quick video
3) I cannot test on hardware I do not have. Likely it will work but may require partition maps to be updated. We auto-format /dev/mmcblk0p4 on first boot (/system on GT-P7510). This is safe on the GT-P7510, but may not be safe on the GT-P7500.
Also there is no GUI yet, so right now it is mainly for:
1) Development
2) Turning your SGT into a Linux Server
3) To say you can run Gentoo on your SGT
Edit: For non-GT-P7510 owners, if you give me a copy of /proc/partitions (from any ROM), I will verify if this is safe for you or not.
If it is not, I will try to add support by build m2
zefie said:
1) Yes, this is native, like the Tabuntu project
2) I am working on a quick video
3) I cannot test on hardware I do not have. Likely it will work but may require partition maps to be updated. We auto-format /dev/mmcblk0p4 on first boot (/system on GT-P7510). This is safe on the GT-P7510, but may not be safe on the GT-P7500.
Also there is no GUI yet, so right now it is mainly for:
1) Development
2) Turning your SGT into a Linux Server
3) To say you can run Gentoo on your SGT
Edit: For non-GT-P7510 owners, if you give me a copy of /proc/partitions (from any ROM), I will verify if this is safe for you or not.
If it is not, I will try to add support by build m2
Click to expand...
Click to collapse
major minor #blocks name
179 0 15387648 mmcblk0
179 1 12288 mmcblk0p1
179 2 5120 mmcblk0p2
179 3 8192 mmcblk0p3
179 4 591872 mmcblk0p4
179 5 458752 mmcblk0p5
179 6 2048 mmcblk0p6
179 7 12288 mmcblk0p7
179 8 13969920 mmcblk0p8
179 9 8192 mmcblk0p9
179 10 307200 mmcblk0p10
Here is the partitions
leventccc said:
179 3 8192 mmcblk0p3
179 4 591872 mmcblk0p4
179 8 13969920 mmcblk0p8
Click to expand...
Click to collapse
Should be alright then
I will be flash but I want to ask how can we connect to keyboard and mouse?
USB OTG adapter .. this is the one I bought
Holy crap... I love you. Gonna install this regardless but need WiFi and BT
GazaIan said:
Holy crap... I love you. Gonna install this regardless but need WiFi and BT
Click to expand...
Click to collapse
I'm gonna work on WPA for m2. Open Wifi should work, but not tested. WEP 128-bit was tested and works. The driver is a little crazy, so there are some workarounds, and as of now my workaround only supports WEP.
BT I am unsure will ever work, and is not a high priority for me. To be honest, Bluetooth gives me trouble, period. Not just on OtherOS, but the entire protocol, I am not a fan of it. But I will see what I can do.
zefie said:
I'm gonna work on WPA for m2. Open Wifi should work, but not tested. WEP 128-bit was tested and works. The driver is a little crazy, so there are some workarounds, and as of now my workaround only supports WEP.
BT I am unsure will ever work, and is not a high priority for me. To be honest, Bluetooth gives me trouble, period. Not just on OtherOS, but the entire protocol, I am not a fan of it. But I will see what I can do.
Click to expand...
Click to collapse
Hm... If WiFi works then, I might just buy that USB adapter so I can make use of it all. I installed Ubuntu but I had to fight the screen to get as far as I did, and then I hit a roadblock because I had to type things in and didn't have the adapter oh; you should probably start a new thread for Ubuntu as well, everyone probably overlooks the original tabuntu thread.
GazaIan said:
Hm... If WiFi works then, I might just buy that USB adapter so I can make use of it all. I installed Ubuntu but I had to fight the screen to get as far as I did, and then I hit a roadblock because I had to type things in and didn't have the adapter oh; you should probably start a new thread for Ubuntu as well, everyone probably overlooks the original tabuntu thread.
Click to expand...
Click to collapse
For some reason, and i did try this, my kernel does not fix touchscreen on Tabuntu. I think Ubuntu's 'auto config' is our enemy on such a fine tuned device.
Also, since Gentoo is compiling everything, it runs ALOT more efficiently. Faster and less RAM usage, as all binaries are tegra2 optimized (or at least cortex-a9)
edit: m2 will launch gnome and onboard keyboard
zefie said:
For some reason, and i did try this, my kernel does not fix touchscreen on Tabuntu. I think Ubuntu's 'auto config' is our enemy on such a fine tuned device.
Also, since Gentoo is compiling everything, it runs ALOT more efficiently. Faster and less RAM usage, as all binaries are tegra2 optimized (or at least cortex-a9)
edit: m2 will launch gnome and onboard keyboard
Click to expand...
Click to collapse
I actually began to suspect the same, with Tabuntu it seems like the mouse does move, but only hovers. I notice buttons highlight when I tap them, but to actually click a button I have to finger rape it. Even in this video here, after rape clicking one of the buttons in the top right corner, I can tap and it will be highlighted. If its fixed here then we all know we can blame Ubuntu for it.
http://www.youtube.com/watch?v=0hcBSxsHpII
Can key events be sent to Ubuntu via ADB, like how it can be sent while in Android? If I could actually get ADB to connect then I can use keyevents to type stuff in while I wait on my USB Adapter.
I'm probably putting this on the sideburner for a while, but I wanted to put out my latest compiled kernel (to match github) with all my touchscreen driver patches, as well as my sound workaround. flashing this to tabuntu does not magically enable touchscreen but does have a more proper driver (as least compatible with ts_print_raw..
http://files.persona.cc/zefie/files...rnel_updates/m1/2012.03.26/otheros_kernel.zip
Edit: On sideburner until ICS release for our tab, and subsequent OSS release, because I want to start over with the 3.x kernel sources.
zefie said:
I'm probably putting this on the sideburner for a while, but I wanted to put out my latest compiled kernel (to match github) with all my touchscreen driver patches, as well as my sound workaround. flashing this to tabuntu does not magically enable touchscreen but does have a more proper driver (as least compatible with ts_print_raw..
http://files.persona.cc/zefie/files...rnel_updates/m1/2012.03.26/otheros_kernel.zip
Edit: On sideburner until ICS release for our tab, and subsequent OSS release, because I want to start over with the 3.x kernel sources.
Click to expand...
Click to collapse
Aw damn, good luck with those sources! Hope something even awesomer can come out from this, I like other OSes on my Tab. Just bought the USB adapter to make use of my keyboard as well
Unfortunately I have 2 bits of bad news about this project
1) I had to sell my tab to pay the rent this month due to a layoff.
2) I seemed to have lost my pre-m2 archive, I was going to release it as-is, but now I can't
I'll leave the existing files up though, and hope someone continues this project.

[Q] OpenElec v4 beta

As you may know, OpenELEC v4 beta was released yesterday.
I formatted my SD Card, used NOOBS to install OpenELEC 3.2, set up my wifi, then pushed the kernel & system + md5's to the update folder, and it successfully updated.
The system flies and is really really smooth, even with my large library in an external HD.
The problem is, my WiFi dongle that I have always used (f5d8053 v3) doesn't work, neither does the spare I have. After a couple of reboots it did work, then on the next boot it didn't.
Can anyone tell me how to pull a log file? I found the option in Setting to enable log - do I switch this on, then reboot to replicate the error, then SSH to get the log file? If so, where is it stored?
Yeah, thats right. You can read about the log here
http://wiki.xbmc.org/index.php?title=Log_file/Advanced
And location
http://wiki.xbmc.org/index.php?title=Log_file/Advanced#Location
(Linux $HOME/.xbmc/temp/xbmc.log)

DebiAndroid [WIP] - Debian native/chroot for datamedia Android installations

Debian for the HP TouchPad
Downloads:
todo: add pics and binary links, for now there's https://mega.co.nz/#F!xZ81iKoK!Xio5bV9yjBRPTIzjLhCX3A
Source:
Kernel Builder: https://github.com/CalcProgrammer1/kernel_tenderloin_debian
I put together this kernel builder repository that contains the ramdisks needed to boot either a discrete Debian partition or a chrooted Debian install. It uses submodules for the kernel and backports sources. You can just run the mkbootzip.sh file and it will build the uImage.Debian/uImage.DebiAndroid moboot kernels. Choose the one that fits your installation method and install it to /boot on the TouchPad.
Kernel Source: https://github.com/CalcProgrammer1/..._msm8660-common/tree/tenderloin-cm-11.0-wip-5
Backports Source: https://github.com/CalcProgrammer1/backports-3.10-2
Thanks to jcsullins for porting the TouchPad to the samsung_msm8660-common kernel, without which this would not have been so easy! The Note 1 shares this kernel tree and I already had Debian working on it, made the port to TouchPad dead simple.
So I got an idea that I'm working on. I have been using Debian in a chroot on my Note 3 and it's really convenient to have both Debian and Android running side-by-side, but there are some things (mainly hardware/GPU hacking) that work better with a native install of Debian/Ubuntu/etc. On my Note 3 (which uses a datamedia partitioning scheme) I decided to forgo using a loopback mounted img file for my chroot and instead dump the Debian rootfs straight into my /data partition in the /data/debian directory. Why? With this configuration, Android, Debian, and Internal SD all share the same storage partition and can grow or shrink as space allows rather than deal with micromanaging partitions and having to resize. Want to install a desktop environment and delete it later? Go ahead, space allows.
So I decided to reformat my TouchPad with TP Toolbox last night and get CM11 running on it so my Ubuntu partition got wiped. That got me thinking...if I install my datamedia Debian installation, could I then write an init script to boot directly into it from a kernel? If so, the same Debian installation (residing in cm-data LVM in the debian directory) could be used both as a native install as well as a chroot from Android. Awesome!
So that's what this project is, create a Debian rootfs that doesn't require repartitioning, works as a chroot, and works natively as well. I'm calling the project DebiAndroid because it merges Debian and Android. Got some time to work on it over the weekend so hopefully I get something up, but for those who want to do it yourself it's basically just that:
1. Use debootstrap to generate a Debian armhf rootfs
2. Use qemu-user-static and chroot on your PC to install all the packages you want on your rootfs
3. Compress rootfs, put it on TouchPad, decompress in /data/debian
4. Write script to bind system FS entries to /data/debian and chroot in
5. Write init script to boot directly into /data/debian for native use
So far I've been successful at all of these, having a working chroot (with MATE desktop through XServer XSDL app) as well as booting into the chroot (terminal only right now, and USB OTG was broken so I couldn't log in). Hopefully I can get some 3.4 kernel action going as well. I'll update this post once something happens.
EDIT 1: I'm in! I forgot to set a password for root and I don't have any other accounts at the moment, so I rebooted into CM11 and chrooted in, set a password. Also had to disable the ALSA service because there's a missing firmware file that crashes it. Now to get networking up and running, I think I'll just build a kernel locally and modules_install rather than deal with cross compiling.
EDIT 2: I'm at it again, this time going to focus on Freedreno graphics as I'm really close on my Note 1 port which uses the same GPU and now the same kernel source tree as well. I was able to get a rendered 3D screensaver to run for a few seconds on my Note, should be repeatable on the TP.
EDIT 3:
Kernel Source: https://github.com/CalcProgrammer1/..._msm8660-common/tree/tenderloin-cm-11.0-wip-5
O_O
Man, that sound really great ! I would like to try it and install it as a zip file on another partition. How much space do you need for the root partition with your mate install ? Did you got some problem with the touchscreen sensibility or with bluetooth, wifi, camera, micro or sound not working ? I guess i could try one with Gnome 3 on my side. Thank in advance for your reply.
Right now it's only working in chroot, so Android is providing the X-server and touchscreen and everything else. I'm trying to get the kernel 3.4 to boot it outside of Android.
I hope you can do it. ^_^ Maybe I will try to find a way to make it work with Arch Linux with your kernel if you succeed to this project.
So finally, one month later, did you succeed into making Debian work for the Tenderloin ?
I got Debian with Freedreno sorta working on my Galaxy Note:
https://www.youtube.com/watch?v=qtb-TSGumNo
The kernel patch I used to make this work seems compatible with the TouchPad kernel source here:
https://github.com/TLOIN-3X-WIP/android_kernel_samsung_msm8660-common/tree/tenderloin-cm-11.0-wip-5
which is based off the same Samsung msm8660-common 3.0 kernel.
If all goes well, this should be pretty simple to get running on the TouchPad same as it is on the Note, which are pretty similar devices in terms of core (MSM8660 vs APQ8060).
EDIT: My kernel patch applied perfectly! I was able to get into X but the backlight shut off and I couldn't see anything without shining a bright light through the swamp of fingerprints covering the screen. Need to fix that issue but hopefully it's working otherwise!
EDIT: Freedreno confirmed working, but still no backlight. It should be at the same level as where my Note 1 demo is (runs es2gears, rss-glx screensavers) but of course I can't see much anything so once I figure out what's turning off the backlight then we should be good to go.
EDIT: Using jcsullins' wip-5 branch fixes the backlight issues. Here's a video:
https://www.youtube.com/watch?v=vx8_u1jhXJY
CalcProgrammer1 said:
I got Debian with Freedreno sorta working on my Galaxy Note:
https://www.youtube.com/watch?v=qtb-TSGumNo
The kernel patch I used to make this work seems compatible with the TouchPad kernel source here:
https://github.com/TLOIN-3X-WIP/android_kernel_samsung_msm8660-common/tree/tenderloin-cm-11.0-wip-5
which is based off the same Samsung msm8660-common 3.0 kernel.
If all goes well, this should be pretty simple to get running on the TouchPad same as it is on the Note, which are pretty similar devices in terms of core (MSM8660 vs APQ8060).
EDIT: My kernel patch applied perfectly! I was able to get into X but the backlight shut off and I couldn't see anything without shining a bright light through the swamp of fingerprints covering the screen. Need to fix that issue but hopefully it's working otherwise!
EDIT: Freedreno confirmed working, but still no backlight. It should be at the same level as where my Note 1 demo is (runs es2gears, rss-glx screensavers) but of course I can't see much anything so once I figure out what's turning off the backlight then we should be good to go.
EDIT: Using jcsullins' wip-5 branch fixes the backlight issues. Here's a video:
https://www.youtube.com/watch?v=vx8_u1jhXJY
Click to expand...
Click to collapse
OMG ! It seem great ! Can you share your method how to install it with a zip file and if you can, make a tutorial of how to port a Linux OS on the TP ? It would be really appreciate to be able to finaly run a linux desktop on the Touchpad. Thank you very much for your hard work. ^_^ Cannot wait to try it.
awesome job ! I cannot wait to try it out myself !!!!!!!!!!
let us know how to install it
Still lovin and rockin my good ol' Touchpad haha
I updated the OP with links to my source code and the build root I use to build the kernel images. If you want to build your own kernel go right ahead and play with it. As for a prebuilt image, it probably won't happen for some time because my rootfs on the TouchPad is a mess (installed a bunch of very large apps like games that aren't feasible to redistribute). I'll have to make a new rootfs from scratch. Since Freedreno is on the verge of making it into Debian testing as it is, it would be best to just wait for that to happen so I don't have to redistribute custom builds of the xserver-xorg-video-freedreno driver (you can build it from source as it's on Debian's git and builds with dpkg-buildpackage, just hasn't made it into a binary release yet). There's also a bug in Mesa that prevents Freedreno from accelerating 3D (GL or GLES). It's a one-line fix and Rob Clark said he's pushed it to master, but it hasn't made its way into a stable Mesa branch yet and thus still needs to be applied manually. Rebuilding Mesa on a TouchPad takes hours. Hopefully that one gets merged soon as well and then we can use straight up Testing without modification. That will make creating a new rootfs image a lot easier. I still haven't messed with getting Bluetooth or touchscreen to work, though the work I and others have done for older Ubuntu releases should apply just fine here. Audio is also going to be tricky, as I deleted WebOS completely and Ubuntu relied on a file from it. I have a webos rootfs that I was able to pull the required files from, but it's not working right.
EDIT: Sound! I talked to jcsullins on #freedreno and he gave me this: https://github.com/CyanogenMod/android_device_hp_tenderloin/blob/cm-11.0/configs/mixer_paths.xml
Those are the initialization settings for ALSA that need to be configured for sound. We can use alsaucm to set these, I just need to figure out how the heck alsaucm configurations work. I got the device initialization working and I threw in the speaker initialization just to test, but no idea how to switch between speaker, headphones, bluetooth, etc. With this method we don't need to pull audiod from webos! That means no more dependency on closed source binaries pulled out of that OS that may or may not exist anymore.
EDIT: I wrote some new alsa ucm files, now it should be able to select headphones or speaker directly. There isn't any jack detection so you'll have to manually switch, though if I could find the input for the jack switch it might not be hard to implement automatic switching. Still need to apply that RGB patch and fix the broken colors.
EDIT: New pic: http://i.imgur.com/SjOPWB5.jpg That's right, applying the RGB patch fixed the desktop and broke the rendering! Some reason the Freedreno GPU-rendered things are using the opposite color format. The big gear should be red and the top one blue. Here's another pic with the TP and Note side by side, running almost the same software: http://i.imgur.com/1kmKDOw.jpg

Fire TV 2 - Ubuntu (Headless) Install Guide

This guide is intend to help you with "installing" Ubuntu 14.04 (12.04 also works) on the Amazon Fire TV 2 after @rbox recovery has been setup. Only headless mode is possible, similar to Ubuntu Server, but it still makes a nice little ARMv8 development box. Starting X.org or running systemd based Linux distributions will likely never be possible due to features missing from the Amazon kernel. Creative use of the framebuffer is possible if desired, maybe eventually a terminal emulator could be started. As long as you don't mount and modify mmcblk0pX there should be no possible way to mess up Android or brick the device. It's 100% reversible by just removing the SD card. You accept all responsibility for what you do with this work should something go wrong and the device becomes inoperable. With disclaimers and precursor knowledge out of the way let's get started.
To follow this guide you will need:
A micro SD card (2 GB+ recommended)
A Linux system
To login into Ubuntu you will need either:
A 1.8 V TTY USB serial device connected to the UART
A pair of USB serial devices and a null modem cable
I actually used a pair of Xbee's for testing the ttyUSB0 stuff, so hence a pair of FTDI chips would also work.
Preparing the SD Card
To get started you need to first partition the micro SD card:
Type = MBR
Part 1 = 100 MB, Fat32 (vfat)
Part 2 = Remainder, Ext4
Extract the attached zip file to the root of the first partition (extracted filename must be "ramdisk-recovery.cpio.lzma"). This is an alternative initramfs that simply uses busybox to clean up from the partial Android boot and prepare the filesystem for regular Linux. Extract an Ubuntu core root filesystem archive, ubuntu-core-14.04.4-core-arm64.tar.gz, to the root of the second partition as the root user (to preserve ownership/permissions). Make sure you sync or eject the device when done with this work so the data gets flushed to the SD card.
Now we need to make a few changes to the root filesystem to avoid usability issues and allow logins.
Replace /etc/fstab with the following contents to correct some mount options. This "disables" SELinux which fixes dpkg errors and some other login annoyances.
Code:
/dev/mmcblk1p2 / ext4 defaults,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs ro,relatime 0 0
Replace /etc/init/console.conf with the following contents to allow logins from the UART. Once the root password has been set (root is disabled by default) you can remove "-a root" if desired.
Code:
# console - getty
#
# This service maintains a getty on console from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -s -a root console
Create /etc/init/ttyUSB0.conf with the following contents to allow logins from an attached USB serial device. This should help people who don't want to take apart their device to solder wires onto the UART test points. SSH would of course be an alternative but it's not installed by default in Ubuntu core and this guide is about the building blocks not providing pre-made images (yet). Since udev doesn't work due to devtmpfs not being enabled in the kernel you will need to attach the USB serial device before booting for this to work. As before you can remove "-a root" later if desired once the root password is set. Also you should change the baud rate if needed.
Code:
start on (tty-device-added ttyUSB0)
stop on (runlevel [!2345] or tty-device-removed ttyUSB0)
respawn
exec /sbin/getty -L -a root 115200 ttyUSB0 vt102
Preparing the Fire TV
Until the search order for the initramfs file is changed by @rbox you will need to rename the initramfs on the system partition so it will continue to search for one on the SD card or USB stick. You need to connect to the device using adb either over USB or the network to execute the following commands.
Code:
adb$ su
adb# mount -o remount,rw /system
adb# mv /system/recovery/ramdisk-recovery.cpio.lzma /system/recovery/ramdisk-recovery.cpio.lzma.bak
adb# mount -o remount,ro /system
Right now this prevents "su" from working, which should be fixed by @rbox in due time. To get "su" working again you should extract the original recovery initramfs file to a USB stick and boot the device with that USB stick inserted instead of the previously created SD card. Then to restore "su" you can repeat the above steps just swapping the order of the files in the "mv" command.
Booting Ubuntu
After connecting your serial device of choice simply insert the SD card and power on the device. It's that easy! With luck you should get a shell prompt that is already logged in as root. It's a good idea to set the root password before going much further. The device isn't too useful without networking, so you can install more packages. To solve that connect an ethernet cable (since it's simpler) and type "dhclient eth0" to get online. At this point you can install openssh-server using apt-get or do anything else you'd normally do on an Ubuntu VM or headless Ubuntu system. I'm interested in hearing what people plan to do with a more-or-less high-end ARM development system.
Tips and Tricks
NOTE: These changes, unless otherwise noted, are performed while logged into the target Ubuntu system.
Setting the Hostname
You can change the hostname using the following command:
Code:
echo sloane > /etc/hostname
You should also create a simple /etc/hosts file that matches the chosen hostname.
Code:
127.0.0.1 localhost
127.0.1.1 sloane
Enable Ethernet at Boot
Create the file /etc/network/interfaces.d/eth0 with the following contents:
Code:
auto eth0
iface eth0 inet dhcp
Allow Users Network Access
Since we are stuck running an Android kernel you need to create the following group and add users who need network access (such as ping) to this special group.
Code:
groupadd -g 3003 aid_inet
usermod -G aid_inet -a root
usermod -G aid_inet -a <username>
Removing Failed Services
There are a few services that fail to start due to hardware limitations. We should just prevent them from starting in the first place. We have no VT support enabled in the kernel (boo) so we can just remove the ttyX login prompt services. Also the console setup doesn't work since our console is a serial device not a virtual terminal or other "graphical" type terminal emulator.
Code:
rm /etc/init/tty?.conf
echo manual > /etc/init/console-font.override
echo manual > /etc/init/console-setup.override
Fix /dev Hotplug
As stated before udev doesn't work due to missing kernel features. The busybox applet mdev is a simple replacement for most users. After installing the "busybox-static" package run the following command:
Code:
ln -s /bin/busybox /sbin/mdev
Now add the following line to /etc/rc.local before "exit 0".
Code:
echo /sbin/mdev > /proc/sys/kernel/hotplug
Pre-installing SSH
See: http://forum.xda-developers.com/showpost.php?p=65595013&postcount=13 (thanks @segfault1978)
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
segfault1978 said:
Thanks a lot, that was exactly the thing I was searching for. Since before today the Raspi3 came out, this box is the cheapest ARMv8 development machine available. With your instruction I was able to login via SSH and install all required software for my development environment. No GUI needed for that, I'm doing all remotely via SSH. Again, thank you!
Click to expand...
Click to collapse
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
zeroepoch said:
Awesome to hear that it worked for you. Just curious if you went the USB serial route or soldered to the UART pins.
Click to expand...
Click to collapse
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
---------- Post added at 09:09 PM ---------- Previous post was at 09:03 PM ----------
zeroepoch said:
There is also the Dragonboard 410c which is a quad core A53 but has a bit more than the raspberry pi. The price is higher though but it has been out probably a year or so. Just FYI. The raspberry pi 3 is a good deal.
Click to expand...
Click to collapse
Thank you for the hint, I'll have a look for the availability of this board in germany.
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Click to expand...
Click to collapse
That is pretty crazy, but since you knew the changes required it worked Not everyone I expected to have such experience. I figured someone might even try to do a qemu chroot or debbootstrap to preinstall openssh. Multiple ways to solve the same problem I guess.
segfault1978 said:
I'm facing a memory problem, resulting in a reboot of the device when all RAM is being used. My compile session takes more than 1.x GB of RAM for the quite complex compilation of all required packages. I can reproduce the situation where all memory is consumed and the device instantly reboots when hitting "no memory left" situation. Since "swapon" is not supported by the kernel (really?): is there any way to enable swap functionality, i.e. via a kernel module? How to overcome this situation where more memory is needed?
Click to expand...
Click to collapse
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
zeroepoch said:
Looking at the default kernel config from the source code drop from Amazon I see:
Code:
# CONFIG_SWAP is not set
Swap can not be compiled as a module. Even if you chose to use a USB stick or something as the swap device It wouldn't work. Given that we can't change the kernel we can't try stuff like zram or zswap either. The only other suggestion I might have is if you're using "-j4" or something while compiling just remove that so it does a single threaded compile. I'm sure you already tried that. Beyond that you could look at using the Linaro AArch64 toolchain and cross compile. Since we're running Ubuntu you shouldn't need to worry about static binaries.
Click to expand...
Click to collapse
Unfortunately, I'm not compiling with parallel processes (I'm compilig Icinga2 for arm64), I'm running
Code:
dpkg-buildpackage -us -uc
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
segfault1978 said:
I'm a novice in android devices: What would be required to use a custom kernel? A hacked boot loader, which is not available for the AFTV2?
Click to expand...
Click to collapse
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
segfault1978 said:
within the source package. One single cpp call consumes so much memory (which is crazy in my eyes, never seen such a big compiler process until today), so I'll investigate the option of cross compiling and afterwards creating the deb file outside of the machine.
Code:
cd /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base && /usr/bin/aarch64-linux-gnu-g++ -DI2_BASE_BUILD -Doverride="" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override -fPIC -I/root/icinga2-2.4.3 -I/root/icinga2-2.4.3/lib -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu -I/root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib -I/root/icinga2-2.4.3/third-party/execvpe -I/root/icinga2-2.4.3/third-party/mmatch -I/root/icinga2-2.4.3/third-party/socketpair -o CMakeFiles/base.dir/base_unity.cpp.o -c /root/icinga2-2.4.3/obj-aarch64-linux-gnu/lib/base/base_unity.cpp
Click to expand...
Click to collapse
I see you are not using -pipe which is good, but a quick search suggested something that might not be simple since this package has it's own build system but changing from -O2 to -O1 might help.
I noticed that Debian has the package available for the same version and already built for arm64.
https://packages.debian.org/sid/icinga2
Maybe you already tried that. You could try going back to jessie which is probably an older version but I think most jessie packages work with Ubuntu 14.04.
zeroepoch said:
Yep... we need to be able to use fastboot to boot an unsigned kernel and initramfs (boot.img). I tried at one point to overwrite the boot partition with own image and it failed to boot. Since I had the preloader stuff worked out already I was able to restore the original boot image and get it working again.
On a side note, if you don't mind could you post the list of packages needed to install SSH server from rc.local? Others might find that useful. To get around the unset password issue you could have also saved a public key in /root/.ssh/authorized_keys which would also avoid you needing to change /etc/ssh/sshd_config to allow password logins as root.
Click to expand...
Click to collapse
This is the list of packages I manually downloaded for ARM64 (unfortunately I used Debian packages which worked first, but leads to a hell situation afterwards when dealing with other dependencies; be sure to use Ubuntu packages in order to avoid problems afterwards):
Code:
busybox_1.22.0
libedit2_3.1
libgssapi-krb5
libk5crypto3
libkeyutils1
libkrb5
libkrb5support0
libwrap0
openssh-client
openssh-server
openssh-sftp-server
This is the piece of calls in /etc/rc.local, right before the exit:
Code:
dpkg --force-all -i /*.deb > /install.log 2>/install.err
echo $? >> /install.log
echo "installation finished" >> /install.log
It took about 1-2 minutes before SSH started to work automatically, you can mount the SD card afterwards in another system in order to check the written logfiles.
Here are some notes for getting wireless working. In addition to the normal OS steps (installing wpasupplicant or wireless-tools and editing /etc/network/interfaces or using wicd) you will need some firmware files from /system (/dev/mmcblk0p13).
Code:
mount -o ro /dev/mmcblk0p13 /mnt
cp -r /mnt/etc/firmware/ /lib/
cp -r /mnt/etc/Wireless /etc/
umount /mnt
segfault1978 said:
None of these methods (since I was in my weekend and all cables and adapters reside in my office)
I placed all .deb-files for openssh-server including all requiremens onto the microSD card, and placed a call "dpkg -i /*.deb" with logging options in /etc/rc.local. I also configured network by mounting the sd card, editing /etc/network/interfaces, and last changed /etc/shadow to have a valid root account for login. It took my some try-and-error loops, but finally it worked as expected. Call me crazy, but I succeeded without any hardware.
Thank you for the the fire tv guide.
Click to expand...
Click to collapse
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Sent from my Mi A1 using Tapatalk
mrchrister said:
So, what's the verdict on this? I want to use my firetv 2 as an emby server. Is it worth it trying to get Ubuntu to run?
Click to expand...
Click to collapse
If it has arm64 packages and headless you can give it a try. If you don't like it you can just revert the ramdisk and go back to Android.
Ok sweet, thanks for the reply
Sent from my Mi A1 using Tapatalk
Just curious if anyone's tried running Plex server on this?
I've been looking for a better solution without shelling out $500+ for a dedicated NAS. AFTV is tiny so I could hardwire it and hide it away.
Thanks
I got the same idea. Right now the firetv is still being used as a media streamer but I'm thinking of doing this soon

Categories

Resources