Welcome! Log In Create A New Profile

Advanced

Debian on Chip PC LXD8941

Posted by Koen 
Re: Chip PC LXD8941
October 21, 2018 04:46PM
Hi bodhi,

I've been thinking about that approach but I'm not sure it would work. If the SD card is removed and the device rebooted the bootargs will get overwritten to 'root=LABEL=rootfsSD' while it should remain 'root=LABEL=rootfsINT'.

Koen
Re: Chip PC LXD8941
October 21, 2018 05:08PM
Koen,

> If the SD card is removed and
> the device rebooted the bootargs will get
> overwritten to 'root=LABEL=rootfsSD' while it
> should remain 'root=LABEL=rootfsINT'.

No. Remember that you don't do any saveenv during the execution of the envs. Next boot, everything restarts in the sequence you have set and saved once.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
October 22, 2018 04:44PM
Hi bodhi,

I guess overwritten was not the best choice of words. If I understand your proposed solution correctly the command 'run set_bootargs_sd' always gets executed before booting. This happens after 'run set_bootargs_int' so the bootargs always end up being set to the following value: console=ttyS0,115200 root=LABEL=rootfsSD rootdelay=10 ${mtdparts} earlyprintk=serial. This would be fine for booting from the SD card but is the incorrect label for booting the internal memory. That is why I've moved the command to the external script and placed it on the SD card such that it only gets loaded and executed if the SD card is present. However I may be missing something here so please let me know if I am misunderstanding your solution.

Koen
Re: Chip PC LXD8941
October 22, 2018 06:01PM
Koen,

setenv bootcmd 'run set_bootargs_int; run bootcmd_int; run set_bootargs_sd; run bootcmd_sd; run bootcmd_bootm'

In this bootcmd, the only things that could fail is bootcmd_int and bootcmd_sd before you get to bootcmd_bootm.

Basically the logic works like this

run set_bootargs_int;      #  set to internal therefore root=LABEL=rootfsINT
run bootcmd_int;             # when this fail it should proceed to run set_bootargs_sd

run set_bootargs_sd;     #  reset to SD  therefore root=LABEL=rootfsSD
run bootcmd_sd;            # when this fail it should proceed to run bootcmd_bootm which will fail

run bootcmd_bootm       # as this fails, the bahavior is depending on the box u-boot, it could reset, or hung.You need to test this.


Not sure if the sequence above is what you want. The rootfs label should be different for internal SD and external SD.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
October 23, 2018 04:13PM
Hi bodhi,

the SD card can easily be replaced if it would ever get damaged so I am using that as the default option. The internal memory can't be replaced so that would be used as rescue / recovery system. So the two boot options are: boot from SD card if present otherwise fall back to booting the rescue system from internal memory. As far as I can see that is only possible by moving the 'run set_bootargs_sd' to a script on the SD card such that it only gets executed if the SD card is present.

If I run the following bootcmd the bootargs are always set to root=LABEL=rootfsSD so the device will boot OK from SD but will fail to boot the rescue system on the internal memory when no SD card is present.

setenv bootcmd 'run set_bootargs_int; run bootcmd_int; run set_bootargs_sd; run bootcmd_sd; run bootcmd_bootm'

If I change the order of the arguments around the opposite happens. The device will always have the bootargs set to root=LABEL=rootfsINT so booting the rescue system works but booting with an SD card in the device will fail.

setenv bootcmd 'run set_bootargs_sd; run bootcmd_sd; run set_bootargs_int; run bootcmd_int; run bootcmd_bootm'

Now by using the 1st option but moving 'run set_bootargs_sd' to a script on the SD card it will only get executed if the SD card is in the device.

So normal boot would successfully go through all 5 steps and since SD is later in the series than INT it will boot from SD.

Remove the SD card and the boot sequence can only successfully run steps 1,2 and 5 and the device will boot to the rescue system on the internal memory.

Koen
Re: Chip PC LXD8941
October 23, 2018 05:39PM
Koen,

Quote

If I run the following bootcmd the bootargs are always set to root=LABEL=rootfsSD so the device will boot OK from SD but will fail to boot the rescue system on the internal memory when no SD card is present.

setenv bootcmd 'run set_bootargs_int; run bootcmd_int; run set_bootargs_sd; run bootcmd_sd; run bootcmd_bootm'


Ah, I've missed that 1st bootcmd_bootm. What we need is to short circuit it at the 1st bootcmd_bootm. Execution only continues if the bootm was unseccessful. It it is successful, then u-boot started the kernel and never return to this sequence for bootcmd_int.

So,
setenv bootcmd  'run set_bootargs_sd; run bootcmd_sd; run bootcmd_bootm; run set_bootargs_int; run bootcmd_int; run bootcmd_bootm;'

So what we really need to test is what will happen in the 1st bootcmd_bootm. If that bootm does not hang, and result in a normal error when SD card is not present, then u-boot will go to the next sequence.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
October 24, 2018 01:34PM
Hi bodhi,

I've tried the approach with the additional 'run bootcmd_bootm' in the middle and the SD card removed. Unfortunately the device does not continue with step 4 but instead goes into stock recovery mode and tries to boot from the network. So I guess I'll stick to my script on the SD card approach which works as intended.

Koen

Hit any key to stop autoboot:  0 
Card did not respond to voltage select!
Device: MV_SDHCI
Manufacturer ID: 0
OEM: 0
Name: Tran Speed: 0
Rd Block Len: 0
MMC version 0.0
High Capacity: No
Capacity: 0
Bus Width: 1-bit
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Recovering...
Loading file "/tffsb" from mmc device 0:2 (mmcda2)
787508 bytes read
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 28
DHCP client bound to address 192.168.1.135
Using egiga0 device
arp eth addr 18:62:2c:2f:bc:34
host 129.100.2.50 is alive
BootMe:   ClientIP=192.168.1.135, ServerIP=129.100.2.50, ServerMAC=18:62:2c:2f:bc:34 platform=8xxx, name=L
BootMe:   timeout 3000 msecs (1 of 3)
BootMe:   ClientIP=192.168.1.135, ServerIP=129.100.2.50, ServerMAC=18:62:2c:2f:bc:34 platform=8xxx, name=L
BootMe:   timeout 3000 msecs (2 of 3)
BootMe:   ClientIP=192.168.1.135, ServerIP=129.100.2.50, ServerMAC=18:62:2c:2f:bc:34 platform=8xxx, name=L
BootMe:   timeout 3000 msecs (3 of 3)
ServerMe: broadcasting IP address=192.168.1.135, Platform=8xxx, Name=L
ServerMe: timeout, 0 servers found.
ServerMe: broadcasting IP address=192.168.1.135, Platform=8xxx, Name=L
ServerMe: timeout, 0 servers found.
ServerMe: broadcasting IP address=192.168.1.135, Platform=8xxx, Name=L
ServerMe: timeout, 0 servers found.
ServerMe: broadcasting IP address=192.168.1.135, Platform=8xxx, Name=L
Re: Chip PC LXD8941
October 24, 2018 02:32PM
Koen,

I suspected that would be the result. The bootm tried to run with nothing on the memory since kernel was not loaded. I was hoping it would error out, but it does make sense that it caused a recovery with this customized u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941 --> LXD8541
October 27, 2018 03:28AM
I've got a similar device (LXD8541).
It's nearly the same ... CPU is running at 800 MHz.
As there is some time in the near future, and I'm working again on other devices.. this is a nice thing too..
I have a working Serial Console .. USB Stick and a SD Card .. what could possibly go wrong ? ;-)



Edited 1 time(s). Last edit at 10/27/2018 03:39AM by pengu.
Re: Chip PC LXD8941
October 27, 2018 06:25AM
Cool. ChipPC doesn't give much info about the device but I hope the info in this thread will help you to get started.

Koen
Re: Chip PC LXD8941
October 27, 2018 04:37PM
After playing around with some other devices ... let's boot this ...




        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 

 ** LOADER **


U-Boot 2009.08-svn7881 (Jan 23 2013 - 13:55:26) version: dove-5.3.4

BootROM:
       Version on chip: 2.33
       Status: OK
       Retries #: 0
Board: RD-88AP510-Avengers
SoC:   MV88F510 Rev 7
CPU:   ??? (0x0c08) (Rev 1)
       CPU @ 800Mhz, L2 @ 400Mhz
       DDR3 @ 400Mhz, TClock @ 166Mhz
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Write Leveling Results:
       CS0, Lane: 0, value: 2
       CS0, Lane: 1, value: 3
       CS0, Lane: 2, value: 1
       CS0, Lane: 3, value: 1
DRAM:   1 GB
       CS 0: base 0x00000000 size 512 MB
       CS 1: base 0x20000000 size 512 MB
       Addresses 38M - 0M are saved for the U-Boot usage.
SF: Detected MX25L1605D with page size 256, total 2097152 bytes
***   env_relocate_spec ****
*** Warning    environment  crc cae2a0b3  cae2a0b3 fffc.****
Warning: clock source is too slow.Try smaller resolution.

Streaming disabled 
L2 Cache Prefetch disabled
L2 Cache ECC disabled
USB 0: Host Mode
USB 1: Host Mode
Setting VPU power ON.
Setting GPU power ON.
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
MMC:   MV_SDHCI: 0, MV_SDHCI: 1
NORMAL MODE detected
Boot config is valid
LCD config is invalid
Using defaults
Try to load image :  0x02f00000, /tffsb 
Loading file "/tffsb" from mmc device 0:2 (mmcda2)
787508 bytes read
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
MIC>> 
MIC>> 
MIC>> 
MIC>> 
MIC>> 
MIC>> 
MIC>> 
MIC>> setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial'
MIC>> setenv bootcmd_usb 'usb start; fatload usb 0:1 0x3000000 /uImage; fatload usb 0:1 0x4000000 /uInitrd'
MIC>> setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; bootm 0x3000000 0x4000000'
MIC>> sa
Saving Environment to SPI Flash...
Erasing 0xc0000 - 0xd0000:      [Done]
Writing to SPI flash:           [Done]
MIC>> run bootcmd_exec
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
       scanning bus for storage devices... 1 Storage Device(s) found
reading /uImage
............................................................................................................................................................................................
.......................................................................................................................................................................................

4465752 bytes read
reading /uInitrd
............................................................................................................................................................................................

7931992 bytes read
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-4.18.4
   Created:      2018-10-27  20:20:00 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4465688 Bytes =  4.3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   initramfs-4.18.4
   Created:      2018-10-27  20:20:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7931928 Bytes =  7.6 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

EUGENE lcd_disable
EUGENE lcd_panel_disable
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.18.5-mvebu-tld-1 (root@tldDebianVM) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)) #1 SMP PREEMPT Thu Aug 30 22:19:21 PDT 2018
[    0.000000] CPU: ARMv7 Processor [413fc081] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Chip PC LXD8941
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4c4 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @(ptrval) s41548 r8192 d23988 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:768k(uboot),256k(uboot_env),768k(uboot2),-(kernel) earlyprintk=serial
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1017252K/1048576K available (9216K kernel code, 790K rwdata, 2304K rodata, 1024K init, 327K bss, 31324K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (10208 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 791 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 328 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.18.5-mvebu-tld-1 #1
[    0.000000] Hardware name: Marvell Dove
[    0.000000] [<c0117d00>] (unwind_backtrace) from [<c0112680>] (show_stack+0x10/0x14)
[    0.000000] [<c0112680>] (show_stack) from [<c0944f18>] (dump_stack+0x70/0x8c)
[    0.000000] [<c0944f18>] (dump_stack) from [<c0943574>] (Ldiv0+0x8/0x10)
[    0.000000] [<c0943574>] (Ldiv0) from [<c05c2fbc>] (dove_recalc_rate+0x44/0x8c)
[    0.000000] [<c05c2fbc>] (dove_recalc_rate) from [<c05bed1c>] (clk_register+0x40c/0x5d4)
[    0.000000] [<c05bed1c>] (clk_register) from [<c0d35580>] (dove_divider_clk_init+0x12c/0x190)
[    0.000000] [<c0d35580>] (dove_divider_clk_init) from [<c0d353c8>] (dove_clk_init+0x4c/0x74)
[    0.000000] [<c0d353c8>] (dove_clk_init) from [<c0d3353c>] (of_clk_init+0x184/0x240)
[    0.000000] [<c0d3353c>] (of_clk_init) from [<c0d04004>] (time_init+0x20/0x2c)
[    0.000000] [<c0d04004>] (time_init) from [<c0d00d14>] (start_kernel+0x2f8/0x4c4)
[    0.000000] [<c0d00d14>] (start_kernel) from [<00000000>] (  (null))
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000008] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.007836] Switching to timer-based delay loop, resolution 6ns
[    0.014595] Console: colour dummy device 80x30
[    0.019110] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.029632] pid_max: default: 32768 minimum: 301
[    0.034511] Security Framework initialized
[    0.038765] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.045371] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.053568] CPU: Testing write buffer coherency: ok
[    0.058518] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.068362] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.128015] Setting up static identity map for 0x100000 - 0x100060
[    0.135077] Hierarchical SRCU implementation.
[    0.177903] smp: Bringing up secondary CPUs ...
[    0.182423] smp: Brought up 1 node, 1 CPU
[    0.186413] SMP: Total of 1 processors activated (333.33 BogoMIPS).
[    0.192718] CPU: All CPU(s) started in SVC mode.
[    0.198489] devtmpfs: initialized
[    0.208175] VFP support v0.3: implementor 41 architecture 2 part 20 variant 9 rev 5
[    0.216721] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.226973] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.233536] prandom: seed boundary self test passed
[    0.242278] prandom: 100 self tests passed
[    0.246358] pinctrl core: initialized pinctrl subsystem
[    0.254586] NET: Registered protocol family 16
[    0.261147] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.268767] audit: initializing netlink subsys (disabled)
[    0.276981] audit: type=2000 audit(0.260:1): state=initialized audit_enabled=0 res=1
[    0.298231] cpuidle: using governor ladder
[    0.302463] cpuidle: using governor menu
[    0.306634] Dove 88AP510 SoC
[    0.309650] Tauros2: Disabling L2 prefetch.
[    0.313816] Tauros2: Disabling burst8 line fill.
[    0.318544] Tauros2: Enabling L2 cache.
[    0.322371] Tauros2: L2 cache support initialised in ARMv7 mode.
[    0.328840] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.439001] vgaarb: loaded
[    0.442086] SCSI subsystem initialized
[    0.448452] usbcore: registered new interface driver usbfs
[    0.453970] usbcore: registered new interface driver hub
[    0.460612] usbcore: registered new device driver usb
[    0.466522] media: Linux media interface: v0.10
[    0.471723] videodev: Linux video capture interface: v2.00
[    0.477807] pps_core: LinuxPPS API ver. 1 registered
[    0.483237] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.492591] PTP clock support registered
[    0.499320] clocksource: Switched to clocksource orion_clocksource
[    0.606619] VFS: Disk quotas dquot_6.6.0
[    0.610660] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.641602] NET: Registered protocol family 2
[    0.647216] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.655633] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.663044] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.669615] TCP: Hash tables configured (established 8192 bind 8192)
[    0.676059] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.682062] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.688674] NET: Registered protocol family 1
[    0.723856] RPC: Registered named UNIX socket transport module.
[    0.729841] RPC: Registered udp transport module.
[    0.734523] RPC: Registered tcp transport module.
[    0.739206] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.745919] Unpacking initramfs...
[    1.351766] Freeing initrd memory: 7748K
[    1.355917] NetWinder Floating Point Emulator V0.97 (double precision)
[    1.365621] Initialise system trusted keyrings
[    1.371326] Key type blacklist registered
[    1.375525] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    1.382173] zbud: loaded
[    1.395917] NFS: Registering the id_resolver key type
[    1.401189] Key type id_resolver registered
[    1.405350] Key type id_legacy registered
[    1.409427] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.416100] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    1.422809] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.430513] orangefs_debugfs_init: called with debug mask: :none: :0:
[    1.437138] orangefs_init: module version upstream loaded
[    1.450298] Key type asymmetric registered
[    1.454384] Asymmetric key parser 'x509' registered
[    1.459436] bounce: pool size: 64 pages
[    1.463429] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[    1.471173] io scheduler noop registered
[    1.475076] io scheduler deadline registered
[    1.479481] io scheduler cfq registered (default)
[    1.486750] dove-pinctrl f10d0200.pin-ctrl: falling back to hardcoded PMU resource
[    1.495526] dove-pinctrl f10d0200.pin-ctrl: [Firmware Bug]: Missing pinctrl regs in DTB. Please update your firmware.
[    1.506989] dove-pinctrl f10d0200.pin-ctrl: registered pinctrl driver
[    1.520644] mvebu-pcie mbus:pcie: PCI host bridge to bus 0000:00
[    1.526639] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    1.533073] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    1.540148] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.547883] PCI: bus0: Fast back to back transfers disabled
[    1.553708] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.561810] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.571471] PCI: bus1: Fast back to back transfers enabled
[    1.578661] PCI: bus2: Fast back to back transfers enabled
[    1.584258] pci 0000:00:01.0: PCI bridge to [bus 01]
[    1.589215] pci 0000:00:02.0: PCI bridge to [bus 02]
[    1.595542] mv_xor f1060800.dma-engine: Marvell shared XOR driver
[    1.660611] mv_xor f1060800.dma-engine: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.668969] mv_xor f1060900.dma-engine: Marvell shared XOR driver
[    1.730604] mv_xor f1060900.dma-engine: Marvell XOR (Registers Mode): ( xor cpy intr )
[    1.893696] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.904415] console [ttyS0] disabled
[    1.908868] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 21, base_baud = 10416666) is a 16550A
[    1.918129] console [ttyS0] enabled
[    1.918129] console [ttyS0] enabled
[    1.925364] bootconsole [earlycon0] disabled
[    1.925364] bootconsole [earlycon0] disabled
[    1.935309] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 22, base_baud = 10416666) is a 16550A
[    1.946848] sata_mv f10a0000.sata-host: slots 32 ports 1
[    1.964892] scsi host0: sata_mv
[    1.968666] ata1: SATA max UDMA/133 irq 33
[    1.975285] m25p80 spi0.0: found mx25l1606e, expected sst25vf080b
[    1.981545] m25p80 spi0.0: mx25l1606e (2048 Kbytes)
[    1.987028] 4 cmdlinepart partitions found on MTD device spi0.0
[    1.993897] Creating 4 MTD partitions on "spi0.0":
[    1.998677] 0x000000000000-0x0000000c0000 : "uboot"
[    2.005288] 0x0000000c0000-0x000000100000 : "uboot_env"
[    2.012414] 0x000000100000-0x0000001c0000 : "uboot2"
[    2.019191] 0x0000001c0000-0x000000200000 : "kernel"
[    2.029631] libphy: Fixed MDIO Bus: probed
[    2.037825] libphy: orion_mdio_bus: probed
[    2.051213] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    2.150798] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:05:35:06:33:d4
[    2.160851] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.167373] ehci-pci: EHCI PCI platform driver
[    2.172479] ehci-orion: EHCI orion driver
[    2.176672] orion-ehci f1050000.usb-host: EHCI Host Controller
[    2.182683] orion-ehci f1050000.usb-host: new USB bus registered, assigned bus number 1
[    2.191125] orion-ehci f1050000.usb-host: irq 26, io mem 0xf1050000
[    2.219360] orion-ehci f1050000.usb-host: USB 2.0 started, EHCI 1.00
[    2.226029] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.18
[    2.234318] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.241557] usb usb1: Product: EHCI Host Controller
[    2.246416] usb usb1: Manufacturer: Linux 4.18.5-mvebu-tld-1 ehci_hcd
[    2.252876] usb usb1: SerialNumber: f1050000.usb-host
[    2.258799] hub 1-0:1.0: USB hub found
[    2.262824] hub 1-0:1.0: 1 port detected
[    2.267650] orion-ehci f1051000.usb-host: EHCI Host Controller
[    2.273818] orion-ehci f1051000.usb-host: new USB bus registered, assigned bus number 2
[    2.282058] orion-ehci f1051000.usb-host: irq 27, io mem 0xf1051000
[    2.298472] random: fast init done
[    2.301927] ata1: SATA link down (SStatus 0 SControl F300)
[    2.309369] orion-ehci f1051000.usb-host: USB 2.0 started, EHCI 1.00
[    2.315994] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.18
[    2.324291] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.331511] usb usb2: Product: EHCI Host Controller
[    2.336367] usb usb2: Manufacturer: Linux 4.18.5-mvebu-tld-1 ehci_hcd
[    2.342801] usb usb2: SerialNumber: f1051000.usb-host
[    2.348641] hub 2-0:1.0: USB hub found
[    2.352648] hub 2-0:1.0: 1 port detected
[    2.358234] usbcore: registered new interface driver usblp
[    2.364522] usbcore: registered new interface driver usb-storage
[    2.371297] mousedev: PS/2 mouse device common for all mice
[    2.378467] rtc-mv f10d8500.real-time-clock: rtc core: registered f10d8500.real-time-clock as rtc0
[    2.388495] i2c /dev entries driver
[    2.395625] orion_wdt: Initial timeout 25 sec
[    2.404935] marvell-cesa f1030000.crypto-engine: CESA device successfully registered
[    2.413506] hidraw: raw HID events driver (C) Jiri Kosina
[    2.420207] usbcore: registered new interface driver usbhid
[    2.425752] usbhid: USB HID core driver
[    2.430792] drop_monitor: Initializing network drop monitor service
[    2.437561] NET: Registered protocol family 10
[    2.453702] Segment Routing with IPv6
[    2.457450] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.465833] NET: Registered protocol family 17
[    2.470884] 8021q: 802.1Q VLAN Support v1.8
[    2.475099] Key type dns_resolver registered
[    2.479826] ThumbEE CPU extension supported.
[    2.484091] Registering SWP/SWPB emulation handler
[    2.490011] registered taskstats version 1
[    2.494095] Loading compiled-in X.509 certificates
[    2.498938] zswap: loaded using pool lzo/zbud
[    2.523012] Key type big_key registered
[    2.535945] Key type encrypted registered
[    2.543553] rtc-mv f10d8500.real-time-clock: setting system clock to 2025-12-13 03:34:14 UTC (1765596854)
[    2.556701] Freeing unused kernel memory: 1024K
[    2.563842] Checked W+X mappings: passed, no W+X pages found
Loading, please wait...
[    2.629449] usb 1-1: new high-speed USB device number 2 using orion-ehci
starting version 232
[    2.692524] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.708991] random: udevadm: uninitialized urandom read (16 bytes read)
[    2.716426] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.723649] usb 2-1: new high-speed USB device number 2 using orion-ehci
[    2.851251] usb 1-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=32.98
[    2.869412] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.876523] usb 1-1: Product: USB2.0 Hub
[    2.899131] hub 1-1:1.0: USB hub found
[    2.909895] hub 1-1:1.0: 4 ports detected
[    2.951303] usb 2-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=32.98
[    2.969455] usb 2-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.976567] usb 2-1: Product: USB2.0 Hub
[    2.998453] hub 2-1:1.0: USB hub found
[    3.010612] hub 2-1:1.0: 4 ports detected
[    3.359596] i2c i2c-0: Added multiplexed i2c bus 1
[    3.379765] i2c i2c-0: Added multiplexed i2c bus 2
[    3.411267] i2c i2c-0: Added multiplexed i2c bus 3
[    3.419417] usb 1-1.1: new high-speed USB device number 3 using orion-ehci
[    3.531108] sdhci: Secure Digital Host Controller Interface driver
[    3.537298] sdhci: Copyright(c) Pierre Ossman
[    3.577317] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.584996] usb 1-1.1: New USB device found, idVendor=8564, idProduct=1000, bcdDevice=11.00
[    3.599383] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.606702] usb 1-1.1: Product: Mass Storage Device
[    3.619770] mmc0 bounce up to 128 segments into one, max segment size 65536 bytes
[    3.627400] usb 1-1.1: Manufacturer: JetFlash
[    3.634341] usb 1-1.1: SerialNumber: 17FFN7GE2ZIDHTYT
[    3.645744] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    3.673845] scsi host1: usb-storage 1-1.1:1.0
[    3.682040] mmc0: SDHCI controller on f1090000.sdio-host [f1090000.sdio-host] using DMA
[    3.706392] sdhci-dove f1092000.sdio-host: Got CD GPIO
[    3.725060] mmc1 bounce up to 128 segments into one, max segment size 65536 bytes
[    3.785749] mmc1: SDHCI controller on f1092000.sdio-host [f1092000.sdio-host] using DMA
[    4.964686] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[    5.044499] scsi 1:0:0:0: Direct-Access     JetFlash Transcend 16GB   1100 PQ: 0 ANSI: 4
[    5.059681] sd 1:0:0:0: [sda] 30818304 512-byte logical blocks: (15.8 GB/14.7 GiB)
[    5.074099] sd 1:0:0:0: [sda] Write Protect is off
[    5.084278] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    5.109413]  sda: sda1 sda2 sda3
[    5.120541] sd 1:0:0:0: [sda] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda3] fsck.ext4 -a -C0 /dev/sda3 
rootfs: clean, 142178/930240 files, 1245377/3720960 blocks
done.
[   15.275233] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Setting hostname to 'debian'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[....] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[   18.219600] sd 1:0:0:0: Attached scsi generic sg0 type 0
done.
[....] Activating swap:swapon: /dev/sda2: found signature [page[   21.020455] Adding 262140k swap on /dev/sda2.  Priority:-2 extents:1 across:262140k FS
size=4096, signature=swap]
swapon: /dev/sda2: pagesize=4096, swapsize=268435456, devsize=268435456
swapon /dev/sda2
. ok 
[   21.189580] EXT4-fs (sda3): re-mounted. Opts: (null)
[....] Will now activate lvm and md swap:[   22.019449] random: crng init done
[   22.022978] random: 7 urandom warning(s) missed due to ratelimiting
swapon: /dev/sda2: already active -- ignored
done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
/dev/disk/by-label/rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable.. ok 
[....] Cleaning up temporary files...[....] Cleaning /tmp...done.
 /tmp. ok 
[....] Will now mount local filesystems:. ok 
[....] Will now activate swapfile swap:swapon: /dev/sda2: already active -- ignored
done.
[....] Checking minimum space in /tmp...done.
[....] Cleaning up temporary files.... ok 
[....] Setting kernel variables...done.
[....] Initializing random number generator...done.
[   24.365025] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   24.400148] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   24.408217] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   24.417003] cfg80211: failed to load regulatory.db
[   24.770426] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...eth0: waiting for carrier
[   27.764020] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   27.773878] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
eth0: carrier acquired
eth0: adding address fe80::9021:ca8:dc86:fc65
DUID 00:01:00:01:23:66:d2:86:aa:6f:7b:d1:ea:4e
eth0: IAID 35:06:33:d4
eth0: soliciting a DHCP lease
eth0: soliciting an IPv6 router
eth0: offered 192.168.178.115 from 192.168.178.1
eth0: probing address 192.168.178.115/24
eth0: Router Advertisement from fe80::ca0e:14ff:fec3:ea8c
eth0: adding address 2a01:c22:3422:1900:e03:f169:17e6:3e97/64
eth0: adding route to 2a01:c22:3422:1900::/64
eth0: adding default route via fe80::ca0e:14ff:fec3:ea8c
eth0: no useable IA found in lease
eth0: dhcp6_readlease: /var/lib/dhcpcd5/dhcpcd-eth0.lease6: No such process
eth0: soliciting a DHCPv6 lease
eth0: REPLY6 received from fe80::ca0e:14ff:fec3:ea8c
eth0: adding address 2a01:c22:3422:1900:9021:ca8:dc86:fc65/128
eth0: renew in 1800 seconds, rebind in 2880 seconds
forked to background, child pid 2354
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
[....] Setting sensors limits...No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
done.
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Not running dhcpcd because there is aleady an interface specific instance ... failed!
[....] /var/run/dhcpcd-eth0.pid ... failed!
[....] Starting system logging: syslog-ng. ok 
[....] Starting periodic command scheduler: cron. ok 
[....] Starting system message bus: dbus. ok 
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Starting NTP server: ntpd. ok 
[....] Not starting S.M.A.R.T. daemon smartd, disabled via /etc/default/smartmontools ... (warning).
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Running local boot scripts (/etc/rc.local). ok 
[....] startpar: service(s) skipped, program is not configured: dhcpcd ... (warning).

Debian GNU/Linux 9 debian ttyS0

Re: Chip PC LXD8941
October 27, 2018 04:58PM
pengu,

Look like a very good boot log!

Please try listing the envs in serial console and then in Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
October 27, 2018 05:32PM
from u-boot (saved before changed, see above):


MIC>> printenv
bootdelay=0
baudrate=115200
loads_echo=0
in_mfg=no
ub_mfgphase=0000000
mb_sn=00000000
mtdids=nand0=dove-mtd
arcNumber=1789
CASset=min
MALLOC_len=5
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::dove:eth0:none
image_name=uImage
sataargs=root=/dev/sda1 rw init=/init video=dovefb:lcd0:1024x768-24@60,lcd1:1024x768-16@60 clcd.lcd0_enable=1 clcd.lcd1_enable=1
sataboot=ide reset;ext2load ide 0:1 0x2000000 /boot/uImage; setenv bootargs ${mtdparts}  ${sataargs};  bootm 0x2000000
usbboot=usb start; sleep 3; ext2load usb 0:1 0x2000000 /boot/uImage; run usbargs;bootm 0x2000000
disaMvPnp=no
usb0Mode=host
usb1Mode=host
yuk_ethaddr=00:00:00:EE:51:81
autoload=no
lcd1_enable=1
ethact=egiga0
rootpath=/work/armel-dev
lcd0_enable=1
nfsboot=tftpboot 0x2000000 uImage521g; setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=dhcp usb0Mode=$(usb0Mode) usb1Mode=$(usb1Mode) video=dovefb:lcd0:$(lc0
load_addr=0x2000000
bootcmd_prev=ide reset; ext2load ide 0:2 0x3000000 tffsg; setenv bootargs $(console) ip=dhcp usb0Mode=$(usb0Mode) usb1Mode=$(usb1Mode) video=dovefb:lcd0:$(lcd0_params),lcd1:$(lcd1_params)0
gatewayip=192.168.9.1
netmask=255.255.255.0
ipaddr=192.168.9.96
serverip=192.168.9.90
bootargs=console=tty0,115200 mtdparts=spi0.0:768k(u-boot),256k(uboot_env),768k(u-boot2),-(unused) rootdelay=6 cpufreq_disable pm_disable usb0Mode=host usb1Mode=host video=dovefb:lcd0:10241
boottest=ide reset; ext2load ide 0:2 0x3000000 uImage; setenv bootargs $(console) $(mtdparts) ip=dhcp usb0Mode=$(usb0Mode) usb1Mode=$(usb1Mode) video=dovefb:lcd0:$(lcd0_params),lcd1:$(lcd0
bootcmd2=usb reset; ext2load usb 0:2 0x3000000 uImage; setenv bootargs $(console) mtdparts=spi0.0:768k(u-boot),256k(uboot_env),768k(u-boot2),-(unused) rootdelay=6 cpufreq_disable pm_disab0
lcd0_params=1024x768-24@60-edid
lcd1_params=1024x768-24@60-edid
bootide=ide reset; ext2load ide 0:2 0x3000000 uImage; setenv bootargs $(console) $(mtdparts) cpufreq_disable lcdseamless pm_disable usb0Mode=$(usb0Mode) usb1Mode=$(usb1Mode) video=dovefb:0
bootmmc=mmcinfo 0; ext2load mmc 0:2 0x3000000 tffsg; setenv bootargs $(console) mtdparts=spi0.0:768k(u-boot),256k(uboot_env),768k(u-boot2),-(unused) cpufreq_disable pm_disable usb0Mode=$(0
console=console=ttyS0,115200
mtdparts=mtdparts=spi0.0:768k(uboot),256k(uboot_env),768k(uboot2),-(kernel)
rootinit=root=initramfs init=/linuxrc
lcdargs=vmalloc=384MB video=dovefb:lcd0:1024x768-24@60,lcd1:1024x768-24@60 clcd.lcd0_enable=1 clcd.lcd1_enable=1
usbargs=usb0Mode=host usb1Mode=host useNandHal=ganged
bootusb=usb reset; ext2load usb 0:2 0x3000000 tffsg; setenv bootargs console=ttyS0,115200 mtdparts=spi0.0:768k(uboot),256k(uboot_env),768k(uboot2),-(kernel) root=initramfs init=/linuxrc v0
fileaddr=3000000
ethaddr=00:05:35:06:33:D4
bootcmd=run bootmmc
stdin=serial
stdout=lcd
stderr=lcd
passDramInitTag=yes
mainlineLinux=yes
enaMonExt=no
pexMode=RC
disL2Cache=no
disL2Ecc=no
sata_dma_mode=yes
enaL2ExtraFeatures=yes
enaCpuStream=no
enaVpuPower=yes
enaGpuPower=yes
filesize=C0434

Environment size: 3887/65532 bytes



Edited 1 time(s). Last edit at 10/27/2018 05:33PM by pengu.
Re: Chip PC LXD8941
November 02, 2018 05:05PM
I can list envs in Debian using the fw_env.config below. However I can only set envs using serial. Is there a way to be able to set envs from Debian?

Koen

root@debian:~# cat /etc/fw_env.config 
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1 0x000000 0x010000
Re: Chip PC LXD8941
November 02, 2018 05:50PM
Koen,

You need another number for "Flash sector size". That should be 64K.

root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1 0x000000 0x010000 0x10000

Be very careful, save your current envs in some notepad. Because in the boot log, it shows a CRC message that migh be to indicate they use something other than standard. So if Debian fw_setenv CRC stores a different expected value, then it will wipe out your envs as stock u-boot is concerned. You would have to restore them in serial console, or worse, it might brick your box if stock u-boot was harded code in some way to check that and stop running.

SF: Detected MX25L1605D with page size 256, total 2097152 bytes
***   env_relocate_spec ****
*** Warning    environment  crc cae2a0b3  cae2a0b3 fffc.****
Warning: clock source is too slow.Try smaller resolution.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
November 03, 2018 08:57AM
Hi bodhi,

I've adjusted the fw_env.config file but can not modify envs from Debian. It does not really matter since I've got serial connection but I would like to understand why it is not possible. I've tried flash_unlock but this doesn't make a difference. Is it locked down in uboot by the manufacturer? Or do need to do a chmod on /dev/mtd1?

Koen
Re: Chip PC LXD8941
November 03, 2018 04:38PM
Hi Koen,

Let's summarize the current mtd info, and set a test variable.

dmesg | grep -i10 'mtd partition'
cat /proc/cmdline
cat /proc/mtd
cat /ect/fw_env.config
fw_setenv test 1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
November 03, 2018 05:30PM
Ok here are the outputs.

root@debian:~# dmesg | grep -i10 'mtd partition'
[    1.774725] console [ttyS0] enabled
[    1.781845] bootconsole [earlycon0] disabled
[    1.791580] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 22, base_baud = 10416666) is a 16550A
[    1.802556] sata_mv f10a0000.sata-host: version 1.28
[    1.802719] sata_mv f10a0000.sata-host: slots 32 ports 1
[    1.820391] scsi host0: sata_mv
[    1.824075] ata1: SATA max UDMA/133 irq 33
[    1.830212] m25p80 spi0.0: found mx25l1606e, expected sst25vf080b
[    1.836291] m25p80 spi0.0: mx25l1606e (2048 Kbytes)
[    1.842711] 4 cmdlinepart partitions found on MTD device spi0.0
[    1.848678] Creating 4 MTD partitions on "spi0.0":
[    1.853457] 0x000000000000-0x0000000c0000 : "uboot"
[    1.859933] 0x0000000c0000-0x000000100000 : "uboot_env"
[    1.866714] 0x000000100000-0x0000001c0000 : "uboot2"
[    1.873307] 0x0000001c0000-0x000000200000 : "kernel"
[    1.882598] libphy: Fixed MDIO Bus: probed
[    1.890466] libphy: orion_mdio_bus: probed
[    1.902355] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    2.009644] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:05:35:09:92:9a
[    2.019500] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.026020] ehci-pci: EHCI PCI platform driver
root@debian:~#

root@debian:~# cat /proc/cmdline
console=ttyS0,115200 root=LABEL=rootfsSD rootdelay=10 mtdparts=spi0.0:768k(uboot),256k(uboot_env),768k(uboot2),-(kernel) earlyprintk=serial
root@debian:~#

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000c0000 00001000 "uboot"
mtd1: 00040000 00001000 "uboot_env"
mtd2: 000c0000 00001000 "uboot2"
mtd3: 00040000 00001000 "kernel"
root@debian:~#

root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1 0x000000 0x010000 0x010000
root@debian:~#

root@debian:~# fw_setenv test 1
root@debian:~# fw_printenv | grep test
root@debian:~# 
Re: Chip PC LXD8941
November 03, 2018 05:58PM
I have a suspicion that our flash definition is not correct in DTS.

Let's try 4K erase size first.

root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1 0x000000 0x010000 0x1000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
November 04, 2018 01:11PM
Hi bodhi,

still can't save envs from Debian.

Koen

root@debian:~# cat /etc/fw_env.config 
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd1 0x000000 0x010000 0x1000
root@debian:~# 
root@debian:~# fw_setenv koen test
root@debian:~# 
root@debian:~# fw_printenv | grep koen
root@debian:~# 
Re: Chip PC LXD8941
November 04, 2018 04:52PM
Koen,

> still can't save envs from Debian.

OK. I'll look for this SPI chip again to see if we need to adjust the DTS. I did not think that 4k versus 64k was relevant for this, but just wanted to see the test.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
November 05, 2018 04:15PM
Koen,

According to your stock u-boot log in the 1st post, the SPI chip is actually MX25L1605D.

SF: Detected MX25L1605D with page size 256, total 2097152 bytes

I'll change the DTS to that chip and will see what happen.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Chip PC LXD8941
November 05, 2018 05:49PM
Hi bodhi,

the number on the chip says macronix MX25L1606E which corresponds with the current kernel dmesg. However you are correct that the stock kernel detects it differently.

Koen


stock:

[   27.165642] m25p80 spi0.0: mx25l1605d (2048 Kbytes)


current:

[    1.830166] m25p80 spi0.0: found mx25l1606e, expected sst25vf080b
Re: Chip PC LXD8941
November 05, 2018 09:06PM
Koen,

Autodection of the SPI chip is OK, providing that it matches what we expected. The new kernel apparently misidentified the chip type (I think I'd trust stock u-boot and kernel for the correct info).

Here is the new DTB attached.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - dove-chip-lxd8941.dtb (13.6 KB)
open | download - dove-chip-lxd8941.dts (1.8 KB)
johnn
Re: Debian on Chip PC LXD8941
January 03, 2019 03:27PM
Do anyone have the pin layout for this device, i am trying to connect via a ftdi ttl 3.3v cable to this device, but the terminal stays black all the the time.

i have tried reseting this device but the official reset method does not work..

thanks
Re: Debian on Chip PC LXD8941
January 04, 2019 02:33PM
Inside there is both a 4 pin and a 6 pin header. The 4 pin is the UART connection. With the power button towards you and the DVI connection away from you the connections are as follows: GND, TX, RX, VCC (from left to right).
Marvin
Re: Debian on Chip PC LXD8941
February 09, 2019 06:01PM
Hi,

I'm new to the whole uBoot and dtb stuff, any short pointers how to use the right dtb?

I already tried to attach it to the zImage and converted it to an uImage, but the dtb doesn't seem to be found...

## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-4.20.6-mvebu-tld-1
   Created:      2019-02-09  23:44:38 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4589848 Bytes =  4.4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
   Image Name:   initramfs-4.20.6-mvebu-tld-1
   Created:      2019-02-09  23:11:56 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    20276386 Bytes = 19.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

EUGENE lcd_disable
EUGENE lcd_panel_disable
Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x000006fd, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Berlin
ffffffff        Marvell Armada 39x (Device Tree)
ffffffff        Marvell Armada 380/385 (Device Tree)
ffffffff        Marvell Armada 375 (Device Tree)
ffffffff        Marvell Armada 370/XP (Device Tree)
ffffffff        Marvell Dove

Please check your kernel config and/or bootloader.

Re: Debian on Chip PC LXD8941
February 09, 2019 07:52PM
Marvin,

The error indicated that you did not have a DTB.

Post the log of how you prepared the uImage and list the files in folder /boot. Assuming this rootfs is mounted as /media/sdb1 on another Linux box,

ls -lart /media/sdb1/boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Marvin
Re: Debian on Chip PC LXD8941
February 09, 2019 08:24PM
-rw-r--r--  1 root root   155806 Jul 30  2017 config-4.12.4-mvebu-tld-1
-rwxr-xr-x  1 root root  4021296 Jul 30  2017 zImage-4.12.4-mvebu-tld-1
-rw-------  1 root root  4021296 Jul 30  2017 vmlinuz-4.12.4-mvebu-tld-1
-rw-------  1 root root  2615209 Jul 30  2017 System.map-4.12.4-mvebu-tld-1
-rw-r--r--  1 root root  8525990 Jul 30  2017 linux-headers-4.12.4-mvebu-tld-1_1.0_armhf.deb
-rwxr-xr-x  1 root root  4589848 Feb  6 00:15 zImage-4.20.6-mvebu-tld-1
drwxr-xr-x  6 root root     4096 Feb  6 00:26 linux-image-4.20.6_deb
-rw-r--r--  1 root root 20190276 Feb  6 00:26 linux-image-4.20.6-mvebu-tld-1_1.0_armhf.deb
-rw-r--r--  1 root root  9387008 Feb  6 00:28 linux-headers-4.20.6-mvebu-tld-1_1.0_armhf.deb
drwxr-xr-x  2 root root     4096 Feb  6 01:15 dts
-rw-r--r--  1 root root   921600 Feb  6 01:18 linux-dtb-4.20.6-mvebu-tld-1.tar
-rw-r--r--  1 root root    67443 Feb  7 22:26 linux-4.20.6-mvebu-tld-1.patch
-rw-r--r--  1 root root    13880 Feb  9 13:20 dove-chip-lxd8941.dtb
drwxrwxrwx 22 root root     4096 Feb  9 22:28 ..
-rw-r--r--  1 root root   174269 Feb  9 22:42 config-4.20.6-mvebu-tld-1
-rw-------  1 root root  2975213 Feb  9 22:42 System.map-4.20.6-mvebu-tld-1
-rw-------  1 root root  4589848 Feb  9 22:42 vmlinuz-4.20.6-mvebu-tld-1
-rw-r--r--  1 root root 16636416 Feb  9 22:46 initrd.img-4.12.4-mvebu-tld-1
drwxr-xr-x  4 root root     4096 Feb  9 22:57 .
-rw-r--r--  1 root root 20276386 Feb  9 23:09 initrd.img-4.20.6-mvebu-tld-1
-rw-r--r--  1 root root 20276450 Feb  9 23:13 uInitrd
-rwxr-xr-x  1 root root  4603725 Feb  9 23:44 zImage
-rw-r--r--  1 root root  4589912 Feb  9 23:44 uImage

I first tried with the 4.12 kernel, then with the 4.20... However, I tried to install the 4.20 kernel from my linux box. I created the initrd, but I'm not sure if mkinitramfs worked the way I intended (with the -r option setting /mnt/sdg1 as root...)

I have the Chippc dtb in the dts folder.
Re: Debian on Chip PC LXD8941
February 10, 2019 04:04AM
Marvin,

-rw-r--r--  1 root root  4589912 Feb  9 23:44 uImage

That uImage does not seem to be the right size. Should be 4603789 bytes.

Could you try again and post what you did here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: