HunterDavis.com 4.0!

1Oct/09326

New Video/Tutorial – Flashing a Stock Z2 to Newest Debian Image (Windows edition)

So you've only got a windows machine handy, and you want to flash your Z2 to the newest debian (apt-get! no more cross-compiling!) image with wireless? This video is for you. Full Text after the jump.

You'll need

  1. Either Aliosa27's 1gb or 2gb disk image posted to the SF page.
  2. Aliosa27's latest oe userland image
  3. phsydiskwrite (I recommend the GUI version for ease of use)
  4. The autoflasher script
  5. (if windows can't see the fat partition) Windows ext2 filesystem driver

Ready?

  1. First, flash the zipit. Extract the autoflasher bundle to a fat16 formatted memory card
  2. Open Aliosa27's wireless+x+audio.tar.gz file, and copy out the /boot/linux-2.6.29 file to your memory card
  3. Rename this file kernel.bin
  4. Boot the zipit with the SD card inserted. If this does not start the linux flash, go to settings->reset to default and it should soft-reset
  5. Some SD cards are reported to not work, or not always be seen by the zipit. Try both with and without the power cable plugged in
  6. The z2 will boot linux and copy the wifi firmware to the sd card before flashing linux to the Z2
  7. Copy off the 2 wireless firmware files gspsi.bin and gpspsi_helper.bin to a folder, you will copy these back to the memory card after we write the image
  8. IMPORTANT -- rename helper_gspi.bin to be gspi8686_hlp.bin or it will not load later!
  9. Extract the 1/2gb image to a folder
  10. Extract phsydiskwrite to a folder
  11. Insert your microSD card into the computer (adapter, usb stick, etc)
  12. Run phsygui.exe from within the folder you extracted psydiskwrite to (requires .net framework)
  13. right-click on the drive letter for your SD card, select the first menu item, and then select the 1/2gb image you extracted earlier (.img)
  14. After it writes, safely remove the disk then plug it back in. if windows can see the fat partition copy the firmware files to it
  15. If windows cannot see this fat partition, congratulations! Windows sucks! Dowload the ext2 filesystem driver, run it, then copy the firmware files over to /lib/firmware/notlibertas/ (yes notlibertas, the fat filesystem is mounted as /lib/firmware/libertas so you can't use that)
  16. Insert the sd card into the Z2, and boot. Login as root, password debian. Congrats! You've got debian on the zipit!
  17. If windows couldn't see your fat32 partition, copy the firmware files from /lib/firmware/notlibertas to /lib/firmware/libertas. You may need to run fsck if linux can't see the files.
  18. Reboot, and you should have wireless device when you type iwconfig. Configure the wireless settings, and you're ready. I like to apt-get install ssh right away, as that's what I use most of all. Ahhhhhhh! Doesn't it feel refreshing to install new software to the Z2 without cross-compiling?
  19. Install ssh/sshd with apt-get install ssh You'll also have to force-move the real start-stop-daemon back in place with mv /sbin/start-stop-daemon.REAL /sbin/start-stop-daemon
Comments (326) Trackbacks (0)
  1. Hey joce,

    Do a cp -rp /bin/firmware/notlibertas /lib/firmware/libertas . Basically you’re just copying the files into the proper directory with the unix ‘cp’ command (copy). Good Luck!

  2. argh, i just tried that. i didn’t want to question your mastery, but i tried cp -rp /lib/firmware/notlibertas /lib/firmware/libertas along with what you had told me. neither of them work, but with the one in this post, it tells me i have no permissions, along with a bunch of stuff i don’t quite understand, and with yours, it says no such files exist

  3. Hey joce,

    For mine, I believe I misspelled the directory structure. Make sure you’re logged in as root, then Try cp -rp /lib/firmware/notlibertas/* /lib/firmware/libertas Hopefully that’ll get you going! Good luck!

  4. cp: failed to perserve ownership for ‘/lib/firmware/libertas/gspi8686.bin’: Operation not permitted
    cp: failed to perserve ownership for ‘/lib/firmware/libertas/gspi8686_hlp.bin.bin’: Operation not permitted
    i feel like i’m just making just one small mistake somewhere, but i don’t know what it is. i also tried renaming(in windows) the file to gspi8686_hlp, because i noticed that bin.bin was showing up, but i got very similar results. i also wanted to add that i think your website is awesome, and this should be good practice for me once i get my pandora

  5. Hey joce,

    After the ‘cp’ operation, are the files in the correct place (even with the warnings)? You can also do a “chmod 777 *” on the files to make sure they are world readable. I wouldn’t try renaming in windows, it sounds like windows is hiding the filename extensions from you, so you’ll never be able to fully remove them unless you change your file view settings. Good luck!

  6. depending on the windows version and the folder settings you have the extension might not be shown so it will /add/ the .bin to the end of the filename. you have to tell windows (at least in vista) to show known file extensions and then you can change them in the rename window. i’ve renamed files on my sd card in windows hundreds of times (incl. the wifi firmware) with no problem as long as show known file extensions is checked and i say ok to the dialog that pops up when you do change or delete the extension.

  7. alright, i figured it out, now i just need to know how to setup my wireless. i have WEP encryption. running iwconfig gives me the lo no wireless extensions followed by eth1 and my router information. it sees it, i just don’t know how to configure it, for i am noob

  8. nvm, figured it out. i do believe my zipit is ready to go, as far as your tutorial is concerned anyways. now to try to figure out how to get a fleshed out os on this thing. thanks for all your help!

  9. Hey joce, Glad you got it working! Happy hacking :)

  10. Very good information. Thanks

  11. Hi
    Hunter love your hacks on the Zipit. I seem to have misplaced my gspsi.bin and gpspsi_helper.bin firmware files. Is there a chance you could help me out?

  12. Hey Rodman,

    Thanks, and sure, they’re already in rootnexus’s newest build so you can just DL them from there, and I believe there are a couple of companies linked from the wiki on sourceforge that provide it as well. Good lucK!

  13. you can find them either on a stock zipit (the original ones), at cozybits http://cozybit.com/projects/gspi8686/ and in the libertas tree http://linuxwireless.org/

  14. Hey Hunter I have a pretty annoying problem and I was hoping I could get some help. I have been trying to connect my zipit to the samba file server that I am running on another computer. I have been trying to use the “mount -t cifs” command which works on my ubuntu machine but I keep getting errors when I try it on the zipit. I have installed both smbfs and smbclient packages just like I have done on ubuntu but the zipit is telling me “mount error: cifs filesystem not supported by the system.” I even have the mount.cifs file in /sbin/ and it still won’t mount.

    Do you think this has something to do with the debian os/repositories or the kernel? I have exhausted all of my linux knowledge tying to fix this problem lol

  15. Hi Preston,

    Just curious, does “mount -t smbfs” work? How about with smbmount? I’m not sure if it’s a kernel issue or particular to this arm version or just an old version of samba. Are you able to mount nfs/ftp etc shares? Good luck..

  16. hello hunter, your articles have prompted me to recently aquire a zipit z2, pretty badass stuff man, for some reason i can’t get past the flashing stage, i loaded all components onto my micro sd and put it in, booted; and it goes straight to the zipit setup everytime, i checked the system info and it says my sd card is not installed… could that be because i am using a micro sd card with a mini sd adapter? and it is not reading my adapter?

  17. Hey andrew,

    Possibly… also could need to do a soft reboot, or the files are not correct in some way?. Do a search for “sd” on my site for some other folks who’ve had similar issues. Hope it works out!

  18. andrew: what happens when you remove the sd card and reinsert it while in the stock app? if the stock app then recognizes it then you are in the SAOD and need to set defaults in the stock app and reboot and all should be good. if it doesn’t then your sd card is probably just cellphone fodder and you’ll need to try another one. personally i’ve had the best luck with 1 or 2gig sandisk cards (both real mini and micros in an adapter) others have reported that kingston and pny work well. i’d avoid sdhc cards at least until you have reflashed

  19. my physgui does not write to the card. I was hoping you can help on troubleshooting?

  20. Hey Charlie,

    Could be all sorts of things.. Is the card mounted? Does it work in other computers? You could use DD for windows, that may work if psy is not working for you. Good Luck!

  21. charlie: I would try using the panasonic sd card formatter ( http://panasonic.jp/support/global/cs/sd/download/index.html )on the card just to /reset/ it back to a known state. and then try again with physdiskwrite (or dd). sometimes sd cards get really flakey and a reset to a known state using the panasonic sd formatter helps.

  22. Nice work – I got started today using the updated image for “normal users” or whatever it’s called – very nice.

    I am really interested in using Java on the Z2. You mentioned in a very old thread that you had done it. I can’t get it to install through apt-get.

    Any hints you could give would be greatly appreciated!

    Thanks!

  23. Hey Davidn70,

    Yeah, I recall a long time ago I had java working. I believe I had to cross compile it with a scratchbox env. It may also be pre-installed on one of my previous userland images. Good luck!

  24. Thank you – one more question – do you know if there is a command you can issue to make the screen come out of power save mode? Similarly, is there a command to make the screen go into power save mode? I was hoping to use a few of these as alert devices for home automation. I got the sound part worked out but the power save on the screen is a toughie.

    Thanks again!

  25. nevermind – I just found it.

    echo 0 > /sys/class/backlight/pwm-backlight.0/brightness # turns the screen off
    echo 700 > /sys/class/backlight/pwm-backlight.0/brightness # turns the screen on

    In case anyone wants to know. Thanks again for such wonderful toys :-)

  26. Hey David,

    Thanks for tips! I’m sure they will be quite handy for the next person who wishes to change the screen settings from scripts too. Happy hacking :)


Leave a comment


No trackbacks yet.