README 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. How to test build using Aboriginal Linux system images.
  2. * Put a source tree into hdc.dir/.
  3. For example, this should work:
  4. git clone git://busybox.net/var/lib/git/busybox.git
  5. * Run ./make-hdc-img.sh: it will generate ext2 image file,
  6. hdc.img, from hdc.dir/* data. This requires root for loop mount.
  7. * Download and unpack, or build from source and unpack
  8. one or more system-image-ARCH directories into this directory
  9. (the one which contains this README).
  10. * Install qemu-system-ARCH. The arch names may differ from
  11. system-image-ARCH: for example, all ARM flavors (armv4l...armv6l)
  12. are served by the same qemu - qemu-system-arm. On my machine,
  13. I needed to install qemu-system-{arm,mips,x86,ppc,sparc,m68k,sh4}.
  14. * Run: ./parallel-build-hdc-img.sh system-image-DIR1 system-image-DIR2...
  15. (background it if you don't want to see "Waiting to finish" thing).
  16. This runs build in several qemu virtual machines in parallel.
  17. * Observe system-image-*.log file(s) with growing log of the build.
  18. There is no automated detection of errors for now: you need to examine
  19. logs yourself.
  20. Log files will also contain uuencoded (or if all else fails, od -tx1'ed)
  21. binary, if build was successful.
  22. To debug a build problem in one of the sandboxes, change keep_hdb
  23. to "keep_hdb=true" in parallel-build-hdc-img.sh
  24. - this preserves system-image-ARCH/hdb.img after the build,
  25. so you can go into system-image-ARCH and run
  26. "HDB=hdb.img ./dev-environment.sh" to debug the problem.
  27. You can also run "./parallel-build-hdc-img.sh -s system-image-ARCH"
  28. - single mode, output is to screen and serial input is from keyboard.
  29. If hdc.dir/bin/busybox-$ARCH exists, it will be used during build
  30. to supply additional tools (dir with all applets appended to $PATH).
  31. For me, the following system images worked:
  32. system-image-armv4l
  33. system-image-armv4tl
  34. system-image-armv5l
  35. od is buggy on arm*:
  36. # echo Hello-hello-hello-hello | od -b
  37. 0000000 110 145 154 154 157 055 150 145 154 154 157 055 150 145 154 154
  38. 0000000 157 055 150 145 154 154 157 012 <= WRONG OFFSET
  39. 0000000 (can also be even more bogus like 17767153361)
  40. system-image-i686
  41. system-image-mips - od is buggy
  42. system-image-mipsel - od is buggy
  43. system-image-x86_64
  44. system-image-powerpc - qemu 1.2.2 didn't work, 2.4.0 worked; od is buggy
  45. system-image-sparc - qemu 1.2.2 didn't work, 2.4.0 worked; od is buggy
  46. And these did not:
  47. system-image-armv6l - hang on "Uncompressing Linux... done, booting the kernel"
  48. system-image-m68k - my qemu doesn't like "-M q800"
  49. system-image-mips64 - init dies "Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a"
  50. system-image-sh4 - qemu segfaults early in kernel boot