CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added files for CuBox device (requires testing)
authorJose V Beneyto <sepen@crux.nu>
Wed, 6 Jun 2012 11:44:12 +0000 (11:44 +0000)
committerJose V Beneyto <sepen@crux.nu>
Wed, 6 Jun 2012 11:44:12 +0000 (11:44 +0000)
Makefile
devices/cubox/Makefile [new file with mode: 0644]
devices/cubox/boot-mmcblk.script [new file with mode: 0644]
devices/cubox/boot-ram.script [new file with mode: 0644]
devices/cubox/printenv.info [new file with mode: 0644]

index 97cfddf3d429bf60e44db09b72640f8ced4b7b26..eae697c51a18781711b486016746cbbb3c1e757e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ WORK = $(PWD)/work
 
 UBOOT_VERSION = 2011.12
 
-.PHONY: all help mkimage clean dist-clean efikamx efikamx-clean efikamx-distclean
+.PHONY: all help mkimage clean distclean cubox cubox-clean cubox-distclean efikamx efikamx-clean efikamx-distclean
 
 all: help
 
@@ -16,13 +16,13 @@ help:
        @echo "Where targets available are:"
        @echo "  mkimage       Build mkimage binary for your host"
        @echo "  <device>      Where device specified should appear under"
-       @echo "                devices's dir as for example efikamx, wm8505, ..."
+       @echo "                devices's dir as for example: cubox, efikamx, ..."
        @echo "  clean         Remove generated files"
        @echo "  distclean     Remove generated files and temporary sources"
 
-clean: mkimage-clean efikamx-clean
+clean: mkimage-clean cubox-clean efikamx-clean
 
-distclean: mkimage-distclean efikamx-distclean
+distclean: mkimage-distclean cubox-distclean efikamx-distclean
 
 
 $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2:
@@ -45,6 +45,15 @@ mkimage-clean:
 mkimage-distclean: mkimage-clean
        rm -rf $(WORK)/u-boot-$(UBOOT_VERSION) $(WORK)/u-boot-$(UBOOT_VERSION).tar.bz2
 
+cubox: mkimage
+       make -C devices/cubox
+
+cubox-clean:
+       make -C devices/cubox clean
+
+cubox-distclean:
+       make -C devices/cubox distclean
+
 efikamx: mkimage
        make -C devices/efikamx
 
diff --git a/devices/cubox/Makefile b/devices/cubox/Makefile
new file mode 100644 (file)
index 0000000..0f5a851
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# uboot/devices/efikamx/Makefile
+#
+
+PWD = $(shell pwd)
+WORK = $(PWD)/work
+MKIMAGE = $(PWD)/../../work/mkimage
+ZIMAGE = $(PWD)/../../../kernel/cubox/work/zImage
+INITRDGZ = $(PWD)/../../../initrd/work/initrd.gz
+
+.PHONY: all clean distclean uImage uInitrd bootscr
+
+all: uImage uInitrd bootscr
+
+clean: uImage-clean uInitrd-clean bootscr-clean
+
+distclean: clean
+
+$(WORK):
+       install -d $(WORK)
+
+$(WORK)/uImage: $(WORK) $(MKIMAGE) $(ZIMAGE)
+       $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+       -T kernel -C none -n "Linux-2.6.32.9-cubox" \
+       -d $(ZIMAGE) $(WORK)/uImage
+
+uImage: $(WORK)/uImage
+
+uImage-clean:
+       rm -f $(WORK)/uImage
+
+$(WORK)/uInitrd: $(WORK) $(MKIMAGE) $(INITRDGZ)
+       $(MKIMAGE) -A arm -O linux -a 0x1a000000 -e 0x1a000000 \
+       -T ramdisk -C none -n "CRUX-ARM Initrd Image" \
+       -d $(INITRDGZ) $(WORK)/uInitrd
+
+uInitrd: $(WORK)/uInitrd
+
+uInitrd-clean:
+       rm -f $(WORK)/uInitrd
+
+$(WORK)/boot-ram.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-ram.script
+       $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+       -T script -C none -n "EfikaMX Boot Script (ram)" \
+       -d $(PWD)/boot-ram.script \
+       $(WORK)/boot-ram.scr
+
+$(WORK)/boot-mmcblk.scr: $(WORK) $(MKIMAGE) $(PWD)/boot-mmcblk.script
+       $(MKIMAGE) -A arm -O linux -a 0 -e 0 \
+       -T script -C none -n "EfikaMX Boot Script (mmcblk)" \
+       -d $(PWD)/boot-mmcblk.script \
+       $(WORK)/boot-mmcblk.scr
+
+bootscr: $(WORK)/boot-ram.scr $(WORK)/boot-mmcblk.scr
+
+bootscr-clean:
+       rm -f $(WORK)/boot-*.scr
+
+
+# End of file
diff --git a/devices/cubox/boot-mmcblk.script b/devices/cubox/boot-mmcblk.script
new file mode 100644 (file)
index 0000000..6e25cbf
--- /dev/null
@@ -0,0 +1,6 @@
+echo ======== Setting bootargs ========
+setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p1 rootwait ro video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0'
+echo ======== Loading kernel ========
+ext2load mmc 0:1 0x00200000 /boot/uImage
+echo ======== Booting kernel ========
+bootm
diff --git a/devices/cubox/boot-ram.script b/devices/cubox/boot-ram.script
new file mode 100644 (file)
index 0000000..f90436c
--- /dev/null
@@ -0,0 +1,14 @@
+setenv ramdisk uInitrd;
+setenv ramdiskaddr 0x18000000;
+setenv kernel uImage;
+setenv kerneladdr 0x16000000;
+setenv bootargs console=ttyS0,115200 root=/dev/ram0 rootwait ro;
+${loadcmd} ${ramdiskaddr} ${ramdisk};
+if imi ${ramdiskaddr}; then; else
+  setenv bootargs ${bootargs} noinitrd;
+  setenv ramdiskaddr "";
+fi;
+${loadcmd} ${kerneladdr} ${kernel}
+if imi ${kerneladdr}; then
+  bootm ${kerneladdr} ${ramdiskaddr}
+fi;
diff --git a/devices/cubox/printenv.info b/devices/cubox/printenv.info
new file mode 100644 (file)
index 0000000..afd45be
--- /dev/null
@@ -0,0 +1,55 @@
+CuBox>> printenv
+baudrate=115200
+loads_echo=0
+rootpath=/mnt/ARM_FS/
+netmask=255.255.255.0
+console=console=ttyS0,115200 useNandHal=single
+mtdids=nand0=dove-nand
+mtdparts=mtdparts=dove-nand:4m(boot),-(rootfs)
+arcNumber=3905
+CASset=min
+MALLOC_len=5
+ethprime=egiga0
+bootargs_root=root=/dev/nfs rw
+bootargs_end=:::dove:eth0:none
+image_name=uImage
+bootscript=boot.scr
+tftpbootcmd=tftpboot 0x2000000 ${image_name}; setenv bootargs ${console} ${mtdparts} ${bootargs_root} nfsroot=${serverip}:${rootpath}  ip=${ipaddr}:${serverip}${bootargs_end} usb0Mode=${usb0Mode} usb1Mode=${usb1Mode}  video=dovefb:lcd0:${lcd0_params},lcd1:${lcd1_params} clcd.lcd0_enable=${lcd0_enable} clcd.lcd1_enable=${lcd1_enable};  bootm 0x2000000;
+standalone=fsload 0x2000000 ${image_name};setenv bootargs ${console} ${mtdparts} root=/dev/mtdblock0 rw ip=${ipaddr}:${serverip}${bootargs_end} usb0Mode=${usb0Mode} usb1Mode=${usb1Mode} video=dovefb:lcd0:${lcd0_params},lcd1:${lcd1_params} clcd.lcd0_enable=${lcd0_enable} clcd.lcd1_enable=${lcd1_enable}; bootm 0x2000000;
+disaMvPnp=no
+ethaddr=00:50:43:c2:36:0d
+usb0Mode=host
+usb1Mode=host
+yuk_ethaddr=00:00:00:EE:51:81
+lcd0_enable=0
+lcd1_enable=1
+lcd0_params=1280x768-24@60
+lcd1_params=640x480-16@60
+ethact=egiga0
+filesize=52DA8
+ipaddr=192.168.15.223
+serverip=192.168.15.100
+stdin=serial
+stdout=serial
+stderr=serial
+passDramInitTag=yes
+mainlineLinux=yes
+enaMonExt=no
+pexMode=RC
+disL2Cache=no
+disL2Ecc=no
+sata_dma_mode=yes
+netbsd_en=no
+vxworks_en=no
+loadaddr=0x02000000
+mmc_started=0
+ide_started=0
+usb_started=0
+bootcmd=for device_name in usb mmc ide ; do for partition in 0 1; do for directory  in / /boot/;do for fstype in ext2 fat; do echo ===> Executing ${fstype}load ${device_name} 0:${partition} ${loadaddr} ${directory}${bootscript};if itest.s $device_name -eq mmc; then if itest.s $mmc_started -ne 1; then mmcinfo;   setenv mmc_started '1';fi;fi;if itest.s $device_name -eq usb; then if itest.s $usb_started -ne 1; then usb start; setenv usb_started '1';fi;fi;if itest.s $device_name -eq ide; then if itest.s $ide_started -ne 1; then ide reset; setenv ide_started '1';fi;fi;if ${fstype}load ${device_name} 0:${partition} ${loadaddr} ${directory}${bootscript}; then source ${loadaddr};fi;if itest.s $device_name -eq usb; then echo ===> Executing ${fstype}load ${device_name} 1:${partition} ${loadaddr} ${directory}${bootscript};if ${fstype}load ${device_name} 1:${partition} ${loadaddr} ${directory}${bootscript}; then source ${loadaddr};fi;fi;done;done;done;done;tftp ${loadaddr} ${bootscript};source ${loadaddr};
+bootdelay=3
+enaL2ExtraFeatures=yes
+enaCpuStream=no
+enaVpuPower=no
+enaGpuPower=yes
+
+Environment size: 2602/65532 bytes