Hi, I am working on Debian-Installer on Neo FreeRunner and Handheld Devices as a Google Summer of Code student. As you can guess, my mentoring organization is Debian. This blog is intended to share my progress and thoughts about the project, and weekly progress reports will be posted here.
Hey! This year's GSoC is coming to an end, and it's great time for a quick update on the situation:
Using my modified packages, you can install Debian, configure u-boot, and have a bootable and usable system. You can even use the graphical installer to do that! However, you can't really use the provided kernel for a smartphone use: no GPS, no GSM, no audio, no bluetooth... only SD and screen. Of course, I'll be working on upstreaming the missing parts in mainline kernel, but it'll probably take some time, and any help is welcome!
Since almost nothing has been upstreamed yet, installing Debian is still a bit tricky, with the missing debs (you have to make a repository to store them). But hopefully, this will be sorted out shortly after the GSoC.
Anyway, here are instructions to try out my work!
Hi! First, sorry not to have posted anything in the last two weeks! I was on vacation, and so, did less work on the project. But in no means it is dead, and development continues!
First week of my vacation was (apart from resting, and vacation stuff) almost entirely dedicated to make my build environment work without internet access. Here, I was lucky to have made a complete debian/main mirror using reprepro before leaving! However, I had to fight a bit with debian-installer: first, for an unknown reason (if someone knows why, speak up!) it didn't search for the debian-installer section and I had to specify 'main/debian-installer' instead of 'main' in sources.list.udeb.local. Second, because I'm lazy, my reprepo repo isn't signed, and so, I had to pass some apt options to make when building d-i.
After this first week, I've been able to work on uboot-installer, that you can find in pkg-fso/d-i.git. Originally written by my co-mentor Per, this package/script is meant to update the device's U-Boot env so it can boot Debian. It installs the uboot-envtools package, tries to read the U-Boot environment to make sure everything is ok, determines the new boot command, and shows/write it in the uboot env. When working on uboot env modification, I ran in a strange issue: I can read the env without problem using fwprintenv, modify it, and read it back, but U-Boot then fails, saying the environment is corrupted. In fact, this is because I've enabled CONFIGMTDNANDS3C2410_HWECC in config.s3c24xx, and it appears to cause invalid ECC values to be written on the flash. Switching it off solved the issue.
Apart from that, I've made some minor modifications in the installation script, and I've (re)installed Debian countless times on my FR, and everything seems to work fine so far (although my kernel is non-installable at the moment because of version mismatch with what's in my repo).
Building d-i for the FR
So, you're welcome to test! Everything is available in the three (pkg-fso/d-i.git, pkg-fso/linux-2.6.git, and usbboot (hg)) repositories. You can rebuild the d-i image and packages the following way:
mkdir ~/incoming/
cd d-i.git/packages/
cd flash-kernel && debuild -uc -us && cd .. && mv *.*deb ~/incoming
cd base-installer && debuild -uc -us && cd .. && mv *.*deb ~/incoming
cd hw-detect && debuild -uc -us && cd .. && mv *.*deb ~/incoming
cd libdebian-installer && autoreconf -i -v && debuild -uc -us && cd .. && mv *.*deb ~/incoming
cd partman/partman-auto && debuild -uc -us && cd .. && mv *.*deb ~/incoming && cd ..
cd arch/armel/uboot-installer && debuild -uc -us && cd .. && mv *.*deb ~/incoming && cd ../..
# For some reason, I had to rebuild installation-locale too
cd installation-locale && debuild -uc -us && cd .. && mv *.*deb ~/incoming
Then, copy everything that is in ~/incoming to your repo. Alternatively, you can use localudebs and add the following lines to pkg-lists/netboot/network-console/armel/s3c24xx.cfg:
mmc-modules-${kernel:Version}
mmc-core-modules-${kernel:Version}
crc-modules-${kernel:Version}
md-modules-${kernel:Version}
ext2-modules-${kernel:Version}
ext3-modules-${kernel:Version}
flash-kernel-installer
base-installer
hw-detect
libdebian-installer4-udeb
partman-auto
uboot-installer
installation-locale
# For some reason, flash-kernel-installer brings live-installer in,
# disable it explicitly as we don't want it
live-installer -
Now that you have built every needed package, you can build the d-i image:
make clean_s3c24xx_network-console
# The SECOPTS thing is only needed if you are using an unsigned repository
make build_s3c24xx_network-console SECOPTS="--allow-unauthenticated"
Now, you can find the ready-to-use u-boot image in dest/s3c24xx/network-console/uImage-multi!
There are a few differences between the pre-built image and the one you have generated. Those differences are: the kernel in use (2.6.32 for the pre-built image, 2.6.34 if you follow the steps above), the network config (192.168.42.202 for the pre-built image, 192.168.0.202 for your own), security (unauthenticated repositories are allowed in the pre-built image!), and uboot-installer (some changes are still staging on my local working copy).
Testing d-i on your FR
Beware, those images are only for testing (especially the pre-built one, which accepts unauthenticated repositories). It should not harm your device, but use with care anyway.
Now that you have built your u-boot image multi (if you don't want to, you can use the pre-built one), you are welcome to follow the steps described in the How to Boot article.
Now, follow the instructions that appears on the FR screen and you should be able to install Debian like you would on any machine. The equivalent of grub-installer is divided into two steps (the two are needed, but each provides bootable-system, yes, that's a bug): flash-kernel ("Make the system bootable") and uboot-installer ("Modify U-Boot environment on flash").
(Note: SSH password is "install")
What's coming next/has to be done?
I've just arrived at DebConf 10, and some intensive testing should be done here. Apart from that, there are quite a few things left to do (right now, or in a distant future):
- Merge uboot-installer into flash-kernel, or give it a life on its own
- Get changes merged into d-i
- Continue with upstreaming kernel changes (drivers and gta02 machine definition)
- Make a FSO task, investigate how to run nodm for a normal user
- Try to get a kernel working on HTC G1
- Resolve some bugs like #586427
- Work on MTD support for partman?
- g-i for the FR?
Ok, here is the (rather short) fifth report!
First, and most important (but not so interesting, as I haven't had any review yet): I've submitted the glamo drivers usptream! There is still a long way to go before having a working Debian kernel on the FR, but I think it's still an important step (well, even more important would be its acceptance in mainline).
Another thing is the uboot-envtools-udeb/uboot-installer thing. I haven't started it yet, but I have a rough idea of how to do that.
Last but not least, the installation "script". It is meant to run on the host, and takes care of pushing necessary files to the FR and boot it, working around any issue ("slow typing" u-boot for instance). I've designed it in an extensible way, but now, I wonder if I've overdone it. However, it's here, and it's easy to strip down if we want something simpler.
This week's report is unfortunately even lesser interesting than the previous week, but it doesn't mean nothing has been done.
The main work of this week have been to fix an outstanding bug with the glamo-mci driver.
What I'll do next week will depend on the acceptance of my last patches in the OpenMoko kernel tree, but I'll probably submit the glamo drivers upstream. Other than that, I plan to work on flash-installer and uboot-envtools-udeb/uboot-installer, which has already been worked on by Per Andersson, to provide automatic u-boot configuration at the end of the installation process, in a way similar to what is done for GRUB on a regular PC.
Hi again! Sorry for the non-existent post of last week, but I didn't really have anything exciting to say. The project is still alive, and I'm still making (rather slow) progress.
Since the last report, I've been reading, cleaning, and fixing the drivers for the Smedia Glamo (the multi-function device that does µSD card access, display handling, and coffee), in order to submit them upstream and eventually backport them in Debian. Hopefully it'll soon be suitable for upstream and I'll be back to d-i itself!
By the way, the git repositories are updated with a cleaner patchset and with framebuffer support!
Hi, already two weeks (and a half)!
Now, this time, I haven't made as much progress I would have wanted, but here is what have been done during this week (and a half):
What I've been doing
- I have set up a quick and dirty repo using reprepro to test modified packages easily.
- I have figured out why some of the u-boot images I've made failed with "junk in compressed archive" without any apparent reason.
- I have included the glamo drivers, as well as various fixes for the FR.
- I have made some various minor changes to d-i to support the new kernel flavour (s3c24xx) I'm working on.
As a result, the Debian Installer works on the FreeRunner, you can install Debian on the FR using it, but it won't setup anything for the bootloader.
Oh, and another important thing is that the GIT repos are now up and running!
- linux-2.6: s3c24xx branch
- debian-installer: gta02 branch
You can try the prebuilt image or build it yourself. Note that you'll probably want to use a custom repo with the modified udebs. An alternative is to modify pkg-lists/netboot/network-console/armel/s3c24xx.cfg to include them in the image.
What's coming next
Well, nothing is sure, but I may:
- wonder how we can build and run d-i for an Android Phone
- continue hacking a user-friendly interface to upload the d-i image to the FreeRunner and boot it
- think about how we should handle the different bootloaders on the FR (that's gonna be a pain, Qi is really limited, and U-Boot wants a fat32 partition, at least with its default configuration)
- work with OM to clean the drivers and submit them upstream, that would be helpful to get the s3c24xx flavour approved by the kernel team
It's almost been a week since the GSoC started!
Before describing what I've been doing this week I would like to write a word on the project and thank the ones I'm thankful to.
The project
Currently, Debian can be installed on the Neo Freerunner (FR) by running a shell script called install.sh on an already running Linux installation on the device (more information here). This works. However, it doesn't make use of the Debian Installer, and it is specific to the FR. The plan is to port Debian Installer to the FR and other similar devices. In order to succeed in this project, I'm mentored by Gaudenz Steinlin and Per Andersson, who I want to thank for their guidance (and the patience they'll probably need to have :p). I have to thank Obey Arhur Liu for all his organizing work, especially for the DebConf 10 sponsoring. While I'm at thanking, I want to thank Google, whithout which this program wouldn't exist at all, and especially Carol Smith, who makes an amazing job at organizing every aspect of the GSoC!
What I've been doing
Now, what have I been doing this week?
- I've set up a Virtual Machine to build the d-i image (as it have to be done on an ARM machine)
- I've set up a cross-compilation toolchain, following lindi's instructions
- I've created a new flavour for the linux-2.6 package
- I've built a d-i image using that kernel flavour
- As Gaudenz suggested, I've started identifying and including the missing drivers needed for a normal use of the Debian Installer on the FreeRunner
As we did not set up git repositories yet, I'll not share the full patches, but only a few files for now:
- The linux 2.6.32-4-s3c24xx kernel package
- The config.s3c24xx config file used to build this kernel
- The first d-i image using that kernel
If you want to try the uImage, here is how to boot it.
What's coming next
First, I hope everything will be in place to share the full sources by then. The first thing I'll do next week is finishing identifying and including the needed drivers. Then, depending on how good goes the installation process, I may:
- wonder how we can build and run d-i for an Android Phone
- start hacking a user-friendly interface to upload the d-i image to the FreeRunner and boot it
- think about how we should handle the different bootloaders
- see wether/how Debian can be installed on the FR's MTD