News
Documentation History Authors Cost Video links
Forums
AdvanceMAME
AdvanceMENU
AdvanceCAB
|
Documentation for the build of AdvanceCD.
AdvanceCD Build Notes1 DescriptionThis document describes the internal details and the build process of AdvanceCD. The build process is possible only in Linux.2 Disk TypesAdvanceCD can boot from three different disk types: CD/DVD, USB disk and fixed disk. Any disk type uses a different boot filesystem with different booting tools.2.1 CD/DVDFor CD and DVD is used an iso9660 filesystem using the El Torito boot support in `no emulation' mode. The image is created with the mkisofs program. For booting is used the isolinux boot loader.2.2 USB diskFor USB disks is used a FAT 12/16 filesystem, with a special partition table which is also a FAT boot sector. This allows booting using both the USB-FDD and USB-HDD BIOS. The disk is created with the included makebootfat program. For booting is used the syslinux boot loader.2.3 Fixed diskFor Fixed disks is used a FAT 12/16/32 filesystem in a standard partition. The disk is created with the included makebootfat program. For booting is used the FreeDOS operating system and the loadlin linux loader.3 FilesIn the bootable disk images are present various files required in the booting process.3.1 isolinux.bin/isolinux.cfgisolinux.bin is the CD/DVD boot loader that loads the Linux Kernel and the root filesystem. The configuration of isolinux is in the isolinux.cfg file. In the configuration file is set the kernel parameter "advancecd=1" to allow the recognition of the boot from CD/DVD condition.3.2 ldlinux.sys/syslinux.cfgldlinux.sys is the FAT boot loader used for USB disks that loads the Linux Kernel and the root filesystem. The configuration of ldlinux.sys is in the syslinux.cfg file. In the configuration file is set the kernel parameter "advanceusb=1" to allow the recognition of the boot from USB disk condition.3.3 loadlin.exeloadlin.exe is the FAT boot loader used for fixed disks that loads the Linux Kernel and the root filesystem. It's a DOS program, so it needs a DOS environment like FreeDOS to run. The configuration of loadlin.exe is in the autoexec.bat file. In the configuration file is set the kernel parameter "advancehd=1" to allow the recognition of the boot from fixed disk condition.3.4 kernel32.sys/command.com/config.sys/autoexec.batkernel32.sys and command.com are minimal component of FreeDOS required to run the loadlin.exe linux loader. config.sys and autoexec.bat are the configuration files of FreeDOS.3.5 linuxlinux is the compressed image of the Linux Kernel.3.6 initrd.imginitrd.img is a gzipped ext2 filesystem image containing the Linux root filesystem. This filesystem is loaded in ram by the linux loader. It contains the minimal software required for the Linux startup.Please note that the ext2 filesystem is supported only in Linux. You cannot read this filesystem in Windows without using special tools. The file /etc/rc.d/rc.S in the image is the start script which does all the initialization work. The /etc/rc.d/rc.0 file is the shutdown script. 3.7 app.imgapp.img is a compressed iso9660 filesystem image using the zisofs extension. This filesystem is mounted by the /etc/rc.d/rc.S startup script present in the initrd filesystem. It contains all the emulator software and all the Linux Kernel modules.Please note that the zisofs extension is supported only in Linux. You cannot read this filesystem in Windows without using special tools. 4 PreparationTo build AdvanceCD you must have both the source and binary package.Login as root and decompress both the packages in the same directory and run the command:
to extract the initrd/ and app/ compressed filesystems. 5 MakefileThe Makefile has the targets:
6 AppTo update the app image follow the steps:
You need at least the kernel 2.4.14 to support the zisofs extension. Check the manpage of mkisofs for the -z option or the mkzftree manpage. 6.1 AdvanceMAME/AdvanceMENU/AdvanceMESSTo compile a new version of AdvanceMAME/MESS/MENU you can use the `wholecd' AdvanceMAME make target.Then you must manually copy the new binaries in the app/root directory. Remember to update also the .xml game list in the same directory. 6.2 KernelTo update the Linux kernel follow the steps:
This is the list of the not included drivers/features:
The kernel has all the modules compiled in. The only external modules are for Joystick, GamePort and ALSA. To boot logo is contained in the linux_logo.h file created with the fblogo utility. The kernel used is the version 2.4.26 with the following patches applied:
The kernel is compiled with the contrib/.config configuration file. 6.3 ModulesTo update the Linux kernel modules follow the steps:
6.4 ALSATo update the ALSA modules and binaries follow the steps:
The ALSA library (lib 0.9.1) doesn't work if compiled with a prefix different than the final running location. It means that you need to compile and install it with the standard prefix=/usr and manually copy the files. Ensure also that the /etc/modules.conf options are still valid for the new ALSA modules. Otherwise the modules will not be loaded. 6.5 OtherTo update the other binaries and libraries you must copy them manually.All the binaries already present are from a Slackware 10.0 installation. 7 InitrdTo update the initrd image follow the steps:
7.1 BusyboxThe BusyBox program is compiled with the .config-busybox configuration file.To compile Busybox, first copy the .config file, then type "make menuconfig", "make" and "make install". To install, copy the install bin/ and sbin/ directory in initrd/. Note that you must have all the commands in /bin and not in /usr/bin. 8 ImageTo update the disk image follow the steps:
8.1 IsolinuxThe isolinux.bin image is compiled with the following patches:
If you don't want to use the `memfix' patch, remember to remove the `mem=512M' option from isolinux.cfg. 8.2 SyslinuxIf you update the syslinux files, be sure to update both the ldlinux.bss and the ldlinux.sys files. They must always be part of the same compilation process.ldlinux.sys uses the same patches of isolinux.bin. If you don't want to use the `memfix' patch, remember to remove the `mem=512M' option from syslinux.cfg. 8.3 FreeDOSBe sure to use the 32 kernel.sys version. The 16 version doesn't have the FAT32 support.9 CopyrightThis file is Copyright (C) 2003, 2004 Andrea Mazzoleni. |