# basic setup (we will work in /g9, but you can do it where you want) /> export PATH=/g9/u-boot-linaro-stable/tools:$PATH /> sudo mkdir g9 /> sudo chown cro.cro g9 /> cd g9 /g9> mkdir d # you need a SD card with a small FAT partition to put the # bootloader and the kernel, and a big ext4 partition to put # Angstrom stuff or whatever (if you go Angstrom, build for # omap4430-panda, that worked for me with my custom init-telnetd.c, # see below) /g9> sudo fdisk /dev/sdb Command (m for help): p Disk /dev/sdb: 1967 MB, 1967128576 bytes 61 heads, 62 sectors/track, 1015 cylinders, total 3842048 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 * 63 80324 40131 c W95 FAT32 (LBA) /dev/sdb2 80325 3842047 1880861+ 83 Linux Command (m for help): q /g9> sudo file -s /dev/sdb1 /dev/sdb1: x86 boot sector, mkdosfs boot message display, code offset 0x58, OEM-ID " mkdosfs", Media descriptor 0xf8, heads 255, sectors 80262 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 618, serial number 0x77286f11, label: "boot " /g9> sudo file -s /dev/sdb2 /dev/sdb2: Linux rev 1.0 ext4 filesystem data, UUID=2585250a-45e0-4b8a-a249-69e83f4d3f5e (needs journal recovery) (extents) (large files) (huge files) # get an arm toolchain from wherever you want # (eg. http://www.angstrom-distribution.org, or get from # archos git repository, a toolchain is built in archos-gpl-gen9) # first step: bootloader /g9> git clone git://git.linaro.org/boot/u-boot-linaro-stable.git /g9> wget http://sed.free.fr/archos/1.0/u-boot-gen9-patch.diff.gz /g9> wget http://sed.free.fr/archos/1.0/u-boot-my-patch.diff.gz /g9> wget http://sed.free.fr/archos/1.0/boot.cmd /g9> gunzip u-boot-gen9-patch.diff.gz /g9> gunzip u-boot-my-patch.diff.gz /g9> cd u-boot-linaro-stable /g9/u-boot-linaro-stable> git checkout f9e40ea /g9/u-boot-linaro-stable> patch -p 2 < ../u-boot-gen9-patch.diff /g9/u-boot-linaro-stable> patch -p 1 < ../u-boot-my-patch.diff /g9/u-boot-linaro-stable> make archos_a80s_config /g9/u-boot-linaro-stable> make /g9/u-boot-linaro-stable> cd .. /g9> mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute uImage.bin' -d boot.cmd boot.scr /g9> sudo mount /dev/sdb1 d /g9> sudo cp u-boot-linaro-stable/MLO d /g9> sudo cp u-boot-linaro-stable/u-boot.img d /g9> sudo cp boot.scr d /g9> sudo umount d # second step: ATAGS /g9> wget http://sed.free.fr/archos/1.0/atags.c /g9> wget http://sed.free.fr/archos/1.0/atags.raw /g9> gcc -Wall atags.c -o atags /g9> ./atags > atags.bin /g9> sudo mount /dev/sdb1 d /g9> sudo cp atags.bin d /g9> sudo umount d # third step: kernel /g9> wget http://sed.free.fr/archos/1.0/linux.diff.gz /g9> wget http://sed.free.fr/archos/1.0/linux.config.gz /g9> gunzip linux.diff.gz /g9> gunzip linux.config.gz /g9> git clone git://gitorious.org/archos/archos-gpl-gen9-kernel-ics.git /g9> cd archos-gpl-gen9-kernel-ics /g9/archos-gpl-gen9-kernel-ics> patch -p 1 < ../linux.diff /g9/archos-gpl-gen9-kernel-ics> cp ../linux.config .config /g9/archos-gpl-gen9-kernel-ics> make ARCH=arm CROSS_COMPILE=arm-linux- uImage /g9/archos-gpl-gen9-kernel-ics> cd .. /g9> sudo mount /dev/sdb1 d /g9> sudo cp archos-gpl-gen9-kernel-ics/arch/arm/boot/uImage d /g9> sudo umount d # fourth step: test with a basic /init (prints "hello world" every second) /g9> wget http://sed.free.fr/archos/1.0/init-hello.c /g9> arm-linux-gcc -static -Wall -o init init-hello.c /g9> arm-linux-strip init /g9> sudo mount /dev/sdb2 d /g9> sudo cp init d /g9> sudo umount d # test with a hackish init that runs telnetd (I use Angstrom # to have telnetd and a more or less working environment; this # is a big hack) /g9> wget http://sed.free.fr/archos/1.0/init-telnetd.c /g9> arm-linux-gcc -static -Wall -o init init-telnetd.c /g9> arm-linux-strip init /g9> sudo mount /dev/sdb2 d /g9> sudo cp init d /g9> sudo umount d # reboot the g9 and then telnet to it: /g9> sudo ifconfig usb0 up 10.0.0.1 /g9> telnet 10.0.0.2 Trying 10.0.0.2... Connected to 10.0.0.2. Escape character is '^]'. .-------. | | .-. | | |-----.-----.-----.| | .----..-----.-----. | | | __ | ---'| '--.| .-'| | | | | | | | |--- || --'| | | ' | | | | '---'---'--'--'--. |-----''----''--' '-----'-'-'-' -' | '---' The Angstrom Distribution (none) Angstrom 2010.7-test-20110220 (none) / #