https://elinux.org/api.php?action=feedcontributions&user=Julspower&feedformat=atomeLinux.org - User contributions [en]2024-03-28T14:43:05ZUser contributionsMediaWiki 1.31.0https://elinux.org/index.php?title=Didj_and_Explorer_libSDL&diff=27487Didj and Explorer libSDL2010-11-19T02:37:36Z<p>Julspower: </p>
<hr />
<div>libSDL is a popular library for games and other applications. It provides APIs for events (buttons, etc), graphics, sound, and more.<br />
<br />
'''Note: A [[Leapster_Explorer_Framebuffer_Driver|framebuffer driver]] is required.''' **not strictly true, will still run audio without a framebuffer**<br />
<br />
<br />
'''Create an install script for iconv:'''<br />
<br />
create a folder in your packages dir called libiconv, then copy and paste the following into a text file and save it in the libiconv folder, call it install.sh (you might need to change permissions on the file as well).<br />
<br />
Download libiconv-1.13.1.tar.gz<br />
google it pretty easy to find<br />
<br />
#!/bin/bash<br />
<br />
BUILD_FROM_SOURCE=1<br />
<br />
PKG_NAME=libiconv<br />
SRC=libiconv-1.13.1.tar.gz<br />
set -e<br />
<br />
. $PROJECT_PATH/scripts/functions<br />
<br />
# make sure all of the environment variables are good<br />
check_vars<br />
<br />
# exit if the user is root<br />
check_user<br />
<br />
# parse args<br />
set_standard_opts $*<br />
<br />
pushd $PROJECT_PATH/packages/$PKG_NAME<br />
<br />
BUILD_DIR=`echo "$SRC" | cut -d '.' -f -3`<br />
<br />
if [ "$CLEAN" == "1" -o ! -e $BUILD_DIR ]; then<br />
rm -rf $BUILD_DIR<br />
tar -xzf $SRC<br />
fi<br />
<br />
pushd $BUILD_DIR<br />
<br />
CFLAGS="-I$PROJECT_PATH/packages/$PKG_NAME/libiconv-1.13.1/ -O3 -fPIC -mcpu=arm926ej-s" LDFLAGS=-L$PROJECT_PATH/packages/$PKG_NAME/libiconv-1.13.1/ ./configure --host=arm-linux --target=arm-linux --prefix=$ROOTFS_PATH/usr --enable-shared<br />
make clean<br />
make<br />
make install<br />
<br />
popd<br />
<br />
popd<br />
<br />
exit 0<br />
<br />
'''Build libiconv'''<br />
<br />
Now that you've got an install script you can run it with the following command:<br />
<br />
CLEAN=1 ./install.sh<br />
<br />
This will download the package for you, unpack it, set the necessary vars then compile and install libiconv. You should only need to do CLEAN=1 for the first time you run it, that's the var that triggers a clean download and install.<br />
<br />
''' Build the SDL library '''<br />
<br />
To build SDL, first download and unpack it:<br />
<br />
<code><br />
wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz<br />
tar -xf SDL-1.2.13.tar.gz<br />
cd SDL-1.2.13<br />
</code><br />
<br />
You'll need a toolchain, for example [[Didj_Build_Environment|this one]]<br />
<br />
Now try the following, but replace the "/path/to" lines with paths on your system. You'll want to tell the build system where to install libSDL and where to look for kernel headers <br />
<br />
<code><br />
CFLAGS="-I/path/to/kernel/linux-2.6/include/" <br />
CC=arm-linux-uclibcgnueabi-gcc<br />
CXX=arm-linux-uclibcgnueabi-g++ <br />
./configure --prefix=/path/to/rootfs//usr/ --build=`uname -m` --host=arm-linux --disable-video-opengl --disable-video-x11 <br />
--disable-esd --disable-video-directfb --enable-video-fbcon --enable-pulseaudio=no<br />
<br />
</code><br />
<br />
If that succeeds, try building and installing:<br />
<br />
<code><br />
make<br />
make install<br />
</code><br />
<br />
You should see libSDL.so in usr/lib in your rootfs directory as well as its header files in "usr/include". When building applications against libSDL, tell the compiler to look for headers and the linker to look for libraries there (ie: CFLAGS="-I/path/to/rootfs/usr/include" and LDFLAGS="-L/path/to/rootfs/usr/lib").<br />
<br />
''' Set up the device '''<br />
<br />
Copy the .so files and symlinks to your device. Also edit "/etc/profile" on your device and add some environment variables for SDL:<br />
<br />
For Didj:<br />
<br />
export SDL_NOMOUSE=1<br />
export SDL_FBDEV="/dev/fb0"<br />
export SDL_VIDEODRIVER="fbcon"<br />
export SDL_AUDIODRIVER="dsp"<br />
export SDL_PATH_DSP="/dev/dsp"<br />
export SDL_DEBUG="1"<br />
export SDL_FBACCEL="0"<br />
<br />
For Explorer, the touchscreen works sort of like a mouse (TODO: add tslib support?), so you could try:<br />
<br />
export SDL_MOUSEDEV="/dev/input/event3"<br />
export SDL_FBDEV="/dev/fb0"<br />
export SDL_VIDEODRIVER="fbcon"<br />
export SDL_AUDIODRIVER="dsp"<br />
export SDL_PATH_DSP="/dev/dsp"<br />
export SDL_DEBUG="1"<br />
export SDL_FBACCEL="0"<br />
<br />
You'll need to source that on your device:<br />
<br />
. /etc/profile<br />
<br />
or just reboot. You should now be able to run SDL programs or demos as long as your device is set up with a standard Linux framebuffer and console in place of the LeapFrog-supplied graphics drivers.<br />
<br />
'''TODO'''<br />
<br />
* better audio support?<br />
* tslib to make touchscreen usable on Explorer?</div>Julspowerhttps://elinux.org/index.php?title=Didj_and_Explorer_libSDL&diff=27481Didj and Explorer libSDL2010-11-19T02:37:10Z<p>Julspower: </p>
<hr />
<div>libSDL is a popular library for games and other applications. It provides APIs for events (buttons, etc), graphics, sound, and more.<br />
<br />
'''Note: A [[Leapster_Explorer_Framebuffer_Driver|framebuffer driver]] is required.''' **not strictly true, will still run audio without a framebuffer**<br />
<br />
<br />
'''Create an install script for iconv:'''<br />
<br />
create a folder in your packages dir called libiconv, then copy and paste the following into a text file and save it in the libiconv folder, call it install.sh (you might need to change permissions on the file as well).<br />
Download libiconv-1.13.1.tar.gz<br />
google it pretty easy to find<br />
<br />
#!/bin/bash<br />
<br />
BUILD_FROM_SOURCE=1<br />
<br />
PKG_NAME=libiconv<br />
SRC=libiconv-1.13.1.tar.gz<br />
set -e<br />
<br />
. $PROJECT_PATH/scripts/functions<br />
<br />
# make sure all of the environment variables are good<br />
check_vars<br />
<br />
# exit if the user is root<br />
check_user<br />
<br />
# parse args<br />
set_standard_opts $*<br />
<br />
pushd $PROJECT_PATH/packages/$PKG_NAME<br />
<br />
BUILD_DIR=`echo "$SRC" | cut -d '.' -f -3`<br />
<br />
if [ "$CLEAN" == "1" -o ! -e $BUILD_DIR ]; then<br />
rm -rf $BUILD_DIR<br />
tar -xzf $SRC<br />
fi<br />
<br />
pushd $BUILD_DIR<br />
<br />
CFLAGS="-I$PROJECT_PATH/packages/$PKG_NAME/libiconv-1.13.1/ -O3 -fPIC -mcpu=arm926ej-s" LDFLAGS=-L$PROJECT_PATH/packages/$PKG_NAME/libiconv-1.13.1/ ./configure --host=arm-linux --target=arm-linux --prefix=$ROOTFS_PATH/usr --enable-shared<br />
make clean<br />
make<br />
make install<br />
<br />
popd<br />
<br />
popd<br />
<br />
exit 0<br />
<br />
'''Build libiconv'''<br />
<br />
Now that you've got an install script you can run it with the following command:<br />
<br />
CLEAN=1 ./install.sh<br />
<br />
This will download the package for you, unpack it, set the necessary vars then compile and install libiconv. You should only need to do CLEAN=1 for the first time you run it, that's the var that triggers a clean download and install.<br />
<br />
''' Build the SDL library '''<br />
<br />
To build SDL, first download and unpack it:<br />
<br />
<code><br />
wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz<br />
tar -xf SDL-1.2.13.tar.gz<br />
cd SDL-1.2.13<br />
</code><br />
<br />
You'll need a toolchain, for example [[Didj_Build_Environment|this one]]<br />
<br />
Now try the following, but replace the "/path/to" lines with paths on your system. You'll want to tell the build system where to install libSDL and where to look for kernel headers <br />
<br />
<code><br />
CFLAGS="-I/path/to/kernel/linux-2.6/include/" <br />
CC=arm-linux-uclibcgnueabi-gcc<br />
CXX=arm-linux-uclibcgnueabi-g++ <br />
./configure --prefix=/path/to/rootfs//usr/ --build=`uname -m` --host=arm-linux --disable-video-opengl --disable-video-x11 <br />
--disable-esd --disable-video-directfb --enable-video-fbcon --enable-pulseaudio=no<br />
<br />
</code><br />
<br />
If that succeeds, try building and installing:<br />
<br />
<code><br />
make<br />
make install<br />
</code><br />
<br />
You should see libSDL.so in usr/lib in your rootfs directory as well as its header files in "usr/include". When building applications against libSDL, tell the compiler to look for headers and the linker to look for libraries there (ie: CFLAGS="-I/path/to/rootfs/usr/include" and LDFLAGS="-L/path/to/rootfs/usr/lib").<br />
<br />
''' Set up the device '''<br />
<br />
Copy the .so files and symlinks to your device. Also edit "/etc/profile" on your device and add some environment variables for SDL:<br />
<br />
For Didj:<br />
<br />
export SDL_NOMOUSE=1<br />
export SDL_FBDEV="/dev/fb0"<br />
export SDL_VIDEODRIVER="fbcon"<br />
export SDL_AUDIODRIVER="dsp"<br />
export SDL_PATH_DSP="/dev/dsp"<br />
export SDL_DEBUG="1"<br />
export SDL_FBACCEL="0"<br />
<br />
For Explorer, the touchscreen works sort of like a mouse (TODO: add tslib support?), so you could try:<br />
<br />
export SDL_MOUSEDEV="/dev/input/event3"<br />
export SDL_FBDEV="/dev/fb0"<br />
export SDL_VIDEODRIVER="fbcon"<br />
export SDL_AUDIODRIVER="dsp"<br />
export SDL_PATH_DSP="/dev/dsp"<br />
export SDL_DEBUG="1"<br />
export SDL_FBACCEL="0"<br />
<br />
You'll need to source that on your device:<br />
<br />
. /etc/profile<br />
<br />
or just reboot. You should now be able to run SDL programs or demos as long as your device is set up with a standard Linux framebuffer and console in place of the LeapFrog-supplied graphics drivers.<br />
<br />
'''TODO'''<br />
<br />
* better audio support?<br />
* tslib to make touchscreen usable on Explorer?</div>Julspowerhttps://elinux.org/index.php?title=Didj_Explorer_Kernel&diff=23175Didj Explorer Kernel2010-09-13T21:39:19Z<p>Julspower: </p>
<hr />
<div>'''This is a work in progress'''<br />
Explains what to change in order to build the 2.6.31 LF Explorer kernel for Didj. Use your DJHI to boot the zImage from uSD.<br />
<br />
1. make lf1000_ts_defconfig<br />
<br />
2. edit .config. (we are enabling jffs2 and giving the right bootargs):<br />
<br />
<code><br />
<br />
CONFIG_CMDLINE="mem=18M mlc_fb=0x01200000,0x01200000 init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge"<br />
<br />
CONFIG_JFFS2_FS=y<br />
<br />
</code><br />
<br />
3. edit line 184 of linux2.6/Makefile to point to your cross compiler (or comment it out if you know the varaible is set elsewhere).<br />
<br />
4. edit include/asm/mach-types.h (the number has changed to 2028 - but the boot loader only knows about 1235)<br />
<br />
(you may need to 'make' once and ctrl-c to get the mach-types file generated the first time.)<br />
<code><br />
<br />
//define MACH_TYPE_ZIR2412 1235<br />
<br />
define MACH_TYPE_DIDJ 1235<br />
<br />
...<br />
<br />
//define MACH_TYPE_DIDJ 2028<br />
<br />
</code><br />
<br />
4.1 instead of editig mach-types.h you can edit the file that it is generated from, mach-types (no.h!) <br />
in /linux-2.6/arch/arm/tools, edit the file and look for 2028, copy everything on the line upto 2028:<br />
<br />
'''didj MACH_DIDJ DIDJ '''<br />
<br />
comment out the 2028 line and now search for 1235 and replace the line with the above, make sure you add 1235 to the end:<br />
<br />
'''didj MACH_DIDJ DIDJ 1235'''<br />
<br />
This allows you to do 'make clean' without having to re-edit mach-types.h each time, if you also own an explorer you might not want to do this.<br />
<br />
5. edit drivers/mtd/nand/lf1000.c (using didj's 9 partition scheme)<br />
<br />
[http://pastie.org/1056564 Unified diff 0f changes to drivers/mtd/nand/lf1000.c]<br />
<br />
[http://pastebin.com/FX0SbZzM Alternate site: Unified Diff of changes to drivers/mtd/nand/lf1000.c]<br />
<br />
6. Edit arch\arm\mach-lf1000\include\mach\mlc.h<br />
#define MLC_MAJOR 251<br />
#define MLC_LAYER_MAJOR 250<br />
This will enable the mlc driver to work with /dev/mlc<br />
<br />
7. make<br />
<br />
zImage is found in arch/arm/boot<br />
<br />
To mount /Didj:<br />
<br />
<code><br />
mount -t vfat -o async,noatime /dev/mtdblock9 /Didj<br />
</code><br />
<br />
For framebuffer configuration see [[Leapster_Explorer_Framebuffer_Driver]]<br />
<br />
For MMC Card configuration see [[Didj_and_Explorer_MMC_Patch]]</div>Julspowerhttps://elinux.org/index.php?title=Didj_and_Explorer_MMC_Patch&diff=23168Didj and Explorer MMC Patch2010-09-12T00:17:50Z<p>Julspower: </p>
<hr />
<div>The original source code for the MMC drivers that were released for the 2.6.31 (LX) kernel were not completed but lucky for us there was a patch included that finishes them to a usable state.<br />
<br />
<br />
'''Notice: Hot swapping is not supported yet and may lead to data loss in the event that the card is not unmounted before it is removed. <br />
<br />
'''As these drivers haven't been through extensive testing you should backup any important information on the card before use.<br />
<br />
'''Applies to the 2.6.31 kernel only <br />
<br />
Here are the files you will need<br />
(Located on Moogle's server for now)<br />
[http://wtfmoogle.com/wp-content/uploads/2010/07/mmc_patch_Kconfig.patch mmc_patch_Kconfig.patch]<br />
[http://wtfmoogle.com/wp-content/uploads/2010/07/mmc_patch_lf1000-sdio.patch mmc_patch_lf1000-sdio.patch]<br />
<br />
To apply these patches just copy them to /drivers/mmc/host/ and type the following<br />
<br />
patch lf1000_mmc.c < mmc_patch_lf1000-sdio.patch<br />
patch Kconfig < mmc_patch_Kconfig.patch<br />
<br />
Now, when you do a make menuconfig, under Device Drivers, enable:<br />
<br />
<M> MMC/SD/SDIO card support <br />
<br />
then<br />
<M> MMC block device driver <br />
<M> LF1000 SDIO controller support<br />
[*] Enable SDIO controller 0 <br />
<br />
Save your configuration, then build the MMC drivers as modules by typing the following: <br />
<br />
make -j Number of cpu cores+1 <br />
sudo make modules_install<br />
<br />
and your modules will be in /lib/modules/2.6.31-leapfrog on your system ready for you to copy them over<br />
<br />
on the device, it is best to copy them to /lib/modules/2.6.31-leapfrog/kernel/drivers/mmc/<br />
<br />
and then run:<br />
<br />
depmod<br />
<br />
on your device.<br />
Note: depmod is only included in the busybox on the explorer kernel.<br />
<br />
'''Reboot the device with the kernel you just compiled (it is now enabled for the mmc device modules).'''<br />
<br />
<br />
Using the kernel you just built, when you want to mount a card simply type the following to load the modules<br />
<br />
modprobe lf1000_mmc<br />
<br />
you will then see something like this:<br />
<br />
XXX: checking for SDIO...<br />
XXX: checking for SD...<br />
XXX: SD...<br />
mmc0: host does not support reading read-only switch. assuming write-enable.<br />
mmc0: new high speed SDHC card at address 0007<br />
<br />
then type:<br />
<br />
modprobe mmc_block<br />
<br />
you will then see something like the following <br />
mmcblk0: mmc0:0002 00000 3.82 GiB<br />
mmcblk0:<br />
p1<br />
<br />
type the following to add the device such that it can be mounted (only need to do this once, the first time)<br />
mdev -s <br />
<br />
<br />
To mount the card type<br />
<br />
mount /dev/mmcblk0p1 /mnt<br />
and you will then have access to the files on your micro sd card in the /mnt directory<br />
<br />
to unmount the card simply type<br />
<br />
umount /dev/mmcblk0p1<br />
<br />
much thanks to zucchini for the help</div>Julspowerhttps://elinux.org/index.php?title=Talk:Didj_gpSP_GBA_Emulator&diff=23042Talk:Didj gpSP GBA Emulator2010-09-01T16:48:53Z<p>Julspower: </p>
<hr />
<div>3 questions:<br />
<br />
So the emulator is nice, but mine crashes when I try to access the menu in-game. Is this a common issue, or just me?<br />
At the moment when the emulator run and the home button is press the quit() function its call <br />
so its not a crash it just emulator that stop<br />
<br />
Also- what sorts of options were used in the compile of the zimage for this? I'm interested in finding a zImage that will have SD/mmc enabled, and I'm not sure if I can apply the patch in place or need to compile it fresh.<br />
Atm Nirvous that build the didj kernel he said he will post the patch for having it compiled<br />
atm this kernel doesn t support mmc/sd no sure if he do plan to make a zImage from the lxkernel with mmc for the didj emulator ask him (IRC)<br />
<br />
-Nirvous posted the patch to change memory allocation on September 1. (yay!)<br />
<br />
Finally, is there a way to make emulator start after boot? I'd like to be able to use it without a computer attached all the time, especially since it needs a UART command to launch every time. Would putting a version of go_emu.sh (modified to point to the right directory) in a boot directory work?<br />
Yes I did it myself<br />
just edit some /etc/init.d/rcS file <br />
at the end append <br />
cd /Didj <br />
./go_emu.sh<br />
<br />
it should boot in emu<br />
but dont press the home button since it close the emu and no way to restart it back :D<br />
<br />
-- what if it says 'permission denied' when the script runs? I tried editing rcS and also adding a file to the startup scripts (I think in /etc/rc.d if the filename starts with S). This may be because I put the emulator in the wrong directory, but if I put it anywhere other than in /Didj, it isn't read/write so the games don't save.<br />
<br />
<br />
--JulsPower<br />
add <br />
mount remount, rw /<br />
to your rcS file</div>Julspowerhttps://elinux.org/index.php?title=Talk:Didj_gpSP_GBA_Emulator&diff=22971Talk:Didj gpSP GBA Emulator2010-08-27T14:07:08Z<p>Julspower: </p>
<hr />
<div>3 questions:<br />
<br />
So the emulator is nice, but mine crashes when I try to access the menu in-game. Is this a common issue, or just me?<br />
At the moment when the emulator run and the home button is press the quit() function its call <br />
so its not a crash it just emulator that stop<br />
<br />
Also- what sorts of options were used in the compile of the zimage for this? I'm interested in finding a zImage that will have SD/mmc enabled, and I'm not sure if I can apply the patch in place or need to compile it fresh.<br />
Atm Nirvous that build the didj kernel he said he will post the patch for having it compiled<br />
atm this kernel doesn t support mmc/sd no sure if he do plan to make a zImage from the lxkernel with mmc for the didj emulator ask him (IRC)<br />
<br />
<br />
Finally, is there a way to make emulator start after boot? I'd like to be able to use it without a computer attached all the time, especially since it needs a UART command to launch every time. Would putting a version of go_emu.sh (modified to point to the right directory) in a boot directory work?<br />
Yes I did it myself<br />
just edit some /etc/init.d/rcS file <br />
at the end append <br />
cd /Didj <br />
./go_emu.sh<br />
<br />
it should boot in emu<br />
but dont press the home button since it close the emu and no way to restart it back :D</div>Julspowerhttps://elinux.org/index.php?title=Getting_started_hacking_the_didj&diff=22658Getting started hacking the didj2010-08-07T00:55:48Z<p>Julspower: </p>
<hr />
<div>Getting started with hacking on the leapfrog didj.<br />
<br />
[Credits]<br />
<br />
Claude<br />
<br />
NullMoogleCable<br />
<br />
Losinggeneration<br />
<br />
JulsPower(some correction)<br />
<br />
Add all the names of contributors to the Didj project here<br />
<br />
[Contents]<br />
<br />
1. What is the purpose of this document?<br />
2. Why hack the didj?<br />
3. Getting started<br />
3.1 UART (serial) connection<br />
3.2 Uploading the custom UART bootloader onto the Didj<br />
3.3 Uploading a custom kernel to the Didj<br />
3.4 Using the custom kernel<br />
3.41 Uploading the OpenGL demo<br />
3.42 Using g_ether to play mp3 files via a network<br />
3.50 Setting up a working toolchain (programming environment)<br />
3.51 Installing and configuring the virtual Image<br />
4. Other stuff<br />
4.1 Links<br />
<br />
<br />
<br />
1. What is the purpose of this document?<br />
<br />
----<br />
<br />
To explain how to get started with hacking the didj, which software to use, which tools you might need and to try and add some extra context to all the hard work that has been done so far. At the end of this document you should have a custom linux kernel on your didj and a working toolchain which should allow you to write your own programs to take full advantage of this little handheld device.<br />
<br />
<br />
<br />
2. Why hack the didj?<br />
<br />
---<br />
<br />
The didj whilst it is marketed as a childs learning tool hides a wealth of power inside the case, it has a 393Mhz arm9 cpu with<br />
a slew of multimedia chips and runs a custom linux kernel, add to that the fact that they have been sold en masse via places like woot for $20 and its easy to see that they make an ideal hacker target for cheap and relatively high power processing for<br />
game emulation or embedded projects.<br />
<br />
for a full list of features check here http://www.elinux.org/Didj for more details<br />
<br />
3. Getting started<br />
<br />
<br />
3.1 UART (serial) connection<br />
<br />
----<br />
<br />
So, You've got your didj and you want to start hacking it, the first thing that you will need to do is gain access to the didj, this is done via UART (Serial).<br />
<br />
luckily for us Claude found out that you could access the didj's uart connection via a pair of pins on the game cartridge slot, [link to relevant wiki section] this was initially done by soldering directly to the cart slot pins, you can still use that method if you wish but these days most people buy a DJHI (did ja hack it?) cart designed and built by NullMoogleCable [http://jertechonline.com/], this gives you a set of pins that can be used with an FTDI usb to serial cable or breakout board, [links to sfe bobs/cable] or any other usb<br />
to serial adapter that uses 3.3V logic levels.<br />
<br />
Another bonus on the DJHI cart is it has a microSD slot which gives you loads of storage space for anything you might want to use on the Didj.(don't say rom and music)<br />
<br />
<br />
<br />
3.2 Uploading the custom UART bootloader onto the Didj<br />
<br />
----<br />
<br />
Once you have your uart connection you will need to get a custom bootloader onto the didj, The bootloader will allow you to boot the custom linux kernel with root(Full) access or access other features instead of bootloading the leapfrog software that the didj ships with.<br />
<br />
There are 2 or 3 ways to do this, you can either uart load everything and as soon as you turn off the didj, it reverts back to the original firmware, no custom bootloader.(This method have 0 chance of briking your didj)<br />
<br />
or you can do the uart load of lightning boot and uboot, then flash those to the didj, then you can either test custom kernels/software or flash them to the didj.<br />
<br />
1. Using a djhi 2.0 or above, make sure D5 is grounded, have hyperterminal open and connected to your com port, 19200,8,n,1<br />
<br />
2. turn on and hold the power button on the didj '''do not let go until you see the blue lightning boot screen'''<br />
<br />
3. In hyperterminal click 'transfer' and select send txt file, set it to 'all files', select 'lightning-boot-1.4-UART.bin' <br />
and click open. <br />
<br />
Djhi doesn't have a led, but my ftdi breakout does, you should be able to see some activity, once the led stops flashing a few seconds later the lightning boot blue screen should come up, you can now let go of the power button. (Should be around 30 Seconds)<br />
<br />
4. Now that lightning boot is loaded you will need to put uboot onto the system if you use the reset cpu command in uboot, you will need to power off the didj completely before you can use it again, reset doesn't do a reboot or shutdown :/<br />
<br />
5. In hyperterminal disconnect, now go to file, properties and then click on configure, set the baud rate to 115200<br />
now click on the call menu and choose call, then click on the transfer menu, choose send a file, for protocol select 'Xmodem' and click on the browse button and select your uboot.bin file and click open, now on the didj select the 'upload using xmodem @ 115200' option and press the A button, (didj will send C on serial console) now back in hyperterminal click on the send button, Then press the A button again to start upload.<br />
<br />
6. Once uboot has been sent there'll be a terminal prompt, you can either start uploading a non destructive kernel image(see below, takes 15 mins) or you can write the bootloaders permanently to the didj following these instructions:<br />
<br />
http://elinux.org/Didj_U_Boot_Flashing_Primer (do step1a and Step3 onwards, we've effectively just done step 2).<br />
<br />
<br />
3.3 Uploading a custom kernel to the Didj<br />
<br />
----<br />
<br />
Now we have the bootloader on the didj we can upload a kernel image to it. This will allow us to use the didj pretty much the same as any other linux handheld computer. <br />
<br />
There are a few caveats, such as there is no USB Host on the Didj, leapfrog didn't connect the relevant pins, so you can't attach USB devices such as webcams etc. directly to the didj. However, you can use g_ether via USB for networking so it still has flexibility and of course there are unused GPIO pins that can be tapped so adding sensors etc. shouldn't be an issue and of course you can connect to all manner of devices via the UART connection.<br />
<br />
Uploading a custom kernel via uart<br />
<br />
----<br />
<br />
with uboot loaded, if you want to upload a non destructive custom kernel enter the<br />
following at the terminal prompt:<br />
<br />
'''setenv bootargs mem=18M init=/sbin/init console=ttyS0,115200 root=31:06 ro rootflags=noatime rootfstype=jffs2 ubi.mtd=Brio ubi.mtd=prg_Brio ubi.mtd=Cartridge ubi.mtd=EXT'''<br />
<br />
'''setenv loadaddr 1800000'''<br />
<br />
'''loadb'''<br />
<br />
<br />
Next send the zImage file using Kermit method once finished there will be another terminal prompt, enter.<br />
<br />
'''go 1800000'''<br />
<br />
You should now see Should now see the linux kernel uncompressing then booting, if not you may need to set the baud rate on your com port to 115200.<br />
<br />
<br />
<br />
3.4 Using the custom kernel<br />
<br />
----<br />
<br />
You should now be able to boot into the custom linux kernel, great but what now?<br />
<br />
We are limited in what we can do but as the wiki project goals are reached this section or the links section will grow as features/software is added. For now though we can load losinggeneration's OpenGL port demo and mp3 playback via g_ether<br />
<br />
3.41 Uploading the OpenGL demo<br />
<br />
One of the aims of the didj project is to get game emulation working, however, OpenGL<br />
was broken on the didj kernel, OpenGL is a library that is used in for producing graphically<br />
intensive apps and games and would be a key feature that needed fixing, due to hard work by<br />
losinggeneration it now works :)<br />
losinggeneration has written a cube demo as a hello world, [link to download and instructions]<br />
<br />
3.42 Using g_ether to play mp3 files via a network<br />
<br />
<br />
<br />
<br />
3.5 Setting up a working toolchain (programming environment)<br />
<br />
----<br />
<br />
You've uploaded a bootloader, got your linux image onto the Didj, played some mp3s on it, seen the OpenGL demo by [losinggeneration, link] but what you really want to do is start programming or editing your kernel so that it starts to do what you want. To do this you're going to need a 'toolchain', http://en.wikipedia.org/wiki/Toolchain<br />
<br />
In this particular document, as I am running windows, the toolchain consists of a virtual linux PC image that runs on the freely downloadable software 'Virtual Box' [link to Vbox site] Once you have downloaded and installed virtual box you will need the toolchain image file.<br />
<br />
This image has all of the software needed to write and compile your own programs/custom kernels for the Didj. <br />
<br />
You can find the image file here [link to losinggenerations image<br />
http://losinggeneration.homelinux.org/wp-upload/VBox-Didj.tar.bz2 and instructions].<br />
<br />
3.51 Installing and configuring the virtual Image<br />
<br />
----<br />
<br />
Before you can start using the build environment it will need unpacking and then you<br />
will need to configure a virtual machine in the Virtual Box software, for now you can<br />
unpack the image file into the folder you downloaded it to, leave the folder open for the<br />
next step.<br />
<br />
Next we need to start the Virtual Box software you installed in the previous section.<br />
When the software is up and running Click on 'File' and choose 'Virtual Media Manager'<br />
In the window that opens you should be on the 'harddisks' Tab, click on the 'add' button<br />
you will now have a browse window open, go back to the folder that you unpacked the image <br />
to and either cut and paste or copy and paste the 2 folders (Harddisks, Machines) into the<br />
browse window, this will put your image files in the Virtual Box default folder, you can <br />
now go into the harddisks folder, select the file named 'Ubuntu-Didj.vdi' and click on the<br />
open button, then click on the OK button. This will allow you to use the virtual disk <br />
image(vdi) in Virtual Box.<br />
<br />
Now that Virtual Box knows where the vdi is we can Configure ourselves a virtual machine <br />
to use it. To configure the virtual machine we will use the built in wizard, click on the<br />
blue 'New' icon in the top left corner of of the main window. <br />
<br />
In the window that opens click on the next button, give the wizard a name for your virtual <br />
machine 'ubuntu-didj' or something you will remember, then click on the dropdown for the <br />
Operating system and choose 'Linux', next click on the version dropdown and choose <br />
'Ubuntu', then click next.<br />
<br />
Now we setup the virtual hardware, first up is the how much memory you want your virtual<br />
machine to have, it defaults to use 512MB of your system memory, I've got 6GB in my PC<br />
so I set mine to 1024MB. To set the memory, drag the slider left or right, when you <br />
are happy click the next button.<br />
<br />
Next we tell the wizard to use the vdi file that we added into virtual box earlier on,<br />
click on the radio button next to 'Use existing Hard Disk', then click the folder icon <br />
to the right, in the virtual media manager window that opens make sure 'ubuntu-didj.vdi'<br />
is selected in the list, then click on the select button, once that window has closed<br />
click on the next button, you should now see a summary of the virtual machines settings,<br />
if you click on the finish button a virtual machine will be created.<br />
<br />
3.52 Extra configuration and installing 'Guest Additions'<br />
You can either start your virtual machine straight away (password: didj) or right click <br />
on the machine name in the list and change other settings, I won't go into too much <br />
detail but you can configure graphics memory allocation (I set mine to 128MB) and <br />
networking, shared folders amongst other things.<br />
<br />
At this point, it would be a good idea to install virtual box 'guest additions', this<br />
will allow you to change screen resolution and give you 3d acceleration on your guest<br />
machine. <br />
<br />
To install 'Guest Additions', start the virtual machine, then once logged in (password: didj)<br />
go to the top of the virtual box window and click on 'Devices', then click on 'Install<br />
guest additions', this will mount the guest additions ISO as a virtual CD, it may or<br />
may not autorun, if it doesn't go to your 'places' menu and then click on 'computer',<br />
then double click on the CD drive, then look for autorun.sh and double click that,<br />
wait for it to install and you should be done. log off and log back on and you should<br />
be able to change screen resolution and you should have 3d acceleration.<br />
<br />
3.53 Start hacking<br />
You can now start editing your custom didj kernel [insert wiki tutorials here] using your<br />
favourite Text/Code editor or IDE.<br />
<br />
<br />
<br />
<br />
<br />
3.6 Other toolchains<br />
[add instructions for installing the toolchain on linux]</div>Julspowerhttps://elinux.org/index.php?title=User:Julspower&diff=22184User:Julspower2010-07-15T01:59:45Z<p>Julspower: Created page with 'Hi guys Im Julspower you can find me idleing on irc im an electronic tech im doing hardware R?D as job pretty skilled with an iron I love to program my best known language is C…'</p>
<hr />
<div>Hi guys<br />
Im Julspower you can find me idleing on irc<br />
im an electronic tech<br />
im doing hardware R?D as job<br />
pretty skilled with an iron <br />
<br />
I love to program<br />
my best known language is C <br />
then C++ but I also know some vb, java and jsp (also asm but hate that :P)<br />
<br />
I just bought a didj for my first little girl and to play with it :P <br />
I hope I can help you guys :P</div>Julspower