OpenCores
URL https://opencores.org/ocsvn/amber/amber/trunk

Subversion Repositories amber

[/] [amber/] [trunk/] [sw/] [vmlinux/] [README.txt] - Diff between revs 48 and 49

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 48 Rev 49
Line 100... Line 100...
# Create the Linux build directory
# Create the Linux build directory
test -e ${LINUX_WORK_DIR} || mkdir ${LINUX_WORK_DIR}
test -e ${LINUX_WORK_DIR} || mkdir ${LINUX_WORK_DIR}
cd ${LINUX_WORK_DIR}
cd ${LINUX_WORK_DIR}
 
 
# Need root permissions to mount disks
# Need root permissions to mount disks
su root
sudo dd if=/dev/zero of=initrd bs=200k count=1
dd if=/dev/zero of=initrd bs=200k count=1
#sudo dd if=/dev/zero of=initrd bs=400k count=1
mke2fs -F -m0 -b 1024 initrd
sudo mke2fs -F -m0 -b 1024 initrd
 
 
mkdir mnt
mkdir mnt
mount -t ext2 -o loop initrd ${LINUX_WORK_DIR}/mnt
sudo mount -t ext2 -o loop initrd ${LINUX_WORK_DIR}/mnt
 
 
# Add files
# Add files
mkdir ${LINUX_WORK_DIR}/mnt/sbin
sudo mkdir ${LINUX_WORK_DIR}/mnt/sbin
mkdir ${LINUX_WORK_DIR}/mnt/dev
sudo mkdir ${LINUX_WORK_DIR}/mnt/dev
mkdir ${LINUX_WORK_DIR}/mnt/bin
sudo mkdir ${LINUX_WORK_DIR}/mnt/bin
mkdir ${LINUX_WORK_DIR}/mnt/etc
sudo mkdir ${LINUX_WORK_DIR}/mnt/etc
mkdir ${LINUX_WORK_DIR}/mnt/proc
sudo mkdir ${LINUX_WORK_DIR}/mnt/proc
mkdir ${LINUX_WORK_DIR}/mnt/lib
sudo mkdir ${LINUX_WORK_DIR}/mnt/lib
 
 
mknod ${LINUX_WORK_DIR}/mnt/dev/console c 5 1
sudo mknod ${LINUX_WORK_DIR}/mnt/dev/console c 5 1
mknod ${LINUX_WORK_DIR}/mnt/dev/tty2 c 4 2
sudo mknod ${LINUX_WORK_DIR}/mnt/dev/tty2 c 4 2
mknod ${LINUX_WORK_DIR}/mnt/dev/null c 1 3
sudo mknod ${LINUX_WORK_DIR}/mnt/dev/null c 1 3
mknod ${LINUX_WORK_DIR}/mnt/dev/loop0 b 7 0
sudo mknod ${LINUX_WORK_DIR}/mnt/dev/loop0 b 7 0
chmod 600 ${LINUX_WORK_DIR}/mnt/dev/*
sudo chmod 600 ${LINUX_WORK_DIR}/mnt/dev/*
 
 
cp $AMBER_BASE/sw/hello-world/hello-world.flt ${LINUX_WORK_DIR}/mnt/sbin/init
sudo cp $AMBER_BASE/sw/hello-world/hello-world.flt ${LINUX_WORK_DIR}/mnt/sbin/init
#cp $AMBER_BASE/sw/dhry/dhry.flt ${LINUX_WORK_DIR}/mnt/sbin/init
#sudo cp $AMBER_BASE/sw/dhry/dhry.flt ${LINUX_WORK_DIR}/mnt/sbin/init
chmod +x ${LINUX_WORK_DIR}/mnt/sbin/init
#sudo cp /proj/amber2-linux/busybox-1.18.5/busybox ${LINUX_WORK_DIR}/mnt/sbin/init
 
sudo chmod +x ${LINUX_WORK_DIR}/mnt/sbin/init
 
 
# Check
# Check
df ${LINUX_WORK_DIR}/mnt
df ${LINUX_WORK_DIR}/mnt
 
 
# Unmount
# Unmount
umount ${LINUX_WORK_DIR}/mnt
sudo umount ${LINUX_WORK_DIR}/mnt
rm -rf ${LINUX_WORK_DIR}/mnt
rm -rf ${LINUX_WORK_DIR}/mnt
exit # from being root
 
 
 
cp initrd $AMBER_BASE/sw/vmlinux/initrd-
cp initrd $AMBER_BASE/sw/vmlinux/initrd-
 
#cp initrd $AMBER_BASE/sw/vmlinux/initrd-400k-busybox
 
 
---
---
 
 
If 200k is not large enough, you can change the size as follows.
If 200k is not large enough, you can change the size as follows.
You'll need to change a couple of values in the ATAG data structure defined in the
You'll need to change a couple of values in the ATAG data structure defined in the

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.