Uncompressing Linux... done, booting the kernel.

解决Linux启动时的“Uncompressing Linux...done, booting the kernel“问题 完成,正在启动内核"这一行提示时,有时会遇到一些问题。如果内核文件和参数配置都没有问题,那么可能是系统配置文件或引导加载程序配置文件中存在错误。如果内核文件和参数配置都没有问题,那么可能是系统配置文件或引导加载程序配置文件中存在错误。请注意,上述示例中的配置文件仅供参考,实际配置文件可能因系统和需求的不同而有所变化。您可以通过重新下载或使用备份的内核文件来解决该问题。您可以通过重新下载或使用备份的内核文件来解决该问题。请注意,上述示例中的配置文件仅供参考,实际配置文件可能因系统和需求的不同而有所变化。 阅读详情

 U-boot网口问题解决后,uImage和ramdisk终于可以上传到单板上去验证了。脚本为:


MINI6410 # setenv serverip 192.168.1.200

 

MINI6410 # setenv bootargs root=/dev/ram rootfstype=ext2 init=/linuxrc console=ttySAC0,115200 mem=256

 

MINI6410 # tftp 0x51800000 ramdisk.bin


MINI6410 # tftp 0x50800000 uImage


MINI6410 # bootm 0x50800000 0x51800000

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

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

执行bootm命令后打印:


## Booting image at 50800000 ...

   Image Name:   Linux-2.6.38

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    1902992 Bytes =  1.8 MB

   Load Address: 50008000

   Entry Point:  50008000

   Verifying Checksum ... OK

OK

## Loading Ramdisk Image at 51800000 ...

   Image Name:   ramdisk1.0

   Image Type:   ARM Linux RAMDisk Image (gzip compressed)

   Data Size:    1040870 Bytes = 1016.5 kB

   Load Address: 00000000

   Entry Point:  00000000

   Verifying Checksum ... OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

 

就无任何反应了!!!!网上查资料主要怀疑方向有:

1、machine ID uboot与内核定义不一致。

2、内核参数console传递的不对。

 

问题确认:

1、machine ID uboot与内核定义不一致。

uboot传递的machine ID参数:

board\samsung\mini6410\Mini6410.c

 gd->bd->bi_arch_number = MACH_TYPE;

include/configs/Mini6410.h

#define MACH_TYPE  2520

内核的machine ID参数:

include/generated/mach-types.h

#define MACH_TYPE_MINI6410             2520

所以不是这个问题。


 

2、内核参数console传递的不对。

console=ttySAC0,115200 这个也确认是没有问题。

所以也不是这个问题。

 

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

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

没办法,只能自己动手调试了。

 

1、首先尝试low-level debug调试方法

Kernel hacking-->Kernel low-level debugging functions

Kernel hacking-->S3C UART to use for low-level debug 为UART 0。

可是问题依旧,还是无任何打印。

 

2、直接使用printascii/printhex8 打印kernel启动过程。

printascii其实就是1个字符1个字符往串口里写,addruart_current 就是返回当前uart的寄存器基地址,这个与我们前面的S3C UART to use for low-level debug 配置有关。

       ENTRY(printascii)
  addruart_current r3, r1, r2
  b 2f
1:  waituart r2, r3
  senduart r1, r3
  busyuart r2, r3
  teq r1, #'\n'
  moveq r1, #'\r'
  beq 1b
2:  teq r0, #0
  ldrneb r1, [r0], #1
  teqne r1, #0
  bne 1b
  mov pc, lr
ENDPROC(printascii)

printhex8 其实就是将16进制数,每4个bit为1个字符,填写到buffer里,即转为 ASCII字符串,然后调用printascii打印出来。

我写的定位函数,r0为入参,打印具体到了哪一步:

__right_p:
    adr r13,spbuf1
    STMIA r13, {R1-R4,R7}
    mov r7,lr
    mov r4, r0
    adr r0, str_p3
    bl     printascii
    mov r0 ,r4
    bl printhex8
    adr r0,str_p4
    bl printascii
    mov lr,r7
    ldmia r13,{R1-R4,R7}

    mov pc,lr
    str_p3: .asciz "\nkernel boot step 0x"
    str_p4:      .asciz     "\n"
 .align
ENDPROC(__right_p)

spbuf1:  .space 20

例如:

/*step 0*/
      mov r0,#0
      bl __right_p

写汇编函数要注意几点:

A、破坏的寄存器一定要保存

B、多层调用(a-->b-->c)一定要记得保存/恢复lr寄存器,因为b调用c是会破坏a的返回地址。

 

加了定位信息后:


Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

 

kernel boot step 0x00000000

000009d8

7f005000

c0008358

50025288

500252c0

000009d8

 

kernel boot step 0x00000001

 

kernel boot step 0x00000002

 

kernel boot step 0x00000003

 

kernel boot step 0x00000004

确认了:

machine ID确实是对的。

异常不是在汇编阶段而是出在start_kernel函数之后。

继续在start_kernel里加打印,终于确定是在 setup_arch(&command_line);之后就出现异常了。但是还是无法精确定位,由于在 console_init();初始化之前printk是打印在__log_buf里,而且在软复位或者按键复位后,内存的值还能保留,所以尝试按键复位后,在uboot里使用md命令查看__log_buf里的值来确认内核初始化的打印。


__log_buf=503c9598


MINI6410 # md 0x503c9598

503c9598: 4c3e353c 78756e69 72657620 6e6f6973    <5>Linux version

503c95a8: 362e3220 2038332e 6f6f7228 6f6c4074     2.6.38 (root@lo

503c95b8: 686c6163 2e74736f 61636f6c 6d6f646c    calhost.localdom

503c95c8: 296e6961 63672820 65762063 6f697372    ain) (gcc versio

503c95d8: 2e34206e 20332e34 6e746328 2e312d67    n 4.4.3 (ctng-1.

503c95e8: 29312e36 23202920 53203432 4a206e75    6.1) ) #24 Sun J

503c95f8: 32206c75 32322034 3a35343a 43203333    ul 24 22:45:33 C

503c9608: 32205453 0a313130 433e343c 203a5550    ST 2011.<4>CPU:

503c9618: 764d5241 6f632d36 7461706d 656c6269    ARMv6-compatible

503c9628: 6f727020 73736563 5b20726f 66303134     processor [410f

503c9638: 36363762 6572205d 69736976 36206e6f    b766] revision 6

503c9648: 52412820 2937764d 7263202c 6330303d     (ARMv7), cr=00c

503c9658: 37383335 343c0a66 5550433e 4956203a    5387f.<4>CPU: VI

503c9668: 6e205450 6c616e6f 69736169 6420676e    PT nonaliasing d

503c9678: 20617461 68636163 56202c65 20545049    ata cache, VIPT

503c9688: 616e6f6e 7361696c 20676e69 74736e69    nonaliasing inst

MINI6410 #

503c9698: 74637572 206e6f69 68636163 00000a65    ruction cache...

503c96a8: 00000000 00000000 00000000 00000000    ................

503c96b8: 00000000 00000000 79726f6d 6c6f7020    ........mory pol

503c96c8: 3a796369 43434520 73696420 656c6261    icy: ECC disable

503c96d8: 44202c64 20617461 68636163 72772065    d, Data cache wr

503c96e8: 62657469 0a6b6361 4b3e303c 656e7265    iteback.<0>Kerne

503c96f8: 6170206c 2063696e 6f6e202d 79732074    l panic - not sy

503c9708: 6e69636e 45203a67 524f5252 6146203a    ncing: ERROR: Fa

503c9718: 64656c69 206f7420 6f6c6c61 65746163    iled to allocate

503c9728: 31783020 20303030 65747962 65622073     0x1000 bytes be

503c9738: 20776f6c 2e307830 3e303c0a 3e343c0a    low 0x0..<0>.<4>

503c9748: 6b636142 63617274 0a203a65 5b3e343c    Backtrace: .<4>[

503c9758: 3030633c 37363133 205d3e63 6d756428    <c003167c>] (dum

503c9768: 61625f70 72746b63 2b656361 2f307830    p_backtrace+0x0/

503c9778: 31317830 66202934 206d6f72 30633c5b    0x114) from [<c0

503c9788: 61306332 5d3e3436 75642820 735f706d    2c0a64>] (dump_s

MINI6410 # md 0x503c9598

503c9798: 6b636174 3178302b 78302f38 0a296331    tack+0x18/0x1c).

503c97a8: 00000000 00000000 00000000 00000000    ................

503c97b8: 00000000 00000000 00346163 00000000    ........ca4.....

503c97c8: 00000000 00000000 00000000 00000000    ................

503c97d8: 00000000 00000000 6d756428 74735f70    ........(dump_st

503c97e8: 2b6b6361 2f307830 63317830 72662029    ack+0x0/0x1c) fr

503c97f8: 5b206d6f 3230633c 63613063 205d3e63    om [<c02c0acc>]

503c9808: 6e617028 302b6369 2f343678 38317830    (panic+0x64/0x18

503c9818: 000a2930 00000000 63323063 38366130    0)......c02c0a68

503c9828: 28205d3e 696e6170 78302b63 78302f30    >] (panic+0x0/0x

503c9838: 29303831 6f726620 3c5b206d 31303063    180) from [<c001

503c9848: 38653936 28205d3e 626d656d 6b636f6c    69e8>] (memblock

503c9858: 6c6c615f 625f636f 2b657361 63337830    _alloc_base+0x3c

503c9868: 3478302f 000a2930 00000000 00000000    /0x40)..........

503c9878: 00000000 00000000 30303a32 30303030    ........2:000000

503c9888: 00003030 00000000 00000000 00000000    00..............

MINI6410 #

503c9898: 00000000 00000000 00006232 00000000    ........2b......

503c98a8: 00000000 00000000 00000000 00000000    ................

503c98b8: 00000000 00000000 625f636f 2b657361    ........oc_base+

503c98c8: 2f307830 30347830 72662029 5b206d6f    0x0/0x40) from [

503c98d8: 3030633c 33613631 205d3e34 6d656d28    <c0016a34>] (mem

503c98e8: 636f6c62 6c615f6b 2b636f6c 34317830    block_alloc+0x14

503c98f8: 3178302f 000a2938 72203e34 30633a35    /0x18)..4> r5:c0

503c9908: 31353134 00006338 00000000 00000000    41518c..........

503c9918: 00000000 00000000 31303063 30326136    ........c0016a20

503c9928: 28205d3e 626d656d 6b636f6c 6c6c615f    >] (memblock_all

503c9938: 302b636f 302f3078 29383178 6f726620    oc+0x0/0x18) fro

503c9948: 3c5b206d 30303063 63306464 28205d3e    m [<c000dd0c>] (

503c9958: 39332e54 78302b31 302f3831 29303378    T.391+0x18/0x30)

503c9968: 0000000a 00000000 00000000 00000000    ................

503c9978: 00000000 00000000 2f307830 30337830    ........0x0/0x30

503c9988: 72662029 5b206d6f 3030633c 32376530    ) from [<c000e72

 

发现一条异常打印:

Kerne  panic - not syncing: ERROR: Failed to allocate 0x1000 bytes be low 0x0..

搜索代码中的打印,确认是这个函数里打印的:

start_kernel-->setup_arch-->paging_init-->bootmem_init-->arm_bootmem_init-->memblock_alloc_base

phys_addr_t __init memblock_alloc_base(phys_addr_t size, phys_addr_t align, phys_addr_t max_addr)
{
 phys_addr_t alloc;

 alloc = __memblock_alloc_base(size, align, max_addr);

 if (alloc == 0)
  panic("ERROR: Failed to allocate 0x%llx bytes below 0x%llx.\n",
        (unsigned long long) size, (unsigned long long) max_addr);

 return alloc;
}

 

这里分配出了问题,怀疑是struct meminfo meminfo;的初始化出问题了,所以继续使用printascii/printhex8在各个阶段打印这个结构


u.mem.start=50000000

u.mem.size=10000000

 

1

r_banks=00000001

start=50000000

u.mem.size=10000000

root=/dev/ram rootfstype=ext2 init=/linuxrc console=ttySAC0,115200 mem=256

 

2

r_banks=00000000

start=50000000

u.mem.size=00000000

 

3

r_banks=00000000

start=50000000

u.mem.size=00000000

OK

 

发现是 parse_early_param();之后就r_banks=00000000确认内存解析函数

early_mem-->memparse

unsigned long long memparse(const char *ptr, char **retptr)
{
 char *endptr; /* local pointer to end of parsed string */

 unsigned long long ret = simple_strtoull(ptr, &endptr, 0);

 switch (*endptr) {
 case 'G':
 case 'g':
  ret <<= 10;
 case 'M':
 case 'm':
  ret <<= 10;
 case 'K':
 case 'k':
  ret <<= 10;
  endptr++;
 default:
  break;
 }

 if (retptr)
  *retptr = endptr;

 return ret;
}

 

size返回是0,终于发现竟然是我的boot args里的mem=256少了个M,悲剧!!!!!

 

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

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

总结一下console_init终端初始化前的定位方法:

1、使用low_level debug的printascii/printhex8做调试打印。

内核配置:

Kernel hacking-->Kernel low-level debugging functions

Kernel hacking-->S3C UART to use for low-level debug 选择UART num。

2、打印出来printk的__log_buf的物理地址的值,软复位或者按键复位后在uboot里使用md 这个物理地址查看打印内容。

             printklogbuf = __pa(__log_buf);
        printascii("\n__log_buf=");
       printhex8(printklogbuf);
       printascii("\n");


 

内存参数传递:

ATAG_MEM

uboot里在armlinux.c的setup_memory_tags里处理,bd->bi_dram[i].start和bd->bi_dram[i].size通常在自己单板的board文件里的dram_init来赋值:

#ifdef CONFIG_SETUP_MEMORY_TAGS
static void setup_memory_tags (bd_t *bd)
{
 int i;

 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
  params->hdr.tag = ATAG_MEM;
  params->hdr.size = tag_size (tag_mem32);

  params->u.mem.start = bd->bi_dram[i].start;
  params->u.mem.size = bd->bi_dram[i].size;

  params = tag_next (params);
 }
}
#endif /* CONFIG_SETUP_MEMORY_TAGS */

 内核在这里解析:setup_arch-->parse_tags-->parse_tag_mem32

parse_tags就是根据传递参数里的tags标记,然后选择各种解析函数进行解析,内存解析就是添加内存分区,即修改struct meminfo meminfo的内容

static int __init parse_tag_mem32(const struct tag *tag)
{
     return arm_add_memory(tag->u.mem.start, tag->u.mem.size);
}

bootargs:

mem=xM或者其它单位,bootargs是在parse_tags-->parse_tag_cmdline拷贝到内核default_command_line里的,然后在setup_arch--> parse_early_param();解析里面的各个参数,内存就是通过这个early_mem函数来解析的。

 

优先级:

bootargs>ATAG_MEM。也就是如果在bootargs里面定义了mem=就以bootargs里面为准,因为这个用户定义的。内核启动不起来,往往和这个还有关系。

SAP BTP-Cloud foundry 构建并部署JAVA应用程序 本文为 SAP BTP Java 应用程序的简单实例, 我们可以用此实例来熟悉SAP BTP 中的java应用开开发流程.在你完成改示例java应用程序以后, 我们可以直接使用该java应用程序进行后续的开发流程, 或直接构建一个新的JAVA应用程序来支持新的业务开发。 阅读详情

相关推荐

内部威胁论文阅读笔记(CMU-CERT专场)

在网上看了很多介绍该数据集的博客,一直有个疑问,这个数据集的标注在哪,本着先入为主的想法结合现有的资料对这个数据集的结构做了一下猜测(可能还是不严谨和正确)1.标注在哪2.什么是密集针模型3.场景文章连接内部人员由于可以绕过安全检测发起攻击,通常最有害的攻击被认为是内部人员发起。通过分析用户行为来检测内部威胁,主要分析一些类时间和活动进行特征选择。选择特征向量用于训练。采用cmu-certr4.2用于训练。提出的算法与。

Jerry的博客 2802

Uncompressing Linux..... done, booting the kernel.

内核启动卡在Uncompressing Linux..... done, booting the kernel.这好像是个老生常谈的问题了。成因在网上也罗列了很多种,可这次我碰到的,却没百度出解决方法,纠结了我很久才解决。 我先把造成Uncompressing Linux...

咕唧咕唧shubo.lk的专栏 3万+

华为ENSP完整安装教程

华为ENSP完整安装教程

Hnm456756的博客 7333

Linux内核启动卡在“Uncompressing Linux... done, booting the kernel.”

移植平台:Linux 3.4.2 Mini2440  U-Boot 2012.04.01 1. 移植内核过程中出现界面卡在"Uncompressing Linux... done, booting the kernel." 在linux内核中搜素"Uncompressing Linux... ", 找到如下 Misc.c (arch\arm\boot\compressed):

行者 2万+

STM32 BootLoader 入门教程:从原理到 APP 跳转实现

在 STM32 项目开发中,BootLoader 通常用于实现固件升级、程序引导和应用程序校验。本文从最基础的 BootLoader 原理开始,讲解 STM32 内部 Flash 分区设计、APP 地址偏移、向量表重定位、BootLoader 跳转 APP 的核心代码,以及实际开发中常见的问题。本文适合刚开始接触 STM32 BootLoader、IAP 在线升级、串口升级、OTA 升级的开发者阅读。

lidecong133的博客 1668

MDPI期刊投稿全流程解析:从注册到提交的实用指南

本文详细解析了向MDPI期刊投稿的全过程,从注册账号、完善个人资料、上传稿件,到填写作者信息、推荐审稿人及提交附信等关键步骤。指南强调了使用机构邮箱、遵循期刊模板、认真准备Cover Letter等实用技巧,旨在帮助作者高效、规范地完成投稿,避免常见错误,提升稿件处理效率。

weixin_29250403的博客 924

移植linux内核到s3c6410(kernel 打印:Uncompressing Linux ... done , booting the kernel.后无响应问题的解决。)

U-boot网口问题解决后,uImage和ramdisk终于可以上传到单板上去验证了。脚本为: MINI6410 # setenv serverip 192.168.1.200   MINI6410 # setenv bootargs root=/dev/ram roo

roadtoforest的专栏 7241

2021-8-14 EDK II编译

2021-8-14 EDK II 编译为什么要写这篇文章新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 为什么要写这篇文章 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdo

qq_45775660的博客 2946

Uncompressing Linux... done, booting the kernel

今天用主线Linux内核移植到MINI6410,主线内核2.6.37.1基本已经支持了MINI6410的板子,所以移植到能够启动起来的阶段很简单,但是在移植的时候还是出现了一个比较常见的问题:    1. MINI6410 # bootm 0x50008000    2. ## Booting kernel from Legacy Image at 50008000 ...    3

wfeng 1009

《UDS协议从入门到精通》系列——图解0x14:清除诊断信息

图解0x14:清除诊断信息,简洁易懂,迅速上手!

车载系统攻城狮 4825

第4-4课:状态压缩与动态规划

什么是状态压缩 动态规划问题中重要的一环就是确定状态的定义,在大多数情况下,状态中所包含的信息并不多,比如线性规划问题的状态一般表示为 d[i,j](i 表示状态的位置,j 表示状态的阶段),算法实现时可用二维数组保存计算过程中的状态。但是也有一些问题,它的状态中包含的信息很多,比如它的状态可能是一个集合中各个元素的情况,或者是像铺瓷砖问题这样,是某一行的覆盖状态。如果沿用简单的状态表示方法,则可...

oRbIt 的专栏 700

树莓派:Uncompressing Linux...done, booting the kernel

如果引起Uncompressing Linux...done, booting the kernel 是因为修改 /boot/cmdline.txt 我的是因为修改cmdline.txt引起的dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcbl...

anyin4134的博客 278

Wi-Fi QoS中AIFSN/CWmin/CWmax/TxOP参数是怎样计算的?

802.11e/WMM的EDCA机制通过AIFS、CWmin/CWmax和TxOP三组参数实现业务优先级控制。AIFS决定最短等待时间(AIFS=SIFS+AIFSN×SlotTime),CWmin/CWmax定义退避范围(2^ECW-1),TxOP设置最大占用时长(32µs单位)。默认配置中,语音业务(VO)优先级最高,其AIFSN最小(2)、CW范围最小(3-7)、TxOP适中(1.504ms);视频(VI)次之;普通数据(BE)和后台(BK)优先级最低。调优需根据网络特性调整参数:VoIP可降低AIF

1042484520@qq.com(邮箱) 1746

Linux卡在Uncompressing Linux..... done, booting the kernel.

我遇到的原因是内核配置的问题,见如下截图;主要还是感谢下边转载的这篇文章的启示 —-——————————————————————————————分隔线—————————————————————————— 、、原文/////////// http://blog.csdn.net/liukun321/article/details/6658191

none 2119

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

为什么极少数android板子会打印Uncompressing Linux... done, booting the kernel就不动了

Uncompressing Linux... done, booting the kernel 明天仔细分下一下,这是咋回事,wince6.0 从来没发生过这种事,真是奇怪。

gooogleman#foxmail.com 3152

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

s3c2440移植linux-2.6.22 内核启动卡在Uncompressing Linux..... done, booting the kernel.

内核启动卡在Uncompressing Linux..... done, booting the kernel. 造成Uncompressing Linux..... done, booting the kernel.的常见的几种可能: 1、机器码不匹配 解决方法:在配置内核时开启debug Kernel hacking -> Kernel low-level debugg

lisz1986的博客 770

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

内核移植错误:Uncompressing Linux............................... done, booting the kernel

Uncompressing Linux............................... done, booting the kernel.2008-06-29 20:40移植内核时总是出现问题:Uncompressing Linux.............................................................

dongliqiang2006的专栏 6554
上一篇: Tiny4412 uboot
下一篇: uboot 残留问题
xiaopohaibebo
博客等级 码龄14年 42粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值