Beaglebone Black——k安装ubuntu系统

        拿到beaglebone black板子之后,默认安装的是Angstrom系统,这个系统根分区文件系统占据eMMC中1.3GB的空间,原因是里面安装了图形界面,同时还有其他一些gcc、g++、vim等一些常用的软件都安装进去了,所以体积才会变大。由于最近想要BBB板子挂载一下宿主机的NFS,但是在做尝试时发现Angstrom原装的系统中没有NFS的客户端,还需要安装一个客户端nfs-common,但是在板子上运行opkg update更新倒是可以,可是opkg install nfs-common或者安装其他包一律无法识别,除了一些常用的的诸如vim、g++倒是能识别,即使识别了一样还是不能安装,而在网站上我又没有找到nfs-common的源码包,倒是找到了nfs-uti**这么一个替代源码包,可是手动安装一个软件带来的困难是,它需要依赖一些其他的库,那么又要安装其他的库,即为了安装A,得先安装好B,为了安装B,又得先安装C.........无奈,只好选择换系统,最后选择了自己最喜欢的ubuntu。

 

        要在BBB板子上安装一个系统可以有三种方法,1)通过烧写一个预编译好的镜像文件到SD卡,插到板子上,将eMMC烧写即可。2)通过网络安装。3)完全手动安装,这种方式主要是u-boot、内核、根文件系统都是自己编译或者做,最后组装成系统,对于学习系统启动原理很有帮助,有点Linux from scratch的味道。后面两种方法限于时间没有尝试过,ubuntu的安装是第一种方法。

 

参考资料:

更新ubuntu系统的方法,提供了一些镜像的下载链接,linux下使用dd命令将镜像文件烧写到SD卡,以及一些ubuntu的软件,比如讲解如何配置无线网卡

http://elinux.org/BeagleBoardUbuntu#Wi-Fi_Networking_.28command_line.29

安装系统后如何启动系统

http://elinux.org/Beagleboard:Ubuntu_On_BeagleBone_Black#Flashing_Ubuntu_13.04_to_the_eMMC

使用kpartx来将一个镜像文件和loop设备连接起来并查看其内容,更重要的讲解了镜像文件中包含的脚本文件以及build文件中的脚本工具和根文件系统是如何在启动之后运行脚本,从而将eMMC更新的。不同的镜像更新方法可能不一样。

http://www.crashcourse.ca/wiki/index.php/BBB_software_update_process

国外的一个网站,上面提供了支持BBB板子的ubuntu12.04LTS、ubuntu14.04LTS这两个系统的启动文件和根文件系统,通过这些文件即可轻松制作出一张带有ubuntu系统的SD启动卡,该镜像文件不能烧写eMMC。

http://www.armhf.com/index.php/boards/beaglebone-black/

一些关于SD卡更新eMMC的脚本git库,以供参考

https://github.com/RobertCNelson/boot-scripts/blob/master/tools/eMMC/init-eMMC-flasher-v2.sh


将镜像文件链接成loop设备,loop 设备是一种伪设备(pseudo-device),或者也可以说是仿真设备。它能使我们像块设备一样访问一个文件,在使用之前,一个 loop 设备必须要和一个文件(指的就是*.img文件)进行连接。这种结合方式给用户提供了一个替代块特殊文件的接口。因此,如果这个文件包含有一个完整的文件系统,那么这个文件就可以像一个磁盘设备一样被 mount 起来。如下所示,

zhouyu@zhouyu-virtual-machine:~/zystore$ ls
BBB-eMMC-flasher-ubuntu-14.04-console-armhf-2014-08-13-2gb.img
fat
linux-3.12.10-ti2013.12.01
lost+found
rootfs
u-boot-2013.10-ti2013.12.01
ubuntu-precise-12.04-LTS
zhouyu@zhouyu-virtual-machine:~/zystore$ sudo kpartx -a -v BBB-eMMC-flasher-ubuntu-14.04-console-armhf-2014-08-13-2gb.img 
[sudo] password for zhouyu: 
add map loop0p1 (252:0): 0 196608 linear /dev/loop0 2048
add map loop0p2 (252:1): 0 3282944 linear /dev/loop0 198656

上述可以看出,和.img文件进行连接之后,loop0设备出现了两个分区。接下来将loop设备的两个分区分别挂载回原来的文件系统,挂载到本目录下的fat和rootfs文件夹。.img文件本身是原来文件系统的文件,将其和loop设备链接之后,又将loop设备挂载回原来的文件系统,于是loop名字由此而来。其中用到了一个工具kpartx,这个工具我觉得其实就相当于windows下面的虚拟光驱的作用,虚拟光驱也是将一个镜像文件和虚拟设备进行连接。

zhouyu@zhouyu-virtual-machine:~/zystore$ sudo mount /dev/mapper/loop0p1 fat/
zhouyu@zhouyu-virtual-machine:~/zystore$ sudo mount /dev/mapper/loop0p2 rootfs/

查看.img文件的内容

zhouyu@zhouyu-virtual-machine:~/zystore/fat$ ls
App          Drivers      nfs-uEnv.txt  scripts     uEnv.txt
autorun.inf  LICENSE.txt  README.htm    START.htm
Docs         MLO          README.md     u-boot.img
zhouyu@zhouyu-virtual-machine:~/zystore/fat$ cd ../rootfs/
zhouyu@zhouyu-virtual-machine:~/zystore/rootfs$ ls
bin   dev  home  lost+found  mnt  proc  run   srv  tmp  var
boot  etc  lib   media       opt  root  sbin  sys  usr

接下来将.img文件原封不动的搬到SD卡里面

sudo dd if=*.img of=/dev/sdX bs=1M

dd命令用处多多,诸如这种将镜像文件烧写到SD卡,以及一些硬盘对拷、硬盘的备份和还原都非常好,感觉就像windows下面的Ghost程序。它基本上是把一个存储介质里面的数据原封不动的搬过去,不同于我们通常的文件复制哦。所以使用这个命令不再需要自己制作SD卡,进行分区,然后拷贝文件。


这一步完成之后。记得先将文件系统卸载,再接着删除虚拟设备(也就是loop设备)。

sudo umount fat/
sudo umount rootfs/
sudo kpartx -d *.img


OK,一张ubuntu的SD启动卡只做好了。接下来按照流程操作就好。

关于镜像文件

         关于安装系统方面的镜像有两种版本,一种版本是做到SD卡里面用于烧写eMMC以进行重新安装系统,另一种版本是做到SD卡里面用于从SD卡启动系统。其实两本版本的镜像差不太多。第一种版本的SD卡插到板子上按住boot键上电启动后,也是和第二种版本一样先从SD卡启动,然后接着有一个用于更新eMMC的进程被初始化,这个进程的工作,就是讲SD卡里面带的MOL、u-boot.img、根文件系统(包含内核)分别复制到eMMC的启动分区和根分区,从而更新系统。这些进行系统更新的脚本文件可能放在根文件系统的/opt/scripts/目录下,也有可能是在/usr/bin/目录下,不同的人制作的可能就不同。

         以下是将一个用于更新eMMC的SD卡插到板子上上电后,从串口得到的输出信息:

U-Boot SPL 2014.07-00016-g329fca9 (Jul 28 2014 - 12:35:02)
reading u-boot.img
reading u-boot.img


U-Boot 2014.07-00016-g329fca9 (Jul 28 2014 - 12:35:02), Build: jenkins-github_Bootloader-Builder-375

I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  0 
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
Checking for: /uEnv.txt ...
reading uEnv.txt
681 bytes read in 4 ms (166 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
290 bytes read in 35 ms (7.8 KiB/s)
5515696 bytes read in 320 ms (16.4 MiB/s)
2972804 bytes read in 180 ms (15.7 MiB/s)
25926 bytes read in 53 ms (477.5 KiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x5429b0 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8fd2a000, end 8ffffc84 ... OK
   Loading Device Tree to 8fd20000, end 8fd29545 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.8.13-bone63 (root@a5-imx6q-wandboard-2gb) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) ) #1 SMP Mon Aug 11 23:03:02 UTC 2014
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: Generic AM33XX (Flattened Device Tree), model: TI AM335x BeagleBone
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] AM335X ES2.0 (l2cache sgx neon )
[    0.000000] PERCPU: Embedded 9 pages/cpu @c0d36000 s14080 r8192 d14592 u36864
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129792
[    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait fixrtc init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v2.sh
[    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] __ex_table already sorted, skipping sort
[    0.000000] allocated 1048576 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 511MB = 511MB total
[    0.000000] Memory: 505340k/505340k available, 18948k 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 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf800000 - 0xbfe00000   (   6 MB)
[    0.000000]       .text : 0xc0008000 - 0xc07e1c74   (8040 kB)
[    0.000000]       .init : 0xc07e2000 - 0xc0822700   ( 258 kB)
[    0.000000]       .data : 0xc0824000 - 0xc08abe40   ( 544 kB)
[    0.000000]        .bss : 0xc08abe40 - 0xc09255c0   ( 486 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] NR_IRQS:0 nr_irqs:0 0
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] Total of 128 interrupts on 1 active controller
[    0.000000] OMAP clockevent source: GPTIMER1 at 24000000 Hz
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] OMAP clocksource: GPTIMER2 at 24000000 Hz
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty0] enabled
[    0.000593] Calibrating delay loop... 993.47 BogoMIPS (lpj=969728)
[    0.029196] pid_max: default: 32768 minimum: 301
[    0.029339] Security Framework initialized
[    0.029404] Mount-cache hash table entries: 512
[    0.035285] Initializing cgroup subsys cpuacct
[    0.035330] Initializing cgroup subsys memory
[    0.035376] Initializing cgroup subsys blkio
[    0.035468] CPU: Testing write buffer coherency: ok
[    0.035858] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.035927] Setting up static identity map for 0x804ca178 - 0x804ca1c4
[    0.036830] Brought up 1 CPUs
[    0.036856] SMP: Total of 1 processors activated (993.47 BogoMIPS).
[    0.037653] devtmpfs: initialized
[    0.046089] omap_hwmod: wd_timer2: _wait_target_disable failed
[    0.098208] pinctrl core: initialized pinctrl subsystem
[    0.098357] rstctl core: initialized rstctl subsystem
[    0.098642] regulator-dummy: no parameters
[    0.098966] NET: Registered protocol family 16
[    0.099563] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.105102] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.105697] platform 49000000.edma: alias fck already exists
[    0.105725] platform 49000000.edma: alias fck already exists
[    0.105745] platform 49000000.edma: alias fck already exists
[    0.106441] OMAP GPIO hardware version 0.1
[    0.108924] gpio-rctrl rstctl.4: loaded OK
[    0.112048] No ATAGs?
[    0.112070] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.113358] cpsw.0: No hwaddr in dt. Using c8:a0:30:ac:7f:cf from efuse
[    0.113392] cpsw.1: No hwaddr in dt. Using c8:a0:30:ac:7f:d1 from efuse
[    0.121360] bio: create slab <bio-0> at 0
[    0.127566] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.127851] vmmcsd_fixed: 3300 mV 
[    0.129363] SCSI subsystem initialized
[    0.129604] usbcore: registered new interface driver usbfs
[    0.129673] usbcore: registered new interface driver hub
[    0.129872] usbcore: registered new device driver usb
[    0.131083] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    0.131989] input: tps65217_pwr_but as /devices/ocp.3/44e0b000.i2c/i2c-0/0-0024/input/input0
[    0.133560] DCDC1: at 1500 mV 
[    0.134395] vdd_mpu: 925 <--> 1325 mV at 1325 mV 
[    0.135249] vdd_core: 925 <--> 1150 mV at 1125 mV 
[    0.136059] LDO1: at 1800 mV 
[    0.136895] LDO2: at 3300 mV 
[    0.138381] LDO3: 1800 mV 
[    0.139225] LDO4: at 3300 mV 
[    0.139937] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    0.140371] omap_i2c 44e0b000.i2c: unable to select pin group
[    0.140891] omap_i2c 4819c000.i2c: bus 1 rev0.11 at 100 kHz
[    0.142180] omap_i2c 4819c000.i2c: unable to select pin group
[    0.142342] media: Linux media interface: v0.10
[    0.142408] Linux video capture interface: v2.00
[    0.142559] pps_core: LinuxPPS API ver. 1 registered
[    0.142575] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.142972] Advanced Linux Sound Architecture Driver Initialized.
[    0.143551] NetLabel: Initializing
[    0.143575] NetLabel:  domain hash size = 128
[    0.143587] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.143658] NetLabel:  unlabeled traffic allowed by default
[    0.143860] Switching to clocksource gp_timer
[    0.174010] NET: Registered protocol family 2
[    0.174660] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.174751] TCP bind hash table entries: 4096 (order: 4, 81920 bytes)
[    0.174847] TCP: Hash tables configured (established 4096 bind 4096)
[    0.174916] TCP: reno registered
[    0.174936] UDP hash table entries: 256 (order: 1, 12288 bytes)
[    0.174968] UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
[    0.175270] NET: Registered protocol family 1
[    0.175668] RPC: Registered named UNIX socket transport module.
[    0.175692] RPC: Registered udp transport module.
[    0.175706] RPC: Registered tcp transport module.
[    0.175719] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.175942] Trying to unpack rootfs image as initramfs...
[    0.363321] Freeing initrd memory: 2900K
[    0.363674] hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
[    0.363955] CPU PMU: attempt to register multiple PMU devices!
[    0.363984] arm-pmu: probe of arm-pmu failed with error -28
[    0.364296] omap2_mbox_probe: platform not supported
[    0.516822] VFS: Disk quotas dquot_6.5.2
[    0.517080] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.517846] NFS: Registering the id_resolver key type
[    0.517941] Key type id_resolver registered
[    0.517958] Key type id_legacy registered
[    0.518227] fuse init (API version 7.20)
[    0.518622] Btrfs loaded
[    0.518735] msgmni has been set to 992
[    0.520380] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.520419] io scheduler noop registered
[    0.520433] io scheduler deadline registered
[    0.520462] io scheduler cfq registered (default)
[    0.521635] tps65217-bl tps65217-bl: no platform data provided
[    0.521675] tps65217-bl: probe of tps65217-bl failed with error -22
[    0.522204] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.523570] omap_uart 44e09000.serial: did not get pins for uart0 error: -19
[    0.523863] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[    1.286575] console [ttyO0] enabled
[    1.290896] [drm] Initialized drm 1.1.0 20060810
[    1.302955] brd: module loaded
[    1.309832] loop: module loaded
[    1.313250] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.320518] at24 1-0054: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.327774] at24 1-0055: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.335028] at24 1-0056: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.342262] at24 1-0057: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.356150] bone-capemgr bone_capemgr.9: Baseboard: 'A335BNLT,t
'    1.356150] ue,EMD503216
[    1.365411] bone-capemgr bone_capemgr.9: compatible-baseboard=ti,beaglebone-black
[    1.403706] bone-capemgr bone_capemgr.9: slot #0: No cape found
[    1.440813] bone-capemgr bone_capemgr.9: slot #1: No cape found
[    1.477922] bone-capemgr bone_capemgr.9: slot #2: No cape found
[    1.515031] bone-capemgr bone_capemgr.9: slot #3: No cape found
[    1.521279] bone-capemgr bone_capemgr.9: slot #4: specific override
[    1.527878] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 4
[    1.535927] bone-capemgr bone_capemgr.9: slot #4: 'Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G'
[    1.546043] bone-capemgr bone_capemgr.9: slot #5: specific override
[    1.552639] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 5
[    1.560686] bone-capemgr bone_capemgr.9: slot #5: 'Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI'
[    1.570701] bone-capemgr bone_capemgr.9: slot #6: specific override
[    1.577295] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 6
[    1.585315] bone-capemgr bone_capemgr.9: slot #6: 'Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN'
[    1.595756] bone-capemgr bone_capemgr.9: loader: before slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
[    1.604643] bone-capemgr bone_capemgr.9: loader: check slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
[    1.613492] bone-capemgr bone_capemgr.9: loader: before slot-5 BB-BONELT-HDMI:00A0 (prio 1)
[    1.622274] bone-capemgr bone_capemgr.9: loader: check slot-5 BB-BONELT-HDMI:00A0 (prio 1)
[    1.630978] bone-capemgr bone_capemgr.9: initialized OK.
[    1.636571] bone-capemgr bone_capemgr.9: loader: before slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    1.645439] bone-capemgr bone_capemgr.9: loader: check slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    1.655607] OneNAND driver initializing
[    1.660528] usbcore: registered new interface driver cdc_ether
[    1.666710] bone-capemgr bone_capemgr.9: loader: after slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
[    1.675540] usbcore: registered new interface driver rndis_host
[    1.681817] bone-capemgr bone_capemgr.9: loader: after slot-5 BB-BONELT-HDMI:00A0 (prio 1)
[    1.690517] bone-capemgr bone_capemgr.9: loader: check slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    1.699356] usbcore: registered new interface driver cdc_ncm
[    1.705324] bone-capemgr bone_capemgr.9: slot #4: Requesting firmware 'cape-bone-2g-emmc1.dtbo' for board-name 'Bone-LT-eMMC-2G', version '00A0'
[    1.719395] usbcore: registered new interface driver cdc_acm
[    1.725366] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.733772] Initializing USB Mass Storage driver...
[    1.738914] bone-capemgr bone_capemgr.9: slot #4: dtbo 'cape-bone-2g-emmc1.dtbo' loaded; converting to live tree
[    1.749638] bone-capemgr bone_capemgr.9: slot #5: Requesting firmware 'cape-boneblack-hdmi-00A0.dtbo' for board-name 'Bone-Black-HDMI', version '00A0'
[    1.763856] usbcore: registered new interface driver usb-storage
[    1.770170] USB Mass Storage support registered.
[    1.775222] bone-capemgr bone_capemgr.9: slot #4: #2 overlays
[    1.781810] bone-capemgr bone_capemgr.9: slot #4: Applied #2 overlays.
[    1.788688] bone-capemgr bone_capemgr.9: loader: done slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
[    1.797403] bone-capemgr bone_capemgr.9: loader: check slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    1.806174] bone-capemgr bone_capemgr.9: slot #5: dtbo 'cape-boneblack-hdmi-00A0.dtbo' loaded; converting to live tree
[    1.817555] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[    1.824123] musb-hdrc musb-hdrc.0.auto: pdev->id = 0
[    1.829351] musb-hdrc musb-hdrc.0.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[    1.838676] bone-capemgr bone_capemgr.9: slot #5: #4 overlays
[    1.846110] platform 4830e000.fb: alias fck already exists
[    1.852099] musb-hdrc musb-hdrc.0.auto: *** mode=3
[    1.857175] musb-hdrc musb-hdrc.0.auto: *** power=250
[    1.863469] bone-capemgr bone_capemgr.9: slot #5: Applied #4 overlays.
[    1.870357] bone-capemgr bone_capemgr.9: loader: done slot-5 BB-BONELT-HDMI:00A0 (prio 1)
[    1.878980] bone-capemgr bone_capemgr.9: loader: check slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    1.888206] musb-hdrc musb-hdrc.1.auto: pdev->id = 1
[    1.893453] musb-hdrc musb-hdrc.1.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[    1.902242] bone-capemgr bone_capemgr.9: loader: after slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    1.911212] musb-hdrc musb-hdrc.1.auto: *** mode=1
[    1.916260] musb-hdrc musb-hdrc.1.auto: *** power=250
[    1.921576] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.927648] bone-capemgr bone_capemgr.9: slot #6: Requesting firmware 'cape-boneblack-hdmin-00A0.dtbo' for board-name 'Bone-Black-HDMIN', version '00A0'
[    1.942220] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[    1.950641] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.957793] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.965384] usb usb1: Product: MUSB HDRC host driver
[    1.970604] usb usb1: Manufacturer: Linux 3.8.13-bone63 musb-hcd
[    1.976916] usb usb1: SerialNumber: musb-hdrc.1.auto
[    1.982182] bone-capemgr bone_capemgr.9: slot #6: dtbo 'cape-boneblack-hdmin-00A0.dtbo' loaded; converting to live tree
[    1.994106] hub 1-0:1.0: USB hub found
[    1.998088] hub 1-0:1.0: 1 port detected
[    2.002623] bone-capemgr bone_capemgr.9: slot #6: BB-BONELT-HDMIN conflict P8.45 (#5:BB-BONELT-HDMI)
[    2.012254] bone-capemgr bone_capemgr.9: slot #6: Failed verification
[    2.019030] bone-capemgr bone_capemgr.9: loader: failed to load slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
[    2.029436] mousedev: PS/2 mouse device common for all mice
[    2.036909] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
[    2.044590] i2c /dev entries driver
[    2.049228] pps_ldisc: PPS line discipline registered
[    2.054785] Driver for 1-wire Dallas network protocol.
[    2.061366] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    2.069051] device-mapper: ioctl: 4.23.1-ioctl (2012-12-18) initialised: [email protected]
[    2.078004] cpuidle: using governor ladder
[    2.082353] cpuidle: using governor menu
[    2.086802] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[    2.094048] omap_hsmmc mmc.5: Failed to get rstctl; not using any
[    2.100736] edma-dma-engine edma-dma-engine.0: allocated channel for 0:25
[    2.107929] edma-dma-engine edma-dma-engine.0: allocated channel for 0:24
[    2.115232] mmc.5 supply vmmc_aux not found, using dummy regulator
[    2.122029] omap_hsmmc mmc.5: pins are not configured from the driver
[    2.155878] gpio-rctrl rstctl.4: gpio_rctrl_request eMMC_RSTn
[    2.162026] omap_hsmmc mmc.11: Got rstctl (gpio:#0 name eMMC_RSTn) label:eMMC_RSTn
[    2.170027] gpio-rctrl rstctl.4: gpio_rctrl_deassert eMMC_RSTn
[    2.176377] edma-dma-engine edma-dma-engine.0: allocated channel for 0:3
[    2.183473] edma-dma-engine edma-dma-engine.0: allocated channel for 0:2
[    2.190861] mmc.11 supply vmmc_aux not found, using dummy regulator
[    2.197554] omap_hsmmc mmc.11: pins are not configured from the driver
[    2.232130] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[    2.243863] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[    2.251180] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
[    2.260164] leds-gpio gpio-leds.8: pins are not configured from the driver
[    2.268118] ledtrig-cpu: registered to indicate activity on CPUs
[    2.274719] edma-dma-engine edma-dma-engine.0: allocated channel for 0:36
[    2.281887] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    2.289299] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    2.295557] edma-dma-engine edma-dma-engine.0: allocated channel for 0:5
[    2.302719] edma-dma-engine edma-dma-engine.0: allocated channel for 0:6
[    2.312755] usbcore: registered new interface driver usbhid
[    2.318671] usbhid: USB HID core driver
[    2.323561] ashmem: initialized
[    2.327230] logger: created 256K log 'log_main'
[    2.332068] mmc0: host does not support reading read-only switch. assuming write-enable.
[    2.340792] logger: created 256K log 'log_events'
[    2.345957] logger: created 256K log 'log_radio'
[    2.351053] logger: created 256K log 'log_system'
[    2.356104] mmc0: new high speed SDHC card at address e624
[    2.364903] davinci_evm sound.14:  nxp-hdmi-hifi <-> 48038000.mcasp mapping ok
[    2.372561] mmcblk0: mmc0:e624 SU08G 7.40 GiB 
[    2.378795]  mmcblk0: p1 p2
[    2.383041] TCP: cubic registered
[    2.387315] NET: Registered protocol family 10
[    2.392946] NET: Registered protocol family 17
[    2.398002] Key type dns_resolver registered
[    2.402685] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    2.410809] ThumbEE CPU extension supported.
[    2.415347] Registering SWP/SWPB emulation handler
[    2.421040] registered taskstats version 1
[    2.427048] tilcdc 4830e000.fb: No power control GPIO
[    2.546771] tilcdc 4830e000.fb: found TDA19988
[    2.552083] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    2.559055] [drm] No driver support for vblank timestamp query.
[    2.565572] tilcdc 4830e000.fb: No connectors reported connected with modes
[    2.572926] [drm] Cannot find any crtc or sizes - going 1024x768
[    2.587794] Console: switching to colour frame buffer device 128x48
[    2.599888] tilcdc 4830e000.fb: fb0:  frame buffer device
[    2.605626] tilcdc 4830e000.fb: registered panic notifier
[    2.611389] [drm] Initialized tilcdc 1.0.0 20121205 on minor 0
[    2.665432] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    2.671956] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    2.684531] libphy: 4a101000.mdio: probed
[    2.688914] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    2.698862] Detected MACID = c8:a0:30:ac:7f:cf
[    2.703569] cpsw 4a100000.ethernet: NAPI disabled
[    2.709934] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:01 UTC (946684801)
[    2.723642] ALSA device list:
[    2.726884]   #0: TI BeagleBone Black
[    2.731415] Freeing init memory: 256K
Loading, please wait...
[    2.821794] systemd-udevd[101]: starting version 204
[    2.841582] mmc1: BKOPS_EN bit is not set
[    2.859119] mmc1: new high speed MMC card at address 0001
[    2.879722] mmcblk1: mmc1:0001 MMC02G 1.78 GiB 
[    2.896010] mmcblk1boot0: mmc1:0001 MMC02G partition 1 1.00 MiB
[    2.913595] mmcblk1boot1: mmc1:0001 MMC02G partition 2 1.00 MiB
[    2.933242]  mmcblk1: p1 p2
[    2.953850]  mmcblk1boot1: unknown partition table
[    2.979753]  mmcblk1boot0: unknown partition table
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[    3.724182] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
Valid EEPROM header found
-----------------------------
debug copying: [/dev/mmcblk0] -> [/dev/mmcblk1]
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk1boot0 179:16   0     1M  1 disk 
mmcblk1boot1 179:24   0     1M  1 disk 
mmcblk0      179:0    0   7.4G  0 disk 
|-mmcblk0p1  179:1    0    96M  0 part /boot/uboot
`-mmcblk0p2  179:2    0   1.6G  0 part /
mmcblk1      179:8    0   1.8G  0 disk 
|-mmcblk1p1  179:9    0  70.6M  0 part 
`-mmcblk1p2  179:10   0   1.7G  0 part 
-----------------------------
Erasing: /dev/mmcblk1
108+0 records in
108+0 records out
113246208 bytes (113 MB) copied, 31.7247 s, 3.6 MB/s
108+0 records in
108+0 records out
113246208 bytes (113 MB) copied, 5.2293 s, 21.7 MB/s
Formatting: /dev/mmcblk1
Checking that no-one is using th[   41.407975]  mmcblk1: unknown partition table
is disk right now ...
OK

Disk /dev/mmcblk1: 58624 cylinders, 4 heads, 16 sectors/track

sfdisk: ERROR: sector 3069779968 does not have an msdos signature
 /dev/mmcblk1: unrecognized partition table type
Old situation:
No partitions found
New situation:
Units = [   41.439704]  mmcblk1: p1 p2
mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/mmcblk1p1   *     1     96     96      98304    e  W95 FAT16 (LBA)
/dev/mmcblk1p2        97   1831   1735    1776640   83  Linux
/dev/mmcblk1p3         0      -      0          0    0  Empty
/dev/mmcblk1p4         0      -      0          0    0  Empty
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
mkfs.fat 3.0.26 (2014-03-07)
mke2fs 1.42.9 (4-Feb-2014)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/mmcblk1p2 is mounted.
Discarding device blocks: done                            
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
111104 inodes, 444160 blocks
22208 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=457179136
14 block groups
32768 blocks per group, 32768 fragments per group
7936 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done 

Copying: /dev/mmcblk0p1 -> /dev/mmcblk1p1
'/boot/uboot/MLO' -> '/tmp/boot/MLO'
'/boot/uboot/u-boot.img' -> '/tmp/boot/u-boot.img'
rsync: /boot/uboot/ -> /tmp/boot/
Copying: /dev/mmcblk0p2 -> /dev/mmcblk1p2
[  293.735453] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
rsync: / -> /tmp/rootfs/
Copying: Kernel modules
rsync: /lib/modules/3.8.13-bone63/ -> /tmp/rootfs/lib/modules/3.8.13-bone63/
/boot/uEnv.txt: disabling flasher script
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=3.8.13-bone63

#dtb=

cmdline=quiet 

##Example
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##enable BBB: eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v2.sh

uuid=bf52d5f1-264d-421f-82c4-4953c8a352e7
Generating: /etc/fstab
# /etc/fstab: static file system information.
#
UUID=bf52d5f1-264d-421f-82c4-4953c8a352e7  /  ext4  noatime,errors=remount-ro  0  1
debugfs  /sys/kernel/debug  debugfs  defaults  0  0
Syncing: /dev/mmcblk1
/opt/scripts/tools/eMMC/init-eMMC-flasher-v2.sh: line 245:   164 Terminated              cylon_leds
100000+0 records in
100000+0 records out
51200000 bytes (51 MB) copied, 2.22843 s, 23.0 MB/s

This script has now completed its task
-----------------------------
Shutting Down
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=252668k,nr_inodes=63167,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,noexec,rel[  415.127031] (NULL device *): gadget not registered.
atime,size=50852[  415.136414] Disabling non-boot CPUs ...
k,mode=755)
/de[  415.143262] System halted.
v/mmcblk0p2 on /

       如果想仔细分析这段工作是如何进行的,可以在你使用的镜像文件中找到那个被运行的脚本,对照脚本仔细分析即可。上面的输出信息使用的脚本来自于这个镜像文件:BBB-eMMC-flasher-ubuntu-14.04-console-armhf-2014-08-13-2gb.img,下载链接:https://rcn-ee.net/deb/flasher/trusty/BBB-eMMC-flasher-ubuntu-14.04-console-armhf-2014-08-13-2gb.img.xz 

 

你可能感兴趣的:(Beaglebone Black——k安装ubuntu系统)