Open aolofsson opened 10 years ago
I've prepared the saucy Ubuntu rootfs with lxde and all the things from pt. 2. It is available here: https://www.dropbox.com/s/vywy77vo4sd7ih5/nano-rootfs-small.tar.gz
just unpack it onto second partition of sd card (ext4 formatted) as boot binaries i used the ones from the newest release: https://github.com/parallella/parallella-bin/blob/master/rel.14.02.06.tgz
please test it and give me feedback about it.
Fantastic!!!!!! I'll try it and let you know asap. Can you document the steps you went through to get from the virgin linaro image to this one step by step (installed packages and any file edits needed?)
the steps needed:
1) unpack virgin linaro image on second partition of mmc (ext4 formatted) 2) go to dev directory in previously unpacked system and there run the script:
#!/bin/bash
mknod ttyPS0 c 251 0
mknod fb0 c 29 0
mkdir dri
mknod dri/card0 c 226 0
mknod dri/controlD64 c 226 64
mkdir input
mknod input/event0 c 13 64
mknod input/event1 c 13 65
mknod input/event2 c 13 66
mknod input/mice c 13 63
mknod input/mouse0 c 13 32
3) add xorg.conf file to etc/X11/ in the new system. The file should look like:
Section "Device"
Identifier "ADV7513 HDMI"
Driver "modesetting"
EndSection
4) umount the card, insert it to the board and boot the system 5) install missing packages:
#ssh server
apt-get install openssh-server
#ifplugd network connection deamon
apt-get install ifplugd
#network manager package
apt-get install network-manager
#lxde (this takes some time)
apt-get install lxde
6) reboot the board with command
reboot
#or poweroff (and manually powercycle) with
poweroff
7) wait until it boots up and enjoy
This is great. 1.) Which linaro image did you grab? 2.) Can you explain the magic going on in step#2:-) That magic seems to be what was missing for me when I couldn't get the serial port to work.
Also, please provide command line for unpacking the rootfs to the sd card. This is what I used in the past, but if there is a better way, please tell me. Thanks!
sudo tar -zxvf linaro-saucy-developer-20131216-586.tar.gz
cd binary
sudo rsync -a --progress ./ /media/"username"/rootfs
1) The image I grabbed is the one from this issue (https://releases.linaro.org/14.02/ubuntu/saucy-images/nano/linaro-saucy-nano-20140222-647.tar.gz)
2) The magic is :) :
#make device node for serial virtual console - it is required for get serial console in Ubuntu
mknod ttyPS0 c 251 0
#make device node for framebuffer - required by Xorg
mknod fb0 c 29 0
#make dri folder
mkdir dri
#make device node for first graphic card - required by Xorg
mknod dri/card0 c 226 0
#make device node for graphic card control - required by Xorg
mknod dri/controlD64 c 226 64
#make folder for input device nodes
mkdir input
#create nodes for input devices - keyboard and usb mouse
#Xorg uses those to capture input events
mknod input/event0 c 13 64
mknod input/event1 c 13 65
mknod input/event2 c 13 66
mknod input/mice c 13 63
mknod input/mouse0 c 13 32
3) the easiest way to extract files onto mmc is:
sudo tar -xvf nano-rootfs-small.tar.gz -C /path/to/mmc/partition #in Ubuntu it is usually located in /media/<partition_label>
sync
Great! LXDE is up and running but I am not seeing the ethernet port. Noticed that there are less eth messages (like setting the clock) compared to before:
root@linaro-nano:~# dmesg | grep eth xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54
This is what ifonfig returns. What am I missing?
root@linaro-nano:~# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:336 (336.0 B) TX bytes:336 (336.0 B)
How come there is an eth2 instead of eth0?
root@linaro-nano:~# ifconfig -a eth2 Link encap:Ethernet HWaddr 04:4f:8b:00:04:9c BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:54 Base address:0xb000
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:21 errors:0 dropped:0 overruns:0 frame:0 TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:570 (570.0 B) TX bytes:570 (570.0 B)
Since every board has a different MAC address..this files looks suspicious. Every board should wake up with eth0:
root@linaro-nano:~# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# Unknown net device (/devices/amba.1/e000b000.eth/net/eth0) (xemacps)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="04:4f:8b:00:01:72", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# Unknown net device (/devices/amba.1/e000b000.eth/net/eth0) (xemacps)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="04:4f:8b:00:00:b6", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# Unknown net device (/devices/amba.1/e000b000.eth/net/eth0) (xemacps)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="04:4f:8b:00:04:9c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
I figure out what is going on with the network. At the boot time Ubuntu search for network devices and generates udev rules for the specific device (recognized by mac addr) and if you run the same system on different hardware it will be recognized as new device and new udev rule will be generated where network device will get new name. That is why you get eth1 and eth2 instead of eth0 when you run Ubuntu on different boards. If you do not have configuration for the exact interface (eth0, eth1 and so on ...) in /etc/network/interfaces dhclient will not be run for it, thus we do not get ip. The solution for this is to remove eth0 entry from /etc/network/interfaces and use ifplugd deamon instead (http://manpages.ubuntu.com/manpages/lucid/man8/ifplugd.8.html). I will update rootfs tarball and instruction.
We also need network-manager package to get ethernet working automatically.
New rootfs tarball (with working networking) is available here: https://www.dropbox.com/s/r5ob89576gyflfl/nano-rootfs-small.tgz
I've updated the tarball from previous comment with xorg.conf file which significantly speeds up the graphic system.
Also the above instruction was extended with information how to add this file to rootfs.
IGNORE MESSAGE BELOW! (IT WAS USER ERROR)
Are you sure there isn't a missing step. I am not getting a serial port command prompt when follwoing the recipe from scratch:
bad sd card or user errror or is there something missing in the recipe?
Login timed out after 60 seconds.
INFO: task kworker/u4:0:6 blocked for more than 20 seconds.
Not tainted 3.12.0-g0bc9c3a-dirty #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
INFO: task jbd2/mmcblk0p2-:904 blocked for more than 20 seconds.
Not tainted 3.12.0-g0bc9c3a-dirty #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
INFO: task apt-check:3191 blocked for more than 20 seconds.
Not tainted 3.12.0-g0bc9c3a-dirty #6
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
I was digging through the parallella forum and in the post about creating Ubuntu with LXDE i saw that there is missing information about adding Xorg.conf file to the root file system (pt 3. in above instruction). Without this file the system runs quite slow and the display blinks. Since I have no power to edit forum posts I'm reporting it here.
We need to create an official Parallella image by the end of this week. Here is the base line.
1.) Linux kernel based on the latest parallella-linux-adi tree (Including the recent additions for USB sound, and docker)