Start of topic | Skip to actions
Building Debian Packages For ARM ABI (EABI, armel) Using ScratchboxThanks to all developers who provided the software mentioned below.......Why
HowRead This FirstGeneral scratchbox Tips & TricksInstall/Build SoftwareRecord of another installationAdditions to default installation were
WhereBuilds were performed onWinXP/VMware
RedHat
RedHat Network/Scratchbox Connection DetailsThe model was not bridged as described elsewhere on this page.It was used with the default network setup (-net user -net nic) with the ports used by scratchbox redirected: qemu-system-arm -M versatilepb -kernel model/2619vpb/zImage -append "console=ttyAMA0 mem=128M root=/dev/ram0" -initrd model/2619vpb/model.bin -nographic -redir tcp:2049::2049 -redir udp:2049::2049 -redir tcp:1202::1202 Useful LinksWhatSpeedncurses-5.4
Example LogsYMMVConstructing an initrd file systemYou must be root, or running (for the complete sequence of operations) under fakeroot, or have sudo permission for these operations.mkdir /tmp/initrd dd if=/dev/zero of=2619vpb/model.img bs=1k count=16384 /sbin/mke2fs -F -v -m0 2619vpb/model.img mount -o loop 2619vpb/model.img /tmp/initrd tar -C /tmp/initrd -xvzf /mnt/hgfs/vmware_share/model.tgz umount /tmp/initrd gzip -9 < 2619vpb/model.img > 2619vpb/model.bin Bridging The Host And Target EthernetsAlthough the commands here turn off most, if not all, available timings the resulting bridge seems to have an initial delay (minutes) before it operates.Whatever data is set up appears to be lost after a while (minutes), so that the next host/target interaction again delays. Running continous both way pings may help..... And set the scratchbox mounts to never expire. [The /proc/sys/net/bridge writes are to ensure no packet filtering is done]
[root@localhost ppearse]# /usr/sbin/brctl addbr br0
[root@localhost ppearse]# /usr/sbin/brctl addif br0 eth0
[root@localhost ppearse]# /sbin/ifconfig eth0 0.0.0.0
[root@localhost ppearse]# /sbin/ifconfig br0 201.201.201.201
[root@localhost ppearse]# /usr/sbin/brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000c29eda49b no eth0
< Start model >
[root@localhost ppearse]# /usr/sbin/brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000c298ae366 no eth0
tap0
[root@localhost ppearse]#cd /proc/sys/net/bridge
[root@localhost bridge]#for f in bridge-nf-*; do cat $f; done
[root@localhost bridge]# /usr/sbin/brctl setfd br0 0
[root@localhost bridge]# /usr/sbin/brctl sethello br0 0
[root@localhost bridge]# /usr/sbin/brctl setpathcost br0 tap0 1
[root@localhost bridge]# /usr/sbin/brctl setpathcost br0 eth0 1
[root@localhost bridge]# /sbin/ifconfig
br0 Link encap:Ethernet HWaddr 00:0C:29:8A:E3:66
inet addr:201.201.201.201 Bcast:201.201.201.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe8a:e366/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:117785 errors:0 dropped:0 overruns:0 frame:0
TX packets:133804 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20554141 (19.6 MiB) TX bytes:46235890 (44.0 MiB)
eth0 Link encap:Ethernet HWaddr 00:0C:29:8A:E3:66
inet6 addr: fe80::20c:29ff:fe8a:e366/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1221 errors:0 dropped:0 overruns:0 frame:0
TX packets:94543 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:101356 (98.9 KiB) TX bytes:30226707 (28.8 MiB)
Interrupt:10 Base address:0x1400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1164587 errors:0 dropped:0 overruns:0 frame:0
TX packets:1164587 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100558770 (95.9 MiB) TX bytes:100558770 (95.9 MiB)
tap0 Link encap:Ethernet HWaddr 00:FF:A1:09:95:E1
inet addr:201.201.201.202 Bcast:201.201.201.255 Mask:255.255.255.0
inet6 addr: fe80::2ff:a1ff:fe09:95e1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36257 errors:0 dropped:0 overruns:0 frame:0
TX packets:42849 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7011568 (6.6 MiB) TX bytes:13618302 (12.9 MiB)
[root@localhost bridge]# /usr/sbin/brctl showstp br0
br0
bridge id 8000.000c298ae366
designated root 8000.000c298ae366
root port 0 path cost 0
max age 19.99 bridge max age 19.99
hello time 0.00 bridge hello time 0.00
forward delay 0.00 bridge forward delay 0.00
ageing time 0.00
hello timer 0.00 tcn timer 0.00
topology change timer 0.00 gc timer 58074.97
flags
eth0 (1)
port id 8001 state forwarding
designated root 8000.000c298ae366 path cost 1
designated bridge 8000.000c298ae366 message age timer 0.00
designated port 8001 forward delay timer 0.00
designated cost 0 hold timer 0.41
flags CONFIG_PENDING
tap0 (2)
port id 8002 state forwarding
designated root 8000.000c298ae366 path cost 100
designated bridge 8000.000c298ae366 message age timer 0.00
designated port 8002 forward delay timer 0.00
designated cost 0 hold timer 0.90
flags CONFIG_PENDING
The qemu-system Network ScriptMake the tap, then add it into the bridge[root@localhost emulator]# cat /etc/qemu-ifup #!/bin/sh # TODO set up sudo - must run model as root at present # sudo -p "Password for $0:" /sbin/ifconfig $1 172.20.0.1 /sbin/ifconfig $1 201.201.201.202 # Add into the pre-existing bridge /usr/sbin/brctl addif br0 $1 Exporting the scratchbox directories from the VMware host to the target (the model)File contents shown with cat. Note the additional directory, mountable by the model for communication.... Command restarts nfs using that file.[root@localhost bridge]# cat /etc/exports /exports/communication 201.201.201.0/255.255.255.0(async,insecure,no_auth_nlm,rw,no_root_squash) /scratchbox/users/ppearse/targets/2006q3_model 201.201.201.0/255.255.255.0(async,insecure,no_auth_nlm,rw,no_root_squash) /scratchbox/users/ppearse/home 201.201.201.0/255.255.255.0(async,insecure,no_auth_nlm,rw,no_root_squash) [root@localhost bridge]# /etc/init.d/nfs restart Stop the Vmware Host FirewallThis allows the scratchbox mounting on the model.(TODO - Be secure; set up iptables correctly.) See also the /proc/sys/net/bridge writes. [root@localhost bridge]# /etc/init.d/iptables status Firewall is stopped. Start the ModelModel pauses (max 120 seconds) at:
qemu-system-arm -M versatilepb -kernel images/2619vpb/zImage -append "console=ttyAMA0 mem=128M root=/dev/ram0" -initrd images/2619vpb/model.bin -nographic -net nic -net tapor with NFS qemu-system-arm -M versatilepb -kernel zImage -append "console=ttyAMA0 mem=128M root=/dev/nfs nfsroot=10.1.77.36:/work/exports/exported_sb ip=dhcp" -nographic -net nic -net tap Set up the Model Ethernet and sbrshdThe model starts without an ethernet connection.eth0 is configured, then tested with both way ping. sbrshd is started with permanent mounting for the scratchbox directories.
~ # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
~ # ifconfig eth0 201.201.201.222
eth0: link up
~ # ping 201.201.201.222
PING 201.201.201.222 (201.201.201.222): 56 data bytes
64 bytes from 201.201.201.222: icmp_seq=0 ttl=64 time=2.372 ms
64 bytes from 201.201.201.222: icmp_seq=1 ttl=64 time=1.518 ms
64 bytes from 201.201.201.222: icmp_seq=2 ttl=64 time=1.019 ms
--- 201.201.201.222 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.019/1.636/2.372/0.559 ms
~ # ping 201.201.201.201
PING 201.201.201.201 (201.201.201.201): 56 data bytes
64 bytes from 201.201.201.201: icmp_seq=0 ttl=64 time=2.636 ms
64 bytes from 201.201.201.201: icmp_seq=1 ttl=64 time=2.111 ms
64 bytes from 201.201.201.201: icmp_seq=2 ttl=64 time=1.344 ms
--- 201.201.201.201 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.344/2.030/2.636/0.531 ms
~ # export EXPIRATION=none
~ # /etc/init.d/initrd start
/verbatim>
<verbatim>
qemu-system-arm -M versatilepb -kernel images/2619vpb/zImage -initrd images/2619vpb/model.bin -nographic -net nic -net tap
</verbatim>
-- Main.PeterPearse - 28 Mar 2007
| |||||||||||||||||||||