diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2011-08-11 15:16:00 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2011-08-11 15:16:00 +0000 |
commit | 226ddbdccd9d41f813cac1bfe2eda93437f059f8 (patch) | |
tree | 2104f4799de6c5a79f11f87eab178079449e0a4b | |
parent | 25f3a498d2f44c18aeadbec36be60abd7de69e1d (diff) | |
download | 2011-tam3517-226ddbdccd9d41f813cac1bfe2eda93437f059f8.tar.gz 2011-tam3517-226ddbdccd9d41f813cac1bfe2eda93437f059f8.tar.bz2 2011-tam3517-226ddbdccd9d41f813cac1bfe2eda93437f059f8.zip |
Correction de fautes dans les commentaires et README
git-svn-id: file:///var/svn/2011-tam3517/trunk@4 e2e0d7dd-b64d-407c-a7ae-d180efd4e19e
-rw-r--r-- | README | 18 | ||||
-rwxr-xr-x | tam3517-build-everything.sh | 11 |
2 files changed, 14 insertions, 15 deletions
@@ -2,11 +2,11 @@ The "tam3517-build-everything.sh" script is a simple and quite stupid script for building a production-aware base SD image of Linux/Amstrong for Technexion TAM3517 (used with Twister dev board) on a already-working Linux called the "host system". -First of all, I am not providing any kind of waranty about this script, his consequences on the host system or on his results (the generated target-system in the SD image file). +First of all, I am not providing any kind of warranty about this script, his consequences on the host system or on his results (the generated target-system in the SD image file). This script has been written and tested for Linux/Debian 5.0 and 6.0 (aka. Lenny and Squeeze) host system. It should be used, with minor modifications, on other analogous platforms. For example, for Ubuntu, you have to comment out sources.list.d modifications because the arm toolchain is in main repositories. Feel free to adapt that for other host systems. You can drop me a mail with your version and I will put it together my work on my web site if you want so. -This script involves many complicated steps suchs as cross-compiling a kernel and it is not written to be faultless in every situation. +This script involves many complicated steps such as cross-compiling a kernel and it is not written to be faultless in every situation. This script have two main goals : - automate things to produce up-to-date Linux/Angstrom SD card image ready for customization and production @@ -16,16 +16,16 @@ I have worked on this board during some time in the past, but it is not my job, 2. Using it -For first uses, I recommand you to use exactly the same context than mine : you should install a base i386 Linux/Debian 6.0 (Squeeze) system with internet connectivity, up-to-date, drop the script in /root, read it and execute it with root user. +For first uses, I recommend you to use exactly the same context than mine : you should install a base i386 Linux/Debian 6.0 (Squeeze) system with internet connectivity, up-to-date, drop the script in /root, read it and execute it with root user. On my old Asus A7V333 based system with AMD1800+ CPU, 512Mb of RAM and a 80Gb HDD and 1Mbit/s aDSL connexion, this script runs the first time in 1 hour and twenty minutes : - 51 min for installing packages and downloading all stuff - 04 min for untarring xuk and compiling u-boot - 22 min for compiling the kernel (and modules) - 04 min for making the SD image from demo image, kernel -You should consider that is a 2011 worst-case time (or consider changing immediatly your hardware !). +You should consider that is a 2011 worst-case time (or consider changing immediately your hardware !). -Remark : If you use a VM you will have extra complexity to transfer SD image on a real physical SD card and "try and test" loops will be longer, so you should make a regular bare-metal install (with dual-boot if needed). You can add almost everything you want in this debian without breaking my script (except maybe somme extra compiling tools), so it could be your current work host-system for all your project. +Remark : If you use a VM you will have extra complexity to transfer SD image on a real physical SD card and "try and test" loops will be longer, so you should make a regular bare-metal install (with dual-boot if needed). You can add almost everything you want in this debian without breaking my script (except maybe some extra compiling tools), so it could be your current work host-system for all your project. You can, and you are invited to, try to do all the steps "by hand" using a freshly install Debian, a root shell and many copy-paste, line by line. Try to understand every step (there is some comments that should help I hope), for each command, check by hand, the result produced. In short : learn. @@ -33,17 +33,17 @@ May be, in your context, you have some needs quite different than mine, my defau I use "bash -ex" for helping troubleshooting. Any call to internal or external tool will be written on stdout and the return code will be checked. If non-zero, the script simply stops just after the faulty call. You can run a "echo $?" command to now the last command return code (non-zero if there were an error). -I have added some stupid tests and helper functions to improove user experience if you call the script many times (after adjustements for example). Some parts will NOT be replayed unless certain generated files already exists. If you want to replay everything, just "rm -r" everything (everything that has been generated by the script, of course). If you want to replay sd-image assembly without recompiling the kernel and download again many things, simply remove the generated .img file. +I have added some stupid tests and helper functions to improve user experience if you call the script many times (after adjustments for example). Some parts will NOT be replayed unless certain generated files already exists. If you want to replay everything, just "rm -r" everything (everything that has been generated by the script, of course). If you want to replay sd-image assembly without recompiling the kernel and download again many things, simply remove the generated .img file. The base root filesystem (aka. rootfs) is taken from my web-site (www.pouzenc.fr). I have drop a tar-ball there because I cannot automated rootfs generation on http://narcissus.angstrom-distribution.org/. -After your first conclusive tests, you should replace my archive (that is outdated) by one that you generate with Narcissius tool (see just above for the URL). If you replace the file "$BASEPATH/dl/tam3517-rootfs-image-am3517-evm.tar.gz" on your host-system, my script will be clever, it will not download again "my" version from my website, it just will use your tarball. +After your first conclusive tests, you should replace my archive (that is outdated) by one that you generate with Narcissus tool (see just above for the URL). If you replace the file "$BASEPATH/dl/tam3517-rootfs-image-am3517-evm.tar.gz" on your host-system, my script will be clever, it will not download again "my" version from my website, it just will use your tarball. 3. Contact -Feel free to drop me a mail if you want to contribute to the improovement of this script. I want to "Keep It Simple and Stupid"(tm) for learning purpose, so I will not add tons of checks or automated guesses and so on, but there is many improovements that can be done without increasing complexity. We can enlarge the range of targeted hardware for example. +Feel free to drop me a mail if you want to contribute to the improvement of this script. I want to "Keep It Simple and Stupid"(tm) for learning purpose, so I will not add tons of checks or automated guesses and so on, but there is many improvements that can be done without increasing complexity. We can enlarge the range of targeted hardware for example. -Remark : I am a french guy and I can write some kind of English when it helps. +Remark : I am a French guy and I can write some kind of English when it helps. Ludovic Pouzenc <lpouzenc@gmail.com> diff --git a/tam3517-build-everything.sh b/tam3517-build-everything.sh index d073d3f..2b04ac0 100755 --- a/tam3517-build-everything.sh +++ b/tam3517-build-everything.sh @@ -31,7 +31,7 @@ BASEPATH=/root/tam3517 # Big problems if you pickup a size bigger that your real card. SD_SECTOR_COUNT=$((240*1024*2)) -# End of teakable parameters +# End of tweakable parameters # Some helpers for code factoring function install_once() { @@ -73,16 +73,14 @@ fi # Install all necessary stuff for cross compiling and making up everything install_once coreutils build-essential tar rsync gcc-4.3-arm-linux-gnueabi -# Envrionnement creation for target-system compilation -mkdir_once "$BASEPATH/dl" - # Downloading of everything that is necessary +mkdir_once "$BASEPATH/dl" wget_once "http://technexion.com/index.php/support-center/downloads/ti-cpu-modules/tam-3517/546-xuk-src-tar/download" "$BASEPATH/dl/xuk-src.tar.bz2" wget_once "http://technexion.com/index.php/support-center/downloads/ti-cpu-modules/tam-3517/543-tam3517-sd-angstrom-img/download" "$BASEPATH/dl/tam3517-sd-angstrom.img.bz2" wget_once "http://www.pouzenc.fr/misc/bin/tam3517-rootfs-image-am3517-evm.tar.gz" "$BASEPATH/dl/tam3517-rootfs-image-am3517-evm.tar.gz" +# Envrionnement creation for target-system compilation mkdir_once "$BASEPATH/crosscompil/xuk" - # x-loader, u-boot and kernel source extraction [ -d "$BASEPATH/crosscompil/xuk/tam3517" ] || tar -xf "$BASEPATH/dl/xuk-src.tar.bz2" -C "$BASEPATH/crosscompil/xuk/" @@ -93,7 +91,7 @@ mkdir_once "$BASEPATH/crosscompil/xuk" CROSS_COMPILE=arm-linux-gnueabi- export ARCH CROSS_COMPILE - # u-bot building (mainly for mkimage bin, used for uImage generation) + # u-boot building (mainly for mkimage bin, used for uImage generation) if [ ! -x "$BASEPATH/crosscompil/xuk/tam3517/u-boot/tools/mkimage" ] then cd "$BASEPATH/crosscompil/xuk/tam3517/u-boot" make tam3517_twister_config @@ -120,6 +118,7 @@ mkdir_once "$BASEPATH/system/from-narcissius/mount-loop/p2" # Reuse of some part of the demo SD image from Technexion (boot partition with x-loader installed + technexion_tools folder) [ -f "$BASEPATH/system/technexion/tam3517-sd-angstrom.img" ] || bzip2 -d -c "$BASEPATH/dl/tam3517-sd-angstrom.img.bz2" > "$BASEPATH/system/technexion/tam3517-sd-angstrom.img" +# Some offset computation for finding start of partitions in the Technexion demo image file tech_p1_offset=$(fdisk -ul "$BASEPATH/system/technexion/tam3517-sd-angstrom.img" 2>/dev/null | sed -n 's/.*img1[^0-9]*\([0-9]\+\).*/\1/p') tech_p2_offset=$(fdisk -ul "$BASEPATH/system/technexion/tam3517-sd-angstrom.img" 2>/dev/null | sed -n 's/.*img2[^0-9]*\([0-9]\+\).*/\1/p') |