URL
https://opencores.org/ocsvn/amber/amber/trunk
Subversion Repositories amber
[/] [amber/] [trunk/] [sw/] [vmlinux/] [README.txt] - Rev 45
Go to most recent revision | Compare with Previous | Blame | View Log
File in this directory:initrd A disk image needed if you want to build theAmber Linux kernel from sourcespatch-2.4.27-amber2.bz2 Amber Linux patch filepatch-2.4.27-vrs1.bz2 ARM Linux patch fileREADME.txt This filevmlinux Kernel executable filevmlinux.dis.bz2 Kernel disassembly file, bzip2 compressedvmlinux.mem.bz2 Kernel .mem file for Verilog simulations, bzip2 compressedIf you build the kernal from source these 2 filesget replaced.# +++++++++++++++++++++++++++++++++++++++++++# How to run Amber Linux kernel on a development board# +++++++++++++++++++++++++++++++++++++++++++1. Download the bitfile to configure the FPGA using Impact ir Chipscope2. Connect HyperTerminal to the serial port on the FPGA to connect to the boot loader3. Download the disk image> b 800000Then select the file $AMBER_BASE/sw/vmlinux/initrd to transfer4. Download the kernel image> lThen select the file $AMBER_BASE/sw/vmlinux/vmlinux to transfer5. Execute th ekernel> j# +++++++++++++++++++++++++++++++++++++++++++# How to build Amber Linux kernel from source# +++++++++++++++++++++++++++++++++++++++++++# If you also want to create your own initrd disk image,# then follow that procedure (below) first.# Set the location on your system where the Amber project is locatedexport AMBER_BASE=/proj/opencores-svn/trunk# Pick a directory on your system where you want to build Linuxexport LINUX_WORK_DIR=/proj/amber2-linuxexport AMBER_CROSSTOOL=arm-none-linux-gnueabi# Create the Linux build directorytest -e ${LINUX_WORK_DIR} || mkdir ${LINUX_WORK_DIR}cd ${LINUX_WORK_DIR}# Download the kernel sourcewget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.27.tar.gztar zxf linux-2.4.27.tar.gzln -s linux-2.4.27 linuxcd linux#Apply 2 patch filescp ${AMBER_BASE}/sw/vmlinux/patch-2.4.27-vrs1.bz2 .cp ${AMBER_BASE}/sw/vmlinux/patch-2.4.27-amber2.bz2 .bzip2 -d patch-2.4.27-vrs1.bz2bzip2 -d patch-2.4.27-amber2.bz2patch -p1 < patch-2.4.27-vrs1patch -p1 < patch-2.4.27-amber2# Build the kernel and create a .mem file for simulationsmake depmake vmlinuxcp vmlinux vmlinux_unstripped${AMBER_CROSSTOOL}-objcopy -R .comment -R .note vmlinux${AMBER_CROSSTOOL}-objcopy --change-addresses -0x02000000 vmlinux$AMBER_BASE/sw/tools/amber-elfsplitter vmlinux > vmlinux.mem# Add the ram disk image to the .mem file$AMBER_BASE/sw/tools/amber-bin2mem ${AMBER_BASE}/sw/vmlinux/initrd 800000 >> vmlinux.mem${AMBER_CROSSTOOL}-objdump -C -S -EL vmlinux_unstripped > vmlinux.discp vmlinux.mem $AMBER_BASE/sw/vmlinux/vmlinux.memcp vmlinux.dis $AMBER_BASE/sw/vmlinux/vmlinux.dis# Run the Linux simulation to verify that you have a good kernel imagecd $AMBER_BASE/hw/simrun vmlinux# +++++++++++++++++++++++++++++++++++++++++++# How to create your own initrd file# +++++++++++++++++++++++++++++++++++++++++++This file is the disk image that Linux mounts aspart of the boot process. It contains a bare bones Linux directorystructure and an init file (which is just hello-world renamed).# Set the location on your system where the Amber project is locatedexport AMBER_BASE=/proj/opencores-svn/trunk# Pick a directory on your system where you want to build Linuxexport LINUX_WORK_DIR=/proj/amber2-linuxcd ${LINUX_WORK_DIR}# Need root permissions to mount diskssu rootdd if=/dev/zero of=initrd bs=200k count=1mke2fs -F -m0 -b 1024 initrdmkdir mntmount -t ext2 -o loop initrd ${LINUX_WORK_DIR}/mnt# Add filesmkdir ${LINUX_WORK_DIR}/mnt/sbinmkdir ${LINUX_WORK_DIR}/mnt/devmkdir ${LINUX_WORK_DIR}/mnt/binmkdir ${LINUX_WORK_DIR}/mnt/etcmkdir ${LINUX_WORK_DIR}/mnt/procmkdir ${LINUX_WORK_DIR}/mnt/libmknod ${LINUX_WORK_DIR}/mnt/dev/console c 5 1mknod ${LINUX_WORK_DIR}/mnt/dev/tty2 c 4 2mknod ${LINUX_WORK_DIR}/mnt/dev/null c 1 3mknod ${LINUX_WORK_DIR}/mnt/dev/loop0 b 7 0chmod 600 ${LINUX_WORK_DIR}/mnt/dev/*cp $AMBER_BASE/sw/hello-world/hello-world.flt ${LINUX_WORK_DIR}/mnt/sbin/initchmod +x ${LINUX_WORK_DIR}/mnt/sbin/init# Checkdf ${LINUX_WORK_DIR}/mnt# Unmountumount ${LINUX_WORK_DIR}/mntrm -rf ${LINUX_WORK_DIR}/mntexitcp initrd $AMBER_BASE/sw/vmlinux
Go to most recent revision | Compare with Previous | Blame | View Log
