AstLinux Development Environment

20 January 2010
Astlinux has now reached version 0.7. These voip-info.org pages are therefore extremely out-of-date. Please refer to the official Astlinux site:

http://www.astlinux.org/

The AstLinux development environment is what was used to create AstLinux 0.4
The AstLinux development environment is currently being developed in a Subversion repository hosted on astlinux.org. It is based off of Erik Anderson's Buildroot2. Because of this, it inherits all of the nice features of Buildroot including:

- Support for multiple architectures
- uclibc (smaller binaries and less memory usage)
- busybox (of course)

and some unique to AstLinux:

- AstLinux kernel configuration
- improved Asterisk support
- astmanproxy, sox, mini_httpd, and all of the other great software from AstLinux

All in a consistent, easy to configure (make menuconfig) package. Thanks to contributions from members of the community, as of this writing it is almost ready. I don't want to commit to a specific timeframe, part of that is up to you! Check it out today and let me know what you think. Patches are welcome, and frequent helpers can be setup with commit access.

Getting started


Note, do _not_ build while logged in as root! Build the development environment as a regular user.

The very first time, do the following to bring down the whole source tree:
cd <somedir>
svn co https://astlinux.svn.sourceforge.net/svnroot/astlinux/trunk astlinux/trunk

Subsequent times you can:

cd astlinux/trunk
svn update

cp astlinux.config .config

astlinux.config is used as an example, but you can choose any from the *.config files there.

make oldconfig
make menuconfig
make

In anywhere ranging from 30 minutes to two hours and beyond, you should have a very nice looking root filesystem in "build_i586/root". Have a look around. Poke and prod. If something you would like in AstLinux is missing, create the appropriate package/*/*.mk and package/*/Config.in files and send them to me. If something is broken, send me the output of "svn diff" after "svn update".


Problems building the development environment


The iproute2 module requires flex-2.5.4. Attempting to build with a newer
version, such as flex-2.5.31, will result in a message similar to the following:

 emp_ematch.lex.c emp_ematch.lex.c:1686: error: syntax error before
 numeric constant emp_ematch.lex.c: In function `ematch__scan_string':
 emp_ematch.lex.c:1687: error: number of arguments doesn't match
 prototype emp_ematch.lex.c:298: error: prototype declaration
 emp_ematch.lex.c:1689: warning: passing arg 1 of `strlen' makes
 pointer from integer without a cast emp_ematch.lex.c:1689: warning:
 passing arg 1 of `ematch__scan_bytes' makes pointer from integer
 without a cast make[2]: *** [emp_ematch.lex.o] Error 1



Building the image


Once you've succesfully built the release, you'll need to create an image, e.g. for compact flash. Use the makeimage.sh command:

./makeimage.sh <image size in MB>

and then follow the prompts. In current releases you need to be logged in as root to run makeimage.sh.

mkimage.sh creates a file called disk.img In current release (0.4.3) 64MB is a good size (don't go below 48). Thus you would use:

./makeimage.sh 64

Once you have disk.img you can dd it to your CF card (using your USB card reader). Be sure you specify the correct drive!

Here is a complete example:

./makeimage.sh 64 <change size in MB to suit need>

I will create a 'flat' hard disk image with

cyl=130 <- note this number for later
heads=16 <- note this number for later
sectors per track=63 <- never seen it change but note it anyway
total sectors=131040
total size=63.98 megabytes

Writing: [] Done.

I wrote 67092480 bytes to disk.img.

The following line should appear in your bochsrc:
ata0-master: type=disk, path="disk.img", mode=flat, cylinders=130, heads=16, spt=63

You need to run fdisk manually to partition the image.
Please write down or memorize the following instructions:

press 'x' - extra functionality
press 'h' fill in heads - probably 16
press 's' fill in sectors - probably 63
press 'c' fill in cylinders - this changes - get value from "I will create" above
press 'r' return to main menu
press 'n' to add new partition
press 'p' to choose primary partition
press '1' to set partition number
press Enter keys to choose default value of First Cylinder parameter.
press Enter keys to choose default value of Last Cylinder parameter.
press 'w' to write partition table and exit


grub> device (hd0) /dev/loop
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Copy image to CF card


If CF card has old image on it and image size has changed, first use FDISK to remove the existing partitions from the CF card. Be sure you have the right device name before doing the dd otherwise you may overwrite the wrong disk!.

CF card in USB reader at /dev/sda use

dd if=disk.img of=/dev/sda; rmmod usb-storage

CF card in IDE slave at /dev/hdb use

dd if=disk.img of=/dev/hdb

To build a jffs2 image for gumstix


su to root and then run:
make jffs2root
That's it! :)



20 January 2010
Astlinux has now reached version 0.7. These voip-info.org pages are therefore extremely out-of-date. Please refer to the official Astlinux site:

http://www.astlinux.org/

The AstLinux development environment is what was used to create AstLinux 0.4
The AstLinux development environment is currently being developed in a Subversion repository hosted on astlinux.org. It is based off of Erik Anderson's Buildroot2. Because of this, it inherits all of the nice features of Buildroot including:

- Support for multiple architectures
- uclibc (smaller binaries and less memory usage)
- busybox (of course)

and some unique to AstLinux:

- AstLinux kernel configuration
- improved Asterisk support
- astmanproxy, sox, mini_httpd, and all of the other great software from AstLinux

All in a consistent, easy to configure (make menuconfig) package. Thanks to contributions from members of the community, as of this writing it is almost ready. I don't want to commit to a specific timeframe, part of that is up to you! Check it out today and let me know what you think. Patches are welcome, and frequent helpers can be setup with commit access.

Getting started


Note, do _not_ build while logged in as root! Build the development environment as a regular user.

The very first time, do the following to bring down the whole source tree:
cd <somedir>
svn co https://astlinux.svn.sourceforge.net/svnroot/astlinux/trunk astlinux/trunk

Subsequent times you can:

cd astlinux/trunk
svn update

cp astlinux.config .config

astlinux.config is used as an example, but you can choose any from the *.config files there.

make oldconfig
make menuconfig
make

In anywhere ranging from 30 minutes to two hours and beyond, you should have a very nice looking root filesystem in "build_i586/root". Have a look around. Poke and prod. If something you would like in AstLinux is missing, create the appropriate package/*/*.mk and package/*/Config.in files and send them to me. If something is broken, send me the output of "svn diff" after "svn update".


Problems building the development environment


The iproute2 module requires flex-2.5.4. Attempting to build with a newer
version, such as flex-2.5.31, will result in a message similar to the following:

 emp_ematch.lex.c emp_ematch.lex.c:1686: error: syntax error before
 numeric constant emp_ematch.lex.c: In function `ematch__scan_string':
 emp_ematch.lex.c:1687: error: number of arguments doesn't match
 prototype emp_ematch.lex.c:298: error: prototype declaration
 emp_ematch.lex.c:1689: warning: passing arg 1 of `strlen' makes
 pointer from integer without a cast emp_ematch.lex.c:1689: warning:
 passing arg 1 of `ematch__scan_bytes' makes pointer from integer
 without a cast make[2]: *** [emp_ematch.lex.o] Error 1



Building the image


Once you've succesfully built the release, you'll need to create an image, e.g. for compact flash. Use the makeimage.sh command:

./makeimage.sh <image size in MB>

and then follow the prompts. In current releases you need to be logged in as root to run makeimage.sh.

mkimage.sh creates a file called disk.img In current release (0.4.3) 64MB is a good size (don't go below 48). Thus you would use:

./makeimage.sh 64

Once you have disk.img you can dd it to your CF card (using your USB card reader). Be sure you specify the correct drive!

Here is a complete example:

./makeimage.sh 64 <change size in MB to suit need>

I will create a 'flat' hard disk image with

cyl=130 <- note this number for later
heads=16 <- note this number for later
sectors per track=63 <- never seen it change but note it anyway
total sectors=131040
total size=63.98 megabytes

Writing: [] Done.

I wrote 67092480 bytes to disk.img.

The following line should appear in your bochsrc:
ata0-master: type=disk, path="disk.img", mode=flat, cylinders=130, heads=16, spt=63

You need to run fdisk manually to partition the image.
Please write down or memorize the following instructions:

press 'x' - extra functionality
press 'h' fill in heads - probably 16
press 's' fill in sectors - probably 63
press 'c' fill in cylinders - this changes - get value from "I will create" above
press 'r' return to main menu
press 'n' to add new partition
press 'p' to choose primary partition
press '1' to set partition number
press Enter keys to choose default value of First Cylinder parameter.
press Enter keys to choose default value of Last Cylinder parameter.
press 'w' to write partition table and exit


grub> device (hd0) /dev/loop
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Copy image to CF card


If CF card has old image on it and image size has changed, first use FDISK to remove the existing partitions from the CF card. Be sure you have the right device name before doing the dd otherwise you may overwrite the wrong disk!.

CF card in USB reader at /dev/sda use

dd if=disk.img of=/dev/sda; rmmod usb-storage

CF card in IDE slave at /dev/hdb use

dd if=disk.img of=/dev/hdb

To build a jffs2 image for gumstix


su to root and then run:
make jffs2root
That's it! :)



Created by: krisk17, Last modification: Sun 10 of Jun, 2012 (04:27 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+