Tiny Core Linux

dCore Import Debian Packages to Mountable SCE extensions => dCore Armv7 => Allwinner A10 => Topic started by: MapHtH on June 06, 2013, 06:21:46 AM

Title: CubieBoard, Install to NAND
Post by: MapHtH on June 06, 2013, 06:21:46 AM
Is it possible to install this on NAND in some way?

I've tried the livesuit but it doesn't work.
Title: Re: CubieBoard, Install to NAND
Post by: roberts on June 17, 2013, 06:15:50 AM
AFAIK livesuit is a Windows program. I don't have or use Windows.
Installing to nand should be possible with proper changes to the appropriate boot files.
There is nothing inherit in the system that should prevent such.
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on January 30, 2015, 08:44:12 AM
Yeah, I know that this is ancient, but can anyone help?

What scripts I would need to edit?
I followed this: http://www.cubieforums.com/index.php/topic,73.msg235.html#msg235
and this: http://linux-sunxi.org/Cubieboard/Installing_on_NAND

but it won't work.

bin file you can download here (http://web.archive.org/web/20150101063620/http://dl.cubieforums.com/loz/boot_partition/bootloader/cubie_nand_uboot_partition_image.bin) because it is gone from cubieboard forums.
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 07, 2015, 04:50:09 AM
Do I need to compile my own uboot files?
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 12, 2015, 04:25:09 AM
Now, I know that I need to modify boot.scr.
The problem is that if I use the following settings:

Code: [Select]
setenv bootargs console=${console} init=/init rootwait panic=${panic} loglevel=${loglevel} ${extraargs}
ext4load nand 0:2 0x43000000 boot/script.bin
ext4load nand 0:2 0x48000000 boot/uImage
ext4load nand 0:2 0x43100000 boot/uCore
bootm 0x48000000 0x43100000

and the image is set so that u-boot and other nand bootable files are on the fat partition 1 (nanda) and the kernel uImage, uCore, script.bin, uEnv.txt and boot.scr are on an ext4 partition (nandb)
However, whenever I use the posted boot.scr, it says something like wrong partition and it can't load any of the files, so it loads the kernel instead (and loads it from ext4 partition which means that it can read it), but nothing else which leads to a constant reboot.

Now, a question, does ext4load load partitions which need to be named linux way (nand1, nand2...) or can it read the android partition names (nanda, nandb...)?
How could I make this work? Do I need to use a different command to load the files?

Thanks
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 12, 2015, 05:42:38 AM
Why can't I edit my post? Anyway, sorry for triple post.

Here's the u-boot serial output:

Code: [Select]
HELLO! BOOT0 is starting!
boot0 version : 1.5.0
dram size =1024
Succeed in opening nand flash.
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00056000.
The file stored in 0X00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.177] boot1 version : 1.5.0
[       0.177] pmu type = 3
[       0.179] bat vol = 0
[       0.210] axi:ahb:apb=3:2:2
[       0.210] set dcdc2=1400, clock=1008 successed
[       0.212] key
[       0.225] no key found
[       0.225] flash init start
[       0.265] flash init finish
[       0.267] fs init ok
[       0.268] fattype FAT12
[       0.268] fs mount ok
[       0.274] script finish
[       0.275] power finish
[       0.284] BootMain start
[       0.284] 0
[       0.316] key value = 0
[       0.316] recovery key high 6, low 4
[       0.317] unable to find fastboot_key key_max value
[       0.325] test for multi os boot with display
[       0.327] logo name is invalid or dont need show logo
[       0.332] load kernel start
[       0.359] load kernel successed
[       0.359] start address = 0x4a000000
[       0.361] jump to


U-Boot 2013.01-05530-g8843079-dirty (Feb 04 2013 - 02:41:41) Allwinner Technology

Board: Cubieboard
I2C:   ready
DRAM:  1 GiB
NAND:  0 MiB
MMC:   SUNXI SD/MMC: 0
MMC init failed
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   wemac
Hit any key to stop autoboot:  0
179 bytes read in 14 ms (11.7 KiB/s)
Loaded environment from /uEnv.txt
330 bytes read in 14 ms (22.5 KiB/s)
Jumping to /boot.scr
## Executing script at 44000000
** Invalid partition 2 **
** Invalid partition 2 **
** Invalid partition 2 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
4484836 bytes read in 282 ms (15.2 MiB/s)
## Booting kernel from Legacy Image at 48000000 ...
   Image Name:   Linux-3.0.42
   Created:      2013-02-09   2:41:39 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4484772 Bytes = 4.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

<6>Initializing cgroup subsys cpuset
<5>Linux version 3.0.42 (root@testing) (gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41) ) #3 PREEMPT Fri Feb 8 18:38:58 PST 2013
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: sun4i
<6>Memory Reserved:
<6>     SYS  : 0x43000000 - 0x4300ffff  (  64 kB)
<6>     VE   : 0x44000000 - 0x48ffffff  (  80 MB)
<6>     G2D  : 0x58000000 - 0x58ffffff  (  16 MB)
<6>     LCD  : 0x5a000000 - 0x5bffffff  (  32 MB)
Memory policy: ECC disabled, Data cache writeback
<6>BROM Ver: 1100 1100 1623
<6>chip-id: A10 (AW1623 revision C)
<7>On node 0 totalpages: 262144
<7>free_area_init_node: node 0, pgdat c084a1dc, node_mem_map c090f000
<7>  Normal zone: 1280 pages used for memmap
<7>  Normal zone: 0 pages reserved
<7>  Normal zone: 162560 pages, LIFO batch:31
<7>  HighMem zone: 768 pages used for memmap
<7>  HighMem zone: 97536 pages, LIFO batch:31
<7>pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
<7>pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
<5>Kernel command line: console=tty0 root=/dev/nandb rootwait loglevel=3 panic=10 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 nozswap nortc host=BuildServer restore=nandb home=nandb tce=nandb opt=nandb
<6>PID hash table entries: 4096 (order: 2, 16384 bytes)
<6>Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
<6>Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
<6>Memory: 1024MB = 1024MB total
<5>Memory: 899128k/899128k available, 149448k reserved, 393216K highmem
<5>Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xe8800000 - 0xf0000000   ( 120 MB)
    lowmem  : 0xc0000000 - 0xe8000000   ( 640 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc0036000   ( 184 kB)
      .text : 0xc0036000 - 0xc0807000   (8004 kB)
      .data : 0xc0808000 - 0xc0853af0   ( 303 kB)
       .bss : 0xc0853b14 - 0xc090e868   ( 748 kB)
<6>SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
<6>NR_IRQS:96 nr_irqs:96 96
<6>timer0: Periodic Mode
<6>Console: colour dummy device 80x30
<6>console [tty0] enabled
<6>Calibrating delay loop... <c>1001.88 BogoMIPS (lpj=5009408)
<6>pid_max: default: 32768 minimum: 301
<6>Mount-cache hash table entries: 512
<6>Initializing cgroup subsys cpuacct
<6>Initializing cgroup subsys devices
<6>Initializing cgroup subsys freezer
<6>Initializing cgroup subsys blkio
<6>CPU: Testing write buffer coherency: ok
<6>hw perfevents: enabled with ARMv7 Cortex-A8 PMU driver, 5 counters available
<6>devtmpfs: initialized
<6>print_constraints: dummy:
<6>NET: Registered protocol family 16
<6>hw-breakpoint: debug architecture 0x4 unsupported.
[ccmu] try to set apb1 parent to sata_pll failed!
SOFTWINNER DMA Driver, (c) 2003-2004,2006 Simtec Electronics
<6>Initialize DMAC OK
<6>bio: create slab <bio-0> at 0
<5>SCSI subsystem initialized
<7>libata version 3.00 loaded.
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>Advanced Linux Sound Architecture Driver Version 1.0.24.
<6>Bluetooth: Core ver 2.16
<6>NET: Registered protocol family 31
<6>Bluetooth: HCI device and connection manager initialized
<6>Bluetooth: HCI socket layer initialized
<6>Bluetooth: L2CAP socket layer initialized
<6>Bluetooth: SCO socket layer initialized
Init eGon pin module V2.0
<6>Switching to clocksource aw 64bits couter
<6>cfg80211: Calling CRDA to update world regulatory domain
<5>FS-Cache: Loaded
<6>CacheFiles: Loaded
<6>Switched to NOHz mode on CPU #0
[usb_manager]: CONFIG_USB_SW_SUN4I_USB0_OTG
[sw_hcd0]: usb host driver initialize........
[sw_udc]: udc_init: version 20080411
[sw_udc]: usb_vbase  = 0xf1c13000
[sw_udc]: sram_vbase = 0xf1c00000
[sw_udc]: open_usb_clock
udc->driver is null, udc is need not stop
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
<6>TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
<6>TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
<6>TCP: Hash tables configured (established 131072 bind 65536)
<6>TCP reno registered
<6>UDP hash table entries: 512 (order: 1, 8192 bytes)
<6>UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
<6>NET: Registered protocol family 1
<6>RPC: Registered named UNIX socket transport module.
<6>RPC: Registered udp transport module.
<6>RPC: Registered tcp transport module.
<6>RPC: Registered tcp NFSv4.1 backchannel transport module.
[pm]aw_pm_init!
<6>audit: initializing netlink socket (disabled)
<5>type=2000 audit(0.279:1): initialized
highmem bounce pool size: 64 pages
<5>VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
<6>squashfs: version 4.0 (2009/01/31) Phillip Lougher
<6>NTFS driver 2.1.30 [Flags: R/W].
<6>fuse init (API version 7.16)
<6>msgmni has been set to 988
<6>alg: No test for stdrng (krng)
<6>Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
<6>io scheduler noop registered
<6>io scheduler deadline registered
<6>io scheduler cfq registered (default)
<6>sunxi disp driver loaded (/dev/disp api 1.0)
<6>Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
<6>serial8250.0: ttyS0 at MMIO 0x1c28000 (irq = 1) is a U6_16550A
[uart]: used uart info.: 0x05
<6>sunxi-uart.0: ttyS0 at MMIO 0x1c28000 (irq = 1) is a U6_16550A
[uart]: serial probe 0, membase   (null) irq 1 mapbase 0x01c28000
<6>sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 3) is a U6_16550A
[uart]: serial probe 2, membase   (null) irq 3 mapbase 0x01c28800
<7>G2D: drv_g2d_init
<6>G2D: g2dmem: g2d_start=58000000, g2d_size=1000000
<6>G2D: head:d8000000,tail:d9000000
<6>G2D: Module initialized.major:251
<6>brd: module loaded
<6>loop: module loaded
[NAND]nand driver, init.
cmu_clk is 480
nand clk init end
offset 0xc:  0x26141
offset 0x14:  0x8200000b
[NAND] nand gpio_request
[NAND] nand driver version: 0x2 0x9
nand interrupte register ok
ret of NFC_ChangMode is 0
dma_hdle  is 0
dma_hdle  is 10000008
cmu_clk is 480
nand clk init end
offset 0xc:  0x26141
offset 0x14:  0x82000007
The 0 disk name = DEVICE, class name = NAND, disk start = 0, disk size = 7979008
The 1 disk name = boot, type = 0, class name = DISK, disk size = 1016
The 2 disk name = root, type = 0, class name = DISK, disk size = 0
The 2 disk size = 7977984
part total count = 3
<6> nand: unknown partition table
<6> nanda:
<6> nandb: unknown partition table
<6>benn: nand probe enter
[NAND]nand driver, ok.
<6>sw_ahci sw_ahci.0: controller can't do PMP, turning off CAP_PMP
<4>sw_ahci sw_ahci.0: forcing PORTS_IMPL to 0x1
<6>sw_ahci sw_ahci.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
<6>sw_ahci sw_ahci.0: flags: ncq sntf pm led clo only pio slum part ccc
<6>scsi0 : sw_ahci_platform
<6>ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 56
<6>wemac Ethernet Driver, V1.01 in file:drivers/net/sun4i/sun4i_wemac.c
<6>[EMAC] ahb clk enable
<6>[EMAC] ahb gate clk: 0x2026141
<6>ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[sw-ehci1]: open clock
[sw-ehci1]: Set USB Power ON
<6>sw-ehci sw-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
<6>sw-ehci sw-ehci.1: new USB bus registered, assigned bus number 1
<6>sw-ehci sw-ehci.1: irq 39, io mem 0xf1c14000
<6>sw-ehci sw-ehci.1: USB 0.0 started, EHCI 1.00
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 1 port detected
[sw-ohci1]: open clock
<6>sw-ohci sw-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
<6>sw-ohci sw-ohci.1: new USB bus registered, assigned bus number 2
<6>sw-ohci sw-ohci.1: irq 64, io mem 0xf1c14400
<6>hub 2-0:1.0: USB hub found
<6>hub 2-0:1.0: 1 port detected
[sw-ehci2]: open clock
[sw-ehci2]: Set USB Power ON
<6>sw-ehci sw-ehci.2: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
<6>sw-ehci sw-ehci.2: new USB bus registered, assigned bus number 3
<6>sw-ehci sw-ehci.2: irq 40, io mem 0xf1c1c000
<6>sw-ehci sw-ehci.2: USB 0.0 started, EHCI 1.00
<6>hub 3-0:1.0: USB hub found
<6>hub 3-0:1.0: 1 port detected
[sw-ohci2]: open clock
<6>sw-ohci sw-ohci.2: SW USB2.0 'Open' Host Controller (OHCI) Driver
<6>sw-ohci sw-ohci.2: new USB bus registered, assigned bus number 4
<6>sw-ohci sw-ohci.2: irq 65, io mem 0xf1c1c400
<6>ata1: SATA link down (SStatus 0 SControl 300)
<6>hub 4-0:1.0: USB hub found
<6>hub 4-0:1.0: 1 port detected
<6>Initializing USB Mass Storage driver...
<6>usbcore: registered new interface driver usb-storage
<6>USB Mass Storage support registered.
<6>usbcore: registered new interface driver ums-alauda
<6>usbcore: registered new interface driver ums-cypress
<6>usbcore: registered new interface driver ums-datafab
<6>usbcore: registered new interface driver ums_eneub6250
<6>usbcore: registered new interface driver ums-freecom
<6>usbcore: registered new interface driver ums-isd200
<6>usbcore: registered new interface driver ums-jumpshot
<6>usbcore: registered new interface driver ums-karma
<6>usbcore: registered new interface driver ums-onetouch
<6>usbcore: registered new interface driver ums-realtek
<6>usbcore: registered new interface driver ums-sddr09
<6>usbcore: registered new interface driver ums-sddr55
<6>usbcore: registered new interface driver ums-usbat
<6>mousedev: PS/2 mouse device common for all mice
sunxi RTC version 0.1
<6>sunxi-rtc sunxi-rtc: sunxi_rtc_probe tmp_data = 380248073
[RTC] ERR: Set LOSC to external failed!!!
[RTC] WARNING: Rtc time will be wrong!!
<6>using rtc device, rtc, for alarms<6>sunxi-rtc sunxi-rtc: rtc core: registered rtc as rtc0
<6>i2c /dev entries driver
!!! base_Addr = 0xe88d4c00
config i2c gpio with gpio_config api
twi0, apb clock = 24000000
<6>axp_mfd 0-0034: AXP (CHIP ID: 0x41) detected
<6>I2C: i2c-0: AW16XX I2C adapter
**********start************
0x40
0xf8
0x28
0x0
0x0
**********end************
!!! base_Addr = 0xe88d6000
twi1, apb clock = 24000000
<6>I2C: i2c-1: AW16XX I2C adapter
**********start************
0x40
0xf8
0x58
0x0
0x0
**********end************
!!! base_Addr = 0xe88d8400
twi2, apb clock = 24000000
<6>I2C: i2c-2: AW16XX I2C adapter
**********start************
0x40
0xf8
0x58
0x0
0x0
**********end************
<6>lirc_dev: IR Remote Control driver registered, major 250
<6>IR NEC protocol handler initialized
<6>IR RC5(x) protocol handler initialized
<6>IR RC6 protocol handler initialized
<6>IR JVC protocol handler initialized
<6>IR Sony protocol handler initialized
<6>IR RC5 (streamzap) protocol handler initialized
<6>IR LIRC bridge handler initialized
<6>Linux video capture interface: v2.00
[cedar dev]: install start!!!
[cedar dev]: install end!!!
[ace_drv] start!!!
[ace_drv] init end!!!
[pa_drv] start!!!
[pa_drv] init end!!!
<6>print_constraints: axp20_ldo1: 1300 mV
<6>print_constraints: axp20_ldo2: 1800 <--> 3300 mV at 3000 mV
<6>print_constraints: axp20_ldo3: 700 <--> 3500 mV at 2800 mV
<6>print_constraints: axp20_ldo4: 1250 <--> 3300 mV at 2800 mV
<6>print_constraints: axp20_buck2: 700 <--> 2275 mV at 1400 mV
<6>print_constraints: axp20_buck3: 700 <--> 3500 mV at 1250 mV
<6>print_constraints: axp20_ldoio0: 1800 <--> 3300 mV at 2800 mV
<6>input: axp20-supplyer as /devices/platform/sun4i-i2c.0/i2c-0/0-0034/axp20-supplyer.28/input/input0
<6>Bluetooth: HCI UART driver ver 2.2
<6>Bluetooth: HCI H4 protocol initialized
<6>Bluetooth: HCI BCSP protocol initialized
<6>Bluetooth: HCILL protocol initialized
<6>cpuidle: using governor ladder
<6>cpuidle: using governor menu
[mmc_pm]: no sdio card used in configuration
[mmc]: sunximmc_init
[mmc]: sunxi mmc controller using config : 0x9
[mmc]: sunxi-mmc.0: pdev->name: sunxi-mmc, pdev->id: 0
[mmc]: mmc 0 power off !!
[mmc]: mmc0 Probe: base:0xe88e0000 irq:32 dma:0 pdes:0xe7bfc000, ret 0.
[mmc]: sunxi-mmc.3: pdev->name: sunxi-mmc, pdev->id: 3
[mmc]: mmc 3 power off !!
[mmc]: mmc3 Probe: base:0xe88e2000 irq:35 dma:0 pdes:0xe7000000, ret 0.
<6>usbcore: registered new interface driver usbhid
<6>usbhid: USB HID core driver
<6>zram: num_devices not specified. Using default: 1
<6>zram: Creating 1 devices ...
enter sun4i Audio codec!!!
<6>sun4i audio support initialized
sun4i Audio codec successfully loaded..
<6>asoc: sndhdmi <-> sun4i-hdmiaudio.0 mapping ok
<6>ALSA device list:
<6>  #0: sun4i-CODEC  Audio Codec
<6>  #1: sun4i-sndhdmi
<6>IPv4 over IPv4 tunneling driver
<6>TCP cubic registered
<6>Initializing XFRM netlink socket
<6>NET: Registered protocol family 10
<6>NET: Registered protocol family 17
<6>NET: Registered protocol family 15
<6>Bluetooth: RFCOMM TTY layer initialized
<6>Bluetooth: RFCOMM socket layer initialized
<6>Bluetooth: RFCOMM ver 1.11
<6>Bluetooth: BNEP (Ethernet Emulation) ver 1.3
<6>Bluetooth: BNEP filters: protocol multicast
<6>802.1Q VLAN Support v1.8
[mmc_pm]: No sdio card, please check your config !!
<6>VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
<5>Registering SWP/SWPB emulation handler
<6>registered taskstats version 1
<6>Console: switching to colour frame buffer device 240x67
<4>regulator_init_complete: axp20_buck3: incomplete constraints, leaving on
<4>regulator_init_complete: axp20_buck2: incomplete constraints, leaving on
<4>regulator_init_complete: axp20_ldo4: incomplete constraints, leaving on
<4>regulator_init_complete: axp20_ldo3: incomplete constraints, leaving on
<4>regulator_init_complete: axp20_ldo2: incomplete constraints, leaving on
<4>regulator_init_complete: axp20_ldo1: incomplete constraints, leaving on
<3>sunxi-rtc sunxi-rtc: hctosys: unable to read the hardware clock
<6>VFS: Mounted root (ext2 filesystem) on device 93:16.
<6>devtmpfs: error mounting -2
<6>Freeing init memory: 184K
<0>Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Backtrace:
[<c0040fe0>] (dump_backtrace+0x0/0x110) from [<c05ed904>] (dump_stack+0x18/0x1c)
 r6:c006f71c r5:c002e590 r4:c0856cf0 r3:00000000
[<c05ed8ec>] (dump_stack+0x0/0x1c) from [<c05ed97c>] (panic+0x74/0x194)
[<c05ed908>] (panic+0x0/0x194) from [<c0036438>] (init_post+0xa8/0xd8)
 r3:00000000 r2:e7b57900 r1:c0e05ae0 r0:c075d4ac
 r7:00000013
[<c0036390>] (init_post+0x0/0xd8) from [<c0008bac>] (kernel_init+0x18c/0x194)
 r4:c002e590 r3:00000000
[<c0008a20>] (kernel_init+0x0/0x194) from [<c006f71c>] (do_exit+0x0/0x74c)
 r5:c0008a20 r4:00000000
<0>Rebooting in 10 seconds..
Title: Re: CubieBoard, Install to NAND
Post by: Rich on February 12, 2015, 07:06:50 AM
Hi MapHtH
Quote
Why can't I edit my post?
You can only edit your post if you do it within 30 minutes of posting.
Title: Re: CubieBoard, Install to NAND
Post by: bmarkus on February 12, 2015, 09:34:36 AM
Why can't I edit my post? Anyway, sorry for triple post.

http://forum.tinycorelinux.net/index.php/topic,17901.0.html
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 13, 2015, 12:11:34 AM
Oh, ok.

Anyway, if anyone wants to know, I solved it.
I found a way to install and boot everything from nand so if anyone is interested, I can share the files.

The only caveat is the fact that you can't use both sd card and nand because the u-boot will keep looking for boot files on your sd card and won't skip to next boot device once it can't find them.
So, this is useful if you are using the cubieboard as a server for something and don't need too much space (the way I'm using it).

The greatest advantage is that nand is lightning fast compared to sd cards, and if you need fast responses (like if you are using a web server or something like that) it's fantastic.

The only thing now that I'd like to figure out is how to make other arguments in uEnv.txt work because those like nodhcp and tz won't work. They break something and the core ignores all the arguments and boots with defaults without restoring and using even the tce, home, opt and restore arguments.
Title: Re: CubieBoard, Install to NAND
Post by: beerstein on February 13, 2015, 02:54:10 AM
Great to hear that!
I am interested in the files. If possible please e-mail me a zip within a personal message or is it allowed to post them here.?
How did you manage it?
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 13, 2015, 01:42:10 PM
+1 interested!
well done!
Were you able to keep files in your nand or you had to delete everything to install the linux image?
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 18, 2015, 09:24:13 AM
Ok , fair enough, you already have been ignored when you asked for help,
and now you enjoy your victory silently ;) I know the feeling.

Anyway I read the info you have shown and it looks straightforward - I will give it a try. If i manage to do a linux install to nand (not necessarily tinycore) I will be happy.
Have you seen also there are ready to use linux images with nand install scripts?
take care
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 18, 2015, 09:52:06 AM
Actually, I've sent you both PM's.

There are a lot of images but there wasn't anything about tiny core and the one with cubian is only for cubian, not for a small distro like dcore.
The only thing that needed to be modified was boot.scr. When I actually used my head, I found out the solution  ;)

You can analyze what's in the script and you can install anything this way, not just tiny core.

However, like I wrote in the PM, you can't keep anything that's on NAND already, you need to back it up and restore it.
I will publish the script here if there is interest and if it isn't against the rules or something. Mods/Admins?
Title: Re: CubieBoard, Install to NAND
Post by: Rich on February 18, 2015, 09:59:44 AM
Hi MapHtH
Quote
I will publish the script here if there is interest and if it isn't against the rules or something. Mods/Admins?
You can attach a script or place it between code tags.
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 18, 2015, 11:20:29 AM
Hi Rick
thanks

Here goes:
Code: [Select]
#!/bin/sh

umount /mnt/nanda
umount /mnt/nandb

wget http://tinycorelinux.net/dCore/armv7/Allwinner-A10/uImage
wget http://tinycorelinux.net/dCore/armv7/Allwinner-A10/uCore

[ -f uEnv.txt ] && rm uEnv.txt
[ -f cubie_nand_uboot_partition_image.bin ] && rm cubie_nand_uboot_partition_image.bin
[ -f boot.scr ] && rm boot.scr
[ -f script.bin ] && rm script.bin

wget http://tinycorelinux.net/dCore/armv7/Allwinner-A10/uEnv.txt
wget http://oldmenatplay.no-ip.biz/files/tinycore/cubie/cubie_nand_uboot_partition_image.bin
wget http://oldmenatplay.no-ip.biz/files/tinycore/cubie/boot.scr
wget http://oldmenatplay.no-ip.biz/files/tinycore/cubie/script.bin

dd bs=4096 if=./cubie_nand_uboot_partition_image.bin of=/dev/nand
sync; sleep 10
sudo rebuildfstab

mkfs.ext4 /dev/nandb
sync; sleep 10
sudo rebuildfstab

mount /dev/nandb
mkdir /mnt/nandb/boot
cp uImage uCore uEnv.txt script.bin boot.scr /mnt/nandb/boot/.
umount /mnt/nandb

It ain't perfect but it works. If anyone has suggestions, feel free to advise :)

I'd like to thank the whole Tiny core team for making Tiny Core and helping me get into the world of Linux. Also, Roberts script helped me to make my own.
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 18, 2015, 12:35:53 PM
My bad... i didn`t see your message... thanks.

I will take a look at all the files and try it if/when I have the courage.. the other img I was talking about is not cubian but an ubuntu made by a guy named Guillaume who made a script named `pimp my mele` but ok you probably knew that one already. It seems there is even a rollback to android option on his script, but I really have not tried that yet. And I have no idea if any of this will work on my MK802 II  - but I suspect yes, at most needing some change in script.bin (i hope)
thanks again
fangis
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 18, 2015, 01:48:30 PM
Ok, I have a suggestion to the script.

I would make the whole process less automatic, meaning, no need to access the internet to get the files, this for the reasons:
 - sometimes you need a different file from these - in my case , for my tv box I will need a different script.bin. Also, I use a different uImage.
 - sometimes you have no connection / connection can break and mess the whole setup
What do you think?
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 19, 2015, 02:37:10 PM
So, I just tried to do a manual install following the steps in the script.

For me, it was a failure.

It can`t go through the mkfs.ext4 part - It states that the partition nandb
does not exist.

fdisk -l only shows partition `nand` with about 3.8GB of size.
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 21, 2015, 02:40:11 AM
Update - The partitions are created nicely on my system. It`s just they have different names here:
nand1
nand2

The mini pc boots, led gets on and stays on, but I get no HDMI output.

I am guessing because of the partition name difference I may need to edit your boot.scr. Do you still have your boot.cmd file?
Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 21, 2015, 10:01:34 AM
Hmm, when you flash the cubie_nand_uboot_partition_image.bin you should already have nanda, not nand1 (android vs linux naming scheme).
Actually, I'll make an image of the system for easy install and post it here, that should make things a lot easier.

Btw, did you check the script I posted? It should be pretty straight forward on what needs to be done.
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 21, 2015, 10:16:23 AM
Hi
I followed the steps on your script - but I had to do them manually as the tv box currently has no internet access.
Maybe i get nand1 nand2 names because i use a different kernel? By the way it`s funny, if I use the default kernel, then dmesg shows that nand driver did not load correctly.

Anyway - i`ll look forward to your img file and also, if you could post your boot.cmd I will be thankful

Title: Re: CubieBoard, Install to NAND
Post by: MapHtH on February 21, 2015, 11:52:39 AM
Uhh, the procedure I've posted is made for Cubieboard and I haven't tested it on anything else so I cant guarantee that it would work on anything else.

You should already have nanda and not nand1 by dding cubie_nand_uboot_partition_image.bin but that's made for cubieboard too.
I think that the primary and secondary boot loaders are a tad different with android tv boxes. I'd use the ones with the working images.

My boot.cmd is:
Code: [Select]
setenv bootargs console=${console} init=/init rootwait panic=${panic} loglevel=${loglevel} ${extraargs}
ext4load nand 1:0 0x43000000 /boot/script.bin
ext4load nand 1:0 0x48000000 /boot/uImage
ext4load nand 1:0 0x43100000 /boot/uCore
bootm 0x48000000 0x43100000
Title: Re: CubieBoard, Install to NAND
Post by: fangis on February 21, 2015, 12:32:04 PM
It`s ok
Usually for A10 devices, it`s just a matter of switching a script.bin and then images from other devices can work on yours. But this nand install may have something different.
THanks for the boot.cmd but it seems there is nothing to replace in there. For now, i run out of ideas, although it feels like it`s close to working.
Title: Re: CubieBoard, Install to NAND - Is this work now?
Post by: vinikon on February 12, 2018, 10:29:20 AM
Hi there,

please tell me if you script works as of today. I'd like to set-up my Mk802II in order to run TinyCore with X.

But since 2015 repositories, uboot etc. changed.

Is there any changes that I should make to the script?
Thanks