Kodi Community Forum
[LINUX] Sam's beta image for Apple TV? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Sam's beta image for Apple TV? (/showthread.php?tid=88518)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19


- garyi - 2011-01-05

well, I am very proud of myself as I did some hard core terminal action.

My Sams image now has all my shares.

Sadly when attempting to connect to them though it times out.

Never mind. Its been fun, I'll go back to the old image.


How To: copy the disk image to the atv harddrive and keep os x option - feikenberg - 2011-01-05

After quite a few nights of trial and error I have managed to install Sam.Nazarko's image on the Apple TV hardrive keeping OS X. I used pin87a's instructions that I found here:

http://forum.xbmc.org/showpost.php?p...&postcount=359

but had to modify a few things. Now I want to share this modified instructions, in case somebody else is interested:

Requirements:
Another usb drive (separate from the one you have the image restored on to)
Since you are making changes to the internal hard drive it is highly recommended that you make a backup of the recovery partition first so you can undo the changes if necessary. Instructions available here:
http://code.google.com/p/atv-bootloader/wiki/ATVBackup

Download atv-usb-creator and create a atv-bootloader drive (select atv-bootloader from the options). Then plug the drive into the ATV and reboot.

Once the atv bootloader has loaded telnet into it (user root / pass root)

Delete current Media partition and create new one
This tutorial assumes a 40GB atv drive. If you have a 160 you can make the atv media partition and the linux partition (sda5) larger.

I use nano for editing files throughout this tutorial. Feel free to use emacs, vim, or any other editor if you wish.
(warning - will delete data - be sure you back up if necessary)
Code:
parted -s /dev/sda rm 4
parted -s /dev/sda mkpart primary HFS 2732072s 54525951s

Create Linux Partitions
Code:
parted -s /dev/sda mkpart primary ext3 54525952s 77091549s
parted -s /dev/sda mkpart primary linux-swap 77091550s 78140126s

Format New Partitions
Code:
partprobe /dev/sda
mkfs.hfsplus -J -v Media /dev/sda4
mkfs.ext3 -b 4096 -L Linux /dev/sda5

Remove usb drive and reboot
Run factory restore in ATV OS

If all is well in the ATV OS connect the linux usb drive and reboot
Once linux is loaded ssh into the atv (user atv pass atv)

Copy Data
Code:
sudo mkdir /media/atvdrive
sudo mount /dev/sda5 /media/atvdrive/
sudo apt-get install rsync
sudo rsync -av --exclude "/proc/" --exclude "/dev/" --exclude "/sys/" --exclude "/mnt/" --exclude "/media/" / /media/atvdrive
cd /media/atvdrive
sudo mkdir -p proc dev sys mnt media
cd

Fix fstab on new install:
First you need to get the uuid information for the linux partitions
The uuid should look something like '72270e11-6b2e-4eb1-807d-4ca29f077626'

Run the following commands and copy the output somewhere so you can use it later.

sda5
Code:
sudo vol_id /dev/sda5 | grep ID_FS_UUID
sda6
Code:
sudo vol_id /dev/sda6 | grep ID_FS_UUID
Edit fstab on new install
Code:
sudo nano /media/atvdrive/etc/fstab
replace "# /dev/sdb3" with "# /dev/sda5"
replace "/dev/sdb3" with "UUID=the uuid you saved for sda5"
replace "# /dev/sdb2" with "# /dev/sda6"
replace "/dev/sdb2" with "UUID=the uuid you saved for sda6"

unmount partition
Code:
sudo umount /media/atvdrive/
sudo rm -fdr /media/atvdrive/

Point atv-bootloader (on usb drive) to new internal drive install
Code:
sudo apt-get install hfsprogs
sudo fsck.hfsplus /dev/sdb1
sudo mkdir /media/atvboot
sudo mount /dev/sdb1 /media/atvboot
sudo nano /media/atvboot/com.apple.Boot.plist

Change root to /dev/sda5
Code:
sudo umount /media/atvboot
sudo rm -fdr /media/atvboot/

Reboot into the linux install on the hard drive
Code:
sudo reboot
If all is well you can delete the linux partitions on the usb drive
ssh into atv
Code:
sudo umount /dev/sdb3
sudo parted -s /dev/sdb rm 3
sudo parted -s /dev/sdb rm 4

Once complete you can switch between linux and os x by inserting or removing the usb drive and rebooting.
Drive inserted = Linux.
Drive removed = OS X


- garyi - 2011-01-06

Could someone tell me what is wrong with this line:

scp /Users/mainuser/Desktop/xbmc.repo.hitchers.zip [email protected]:/usr/share

I just want to copy the zip file to the ATV, but it says 'no such file or directory and shows hitchers zip.

Well it does bloody well exist its right there.


- garyi - 2011-01-06

How exciting I worked it out myself, just not allowed to put things there! bad boy.


- pumkinut - 2011-01-06

garyi Wrote:How exciting I worked it out myself, just not allowed to put things there! bad boy.
I usually perform wget's when adding repos. It knocks out the step of copying it over. In fact, I just added a bunch of repos that way.

Sam, I installed the new image, and it's working beautifully with the CrystalHD card I installed tonight before firing it up! Thanks a lot.

One question, where is the keymap for the Apple remote? I'd like to map the codec display to a long hold of the menu key, kind of like the ATV install. Other than that, I'm loving it. I'll play with it for a few days and the probably take the plunge of moving it to the HDD.


- bass63 - 2011-01-06

Davilla, here's my log file of first 2 minutes of playing 1080p file.

http://pastebin.com/phbKzuvr

Got frame drops when subtitles appearing. I think it is these lines in the log

04:50:37 T:2870352784 M: 43245568 DEBUG: CPullupCorrection: detected pattern of length 24: 42000.00 41000.00 42000.00

There are less frame drops when playing without subtitles, but they still do appear on complex scenes.

This file plays fine with ZERO drops on old pin87s image (with or without subtitles enabled).

Any ideas? Thanks!

P.S. And here's the log with subtitles disabled http://pastebin.com/gbmTFvhG
I've checked again and it is definitely these lines when frames are dropping

05:09:45 T:2826701712 M: 34889728 DEBUG: CPullupCorrection: detected pattern of length 24: 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00 42000.00 41000.00 42000.00 42000.00 42000.00 41000.00 42000.00


- pumkinut - 2011-01-06

Quote:One question, where is the keymap for the Apple remote? I'd like to map the codec display to a long hold of the menu key, kind of like the ATV install.
Nevermind, I got it figured out. If anyone else wants to know I did the following:
Code:
cp /usr/share/xbmc/system/keymaps/joystick.AppleRemote.xml /root/.xbmc/userdata/keymaps/keymap.xml

I then edited the new keymap.xml <FullscreenVideo> stanza to the following:
Code:
<FullscreenVideo>
    <joystick name="AppleRemote">
      <button id="1">VolumeUp</button>
      <button id="2">VolumeDown</button>
      <button id="3">StepBack</button>
      <button id="4">StepForward</button>
      <button id="5">Pause</button>
      <button id="6">Stop</button>
      <button id="7">OSD</button>
      <button id="8">CodecInfo</button>
      <button id="9">Rewind</button>
      <button id="10">FastForward</button>
    </joystick>
  </FullscreenVideo>



- jagabongo - 2011-01-06

Hi guys, i now need some help here. The Image runs good and i'm glad to have it.

I restored it to 16GB USB stick.. but how can i use my more space for sdb3 ?

It has now 3GB but i want it using all the 15gb available without destroing something.... Sad

Can u help me !?

Code:
atv@appletv-ubuntu:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sdb3              3292880   1839364   1287532  59% /
varrun                  124392        44    124348   1% /var/run
varlock                 124392         0    124392   0% /var/lock
udev                    124392        48    124344   1% /dev
devshm                  124392         0    124392   0% /dev/shm



- Sam.Nazarko - 2011-01-06

Want performance feedback for this please. It is a beta after all and I have no idea if this is adequate for final or not.

Here's a full guide with FAQ - you can leave feedback there if you have a Google Code account: http://code.google.com/p/crystalhd-for-atv/wiki/Ubuntu

Report bugs here: http://code.google.com/p/crystalhd-for-atv/wiki/Troubleshooting


- jadel - 2011-01-06

Hey pumkinut, (and anyone else with more clue than me ...oh ... that everyone)
Since you seem to have a handle on the remote control stuff. I was trying to use your tips to enable the harmony remote. I did essentially the same thing but copied the harmony xml instead of the appleremote.

It doesnt seem to do anything. Do you have to enable it somehow or is it supposed to just happen? There doesnt seem to be any new options in system settings.

Im not 100% sure on what profile needs to be selected in the harmony either. I found a thread that said you use the plex remote profile so I tried that.

Another thread said you need to adjust settings in launcher... but we dont use that with this image right?

A more comprehensive remote control setup would really make this little box as good as my old HTPC.. if a trifle hotter. Hopefully someone knows what to do.

Thanks
Smile

edit: is this the correct format for the functions
<!-- Prev --> <button id="32">Close</button>

or is this a remarked out line that has to be edited if you want it. almost all the lines are in this format.


- pumkinut - 2011-01-06

Jadel:

I found the remote information I needed from here.
Quote:Getting the diagnostics overlay to show
To get the overlay that shows CPU load, buffers and codec info, you need to modify the default keymap for the Apple remote. Copy the keymap to your homedir:
cp /usr/share/xbmc/system/keymaps/joystick.AppleRemote.xml ~/.xbmc/userdata/keymaps/keymap.xml.
The name of the destination file does not really matter; what matters is the suffix (.xml). Then apply this patch to get the overlay to show. After restarting XBMC you'll be able to call that OSD by holding your Menu button - just like you can call the playback OSD for holding your Play button.
For your Logitech Harmony, copy the corresponding keymap file:
cp /usr/share/xbmc/system/keymaps/joystick.Harmony.xml ~/.xbmc/userdata/keymaps/keymap.xml
After that, you should apply this patch, which lets you call the diagnostics overlay by pressing the Guide button during fullscreen video playback. You can of course change this; the trick is to find a button that you don't use (or want to be mapped differently) and reassign it.
Mapping Apple remote buttons on your Logitech Harmony
If you like to use your Logitech Harmony with the AppleTV, you'll notice the Logitech software simply maps the Apple buttons onto the Harmony remote. With tons of buttons on the Harmony remote, that's a bit irritating. Since the Menu button on the Apple Remote is a true wonder of versatility, you might want to remap it in the Logitech interface. Assign the Menu call to the Exit (and if you want, the Info button) on your Logitech remote and life gets a little bit easier. To me it's very counterintuitive to reach for that Menu buttton to exit (context) menus all the time. Make sure that, if you set up an Activity with the software, you do not only map the buttons in the device profile itself, but also in the Activity - if you fail to do so your activity will still only use the Menu button on the Harmony. While you're in there, you can always take a look at mapping other buttons (but the options are fairly limited).
As you can see, the author also addresses, to some extent, so I'm not sure if that will help you or not. BTW, I didn't use the patch linked to for remote.xml, rather I just looked at the content to check for format as to what needed to be changed and compared that with the existing joystick.AppleRemote.xml file.


- Metsadah - 2011-01-06

@Sam, I tried your image today on a usb stick and I get definately dropped frames on 1080p content. Although it worked better for me then the crystalbuntu installed to hdd with a manual update for xbmc to dharma 10.0 + broadcom hd rv 174.

Also 720p works with far fewer problems and dropped frames then on my current install. I watched a Glee (with my wife, so I guess its ok) high quality 720p DTS rip with no dropped frames at all unless I bring up the overlay and even then its minimal.

The playback thus far has been a superb experience for me, but as stated before, that is subjective. I only know how much in comparison to my current installation.

Needless to say, I cant wait until I install this image to my hdd. Can I use this install guide or should I wait for your automatic installation.


- garyi - 2011-01-06

Sam, in terms of performance I have to say I am delighted and a bit miffed.

Miffed because it performs better than my mac mini 2ghz 4g ram, delighted because its so damn good!

Only two issues for me, hitting restart in the xbmc menu causes xbmc to close then I guess back into linux with a prompt for atv password. So I have to unplug the power cord.

And the second minor issue is if its been left idle for a number of horus the sound goes on the menus, not on video. Once you finish a video the sound is back.

Other than that 720 is utterly smooth, and its so damn quick.

Seriously, can I install this on my mac mini?


- MasterOe - 2011-01-07

garyi Wrote:Sam, in terms of performance I have to say I am delighted and a bit miffed.

Miffed because it performs better than my mac mini 2ghz 4g ram, delighted because its so damn good!

Only two issues for me, hitting restart in the xbmc menu causes xbmc to close then I guess back into linux with a prompt for atv password. So I have to unplug the power cord.

And the second minor issue is if its been left idle for a number of horus the sound goes on the menus, not on video. Once you finish a video the sound is back.

Other than that 720 is utterly smooth, and its so damn quick.

Seriously, can I install this on my mac mini?

Can you tell me how long the atv boots ?

Until now, I'm using Pin's Image (because of shorter boot time) with the latest XBMC Version (SVN35***) and crystalhd r162 .

Don't know if it would be a big step forward Wink


- pmcd - 2011-01-07

feikenberg Wrote:Once complete you can switch between linux and os x by inserting or removing the usb drive and rebooting.
Drive inserted = Linux.
Drive removed = OS X

Is there no way to get the switching working without having to remove the usb drive? That is, have some kind of bootloader on the usb drive which would give you a choice?

philip