I only got the problem during boot.<br>I made me a script to generate the sdcard and when I get the boot its ok,<br>But network is not working. I had network working sometime but don't know what changes I did when I had it working.<br>
This is the script I made. It has to be runned in rootmode (sudo)<br><br>#!/bin/bash<br>#Set some variables<br>MMC_DEV=/dev/mmcblk0 #change if mmc-card mounts on different dev like /dev/sdb<br>UBOOT_PART=$MMC_DEV"p1" #if dev is /dev/sdX then use 1 not p1<br>
ROOTFS=$MMC_DEV"p2" #if dev is /dev/sdX then use 2 not p2<br>HOSTNAME_MELE=mele<br>#Set the macadress you have on the box<br>MACADDRESS_="00:11:22:33:44:55"<br>MACADDRESS=`echo $MACADDRESS_|cut -c 1-2,4-5,7-8,10-11,13-14,16-17,19-20`<br>
MELE_BUILDDIR=/mnt/allwinner/mele-bygg<br>GIT_UBOOT=sun4i<br>#Choose what linuxbranch you want to use<br>GIT_LINUX=allwinner-v3.0-android-v2<br>#GIT_LINUX=allwinner-v3.0-android<br>#GIT_LINUX=linux-3.3-sun4i<br>#GIT_LINUX=lichee-3.0.8-sun4i<br>
#You can use your own image. Just unpack it to a catalog with the $IMAGE_NAME in $MELE_BUILDDIR/images/$IMAGE_NAME<br>IMAGE_NAME=mele_debian_armhf_minimal<br>#IMAGE_NAME=mele_debian_armhf<br>ROOTIMG=$MELE_BUILDDIR/images/$IMAGE_NAME<br>
umount $ROOTFS<br>umount $UBOOT_PART<br><br>#Get and unpack a downloadable image (Remove # to get it first time and then add # after first run<br># mkdir -p $ROOTIMG<br># cd $MELE_BUILDDIR/images/<br># wget <a href="http://hands.com/~lkcl/mele_debian_armhf_minimal.cpio.gz">http://hands.com/~lkcl/mele_debian_armhf_minimal.cpio.gz</a><br>
# gunzip -d mele_debian_armhf_minimal.cpio.gz<br>cd $ROOTIMG<br># cpio -id < ../mele_debian_armhf_minimal.cpio<br><br>### Set macadress and config dhcp on image<br>cat <<END > etc/network/interfaces<br>
auto lo eth0<br>iface lo inet loopback<br>iface eth0 inet dhcp<br>hwaddress ether $MACADDRESS_<br>END<br><br>### Set hostname in image<br>echo $HOSTNAME_MELE > etc/hostname<br><br>### File system mounts.<br>cat <<END > etc/fstab<br>
# /etc/fstab: static file system information.<br>#<br># <file system> <mount point> <type> <options> <dump> <pass><br>/dev/root / ext4 noatime,errors=remount-ro 0 1<br>
tmpfs /tmp tmpfs defaults 0 0<br>END<br><br>## Activate remote console and disable local consoles.<br>echo 'T0:2345:respawn:/sbin/getty -L ttyS0 115200 linux' >> etc/inittab<br>
sed -i 's/^\([1-6]:.* tty[1-6]\)/#\1/' etc/inittab<br><br>### Create the uboot<br>cd $MELE_BUILDDIR<br>#Some packages in ubuntu you need to install to build<br>#apt-get install emdebian-archive-keyring<br>#apt-get install gcc-4.5-arm-linux-gnueabi<br>
#apt-get install build-essential git<br>#apt-get install u-boot-tools<br>#apt-get install gcc-4.5-arm-linux-gnueabi<br>#apt-get install gcc-4.5-arm-linux-gnueabihf<br>#ln -s /usr/bin/arm-linux-gnueabihf-gcc-4.5 /usr/bin/arm-linux-gnueabihf-gcc<br>
#ln -s /usr/bin/arm-linux-gnueabi-gcc-4.5 /usr/bin/arm-linux-gnueabi-gcc<br><br># Uncomment it on first run to get a clone of git<br>#git clone <a href="https://github.com/hno/uboot-allwinner.git">https://github.com/hno/uboot-allwinner.git</a><br>
<br>cd uboot-allwinner<br># OK if you get "Already on sun4i".<br>git checkout $GIT_UBOOT<br><br>make clean<br>make sun4i CROSS_COMPILE=arm-linux-gnueabi-<br><br>### This will format and prepare your mmc card<br>
dd if=/dev/zero of=$MMC_DEV bs=512 count=2047<br>sfdisk /dev/mmcblk0 <<EOF<br>64,1024<br>1088,;<br>EOF<br>#spl/sun4i-spl.bin doesnt work for me so I had to make temp a hack to get uboot working<br>#dd if=spl/sun4i-spl.bin of=$MMC_DEV bs=1024 seek=8<br>
<br>#I had to make this hack to get uboot working. I think sth is wrong with the uboot-build<br>#using the file from <a href="http://rhombus-tech.net/allwinner_a10/hacking_the_mele_a1000/mele_ubuntu_image/">http://rhombus-tech.net/allwinner_a10/hacking_the_mele_a1000/mele_ubuntu_image/</a><br>
#using this article <a href="http://rhombus-tech.net/allwinner_a10/a10_image/">http://rhombus-tech.net/allwinner_a10/a10_image/</a><br>#unpack the image mele-ubuntu-lucid.img on $MELE_BUILDDIR/images<br># mkdir $MELE_BUILDDIR/binfiles<br>
# mkdir -p $MELE_BUILDDIR/images<br># cd $MELE_BUILDDIR/images<br># wget <a href="http://www.j1nx.nl/allwinner/images/mele-ubuntu-lucid.img.lzma">http://www.j1nx.nl/allwinner/images/mele-ubuntu-lucid.img.lzma</a> <br>
# # or wget <a href="http://hands.com/~lkcl/mele-ubuntu-lucid.img.lzma">http://hands.com/~lkcl/mele-ubuntu-lucid.img.lzma</a> <br># lzma -d mele-ubuntu-lucid.img.lzma<br># mount -o loop,offset=1048576 $MELE_BUILDDIR/images/mele-ubuntu-lucid.img ../mnt<br>
# umount ../mnt<br># cp ../mnt/evb.bin<br># dd if=mele-ubuntu-lucid.img of=$MELE_BUILDDIR/binfiles/uboot_mele_mmc.bin bs=1024 skip=8 count=1008<br>#<br><br>#<br>dd if=../binfiles/uboot_mele_mmc.bin of=$MMC_DEV bs=1024 seek=8<br>
dd if=u-boot.bin of=$MMC_DEV bs=1024 seek=32<br><br>cd $MELE_BUILDDIR<br>#git clone git://<a href="http://github.com/amery/linux-allwinner.git">github.com/amery/linux-allwinner.git</a><br>cd linux-allwinner<br>git checkout $GIT_LINUX<br>
make clean<br>make ARCH=arm CROSS_COMPILE=arm-linux-ghueabi- sun4i_defconfig<br>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 uImage modules<br>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=output modules_install<br>
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=$ROOTIMG modules_install<br><br>cd $MELE_BUILDDIR<br>#mkdir /media/UBOOT<br>echo $UBOOT_PART<br>mkfs.vfat -n 'UBOOT' $UBOOT_PART<br>mount $UBOOT_PART /media/UBOOT<br>
cp linux-allwinner/arch/arm/boot/uImage /media/UBOOT<br>cp binfiles/evb.bin /media/UBOOT<br>cat <<END > boot.cmd<br>setenv console 'ttyS0,115200'<br>setenv root '/dev/mmcblk0p2'<br>setenv panicarg 'panic=10'<br>
setenv extra 'rootfstype=ext4 rootwait'<br>setenv loglevel '8'<br>setenv setargs 'setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extra}'<br>setenv kernel 'uImage'<br>
setenv boot_mmc 'fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000'<br>setenv bootcmd 'run setargs boot_mmc'<br>END<br><br>mkimage -A arm -O u-boot -T script -C none -n "boot" -d boot.cmd boot.scr<br>
cp boot.scr /media/UBOOT<br>rm *.bin *.fex<br>wget <a href="https://github.com/amery/sunxi-bin-archive/raw/master/mele-a1000/stock-nanda/script.bin">https://github.com/amery/sunxi-bin-archive/raw/master/mele-a1000/stock-nanda/script.bin</a><br>
git clone <a href="https://github.com/amery/sunxi-tools">https://github.com/amery/sunxi-tools</a><br>cd sunxi-tools<br>make<br>cd ..<br>sunxi-tools/bin2fex script.bin script.fex<br><br>sed s/000000000000/$MACADDRESS/ script.fex >scriptmac.fex<br>
<br>sunxi-tools/fex2bin scriptmac.fex scriptmac.bin<br><br>cp scriptmac.bin /media/UBOOT/script.bin<br><br>mkfs.ext4 -LROOTFS $ROOTFS<br>#mkdir /media/ROOTFS<br>umount $ROOTFS<br>mount $ROOTFS /media/ROOTFS<br>cd $ROOTIMG<br>
cp -a * /media/ROOTFS<br><br>umount $UBOOT_PART<br>umount $ROOTFS<br><br>_____<br>Håkon<br><br><div class="gmail_quote">2012/6/10 lkcl luke <span dir="ltr"><<a href="mailto:luke.leighton@gmail.com" target="_blank">luke.leighton@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, Jun 10, 2012 at 12:08 PM, Craig Whitcombe<br>
<<a href="mailto:craig.whitcombe@gmail.com">craig.whitcombe@gmail.com</a>> wrote:<br>
> ill update the wiki page for the ubuntu image to indicate that the<br>
> network card doesnt work.<br>
<br>
</div> super. could you throw ian's comments in there as well at the same<br>
time, showing how to get it to work?<br>
<br>
many thanks craig.<br>
<div class="im"><br>
> On 10 June 2012 13:05, Iain Bullard <<a href="mailto:iain.bullard@gmail.com">iain.bullard@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">>> However, after building the 3.0 kernel from source and following the<br>
>> instructions<br>
>> here <a href="http://rhombus-tech.net/allwinner_a10/hacking_the_mele_a1000/Building_Debian_From_Source_Code_for_Mele/" target="_blank">http://rhombus-tech.net/allwinner_a10/hacking_the_mele_a1000/Building_Debian_From_Source_Code_for_Mele/</a><br>
>> and *not* using the evb.bin from the original ubuntu image, the network<br>
>> interface works fine.<br>
<br>
</div> excellent. that's very valuable info.<br>
<div class="HOEnZb"><div class="h5"><br>
l.<br>
<br>
_______________________________________________<br>
arm-netbook mailing list <a href="mailto:arm-netbook@lists.phcomp.co.uk">arm-netbook@lists.phcomp.co.uk</a><br>
<a href="http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook" target="_blank">http://lists.phcomp.co.uk/mailman/listinfo/arm-netbook</a><br>
Send large attachments to <a href="mailto:arm-netbook@files.phcomp.co.uk">arm-netbook@files.phcomp.co.uk</a></div></div></blockquote></div><br>