Stuckie
Member
Debian Squeeze is now running on the Pandora via SD - please see this post for more details: http://www.gp32x.de/board/index.php?/topic/57097-debian-on-an-sd-card/page__view__findpost__p__940030
Hiding old post for posterity, and to confuse people less
Hiding old post for posterity, and to confuse people less
Splitting this somewhat from the Debian in an Extend topic ( well, 17 pages is a huge amount for anyone to read, and this is a bit different. )
This morning, my favourite forum dwellers, I bring you a working rootfs for Debian to boot from SD card on the Pandora.
Originally, what I was doing was rewriting the Debian in an Extend guide to help make it much more clearer as to what was going on.. I then decided to try going a step further and seeing if I could boot from it - and you can, with some fiddling.
[youtube]http://www.youtube.com/watch?v=TuqDNS4oQrE[/youtube]
*** IMPORTANT NOTE *** This is NOT complete, and is more of a proof of concept just now.. it is only marginally usable at the moment due to some bits not quite configured and setup yet. At time of writing, this includes Audio, WiFi, accelerated graphics, as well as the nubs and a full keymap for the Pandora's keyboard.. but it's enough to start with. *** IMPORTANT NOTE ***
For those wanting a quick start guide ( and know roughly what they're doing ):
Download the DebianPandora.tar.gz here: http://stuckiegamez.co.uk/apps/pandora/Debian/pandoraDebianPOC.tar.gz [edit] it's up now, sorry for the wait! [/edit]
This is a gzipped tarball just shy of 900mb, and will expand to about 2.5GB... so ensure you've a large sacrificial card at the ready.
Partition an SD card to have one large Ext2 partition, and a swap partition ( if you're going anywhere near gnome, you're going to need swap! about 512mb will be suffice. )
Format the two partitions - mke2fs and mkswap respectively.
Extract DebianPandora.tar.gz to the Ext2 Partition.
Ensure your SD card is in the first slot ( next to the volume wheel. )
Reboot; holding the right shoulder button on boot and select boot from SD.
Boot to SD.
Default username is: pandora
Default password is: debian
Default root password: craigforprimeminister
( There's a reason for the root password - it made setting things up far easier - touchscreen especially - as I still ran into odd permission issues and devices not being found when using sudo. The root password will obviously be scrambled before any "proper" release is done. This is only a proof of concept, and I wanted to get things sorted quickly than jump through sudo/su/permission hoops )
The above package has already done everything else in this post, the rest of this post is just a continuation from the Debian in an Extend Guide here: http://www.gp32x.de/board/index.php?/topic/54651-debian-in-an-extend/page__view__findpost__p__922100
I suggest you read that first before continuing on here.. the reason this has been split is to save people 17 pages of waffle, and the goals have changed to get Debian to run outside of Angstrom. The initial Parts of that guide are still valid, and to save your sanity, ensure you install sid rather than lenny!
Part Five - Debian on an SD Card
We're treading new ground here... so bear with me as I type as I work. I'll try not to make it as much of a brain dump as the original post was
I'm assuming you've just booted up your Pandora again, and that this time your Debian card is in Slot 0 ( next to the power switch. )
If you're continuing on from the previous part, ensure that you've unmounted /tmp before swapping your cards.
Angstrom: sudo umount /media/mmcblk1p1/tmp
And if you have swap enabled: sudo swapoff /dev/mmcblk1p2
Debian and Angstrom are somewhat compatible.. which is good for us as we can be sneaky and pinch bits and pieces from Angstrom in order to get stuff to work. This is exactly what I'll be doing.
Now, if you've created a bootable SD card with the current Pandora firmware on it for messing with, you'll know roughly what we're upto here, as we need the uImage and a boot.txt installed onto our Debian card so it can boot.
My current boot.txt contains the following:
Save this to /media/mmcblk0p1/boot.txt
You could use whatever text editor you like to create it, as long as it's saved to that file.
Then in a terminal:
Angstrom: sudo cp /boot/uImage /media/mmcblk0p1/boot We're copying our uImage that we know works ( as we've booted with it ) to our Debian SD
Now to test, you can reboot here, and hold R - the right shoulder button - while booting to get the startup menu, select the SD option, and watch as Debian boots! ... but not many things will work and you'll likely get dumped to a terminal. If you haven't set up any users or passwords at this point, you'll likely be a bit stuffed. You'll also likely see lots of errors fly past, about modules.dep not existing, and /etc/fstab not existing either. These are some of the things we'll need to fix if we've to get this up and running.
Modules are easy, reboot back to Angstrom if you haven't already by typing: reboot if you've logged in, or doing the CTRL+ALT+DEL salute from a USB keyboard, or failing that, pandora+power as a last resort... we're going to pinch the modules we have available to us!
Once Angstrom has started back up, open up a Terminal.
Angstrom: sudo cp -R /lib/modules/* /media/mmcblk0p1/lib/modules We're copying all the modules that are linked to our uImage directly to where Debian expects to find them.
Angstrom: sudo cp /etc/fstab /media/mmcblk0p1/etc/fstab We may as well copy our fstab over while we're here.
Now, depending on if you install Debian Lenny or Sid, we're going to have to deviate a bit here.
After installing GDM and fluxbox, and somewhat expecting them to "just work," I found out that although Sid does have the omapfb driver we need, Lenny does not... so X isn't going to start regardless of what you do in Lenny - well, you could recompile the omapfb driver I suppose.. if you really wanted to!
So lets upgrade our Debian to Sid.. we need to do this in Angstrom as we don't have WiFi access in Debian as yet.
Angstrom: sudo chroot /media/mmcblk0p1
Open another Terminal window/tab.. again this gives us our Debian Terminal and Angstrom Terminal.
Angstrom: sudo mount --rbind /tmp /media/mmcblk0p1/tmp
Debian: nano /etc/apt/sources.list If you haven't installed nano, you might as well grab it just now - apt-get install nano
We're going to change this line to the following:
deb http://ftp.debian.org/debian sid main contrib non-free
Which gives us all the sid packages in the main, contrib and non-free (as in, non-GPL) repositories.
You can also change to a closer mirror if you want.
Those clever folks who already have a Sid install, may want to add contrib and non-free repositories to their sources anyway.
Then tell apt to update and a distribution upgrade:
Debian: apt-get update
Debian: apt-get dist-upgrade This is likely to chew through a huge amount of space... with my minimal install with just nano, GDM and fluxbox added, it's going to chew up another 300MB in total. Be aware of how much space you have left! We can kill apt's cache later to regain the majority of the space though. This'll take a huge amount of time, unfortunately... infact, in retrospect, it's probably quicker to wipe your current install, and redo the bootstrap using Sid, it's seriously that slow!
Now everyone's sitting with a Sid install of Debian, we shall continue.
We need the omapfb driver in order to get X to work, as well as the dri2 extension. I know this from peeking at the xorg.conf that powers the Pandora ( you can find it in /etc/X11/xorg.conf if you want a peek too! )
Debian: apt-get install xserver-xorg-video-omap3 libxcb-dri2-0 xserver-xorg-input-tslib tslib-bin Curiously, the Debian package site recommends to try xserver-xorg-video-omap3 for better performance on OMAP3 chipsets.. so we'll try that. Additionally, we're installing the touchscreen drivers while we're here
Debian: apt-get install gdm fluxbox I like fluxbox, but you can pretty much choose whichever window manager you like, but stick with GDM as the desktop manager. You may have already installed these in Part Four anyway, but it's here incase you skipped down. If you're going to go install gnome, be aware of the VAST amount of time it's going to take to install. Consider yourself warned. Why do you think this guide is so late?
Right, we might as well setup the touchscreen while we're here.. or at least do as much as we can.
Debian: nano /etc/skel/.profile
You'll want to add the following to the bottom of the file:
You'll also need to add that to the .profile of any users you have already created.
If you haven't created any, we'll do one now...
Debian: adduser username Obviously, replace username with whatever username you want. We might as well sort this out now if you haven't done so already.
Debian: visudo visudo should load up nano, and give you access to the sudoers file. We want to add our username to the list so we can use sudo.
Find the line that reads root ALL=(ALL) ALL and add this beneath:
Replacing <username> with your actual username, of course.
If, like me, you like checking out your current progress, feel free to reboot at this point, and try to boot from SD and see where it takes you.
At this point, GDM should show up and if you've created a user, you can login!
You'll notice your touchscreen is messed up though, but we shall fix that in a minute... for now, marvel at running Debian on your Pandora
Let's fix this touchscreen madness.
If you've been insane enough to install gnome, open up a Terminal from the Applications menu. If you've installed fluxbox, press ALT+F1 - which on the Pandora keyboard is, Fn+Alt+1
Either way, in your terminal run this:
Debian: sudo chvt 1 We need to change to the first terminal to do this.
Login as root.
Debian: ts_calibrate You'll then get to click some boxes.
Debian: chvt 7 Your mouse should be fine now, if not, just logout and back in again which should fix it.
Currently, this is up to where I am.
Seeing as the community has always been awesome in taking a project and running with it, I give you my current proof-of-concept, so we can get all the driver issues sorted, and have something else to play with
Especially as I don't really have as much time to hack about as I'd like to, these days.
This morning, my favourite forum dwellers, I bring you a working rootfs for Debian to boot from SD card on the Pandora.
Originally, what I was doing was rewriting the Debian in an Extend guide to help make it much more clearer as to what was going on.. I then decided to try going a step further and seeing if I could boot from it - and you can, with some fiddling.
[youtube]http://www.youtube.com/watch?v=TuqDNS4oQrE[/youtube]
*** IMPORTANT NOTE *** This is NOT complete, and is more of a proof of concept just now.. it is only marginally usable at the moment due to some bits not quite configured and setup yet. At time of writing, this includes Audio, WiFi, accelerated graphics, as well as the nubs and a full keymap for the Pandora's keyboard.. but it's enough to start with. *** IMPORTANT NOTE ***
For those wanting a quick start guide ( and know roughly what they're doing ):
Download the DebianPandora.tar.gz here: http://stuckiegamez.co.uk/apps/pandora/Debian/pandoraDebianPOC.tar.gz [edit] it's up now, sorry for the wait! [/edit]
This is a gzipped tarball just shy of 900mb, and will expand to about 2.5GB... so ensure you've a large sacrificial card at the ready.
Partition an SD card to have one large Ext2 partition, and a swap partition ( if you're going anywhere near gnome, you're going to need swap! about 512mb will be suffice. )
Format the two partitions - mke2fs and mkswap respectively.
Extract DebianPandora.tar.gz to the Ext2 Partition.
Ensure your SD card is in the first slot ( next to the volume wheel. )
Reboot; holding the right shoulder button on boot and select boot from SD.
Boot to SD.
Default username is: pandora
Default password is: debian
Default root password: craigforprimeminister
( There's a reason for the root password - it made setting things up far easier - touchscreen especially - as I still ran into odd permission issues and devices not being found when using sudo. The root password will obviously be scrambled before any "proper" release is done. This is only a proof of concept, and I wanted to get things sorted quickly than jump through sudo/su/permission hoops )
The above package has already done everything else in this post, the rest of this post is just a continuation from the Debian in an Extend Guide here: http://www.gp32x.de/board/index.php?/topic/54651-debian-in-an-extend/page__view__findpost__p__922100
I suggest you read that first before continuing on here.. the reason this has been split is to save people 17 pages of waffle, and the goals have changed to get Debian to run outside of Angstrom. The initial Parts of that guide are still valid, and to save your sanity, ensure you install sid rather than lenny!
Part Five - Debian on an SD Card
We're treading new ground here... so bear with me as I type as I work. I'll try not to make it as much of a brain dump as the original post was
I'm assuming you've just booted up your Pandora again, and that this time your Debian card is in Slot 0 ( next to the power switch. )
If you're continuing on from the previous part, ensure that you've unmounted /tmp before swapping your cards.
Angstrom: sudo umount /media/mmcblk1p1/tmp
And if you have swap enabled: sudo swapoff /dev/mmcblk1p2
Debian and Angstrom are somewhat compatible.. which is good for us as we can be sneaky and pinch bits and pieces from Angstrom in order to get stuff to work. This is exactly what I'll be doing.
Now, if you've created a bootable SD card with the current Pandora firmware on it for messing with, you'll know roughly what we're upto here, as we need the uImage and a boot.txt installed onto our Debian card so it can boot.
My current boot.txt contains the following:
Code:
setenv bootargs root=/dev/mmcblk0p1 rw rootdelay=2 vram=6272K omapfs.vram=0:3000K
ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr} && boot
You could use whatever text editor you like to create it, as long as it's saved to that file.
Then in a terminal:
Angstrom: sudo cp /boot/uImage /media/mmcblk0p1/boot We're copying our uImage that we know works ( as we've booted with it ) to our Debian SD
Now to test, you can reboot here, and hold R - the right shoulder button - while booting to get the startup menu, select the SD option, and watch as Debian boots! ... but not many things will work and you'll likely get dumped to a terminal. If you haven't set up any users or passwords at this point, you'll likely be a bit stuffed. You'll also likely see lots of errors fly past, about modules.dep not existing, and /etc/fstab not existing either. These are some of the things we'll need to fix if we've to get this up and running.
Modules are easy, reboot back to Angstrom if you haven't already by typing: reboot if you've logged in, or doing the CTRL+ALT+DEL salute from a USB keyboard, or failing that, pandora+power as a last resort... we're going to pinch the modules we have available to us!
Once Angstrom has started back up, open up a Terminal.
Angstrom: sudo cp -R /lib/modules/* /media/mmcblk0p1/lib/modules We're copying all the modules that are linked to our uImage directly to where Debian expects to find them.
Angstrom: sudo cp /etc/fstab /media/mmcblk0p1/etc/fstab We may as well copy our fstab over while we're here.
Now, depending on if you install Debian Lenny or Sid, we're going to have to deviate a bit here.
After installing GDM and fluxbox, and somewhat expecting them to "just work," I found out that although Sid does have the omapfb driver we need, Lenny does not... so X isn't going to start regardless of what you do in Lenny - well, you could recompile the omapfb driver I suppose.. if you really wanted to!
So lets upgrade our Debian to Sid.. we need to do this in Angstrom as we don't have WiFi access in Debian as yet.
Angstrom: sudo chroot /media/mmcblk0p1
Open another Terminal window/tab.. again this gives us our Debian Terminal and Angstrom Terminal.
Angstrom: sudo mount --rbind /tmp /media/mmcblk0p1/tmp
Debian: nano /etc/apt/sources.list If you haven't installed nano, you might as well grab it just now - apt-get install nano
We're going to change this line to the following:
deb http://ftp.debian.org/debian sid main contrib non-free
Which gives us all the sid packages in the main, contrib and non-free (as in, non-GPL) repositories.
You can also change to a closer mirror if you want.
Those clever folks who already have a Sid install, may want to add contrib and non-free repositories to their sources anyway.
Then tell apt to update and a distribution upgrade:
Debian: apt-get update
Debian: apt-get dist-upgrade This is likely to chew through a huge amount of space... with my minimal install with just nano, GDM and fluxbox added, it's going to chew up another 300MB in total. Be aware of how much space you have left! We can kill apt's cache later to regain the majority of the space though. This'll take a huge amount of time, unfortunately... infact, in retrospect, it's probably quicker to wipe your current install, and redo the bootstrap using Sid, it's seriously that slow!
Now everyone's sitting with a Sid install of Debian, we shall continue.
We need the omapfb driver in order to get X to work, as well as the dri2 extension. I know this from peeking at the xorg.conf that powers the Pandora ( you can find it in /etc/X11/xorg.conf if you want a peek too! )
Debian: apt-get install xserver-xorg-video-omap3 libxcb-dri2-0 xserver-xorg-input-tslib tslib-bin Curiously, the Debian package site recommends to try xserver-xorg-video-omap3 for better performance on OMAP3 chipsets.. so we'll try that. Additionally, we're installing the touchscreen drivers while we're here
Debian: apt-get install gdm fluxbox I like fluxbox, but you can pretty much choose whichever window manager you like, but stick with GDM as the desktop manager. You may have already installed these in Part Four anyway, but it's here incase you skipped down. If you're going to go install gnome, be aware of the VAST amount of time it's going to take to install. Consider yourself warned. Why do you think this guide is so late?
Right, we might as well setup the touchscreen while we're here.. or at least do as much as we can.
Debian: nano /etc/skel/.profile
You'll want to add the following to the bottom of the file:
Code:
TSLIB_TSDEVICE=/dev/input/event7
TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE TSLIB_CONFFILE
You'll also need to add that to the .profile of any users you have already created.
If you haven't created any, we'll do one now...
Debian: adduser username Obviously, replace username with whatever username you want. We might as well sort this out now if you haven't done so already.
Debian: visudo visudo should load up nano, and give you access to the sudoers file. We want to add our username to the list so we can use sudo.
Find the line that reads root ALL=(ALL) ALL and add this beneath:
Code:
<username> ALL=(ALL) ALL
If, like me, you like checking out your current progress, feel free to reboot at this point, and try to boot from SD and see where it takes you.
At this point, GDM should show up and if you've created a user, you can login!
You'll notice your touchscreen is messed up though, but we shall fix that in a minute... for now, marvel at running Debian on your Pandora
Let's fix this touchscreen madness.
If you've been insane enough to install gnome, open up a Terminal from the Applications menu. If you've installed fluxbox, press ALT+F1 - which on the Pandora keyboard is, Fn+Alt+1
Either way, in your terminal run this:
Debian: sudo chvt 1 We need to change to the first terminal to do this.
Login as root.
Debian: ts_calibrate You'll then get to click some boxes.
Debian: chvt 7 Your mouse should be fine now, if not, just logout and back in again which should fix it.
Currently, this is up to where I am.
Seeing as the community has always been awesome in taking a project and running with it, I give you my current proof-of-concept, so we can get all the driver issues sorted, and have something else to play with
Especially as I don't really have as much time to hack about as I'd like to, these days.
Last edited by a moderator: