Re: Shuttle KS10 January 17, 2022 01:09PM |
Registered: 2 years ago Posts: 82 |
Quote
It has a Power button?
Quote
the correct Power Off GPIO (if it is indeed using GPIO).
Quote
Unfortunately the stock boot log does not show the SPI flash chip name.
Shuttle>> sf probe 0 1024 KiB EN25Q80 at 0:0 is now current device
Re: Shuttle KS10 January 17, 2022 04:18PM |
Admin Registered: 13 years ago Posts: 18,898 |
Quote
>>Quote
the correct Power Off GPIO (if it is indeed
> using GPIO).
> What are the other options?
Quote
>>Quote
Unfortunately the stock boot log does not
> show the SPI flash chip name.
> u-boot has some information
>
>> Shuttle>> sf probe 0 > 1024 KiB EN25Q80 at 0:0 is now current device >
/* Flashes that can't be detected using JEDEC */ {"m25p05-nonjedec"}, {"m25p10-nonjedec"}, {"m25p20-nonjedec"}, {"m25p40-nonjedec"}, {"m25p80-nonjedec"}, {"m25p16-nonjedec"}, {"m25p32-nonjedec"}, {"m25p64-nonjedec"}, {"m25p128-nonjedec"},
Quote
[ 5.737484][ T1] spi-nor spi0.0: unrecognized JEDEC id bytes: 1c 31 14 1c 31 14
Re: Shuttle KS10 January 18, 2022 10:03AM |
Registered: 2 years ago Posts: 82 |
[ 5.755449] spi-nor spi0.0: m25p80-nonjedec (1024 Kbytes) [ 5.762066] 3 fixed-partitions partitions found on MTD device spi0.0 [ 5.769502] Creating 3 MTD partitions on "spi0.0": [ 5.775033] 0x000000000000-0x0000000c0000 : "u-boot" [ 5.782978] 0x0000000c0000-0x0000000d0000 : "u-boot-env" [ 5.792399] 0x0000000d0000-0x000000100000 : "unused"
ethtool -s eth0 wol genables it. Unfortunately it doesn't work when the box has lost it's power in between. According to my switch it has no link in that case, so it's not just an unknown MAC address.
echo `date '+%s' -d '+ 1 minutes'` > /sys/class/rtc/rtc0/wakealarm ; poweroffswitches off the box, and it restarts after 1 minute. This survives a power cycle.
Re: Shuttle KS10 January 18, 2022 11:08AM |
Registered: 2 years ago Posts: 82 |
Quote
Shuttle>> bootm ## Booting kernel from Legacy Image at 02000000 ... Image Name: ARM OpenWrt Linux-5.10.90 Created: 2022-01-13 8:33:29 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5087137 Bytes = 4.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... DTB:0x004DEBE8 (0x000033B9) C:0x000080C0-0x004E2040->0x0119D200-0x01677180 DTB:0x01673D28 (0x00003452) Uncompressing Linux... done, booting the kernel.
C:0x000080C0-0x004E2040->0x0119D200-0x01677180Both ranges are 5087104 bytes in size, so I suppose the decompressor moves the compressed kernel from 0x000080C0 to 0x0119D200, and decompresses it back. According to binwalk the decompressed kernel is 18433664 bytes (there is an initramfs inside), so the address 0x0119D200 (18469376) should fit, but there is not much room left.
Re: Shuttle KS10 January 18, 2022 05:01PM |
Admin Registered: 13 years ago Posts: 18,898 |
> ethtool -s eth0 wol g >> enables it. Unfortunately it doesn't work when the
> echo `date '+%s' -d '+ 1 minutes'` > > /sys/class/rtc/rtc0/wakealarm ; poweroff >> switches off the box, and it restarts after 1
Re: Shuttle KS10 January 18, 2022 06:46PM |
Admin Registered: 13 years ago Posts: 18,898 |
> C:0x000080C0-0x004E2040->0x0119D200-0x01677180 >> Both ranges are 5087104 bytes in size, so I
Re: Shuttle KS10 January 22, 2022 03:29AM |
Registered: 2 years ago Posts: 82 |
Using egiga0 device TFTP from server 172.20.172.252; our IP address is 172.20.172.169 Filename 'openwrt-mvebu-cortexa9-globalscale_mirabox-initramfs-kernel.bin'. Load address: 0x6400000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ###################### done Bytes transferred = 5087201 (4d9fe1 hex) Shuttle>> bootm 0x06400000 ## Booting kernel from Legacy Image at 06400000 ... Image Name: ARM OpenWrt Linux-5.10.90 Created: 2022-01-13 8:33:29 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 5087137 Bytes = 4.9 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... DTB:0x004DEBE8 (0x000033B9) C:0x000080C0-0x004E2040->0x0119D200-0x01677180 DTB:0x01673D28 (0x00003452) Uncompressing Linux... done, booting the kernel.
Re: Shuttle KS10 January 22, 2022 04:22AM |
Registered: 2 years ago Posts: 82 |
Quote
Nice! it makes sense (with its own battery).
Quote
This u-boot is too old.
Quote
Did you use the SPI mtd dump for kwboot
kwboot -b spidump -p -a -t /dev/ttyUSB0 Sending boot message. Please reboot the target...- Sending boot image... Booting from SPI flash DDR3 Training Sequence - Ver 2.3.5 DDR3 Training Sequence - Ended Successfully 0 % [+xmodem: Protocol error
kwboot -b recover.bin -p -a -t /dev/ttyUSB0 Sending boot message. Please reboot the target...| Sending boot image... 0 % [......................................................................] 1 % [......................................................................] 2 % [......................................................................] 3 % [......................................................................] 4 % [......................................................................] 6 % [......................................................................] 7 % [......................................................................] 8 % [.................................................^C
kwboot -b spidump -p -a -t /dev/ttyUSB0 spidump: Invalid image.
Re: Shuttle KS10 January 22, 2022 05:46AM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Shuttle KS10 January 22, 2022 09:55AM |
Registered: 2 years ago Posts: 82 |
./kwboot -b spidump -t /dev/ttyUSB0 kwboot version 2022.01-00673-g70fe7827f2-dirty Patching image boot signature to UART Aligning image header to Xmodem block size Sending boot message. Please reboot the target.../ Waiting 2s and flushing tty Sending boot image header (59648 bytes)... 0 % [......................................................................] <snip> 75 % [......................................................................] 90 % [.............................................. ] Done DDR3 Training Sequence - Ver 2.3.5 DDR3 Training Sequence - Ended Successfully Sending boot image data (674628 bytes)... 0 % [......................................................................] <snip> 98 % [......................................................................] 99 % [..................... ] Done Finishing transfer [Type Ctrl-\ + c to quit] _ _ _ _ | | | | | | | | ___| |__ _ _| |_| |_| | ___ / __| '_ \| | | | __| __| |/ _ \ \__ \ | | | |_| | |_| |_| | __/ |___/_| |_|\__,_|\__|\__|_|\___| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** LOADER ** U-Boot 2009.08 ( 9月 25 2013 - 16:20:16)Marvell version: 1.1.3 NQ <snip>
./kwboot -b spidump2 -t /dev/ttyUSB0 kwboot version 2022.01-00673-g70fe7827f2-dirty spidump2: Invalid image.
and editsQuote
The command-line arguments provided by the boot loader will be
appended to a new device tree property: bootloader-args.
If there is a property "append-rootblock" in DT under /chosen
and a root= option in bootloaders command line it will be parsed
and added to DT bootargs with the form: <append-rootblock>XX.
Only command line ATAG will be processed, the rest of the ATAGs
sent by bootloader will be ignored.
This is usefull in dual boot systems, to get the current root partition
without afecting the rest of the system.
arch/arm/Kconfig | 11 ++++ arch/arm/boot/compressed/atags_to_fdt.c | 85 ++++++++++++++++++++++++- init/main.c | 16 +++++
Re: Shuttle KS10 January 22, 2022 04:25PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Shuttle KS10 January 22, 2022 04:56PM |
Admin Registered: 13 years ago Posts: 18,898 |
kwboot: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=14a40583f5233440e98814a1843c6c5a73ef80a9, for GNU/Linux 3.2.0, not stripped
Re: Shuttle KS10 January 23, 2022 07:13AM |
Registered: 2 years ago Posts: 82 |
#ifndef CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE else if (atag->hdr.tag == ATAG_MEM) { if (memcount >= sizeof(mem_reg_property)/4) continue; if (!atag->u.mem.size) continue; memsize = get_cell_size(fdt); if (memsize == 2) { /* if memsize is 2, that means that * each data needs 2 cells of 32 bits, * so the data are 64 bits */ __be64 *mem_reg_prop64 = (__be64 *)mem_reg_property; mem_reg_prop64[memcount++] = cpu_to_fdt64(atag->u.mem.start); mem_reg_prop64[memcount++] = cpu_to_fdt64(atag->u.mem.size); } else { mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start); mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size); }
DTB:0x01673BD0 (0x00003402) Uncompressing Linux... done, booting the kernel. [ 0.000000] Booting Linux on physical CPU 0x0
asmlinkage __visible void __init __no_sanitize_address start_kernel(void) { char *command_line; char *after_dashes; set_task_stack_end_magic(&init_task); smp_setup_processor_id();
else if (atag->hdr.tag == ATAG_MEM) { if (memcount >= sizeof(mem_reg_property)/4) continue; if (!atag->u.mem.size) continue; memsize = get_cell_size(fdt); if (memsize == 2) { /* if memsize is 2, that means that * each data needs 2 cells of 32 bits, * so the data are 64 bits */ __be64 *mem_reg_prop64 = (__be64 *)mem_reg_property; mem_reg_prop64[memcount++] = cpu_to_fdt64(atag->u.mem.start); mem_reg_prop64[memcount++] = cpu_to_fdt64(atag->u.mem.size); } else { mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start); mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size); } } <snip> } if (memcount) { setprop(fdt, "/memory", "reg", mem_reg_property, 4 * memcount * memsize); }
Re: Shuttle KS10 January 23, 2022 03:59PM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Shuttle KS10 January 25, 2022 10:10AM |
Registered: 2 years ago Posts: 82 |
Quote
You could try Willy's recover.bin with the new kwboot. It might boot.
$ ./kwboot -b recover.bin -t /dev/ttyUSB0 kwboot version 2022.01-00673-g70fe7827f2-dirty Sending boot message. Please reboot the target...| Waiting 2s and flushing tty Sending boot image header (48640 bytes)... 0 % [......................................................................] 18 % [......................................................................] 37 % [......................................................................] 55 % [......................................................................] 73 % [......................................................................] 92 % [.............................. ] Done
$ ./kwboot -f -b spidump.patched -t /dev/ttyUSB0 kwboot version 2022.01 sum32 260959006 != -336687930 Patching image boot signature to UART Aligning image header to Xmodem block size Sending boot message. Please reboot the target...| Waiting 2s and flushing tty Sending boot image header (59648 bytes)... 0 % [......................................................................] 15 % [......................................................................] 30 % [......................................................................] 45 % [......................................................................] 60 % [......................................................................] 75 % [......................................................................] 90 % [.............................................. ] Done DDR3 Training Sequence - Ver 2.3.5 DDR3 Training Sequence - Ended Successfully Sending boot image data (674628 bytes)... 0 % [......................................................................] 1 % [......................................................................] <snip> 98 % [......................................................................] 99 % [..................... ] Done Finishing transfer [Type Ctrl-\ + c to quit] _ _ _ _ | | | | | | | | ___| |__ _ _| |_| |_| | ___ / __| '_ \| | | | __| __| |/ _ \ \__ \ | | | |_| | |_| |_| | __/ |___/_| |_|\__,_|\__|\__|_|\___| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** LOADER ** Patched U-boot ( 9月 25 2013 - 16:20:16)Marvell version: 1.1.3 NQ
Quote
Does the KD22 boot with my Mirabox image?
Re: Shuttle KS10 January 25, 2022 04:25PM |
Admin Registered: 13 years ago Posts: 18,898 |
Quote
So I patched kwboot to patch the checksum of my patched dump
....
Patched U-boot ( 9月 25 2013 - 16:20:16)Marvell version: 1.1.3 NQ
Quote
/Edit: After removing the 'read_only' tag from the u-boot-env partition in the dts file, I was able to change the environment using fw_setenv, the box still booted :) , and the environment change survived a reboot.
Re: Shuttle KS10 January 28, 2022 02:17AM |
Registered: 2 years ago Posts: 82 |
Re: Shuttle KS10 January 28, 2022 03:54AM |
Admin Registered: 13 years ago Posts: 18,898 |
Re: Debian on Omninas Shuttle KS10 February 13, 2022 10:32AM |
Registered: 2 years ago Posts: 82 |
Re: Debian on Omninas Shuttle KS10 February 13, 2022 03:44PM |
Admin Registered: 13 years ago Posts: 18,898 |
CONFIG_POWER_RESET=y # CONFIG_POWER_RESET_BRCMKONA is not set # CONFIG_POWER_RESET_BRCMSTB is not set CONFIG_POWER_RESET_GPIO=y CONFIG_POWER_RESET_GPIO_RESTART=y CONFIG_POWER_RESET_LINKSTATION=m # CONFIG_POWER_RESET_LTC2952 is not set CONFIG_POWER_RESET_QNAP=y # CONFIG_POWER_RESET_REGULATOR is not set # CONFIG_POWER_RESET_RESTART is not set # CONFIG_POWER_RESET_VERSATILE is not set # CONFIG_POWER_RESET_SYSCON is not set # CONFIG_POWER_RESET_SYSCON_POWEROFF is not set
Re: Debian on Omninas Shuttle KS10 February 14, 2022 12:35PM |
Registered: 2 years ago Posts: 82 |
Re: Debian on Omninas Shuttle KS10 February 14, 2022 04:10PM |
Admin Registered: 13 years ago Posts: 18,898 |