Free/open source journal

This post is really long and boring and probably useless.  So please skip to the end and look at my other posts.

I will try to write about experience with technicalities I encounter in free/open source projects.  This might help academics and other beginners to educate so they can join free or open source communities.

For now, I started working the training materials for Linux on the Beagleboard posted by free-electrons. Read and made notes on the .pdf files with Adobe’s pdf viewer on an Android (Samsung Note 10.1) tablet.  (DISCOVERED LATER: These materials are obsolete.  They predated the Beagleboard xM rev. c1 which I have, and web links in the lab materials are broken.  Free Electrons posted in 2013 that all their Linux-arm training is on the … which is like the Beagleboard.)

The instructions worked ok until the build of the ct-ng toolkit 1.8 failed because of broken links.  I made a note to use current versions, and proceeded with 1.18.

Some step failed because of missing software.  That was easily remedied by installing the (Ubuntu) package.  However, the ct-ng build wasn’t restartable.  Investigation (..fill in ) showed a configuration setting (I knew that systems typically do or should have checkpoint/restart features)

Navigating around the tools built from ct-ng

Installed under x-tools.  Observed one dir. for the built tools  arm-unknown-linux-uclibcgnueabi written about in lab instructions.  Observed a subdirectory arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi having entries: bin  debug-root  include  lib  lib32  lib64  sysroot

CURVE:  hello C program built with tool built from ct-ng failed on Beagleboard’s out-of-the box system.

-sh: ./hello not found

Knew this is likely a missing shared library (from past experience, seeing this non-informative error message) (The lab book contents in a later chapter from testing your cross toolkit discusses the shared library issue, and quotes the “not found” message.)

Tried ldd hello: Failed since the out-of-the-box system didn’t have ldd. (past experience: ldd, stands for list dynamic dependencies. Linux dynamic link libraries have names like lib*.so and many are installed under /usr/lib)

Looked for ldd in x-tools built by ct-ng:  Found it!  Tried arm-linux-ldd ./hello and it failed with a message suggesting the –root option.  Used –help option and read about –root option.  Knew (from this project’s reading) about sysroot.  Observed sysroot has lib subdirectory containing familiar lib*.so and lib*.a files.  So I tried arm-linux-ldd –root that sysroot dir hello and found 2 dependencies:  I then looked for them on the Beagleboard system.  Saw libc.so but NO libuClib.so and ld-??? !

With tools, compiled hello.c with –static (past experience, training content about dynamic libraries).  Built.  SUCCESS running the static version on the Beagleboard!

C compiler command line arguments: –static  -o used to name the result hello.static (good idea to use multiple names)

What should I do next?

A root file system (observed out-of-the-box system did not use initramfs or initrd) has a kernel, so to build a root file system, I need a kernel.  So we should work on building a kernel first.

Delay

Training explains using an nfs root file system.  The PC requires shorter (don’t know what to call that size) cards, which I didn’t see in the depts. old card box.  Emailed for sysadm for spare nic.

Try instructions from Embedded Linux Primer for kgdb:

How can I get new kernel parameters (kernel command line) in the out-of-the-box Beagleboard?

Ran u-boot (booted Beagle and pressed a key).  Explored environment with commands, beginning with printenv (had read about uboot before).

Printing: Copy from terminal screen, paste into screen running lpr .  (Had to configure our network printer into the PC, basic Ubuntu adm.)

Finding the .config file for a working kernel

Past observations/readings: it’s installed in the /boot subdirectory alongside the kernels and initrds.  NOT found under /boot in the Beagleboard out-of-the-box system!

Noticed config.gz in the /proc directory of the Beagleboard.  (Unix cp command; ok to copy /proc files; know /proc files won’t exist on the disk image!)  cp to my user home dir, so I can get the copy outside the Beagleboard.

Kernel building subproject

I’m familiar with Linux kernel configuration.  Recent reading reminded me that one can start with a given configuration, copy it to .config and then run make oldconfig.

Note kernel version on the out-of-the-box system:  Use uname -a (previous experience)  Also, noted in notebook from boot messages TI DM3730 (model of OMAP–had read about lots of new OMAPs from TI’s recent OMAP tech reference manual; I read the initialization chapter after reading web pages about xloader uboot OMAP booting)

BeagleStudy/kernels must download 2.6.32 kernel src.  Hey, let’s use GIT!

wget -nd https://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.32/linux-2.6.32.61.tar.xz

Went to http://www.kernel.org.  Saw 2.6.32.61 was a “long term” so I decided on that. Saw URL when hovering.  Decided to use wget.  (Learned of wget long ago. Remembered -nd option.)

tar xzf linux-2.6.32.61.tar.xz (long ago; basic kernel building instructions appearing many places.)  FAILED:  Encountered .xz yesterday!!  Did google xz and man -k xz to find out about .xz compression and tool xzcat.

xzcat lin… | tar xvf –  (long ago–l like seeing it happen so I use v flag.  x is extract, f is file, – use stdin (piped from xzcat command)  ls to confirm I have a linux-2.6.32.61 dir.

cd linux-2.6.32.61, git (have to find out again how to init a git repo!) (git not installed!, sudo apt-get install git)

https://git.wiki.kernel.org/index.php/QuickStart (Wow, for Linux kernel)

git init; git add .; (took a long time); git commit -m “pristine…” (knew message was required)

Used USB micro/etc flash card interface to cp config.gz (above)

Know: Automounter make flash cards available under /media  Tab completion to remind names under which partitions are mounted..  is Narcissus… (observed before).. know users are under /home, so use /home/seth

gunzip config.gz ; ls to confirm config.gz replaced by config; rename mv config BeagleOutOfBoxConfig; cp Beag.. .config

Tried git add Beagle-Out-Of-Box-Config .config;   add .config refused because of .gitignore (So stuff built won’t be saved by git…  Decided not to use -f to really want to add them!)

Look at 2009 cross compile material in free-electrons lab.  (BEFORE dispatching make oldconfig)

Forgot install uboot-mkimage!  Try that.  Installed uboot-tools package too. (Free Electrons lab explains getting and using Ubuntu, installing linux packages, and use of apt-get install on Ubuntu Linux. )

lab says: TI OMAP Beagleboard (reminded it’s OMAP based and from TI)

lab says: put bin dir of our xtools in front of PATH (know about unix PATH, etc)

Observed: x-tools/arm-unknown-linux-uclibcgnueabi/bin has arm-linux named tools, but

x-tools/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/bin has the tools without the arm–… qualified names.  Did ls -l to see they are not symbolic links.  Are the binaries equal?? YES, at least the gcc one! I’ll follow the lab’s instrs.

I wrote question in lab: Makefile setup Modify the top level makefile… REALLY??? Lets look in the top level makefile.  Also do a make help (know about that).

Reading the makefile and google search found http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=4   Have to set ARCH set to an arch in the arch subdir.  CROSS_COMPILE is the prefix appended to commands like gcc for finding them under a search using PATH.  gentoo also explains an INSTALL_MOD_PATH Apparently gentoo explains a way to get the kernel build tree in the embedded system.  gentoo explains two ways of setting environment (What’s that?) for kernel building: Put them in the make command within a shell script, or modify Makefile.

I see Makefile uses uname to set SUBARCH and uses that as default for ARCH.  This is how it knows the arch for a native build.

I think I’ll use a script setting the env.  What’s “$@” after the make for?  command line args..  follow gentoo: make it executable.  Named it mymake (I like my).  Checked: PATH does not contain .; so I’ll do that in the shell.  Checked: mymake help printed help!

Maybe … I’ll make a sysroot dir alongside the linux tree!!

Look for INSTALL_MOD_PATH in Makefile.

#
# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
# relocations required by build roots.  This is not defined in the
# makefile but the argument can be passed to make if needed.
#

SCROLLING:  Ctrl-midde and Ctrl-right in xterm give option setting window.  Handy to turn on scrollbars.

Ouch!

did mymake oldconfig.  Noticed an extra new line was entered each time I pressed enter!!

So, I viewed xterm’s settings with Ctrl-right and turned OFF auto linefeed. (Probably set it accidentally)

Forgot to write a custom subversion in the makefile. Do that now… (edit the makefile!! .61-sdc1)

Whoops!

mymake oldconfig… something wrong.. looks like it thinks I’m doing an x86, not ARM!! Instead of putting the enviroment settings on the make command line, I put them on separate lines in the script!!!  So they were not exported.  Will fix it:  use shell command export on each one..

…. built 2 kernels and got uBoot to load them; got uncompress messages and starting kernel messges.. then nothing!!

The next day.

Viewed some Google search results.  Worked from http://elinux.org/BeagleBoardLinuxKernel Looked at the referenced git repository via the web interface: found a commit to support Beagleboard xM rev. C.  Compared file to file in my last kernel version build…new one has much more.

Tried to use the published command (suspicious of the ;):

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git;branch=linux-3.2.y;protocol=git

It looks like the author took the entry from a bitbake recipe and reprinted it in a git command!  But I tried it anyway.  As I expected, it got the whole linux-stable repository.  A git checkout linux-3.2.y worked of course.  I listed all branches for fun git branch -a.

I see the author says to checkout a particular commit (identified by hash)  must try that…

FAILS!  Check out the version given by above recipe (SRCREV). E.g. git checkout 58cf2f1425abfd3a449f9fe985e48be2d2555022 failed with fatal: reference is not a tree: 58cf2f1425abfd3a449f9fe985e48be2d2555022 Also git show on this reports bad object

————————————————–

Networking with u-Boot.

The current FE lab instr. didn’t work.

Google search: David Neiss’ Blog (Jan 9,2012) said his “stock 05.02 precompiled u-boot image didn’t seem to support tftp.” He got a source tree from github.com/koenkooi/u-boot.git u-boot.not.mainline, built it and reported success.  His steps:

  1. setenv serverip 192.168.0.1  (sdc’s IP here)
  2. setenv ipaddr 192.168.0.100 (sdc’s Beagleboards IP here)
  3. usb start
  4. see output
  5. try ping

github.com/koenkooi reports he’s an active TI arm hacker; but no u-boot.not-mainline branch.  I found a 2yr old u-boot repository commit that edited doc/README.usb adding information about usb networking.  Quote of current version of Networking section:

USB Host Networking
===================
If you have a supported USB Ethernet adapter you can use it in U-Boot
to obtain an IP address and load a kernel from a network server.
Note: USB Host Networking is not the same as making your board act as a USB
client. In that case your board is pretending to be an Ethernet adapter
and will appear as a network interface to an attached computer. In that
case the connection is via a USB cable with the computer acting as the host.
With USB Host Networking, your board is the USB host. It controls the
Ethernet adapter to which it is directly connected and the connection to
the outside world is your adapter’s Ethernet cable. Your board becomes an
independent network device, able to connect and perform network operations
independently of your computer.
Device support
————–
Currently supported devices are listed in the drivers according to
their vendor and product IDs. You can check your device by connecting it
to a Linux machine and typing ‘lsusb’. The drivers are in
drivers/usb/eth.
For example this lsusb output line shows a device with Vendor ID 0x0x95
and product ID 0x7720:
Bus 002 Device 010: ID 0b95:7720 ASIX Electronics Corp. AX88772
If you look at drivers/usb/eth/asix.c you will see this line within the
supported device list, so we know this adapter is supported.
        { 0x0b95, 0x7720 }, /* Trendnet TU2-ET100 V3.0R */
If your adapter is not listed there is a still a chance that it will
work. Try looking up the manufacturer of the chip inside your adapter.
or take the adapter apart and look for chip markings. Then add a line
for your vendor/product ID into the table of the appropriate driver,
build U-Boot and see if it works. If not then there might be differences
between the chip in your adapter and the driver. You could try to get a
datasheet for your device and add support for it to U-Boot. This is not
particularly difficult – you only need to provide support for four basic
functions: init, halt, send and recv.
Enabling USB Host Networking
—————————-
The normal U-Boot commands are used with USB networking, but you must
start USB first. For example:
usb start
setenv bootfile /tftpboot/uImage
bootp
To enable USB Host Ethernet in U-Boot, your platform must of course
support USB with CONFIG_CMD_USB enabled and working. You will need to
add some config settings to your board header file:
#define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */
#define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */
As with built-in networking, you will also want to enable some network
commands, for example:
#define CONFIG_CMD_NET
#define CONFIG_NET_MULTI
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
and some bootp options, which tell your board to obtain its subnet,
gateway IP, host name and boot path from the bootp/dhcp server. These
settings should start you off:
#define CONFIG_BOOTP_SUBNETMASK
#define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_HOSTNAME
#define CONFIG_BOOTP_BOOTPATH
You can also set the default IP address of your board and the server
as well as the default file to load when a ‘bootp’ command is issued.
All of these can be obtained from the bootp server if not set.
#define CONFIG_IPADDR 10.0.0.2 (replace with your value)
#define CONFIG_SERVERIP 10.0.0.1 (replace with your value)
#define CONFIG_BOOTFILE uImage
The ‘usb start’ command should identify the adapter something like this:
CrOS> usb start
(Re)start USB…
USB EHCI 1.00
scanning bus for devices… 3 USB Device(s) found
       scanning bus for storage devices… 0 Storage Device(s) found
       scanning bus for ethernet devices… 1 Ethernet Device(s) found
CrOS> print ethact
ethact=asx0
You can see that it found an ethernet device and we can print out the
device name (asx0 in this case).
Then ‘bootp’ or ‘dhcp’ should use it to obtain an IP address from DHCP,
perhaps something like this:
CrOS> bootp
Waiting for Ethernet connection… done.
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 172.22.73.81
Using asx0 device
TFTP from server 172.22.72.144; our IP address is 172.22.73.81
Filename ‘/tftpboot/uImage-sjg-seaboard-261347’.
Load address: 0x40c000
Loading: #################################################################
         #################################################################
         #################################################################
         ################################################
done
Bytes transferred = 3557464 (364858 hex)
CrOS>
Another way of doing this is to issue a tftp command, which will cause the
bootp to happen automatically.
MAC Addresses
————-
Most Ethernet dongles have a built-in MAC address which is unique in the
world. This is important so that devices on the network can be
distinguised from each other. MAC address conflicts are evil and
generally result in strange and eratic behaviour.
Some boards have USB Ethernet chips on-board, and these sometimes do not
have an assigned MAC address. In this case it is up to you to assign
one which is unique. You should obtain a valid MAC address from a range
assigned to you before you ship the product.
Built-in Ethernet adapters support setting the MAC address by means of
an ethaddr environment variable for each interface (ethaddr, eth1addr,
eth2addr). There is similar support on the USB network side, using the
names usbethaddr, usbeth1addr, etc. They are kept separate since we
don’t want a USB device taking the MAC address of a built-in device or
vice versa.
So if your USB Ethernet chip doesn’t have a MAC address available then
you must set usbethaddr to a suitable MAC address. At the time of
writing this functionality is only supported by the SMSC driver.
I compared the include/configs/omap3_beagle.h with the config.h file in my u-boot build tree [How did I know to look there? I had read u-boot documentation about how to configure and build it.]  I observed that usb networking seemed to be configured fine.  I checked include/config_cmd_all.h [How did I know? omap3_beagle.h has an include targeting default commands, so I looked where that would be and noticed other *cmd*.h files in the include directory].  There was no CONFIG_CMD for the tftp command!  But in the latest config_cmd_all.h I saw:
#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#define CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_PING /* ping support */

That means the NET option implies all 3 commands, including tftp (which is a prefix of tftboot)  The FE lab indicates that tftpboot merely transfers a file, whilst (other sources say) bootp does everything, including getting the board’s IP addr from a bootp server.

Here is the sequence that worked (the first time)

# usb start
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… Warning: failed to set MAC address
1 Ethernet Device(s) found

# print ethact
ethact=usb_ether

# setenv usbethaddr 00:11:22:33:44:55
OMAP3 beagleboard.org # usb stop
stopping USB..
OMAP3 beagleboard.org # usb start
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 1 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 0 Ethernet Device(s) found
OMAP3 beagleboard.org # ping 192.168.0.1
ERROR: Need valid ‘usbnet_devaddr’ to be set
at ether.c:2369/usb_eth_init()
ping failed; host 192.168.0.1 is not alive
OMAP3 beagleboard.org # usb tree
USB device tree:
1  Hub (480 Mb/s, 0mA)
u-boot EHCI Host Controller
  [LOOKS LIKE ethernet device is off now!]
OMAP3 beagleboard.org #

OMAP3 beagleboard.org # usb reset
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 1 Ethernet Device(s) found
OMAP3 beagleboard.org # usb info
1: Hub,  USB Revision 2.0
……

2: Hub,  USB Revision 2.0
……
3: Vendor specific,  USB Revision 2.0
– Class: Vendor specific [THAT’S MY ethernet device!]
– PacketSize: 64  Configurations: 1
– Vendor: 0x0424  Product 0xec00 Version 1.0
Configuration: 1
– Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
– Alternate Setting 0, Endpoints: 3
– Class Vendor specific
– Endpoint 1 In Bulk MaxPacket 512
– Endpoint 2 Out Bulk MaxPacket 512
– Endpoint 3 In Interrupt MaxPacket 16 Interval 4ms

OMAP3 beagleboard.org # ping 192.168.0.1
ERROR: Need valid ‘usbnet_devaddr’ to be set
at ether.c:2369/usb_eth_init()
Waiting for Ethernet connection… done.
*** ERROR: `ipaddr’ not set
ping failed; host 192.168.0.1 is not alive

[Noticed: 2 Error messages! Note usbnet_devaddr is spelled differently from usbethaddr which is cited README.usb]

OMAP3 beagleboard.org # printenv usbethaddr [I knew this from the README.usb and Neiss’ blog]
usbethaddr=00:11:22:33:44:55
OMAP3 beagleboard.org # setenv ipaddr 192.168.0.100
OMAP3 beagleboard.org # ping 192.168.0.1

Waiting for Ethernet connection… done.
Using sms0 device
host 192.168.0.1 is alive
OMAP3 beagleboard.org # ping 192.168.0.1
Waiting for Ethernet connection… done.
Using sms0 device
host 192.168.0.1 is alive

[HOORAY!!]

Also observed: I had the server ping repeatedly: Network not reachable messages.  Then, when I commanded u-boot to ping, then 3 (and then 2) ping responses appeared and the not reachable messages ceased.  Account for this: u-boot did not run an arp service until the ping command was given.  After the first ping, the server knew the mac addr.  I verified it (00:11:22:33:44:55) was in the server’s arp table with the arp command.

 

Now, lets try tftpboot:

OMAP3 beagleboard.org # tftp 0x8000000 hello.txt
Waiting for Ethernet connection… done.
*** ERROR: `serverip’ not set
OMAP3 beagleboard.org # setenv serverip 192.168.0.1
OMAP3 beagleboard.org # tftp 0x80000000 hello.txt
Waiting for Ethernet connection… done.
Using sms0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.100
Filename ‘hello.txt’.
Load address: 0x80000000
Loading: #
0 Bytes/s
done
Bytes transferred = 20 (14 hex)
OMAP3 beagleboard.org #

OMAP3 beagleboard.org # md 0x80000000
80000000: 6c6c6568 6966206f 670a656c 62646f6f    hello file.goodb
80000010: 0a2e6579 00000000 00000000 00000000    ye…………..
80000020: 00000000 00000000 00000000 00000000    …………….
80000030: 00000000 00000000 80308000 00000000    ……….0…..

[Whoopie again!]

————————————————————————————————————————

Back to Linux kernel building.

seth@csulab:~/BeagleStudy/kernels/linux-stable$ ./mymake uImage
CHK     include/linux/version.h
CHK     include/generated/utsrelease.h
UPD     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h’ is up to date.
CALL    scripts/checksyscalls.sh
CHK     include/generated/compile.h
CC      init/version.o
LD      init/built-in.o
CC      kernel/sys.o
CC      kernel/trace/trace.o
kernel/trace/trace.c: In function ‘tracing_mark_write’:
kernel/trace/trace.c:3678: warning: ‘page2’ may be used uninitialized in this function
LD      kernel/trace/built-in.o
CC      kernel/module.o
CC      kernel/kexec.o
CHK     kernel/config_data.h
LD      kernel/built-in.o
LD      vmlinux.o
MODPOST vmlinux.o
GEN     .version
CHK     include/generated/compile.h
UPD     include/generated/compile.h
CC      init/version.o
LD      init/built-in.o
LD      .tmp_vmlinux1
KSYM    .tmp_kallsyms1.S
AS      .tmp_kallsyms1.o
LD      .tmp_vmlinux2
KSYM    .tmp_kallsyms2.S
AS      .tmp_kallsyms2.o
LD      vmlinux
SYSMAP  System.map
SYSMAP  .tmp_System.map
OBJCOPY arch/arm/boot/Image
Kernel: arch/arm/boot/Image is ready
GZIP    arch/arm/boot/compressed/piggy.gzip
AS      arch/arm/boot/compressed/piggy.gzip.o
LD      arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.2.49-00003-gddb279e
Created:      Thu Aug  8 11:25:17 2013
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3125280 Bytes = 3052.03 kB = 2.98 MB
Load Address: 80008000
Entry Point:  80008000
Image arch/arm/boot/uImage is ready
seth@csulab:~/BeagleStudy/kernels/linux-stable$

 

[Does this mean I should use addresses 0x80008000 both for load addr and entry in uboot use?]

OMAP3 beagleboard.org # tftp 0x80008000 /boot/uImage
Waiting for Ethernet connection… done.
Using sms0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.100
Filename ‘/boot/uImage’.
Load address: 0x80008000
Loading: #################################################################
#################################################################
#################################################################
##################
2.7 MiB/s
done
Bytes transferred = 3125344 (2fb060 hex)
OMAP3 beagleboard.org # printenv bootargs
## Error: “bootargs” not defined
OMAP3 beagleboard.org # setenv bootargs console=ttyO2
OMAP3 beagleboard.org # setenv bootargs console=${CONSOLE}
OMAP3 beagleboard.org # printenv bootargs
bootargs=console=
OMAP3 beagleboard.org # setenv bootargs console=${console}
OMAP3 beagleboard.org # printenv bootargs
bootargs=console=ttyO2,115200n8
OMAP3 beagleboard.org # bootm 0x80008000

OMAP3 beagleboard.org # setenv bootargs console=${console}
OMAP3 beagleboard.org # printenv bootargs
bootargs=console=ttyO2,115200n8

OMAP3 beagleboard.org # bootm 0x80008000
## Booting kernel from Legacy Image at 80008000 …
Image Name:   Linux-3.2.49-00003-gddb279e
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3125280 Bytes = 3 MiB
Load Address: 80008000
Entry Point:  80008000
Verifying Checksum … OK
XIP Kernel Image … OK
OK

Starting kernel …

data abort

MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<80008008>]          lr : [<9ff5c150>]
sp : 9fef8da8  ip : 00000007     fp : 00000000
r10: 9ffacb80  r9 : 00000000     r8 : 9fef8f38
r7 : 00000002  r6 : 00000000     r5 : 80008000  r4 : 9ffacb80
r3 : 9fef8fd8  r2 : 80000100     r1 : 0000060a  r0 : 00000000
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU …

resetting …

U-Boot SPL 2013.04 (Aug 02 2013 – 17:26:55)
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
[Well, I’m wrong!  0x80200000 is the right address, it seems.]

OMAP3 beagleboard.org # setenv usbethaddr 00:11:22:33:44:55
OMAP3 beagleboard.org # setenv ipaddr 192.168.0.100
OMAP3 beagleboard.org # setenv serverip 192.168.0.1
OMAP3 beagleboard.org # usb reset
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 1 Ethernet Device(s) found
OMAP3 beagleboard.org # ping 192.168.0.1
ERROR: Need valid ‘usbnet_devaddr’ to be set
at ether.c:2369/usb_eth_init()
Waiting for Ethernet connection… done.
Using sms0 device
host 192.168.0.1 is alive
OMAP3 beagleboard.org # printenv loadaddr
loadaddr=0x80200000
OMAP3 beagleboard.org # tftp ${loadaddr} /boot/uImage
Waiting for Ethernet connection… done.
Using sms0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.100
Filename ‘/boot/uImage’.
Load address: 0x80200000
Loading: #################################################################
#################################################################

##################
2.8 MiB/s
done
Bytes transferred = 3125344 (2fb060 hex)
OMAP3 beagleboard.org # bootm ${loadaddr}
## Booting kernel from Legacy Image at 80200000 …
Image Name:   Linux-3.2.49-00003-gddb279e
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3125280 Bytes = 3 MiB
Load Address: 80008000
Entry Point:  80008000
Verifying Checksum … OK
Loading Kernel Image … OK
OK

Starting kernel …

Uncompressing Linux… done, booting the kernel.
[    0.000000] Linux version 3.2.49-00003-gddb279e (seth@csulab) (gcc version 4.4.3 (crosstool-NG 1.18.0) ) #3 Thu Aug 8 11:25:02 EDT 2013
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: OMAP3 Beagle Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )

———————————————————————–

OMAP3 beagleboard.org # setenv usbethaddr 00:11:22:33:44:55
OMAP3 beagleboard.org # setenv ipaddr 192.168.0.100
OMAP3 beagleboard.org # setenv serverip 192.168.0.1
OMAP3 beagleboard.org # setenv bootargs console=${console} rootwait
OMAP3 beagleboard.org # printenv bootargs
bootargs=console=ttyO2,115200n8 rootwait
OMAP3 beagleboard.org # usb reset
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 1 Ethernet Device(s) found
OMAP3 beagleboard.org # tftp ${loadaddr} /boot/uImage
ERROR: Need valid ‘usbnet_devaddr’ to be set
at ether.c:2369/usb_eth_init()
Waiting for Ethernet connection… done.
Using sms0 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.100
Filename ‘/boot/uImage’.
Load address: 0x80200000
Loading: #################################################################
#################################################################
#################################################################
##################
2.8 MiB/s
done
Bytes transferred = 3125344 (2fb060 hex)
OMAP3 beagleboard.org # bootm ${loadaddr}
## Booting kernel from Legacy Image at 80200000 …
Image Name:   Linux-3.2.49-00003-gddb279e
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3125280 Bytes = 3 MiB
Load Address: 80008000
Entry Point:  80008000
Verifying Checksum … OK
Loading Kernel Image … OK
OK

Starting kernel …
Uncompressing Linux… done, booting the kernel.
[    0.000000] Linux version 3.2.49-00003-gddb279e (seth@csulab) (gcc version 4.4.3 (crosstool-NG 1.18.0) ) #3 Thu Aug 8 11:25:02 EDT 2013
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: OMAP3 Beagle Board
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
[    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyO2,115200n8 rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 512MB = 512MB total
[    0.000000] Memory: 508020k/508020k available, 16268k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 – 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 – 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xe0800000 – 0xf8000000   ( 376 MB)
[    0.000000]     lowmem  : 0xc0000000 – 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 – 0xc0000000   (  16 MB)[    0.000000]       .text : 0xc0008000 – 0xc05910d4   (5669 kB)
[    0.000000]       .init : 0xc0592000 – 0xc05c6000   ( 208 kB)
[    0.000000]       .data : 0xc05c6000 – 0xc061e090   ( 353 kB)
[    0.000000]        .bss : 0xc061e0b4 – 0xc0b71c78   (5455 kB)
[    0.000000] NR_IRQS:410
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
[    0.000000] Total of 96 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER12 at 32768 Hz
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
[    0.000000] Console: colour dummy device 80×30
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000000] … MAX_LOCKDEP_SUBCLASSES:  8
[    0.000000] … MAX_LOCK_DEPTH:          48
[    0.000000] … MAX_LOCKDEP_KEYS:        8191
[    0.000000] … CLASSHASH_SIZE:          4096
[    0.000000] … MAX_LOCKDEP_ENTRIES:     16384
[    0.000000] … MAX_LOCKDEP_CHAINS:      32768[    0.000000] … CHAINHASH_SIZE:          16384
[    0.000000]  memory used by lock dependency info: 3695 kB
[    0.000000]  per task-struct memory footprint: 1152 bytes
[    0.000732] Calibrating delay loop… 471.61 BogoMIPS (lpj=1843200)
[    0.074310] pid_max: default: 32768 minimum: 301
[    0.074707] Security Framework initialized
[    0.074829] Mount-cache hash table entries: 512
[    0.078094] CPU: Testing write buffer coherency: ok
[    0.092498] print_constraints: dummy:
[    0.094268] NET: Registered protocol family 16
[    0.095275] GPMC revision 5.0
[    0.105438] OMAP GPIO hardware version 2.5
[    0.117858] omap_mux_init: Add partition: #1: core, flags: 0
[    0.120147] OMAP3 Beagle Rev: xM C
[    0.133544] Reprogramming SDRC clock to 400000000 Hz
[    0.133575] dpll3_m2_clk rate change failed: -22
[    0.134490] Found NAND on CS0
[    0.134490] Registering NAND on CS0
[    0.135559] Unable to get DVI reset GPIO
[    0.135986] hw-breakpoint: debug architecture 0x4 unsupported.[    0.153900]  omap-mcbsp.2: alias fck already exists
[    0.154693]  omap-mcbsp.3: alias fck already exists
[    0.160125] OMAP DMA hardware revision 5.0
[    0.215576] bio: create slab <bio-0> at 0
[    0.223144] SCSI subsystem initialized
[    0.230987] usbcore: registered new interface driver usbfs
[    0.231994] usbcore: registered new interface driver hub
[    0.232666] usbcore: registered new device driver usb
[    0.241912] omap_i2c omap_i2c.1: bus 1 rev1.4.0 at 2600 kHz
[    0.250762] twl4030: PIH (irq 7) chaining IRQs 368..375
[    0.251281] twl4030: power (irq 373) chaining IRQs 376..383
[    0.253417] twl4030: gpio (irq 368) chaining IRQs 384..401
[    0.254913] _omap_mux_init_gpio: Could not set gpio192
[    0.263244] print_constraints: VMMC1: 1850 <–> 3150 mV at 3150 mV normal standby
[    0.265441] print_constraints: VDAC: 1800 mV normal standby
[    0.267608] print_constraints: VDVI: 1800 mV normal standby
[    0.270141] print_constraints: VSIM: 1800 <–> 3000 mV at 1800 mV normal standby
[    0.278900] omap_i2c omap_i2c.3: bus 3 rev1.4.0 at 100 kHz[    0.286712] Switching to clocksource 32k_counter
[    0.387786] NET: Registered protocol family 2
[    0.388336] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.389801] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.390441] TCP bind hash table entries: 16384 (order: 7, 589824 bytes)
[    0.398986] TCP: Hash tables configured (established 16384 bind 16384)
[    0.399047] TCP reno registered
[    0.399078] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.399383] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.400146] NET: Registered protocol family 1
[    0.401184] RPC: Registered named UNIX socket transport module.
[    0.401184] RPC: Registered udp transport module.
[    0.401214] RPC: Registered tcp transport module.
[    0.401214] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.401947] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.552673] VFS: Disk quotas dquot_6.5.2
[    0.552764] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.554656] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.555236] msgmni has been set to 992[    0.558746] io scheduler noop registered
[    0.558776] io scheduler deadline registered
[    0.558898] io scheduler cfq registered (default)
[    0.562499] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.569213] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
[    0.570831] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
[    0.571990] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
[    1.141571] console [ttyO2] enabled
[    1.146667] omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3
[    1.184326] brd: module loaded
[    1.205108] loop: module loaded
[    1.213073] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.219940] omap2-nand driver initializing
[    1.224822] No NAND device found
[    1.228393] No NAND device found
[    1.232696] OneNAND driver initializing
[    1.242950] PPP generic driver version 2.4.2
[    1.249359] usbcore: registered new interface driver smsc95xx
[    1.257568] usbcore: registered new interface driver cdc_wdm
[    1.263519] Initializing USB Mass Storage driver…[    1.269165] usbcore: registered new interface driver usb-storage
[    1.275451] USB Mass Storage support registered.
[    1.281372] usbcore: registered new interface driver libusual
[    1.287994] usbcore: registered new interface driver usbtest
[    1.295593] mousedev: PS/2 mouse device common for all mice
[    1.307586] input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl4030_pwrbutton/input/input0
[    1.324981] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
[    1.332977] i2c /dev entries driver
[    1.339599] Driver for 1-wire Dallas network protocol.
[    1.348297] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
[    1.355712] twl4030_wdt twl4030_wdt: Failed to register misc device
[    1.362335] twl4030_wdt: probe of twl4030_wdt failed with error -16
[    1.599700] usbcore: registered new interface driver usbhid
[    1.605499] usbhid: USB HID core driver
[    1.609527] oprofile: hardware counters not available
[    1.614807] oprofile: using timer interrupt.
[    1.619750] TCP cubic registered
[    1.623199] Initializing XFRM netlink socket
[    1.627746] NET: Registered protocol family 17[    1.632507] NET: Registered protocol family 15
[    1.637390] Registering the dns_resolver key type
[    1.642791] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    1.650878] ThumbEE CPU extension supported.
[    1.695007] clock: disabling unused clocks to save power
[    1.705230] regulator_init_complete: VDVI: incomplete constraints, leaving on
[    1.712921] regulator_init_complete: VDAC: incomplete constraints, leaving on
[    1.722747] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[    1.733398] twl_rtc twl_rtc: setting system clock to 2000-01-01 00:33:30 UTC (946686810)
[    1.745086] Waiting for root device …
[    1.977844] mmc0: host does not support reading read-only switch. assuming write-enable.
[    1.988342] mmc0: new high speed SDHC card at address b368
[    1.997161] mmcblk0: mmc0:b368 SDU16 14.9 GiB
[    2.007629]  mmcblk0: p1 p2

Is is rootwaiting now???
#################################################################

 

 

 

Advertisements
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: