jeudi 27 septembre 2012

Mele A2000: my own Linux flash kitchen

Here it is, my own linux flash kitchen that I used to generate customized ROM images for my Mele HTPC.
Mele flash kitchen for ICS, here: mele_flash_kitchen_2.tgz
This runs only on linux (Slackware, but should work on Ubuntu and so on).

It is based on the A10 flash kitchen v2, with adaptations to run on linux, and based on this topic on Miniand
I have chosen to strip down this kitchen into a packer_ics only version for Mele since this is the one I was interested in.
You still need Windows to flash on SDcard the resulting output.img, using Phoenixcard (the only tool that I was not able to run under linux with wine)

My scripts are derived from the .bat scripts found in A10 flash kitchen (e.g. extract_image.bat is now that run under Windows, but I feel safe to perform all the required operations in only one operating system.
You will find a README.txt at the root directory of the extracted archive.

v2: I added the sdcard bootable kitchen.
After having put the original.img file (PhoenixCard source image), run "make build_sdcard" as root and it should create everything needed to generate the sdcard bootable image in sdcard/
Then, you will have to cd sdcard/ , then run make DEV=/dev/sdX (where X is the device letter of your sdcard).
Read this post for more information on that: Booting the Android ICS system from SDCard

wine, in order to extract/build the flash image.
root access, for scripts other than
The script will create /system in your root directory. This is necessary if you make symbolic links in "system" filesystem.
Of course, you need an original image (that you will rename as original.img) to start hacking.

Many thanks to Sztupy for the A10 flash kitchen, and to Miniand Tech for the detailed tutorial!

28 commentaires:

  1. I've been trying to compile the ISO9660 and UDF modules to add CD/DVD support to the MELE, following the instructions provided before, but I'm getting error when inserting the module, though the vermagic shows the same version for a working and a non-working module (3.0.8+)

    Any clues?

    Thanks for the kitchen!

  2. Perhaps the toolchain? What kind of error are you getting?
    Just follow this tutorial:
    And see if you get something better...

  3. The modules compile, and some work (like xpad.ko) but isofs and udf both give me "insmod: init_module 'isofs.ko' failed (Device or resource busy)"

    1. Seems that the module already exists..
      Just try this:
      cat /proc/filesystems
      And see if you find isofs or udf.

    2. Seems that the module already exists..
      Just try this:
      cat /proc/filesystems
      And see if you find isofs or udf.

  4. The modules seem to be there (not marked as "nodev") but when I plug a dvdrom in the sata port, it won't get mounted nor recognised

    1. I plugged a USB dvd-rom reader, and in a adb shell I did:
      busybox mount /dev/block/sr0 /mnt/sdcard/Movies/ (for example), and I saw the DVD-rom contents in /mnt/sdcard/Movies.
      Nevertheless I don't know what reader is able to read a mounted DVD (perhaps vlc-beta?).
      This is a manual operation, and you must perform "busybox umount /mnt/sdcard/Movies" before ejecting the DVD-rom.
      Not very handy I must admit, but shows that this could work...

    2. I'll run a few test with a sata -to-usb adapter but I was using sata all along, and still can't get it to work that way

    3. It works with the usb adapter.
      It worked with the sata cable.

      Somehow I totally forgot about the device being listed within the block devices, and dmesg doesn't say anything about sata devices, but you do get a message with it mounted through usb..

      (USB MESSAGE:)

      <6>[ 317.150484] usb 2-1.2: new high speed USB device number 5 using sw-ehci
      <6>[ 317.270171] scsi2 : usb-storage 2-1.2:1.0
      <5>[ 318.273207] scsi 2:0:0:0: CD-ROM HL-DT-ST DVDRAM GH20NS15 IL00 PQ: 0 ANSI: 0
      <7>[ 318.282760] sr0: scsi3-mmc drive: 78x/78x writer dvd-ram cd/rw xa/form2 cdda tray
      <7>[ 318.309789] sr 2:0:0:0: Attached scsi CD-ROM sr0
      <6>[ 319.278209] init: waitpid returned pid 724, status = 00000000
      <3>[ 319.278233] init: untracked pid 724 exited

      Thanks a lot!

  5. Can you boot into recovery CWM any time that you need?
    I can do it only once after burning firmwire(

    1. Indeed there is a trick here.
      "adb reboot recovery" does not seem to work.
      But if you try
      adb shell "echo -n boot-recovery | busybox dd of=/dev/block/nandf count=1 conv=sync; sync;"
      And then
      adb reboot
      the target reboots in recovery mode.

    2. Do you see novo7 tools?
      Looks like clone meletools.apk

  6. I have a thing after burn SD card by phoenix. I have been looked for hidden partitions on SD card. I wanted create my img from SD after phienix. But i cant understand there phoenix are hide the android files on SD. Partitions are not exist, but files are situated there.
    My mission create SD like thoenix burn. Is it really? Or live suit more ease?

    1. Windows can't see the partition that phoenix creates, you could see it with some software like partition manager or natively in linux. If you don't know a thing about linux try a live iso of gparted.

      same information.

    3. Have you error on kitchen?

    4. Under Windows, you should use the miniand tutorial:
      The only modification you have to do is in the kitchen, files/image.cfg: first to remove "OEM" part, second, to add "DISK" part. Or to make it simpler, overwrite this file with the one in mele_flash_kitchen.tgz.

    5. I try in ubuntu. Error showing under wine. Ok, thanks for help. What is your profession in a real life?

  7. HI! You can use RX TX pins on mele and you never need to activate lan or usb ADB


    Currently downloading, I'll test it later.

  9. Hi! I've tried to download your custom kitchen but the link does not work. I've have found it in this google group:!topic/cubieboard/N4IRtLH07CM

    but I'd rather had the kitchen from it's original source.
    I've also noticed that the original A10 kitchen v2 for Windows is infected by a trojan. If it try to run in in a Windows VM it won't even allow me, it detects that it is running in a VM and stops. To me that is a clear sign of a virus infection. The culprit is unimg.exe.
    There is no difference between the unimg.exe file in your kitchen and the infected unimg.exe. So I wonder how safe is to use your kitchen even in linux.

    1. Indeed the hoster has deleted the file (no download during 30 days).
      I uploaded it on 4shared, permanent storage.
      Here it is:
      This is a v2 version since I put the sdcard kitchen. It should work, just by a "make build_sdcard" after having put "original.img" as the source PhoenixCard image.
      I have no issue with unimg, but I did not check if a network connection was done during the image extraction. And Windows trojans do not mix well on linux under wine...

    2. Could someone upload this somewhere I don't have to register, please.
      Or just a paste of the "scripts to generate the sdcard version" would be enough for me.

    3. Please try this:

  10. Here is the infection report for the unimg.exe file:

    1. Indeed, even another source shows a trojan:
      The source:

  11. Biggest thanks, Thierry! But there's an error with abootimg:
    ../../tools/abootimg: error while loading shared libraries: cannot open shared object file: No such file or directory
    tools/abootimg-20120825-src/abootimg: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
    I compiled abootimg statically linked and stripped for i386 and amd64:
    Haven't tested i386 natively so to be sure I also included the static libraries libblkid.a and libuuid.a and you might need blkid.h
    Change the LDLIBS line in the Makefile as follows:
    LDLIBS=-static -lblkid -luuid -L.

    1. Indeed this is a dynamic linked version against util-linux-2.21.2 package.
      On debian, there must be a precompiled package somewhere...