DhanOS
03/01/2023, 12:18 AM_____ _ _ ____ ___ _ _ ____ ____ ___ ___
|_ _| | | | _ \|_ _| \ | |/ ___| | _ \|_ _| |_ \
| | | | | | |_) || || \| | | _ | |_) || | ) |
| | | |_| | _ < | || |\ | |_| | | _ / | | / /
|_| \___/|_| \_|___|_| \_|\____| |_| |___| |___|
Community Updates by DhanOS
I took the firmware and started performing updates and I'm just releasing the first version with more to come.
The first version, v0.1.0
contains:
- Added SSH root logins (an ability to log in via SSH without a need to do any changes using UART or adb shell)
- Set static MAC address (12:34:56:78:9A:BC
- later you'll be able to pick own MAC, especially useful with multiple boards)
- Added ntp
and ntpd
(automatic time synchronization from the internet)
- A few more smaller changes
Full changelog and initial TODO: https://github.com/daniel-kukiela/turing-pi2-community-firmware/blob/master/changelog.md
Project GitHub: https://github.com/daniel-kukiela/turing-pi2-community-firmware
Feel free to propose what updates would you like to see.BadOkami
03/01/2023, 9:14 AMDhanOS
03/01/2023, 9:41 AMBadOkami
03/01/2023, 9:50 AMDhanOS
03/01/2023, 9:54 AMBadOkami
03/01/2023, 9:58 AMDhanOS
03/01/2023, 10:03 AMwalkjivefly
03/01/2023, 6:21 PMwalkjivefly
03/01/2023, 6:22 PMDan D.
03/03/2023, 8:17 PMDan D.
03/03/2023, 8:21 PMDhanOS
03/03/2023, 8:24 PMDhanOS
03/03/2023, 8:26 PMDan D.
03/03/2023, 9:06 PMDhanOS
03/03/2023, 9:08 PMDan D.
03/03/2023, 9:26 PMDhanOS
03/03/2023, 9:27 PMscienceman
03/03/2023, 9:39 PMgunther2908
03/04/2023, 5:00 PMgunther2908
03/04/2023, 5:01 PMYann
03/04/2023, 7:21 PMDhanOS
03/04/2023, 7:30 PMuppe
03/05/2023, 10:00 PMuppe
03/05/2023, 10:02 PMDhanOS
03/05/2023, 10:02 PMDhanOS
03/05/2023, 10:03 PMuppe
03/05/2023, 10:04 PMDhanOS
03/05/2023, 10:04 PMuppe
03/05/2023, 10:06 PMuppe
03/05/2023, 10:06 PMDhanOS
03/05/2023, 10:06 PMuppe
03/05/2023, 10:08 PMuppe
03/05/2023, 10:10 PMDhanOS
03/05/2023, 10:14 PMDhanOS
03/05/2023, 10:14 PMDhanOS
03/05/2023, 10:14 PMDhanOS
03/05/2023, 10:14 PMuppe
03/05/2023, 10:15 PMuppe
03/05/2023, 10:15 PMDhanOS
03/05/2023, 10:16 PMcd /mnt
mkdir sdcard
reboot
uppe
03/05/2023, 10:16 PMDhanOS
03/05/2023, 10:16 PMDhanOS
03/05/2023, 10:17 PMDhanOS
03/05/2023, 10:17 PMadb shell
with the MicroSD cableuppe
03/05/2023, 10:17 PMDhanOS
03/05/2023, 10:18 PMuppe
03/05/2023, 10:18 PMDhanOS
03/05/2023, 10:19 PMrubberduck
03/05/2023, 10:39 PMrubberduck
03/05/2023, 10:39 PMrubberduck
03/05/2023, 10:39 PMDhanOS
03/05/2023, 10:45 PMDhanOS
03/05/2023, 10:45 PMrubberduck
03/05/2023, 10:47 PMrubberduck
03/05/2023, 10:49 PMDhanOS
03/05/2023, 10:50 PMDhanOS
03/05/2023, 10:51 PMBadOkami
03/06/2023, 6:19 AMhurrycane
03/06/2023, 7:16 AMYann
03/06/2023, 7:34 AMDhanOS
03/06/2023, 8:19 AMDhanOS
03/06/2023, 8:21 AMDhanOS
03/06/2023, 8:22 AMBadOkami
03/06/2023, 10:14 AMDhanOS
03/06/2023, 10:18 AMBadOkami
03/06/2023, 10:25 AMDhanOS
03/06/2023, 10:26 AMDhanOS
03/06/2023, 10:27 AMBadOkami
03/06/2023, 10:29 AMDhanOS
03/06/2023, 10:32 AMBadOkami
03/06/2023, 10:35 AMDhanOS
03/06/2023, 10:37 AMBadOkami
03/06/2023, 10:41 AMDhanOS
03/06/2023, 10:51 AMBadOkami
03/06/2023, 10:51 AMDhanOS
03/06/2023, 10:52 AMBadOkami
03/06/2023, 10:57 AMDhanOS
03/06/2023, 10:59 AMbhuism 🍊
03/06/2023, 4:18 PMDhanOS
03/06/2023, 4:20 PMbhuism 🍊
03/06/2023, 4:25 PMDhanOS
03/07/2023, 2:35 PMscienceman
03/07/2023, 4:01 PMDhanOS
03/07/2023, 4:01 PMscienceman
03/07/2023, 4:04 PMDhanOS
03/07/2023, 4:07 PMscienceman
03/07/2023, 4:12 PMDhanOS
03/07/2023, 4:13 PMDan D.
03/07/2023, 4:53 PMDhanOS
03/07/2023, 5:09 PMDan D.
03/07/2023, 5:31 PMmachinchose
03/07/2023, 6:27 PMmachinchose
03/07/2023, 6:30 PMDhanOS
03/07/2023, 6:59 PMDan D.
03/07/2023, 7:35 PMDhanOS
03/07/2023, 7:37 PMDhanOS
03/07/2023, 7:40 PMDan D.
03/07/2023, 7:46 PMDhanOS
03/07/2023, 7:48 PMDhanOS
03/07/2023, 7:49 PMDhanOS
03/07/2023, 7:53 PMDhanOS
03/07/2023, 7:53 PMDhanOS
03/07/2023, 7:54 PMDhanOS
03/07/2023, 7:55 PMDhanOS
03/07/2023, 7:57 PMrubberduck
03/07/2023, 10:09 PMDhanOS
03/07/2023, 10:12 PMrubberduck
03/07/2023, 10:15 PMDhanOS
03/07/2023, 10:21 PMrubberduck
03/07/2023, 10:25 PMrubberduck
03/07/2023, 10:43 PMshox
03/07/2023, 11:29 PMshox
03/07/2023, 11:30 PMDhanOS
03/07/2023, 11:39 PMmachinchose
03/08/2023, 4:02 PMDhanOS
03/08/2023, 5:47 PMDhanOS
03/08/2023, 5:49 PMmachinchose
03/08/2023, 10:31 PMDhanOS
03/14/2023, 1:26 PMgunther2908
03/14/2023, 3:09 PMTeslamax
03/17/2023, 8:56 PMbooth5381
03/19/2023, 3:00 AMbooth5381
03/22/2023, 12:17 AMKoen
03/22/2023, 9:52 PMDhanOS
03/22/2023, 9:53 PMDhanOS
03/22/2023, 9:54 PMDhanOS
03/22/2023, 9:54 PMDan D.
03/23/2023, 12:31 AMDhanOS
03/23/2023, 1:31 AMDan D.
03/23/2023, 2:05 AMDhanOS
03/23/2023, 2:09 AMbooth5381
03/23/2023, 10:49 PMDhanOS
03/24/2023, 1:31 PMtpi
command to turn modules on and off separatelyscienceman
03/27/2023, 4:15 PMDhanOS
03/27/2023, 4:21 PMgamerhaas
03/30/2023, 3:17 AMDhanOS
03/30/2023, 3:53 AMDhanOS
03/30/2023, 3:53 AMDhanOS
03/30/2023, 3:54 AMgamerhaas
03/30/2023, 4:00 AMDhanOS
03/30/2023, 4:02 AMDhanOS
03/30/2023, 4:02 AMDhanOS
03/30/2023, 4:02 AMDhanOS
03/30/2023, 4:03 AMDhanOS
03/30/2023, 4:04 AMturing-pi_1.0.1.swu
from here: https://github.com/daniel-kukiela/turing-pi-2-community-edition-firmware/releases/tag/v0.0.0 ? This is the latest official firmware. Maybe your board has some other version and this causes issues. And after this try to install mine again?gamerhaas
03/30/2023, 4:04 AMDhanOS
03/30/2023, 4:05 AMDhanOS
03/30/2023, 4:05 AMgamerhaas
03/30/2023, 4:07 AMDhanOS
03/30/2023, 4:09 AMDhanOS
03/30/2023, 4:09 AMDhanOS
03/30/2023, 4:09 AMgamerhaas
03/30/2023, 4:09 AMDhanOS
03/30/2023, 4:10 AMDhanOS
03/30/2023, 4:10 AMDhanOS
03/30/2023, 4:10 AMgamerhaas
03/30/2023, 4:11 AMgamerhaas
03/30/2023, 4:11 AMDhanOS
03/30/2023, 4:11 AMDhanOS
03/30/2023, 4:12 AMgamerhaas
03/30/2023, 4:12 AMDhanOS
03/30/2023, 4:13 AMDhanOS
03/30/2023, 4:13 AMDhanOS
03/30/2023, 4:14 AMgamerhaas
03/30/2023, 4:17 AMDhanOS
03/30/2023, 4:20 AMadb
command work?DhanOS
03/30/2023, 4:20 AMgamerhaas
03/30/2023, 4:22 AMDhanOS
03/30/2023, 4:23 AMgamerhaas
03/30/2023, 4:23 AMDhanOS
03/30/2023, 4:28 AMDhanOS
03/30/2023, 4:28 AM>adb devices
List of devices attached
0402101560 device
DhanOS
03/30/2023, 4:29 AMDhanOS
03/30/2023, 4:29 AMDhanOS
03/30/2023, 4:29 AMDhanOS
03/30/2023, 4:30 AMgamerhaas
03/30/2023, 4:34 AMDhanOS
03/30/2023, 4:34 AMgamerhaas
03/30/2023, 4:36 AMDhanOS
03/30/2023, 4:39 AMDhanOS
03/30/2023, 4:39 AMDhanOS
03/30/2023, 4:39 AMgamerhaas
03/30/2023, 4:42 AMDhanOS
03/30/2023, 4:42 AMDhanOS
03/30/2023, 4:43 AMgamerhaas
03/30/2023, 4:45 AMDhanOS
03/30/2023, 4:45 AMDhanOS
03/30/2023, 4:45 AMADB
, head to the Device Manager and see if you have any unknown device listed (like with missing drivers)DhanOS
03/30/2023, 4:46 AMgamerhaas
03/30/2023, 4:50 AMDhanOS
03/30/2023, 4:51 AMDhanOS
03/30/2023, 4:51 AMgamerhaas
03/30/2023, 4:59 AMDhanOS
03/30/2023, 4:59 AMgamerhaas
03/30/2023, 5:00 AMDhanOS
03/30/2023, 5:01 AMgamerhaas
03/31/2023, 2:05 AMDhanOS
03/31/2023, 6:00 AMgamerhaas
03/31/2023, 11:25 AMDhanOS
03/31/2023, 11:33 AMgamerhaas
03/31/2023, 11:40 AMDhanOS
03/31/2023, 11:40 AMDhanOS
03/31/2023, 11:41 AMadb
, thoughgamerhaas
03/31/2023, 11:43 AMDhanOS
04/07/2023, 11:02 AMgamerhaas
04/09/2023, 9:07 PMDhanOS
04/09/2023, 9:24 PMwerdnum
04/10/2023, 7:00 AMDhanOS
04/10/2023, 7:45 AMscienceman
04/10/2023, 2:47 PMDhanOS
04/10/2023, 3:36 PMwerdnum
04/12/2023, 3:57 AMwerdnum
04/12/2023, 4:00 AMLinux turing 5.4.61 #31 SMP PREEMPT Thu Oct 20 00:11:14 CST 2022 armv7l GNU/Linux
werdnum
04/12/2023, 4:00 AMfirem00
04/12/2023, 6:54 PMTeslamax
04/12/2023, 7:28 PMTeslamax
04/12/2023, 7:28 PMfirem00
04/12/2023, 7:34 PMTeslamax
04/12/2023, 7:47 PMTeslamax
04/12/2023, 7:49 PMTeslamax
04/12/2023, 7:50 PMfirem00
04/12/2023, 7:50 PMTeslamax
04/12/2023, 7:51 PMTeslamax
04/12/2023, 7:51 PMTeslamax
04/12/2023, 7:52 PMfirem00
04/12/2023, 7:52 PMfirem00
04/12/2023, 7:52 PMfirem00
04/12/2023, 7:55 PMfirem00
04/12/2023, 7:57 PMfirem00
04/12/2023, 7:57 PMfirem00
04/12/2023, 7:58 PMBatz_10K
04/12/2023, 8:01 PMTeslamax
04/12/2023, 8:02 PMfirem00
04/12/2023, 8:18 PMfirem00
04/12/2023, 8:21 PMDan D.
04/12/2023, 8:32 PMDhanOS
04/12/2023, 9:08 PMfirem00
04/12/2023, 9:14 PMfirem00
04/12/2023, 9:14 PMDhanOS
04/12/2023, 9:15 PMfirem00
04/12/2023, 9:19 PMDhanOS
04/12/2023, 9:19 PMDhanOS
04/12/2023, 9:19 PMturing_pi2_ce-0.1.0.swu
onto the board, it won't require an SD card for flashing anymorefirem00
04/12/2023, 9:20 PMDhanOS
04/12/2023, 9:21 PMfirem00
04/12/2023, 9:21 PMfirem00
04/12/2023, 9:24 PMDhanOS
04/12/2023, 9:24 PMDan D.
04/12/2023, 11:57 PMwerdnum
04/13/2023, 1:13 AMwerdnum
04/13/2023, 1:13 AMwerdnum
04/13/2023, 1:13 AMwerdnum
04/13/2023, 1:15 AMfirem00
04/13/2023, 7:08 AMfirem00
04/13/2023, 7:09 AMDhanOS
04/13/2023, 7:16 AMDhanOS
04/13/2023, 7:17 AMfirem00
04/13/2023, 10:01 AMDhanOS
04/13/2023, 10:04 AMwerdnum
04/13/2023, 11:05 AMStuart
04/13/2023, 11:32 AMStuart
04/13/2023, 11:33 AMDhanOS
04/13/2023, 12:57 PMDhanOS
04/13/2023, 12:58 PMStuart
04/13/2023, 1:42 PMdojo-major
04/14/2023, 12:41 PMdojo-major
04/14/2023, 12:42 PMDhanOS
04/14/2023, 12:42 PMDhanOS
04/14/2023, 12:42 PMdojo-major
04/14/2023, 12:43 PMuncle_phuzzy
04/16/2023, 2:03 AMturing-pi-2-community-edition-firmware on master [!?]
❯ head ./buildroot/package/lvm2/lvm2.mk
################################################################################
#
# lvm2
#
################################################################################
LVM2_VERSION = 2.03.14
LVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz
#LVM2_SITE = http://sources.redhat.com/pub/lvm2
LVM2_SITE = https://sourceware.org/pub/lvm2
timmy_pete
04/16/2023, 1:11 PMtimmy_pete
04/16/2023, 1:12 PMDhanOS
04/16/2023, 1:14 PMDhanOS
04/16/2023, 1:15 PMtimmy_pete
04/16/2023, 1:18 PMrkkochie
04/16/2023, 2:09 PMDhanOS
04/16/2023, 6:11 PMwerdnum
04/17/2023, 2:36 AMmicro
as a text editor, if we wanna get into holy wars 😄werdnum
04/17/2023, 2:37 AMDhanOS
04/17/2023, 2:37 AMwerdnum
04/17/2023, 2:38 AMwijk% ls -lh $(which micro)
-rwx------+ 1 ubuntu ubuntu 11M Feb 20 02:11 /mnt/seaweed/workspace/bin/micro
wijk% ls -lh $(which nano)
-rwxr-xr-x 1 root root 269K Feb 19 2022 /usr/bin/nano
werdnum
04/17/2023, 2:38 AMDhanOS
04/17/2023, 2:38 AMDhanOS
04/17/2023, 2:38 AMDhanOS
04/17/2023, 2:39 AMwerdnum
04/17/2023, 2:39 AMgo install
it with my GOPATH
on SDtimmy_pete
04/17/2023, 2:39 AMDhanOS
04/17/2023, 2:39 AMDhanOS
04/17/2023, 2:41 AMDhanOS
04/17/2023, 2:42 AMwerdnum
04/17/2023, 2:44 AMwerdnum
04/17/2023, 3:00 AMdestos
04/17/2023, 3:43 AMdestos
04/17/2023, 3:45 AMDhanOS
04/17/2023, 3:45 AMDhanOS
04/17/2023, 3:45 AMdestos
04/17/2023, 3:45 AMdestos
04/17/2023, 3:45 AMDhanOS
04/17/2023, 3:46 AMDhanOS
04/17/2023, 3:46 AMdestos
04/17/2023, 3:46 AMDhanOS
04/17/2023, 3:48 AMDhanOS
04/17/2023, 3:48 AMDhanOS
04/17/2023, 3:50 AMdestos
04/17/2023, 3:51 AMDhanOS
04/17/2023, 3:54 AMwerdnum
04/17/2023, 5:00 AMDhanOS
04/17/2023, 10:57 AMdonfl
04/17/2023, 11:44 AMDhanOS
04/17/2023, 11:46 AMDhanOS
04/17/2023, 11:47 AMdonfl
04/17/2023, 11:47 AMDhanOS
04/17/2023, 11:48 AMdonfl
04/17/2023, 11:48 AMDhanOS
04/17/2023, 11:48 AMdestos
04/17/2023, 4:58 PMdestos
04/17/2023, 4:59 PMDan D.
04/17/2023, 6:13 PMDan D.
04/17/2023, 6:16 PMDhanOS
04/17/2023, 6:16 PMDan D.
04/17/2023, 6:18 PMDhanOS
04/17/2023, 6:18 PMDhanOS
04/17/2023, 6:20 PMDhanOS
04/17/2023, 6:23 PMDan D.
04/17/2023, 6:32 PMDhanOS
04/17/2023, 6:34 PMDhanOS
04/17/2023, 6:35 PMDhanOS
04/17/2023, 6:36 PMDhanOS
04/17/2023, 6:37 PMDhanOS
04/17/2023, 6:37 PMDan D.
04/17/2023, 6:40 PMDhanOS
04/17/2023, 6:44 PMDhanOS
04/17/2023, 6:45 PMDhanOS
04/17/2023, 6:46 PMDhanOS
04/17/2023, 6:46 PMbenleb
04/17/2023, 7:27 PMEnsate
04/17/2023, 9:17 PMDhanOS
04/17/2023, 9:18 PMDhanOS
04/17/2023, 11:25 PMuncle_phuzzy
04/17/2023, 11:29 PMDhanOS
04/17/2023, 11:33 PMuncle_phuzzy
04/17/2023, 11:35 PMDhanOS
04/17/2023, 11:38 PMDhanOS
04/17/2023, 11:39 PMuncle_phuzzy
04/17/2023, 11:41 PMDhanOS
04/17/2023, 11:42 PMuncle_phuzzy
04/17/2023, 11:45 PMDhanOS
04/18/2023, 1:06 AMuncle_phuzzy
04/18/2023, 1:24 AMMichael Feher
04/18/2023, 1:26 AMscreen
should be available in buildroot, would be good to give it a tryDhanOS
04/18/2023, 1:27 AMlogin as: root
root@turing's password:
# screen
-sh: screen: not found
Michael Feher
04/18/2023, 1:30 AMmake menuconfig
and it's under the Terminal/Emulators sectionDhanOS
04/18/2023, 1:30 AMDhanOS
04/18/2023, 1:30 AMDhanOS
04/18/2023, 1:30 AMMichael Feher
04/18/2023, 1:31 AMwerdnum
04/18/2023, 1:32 AMpicocom
maybe? https://linux.die.net/man/8/picocomwerdnum
04/18/2023, 1:32 AMDhanOS
04/18/2023, 1:33 AMwerdnum
04/18/2023, 1:34 AMwijk% ls -l picocom
-rwxr-xr-x 1 andrew admin 57716 Apr 18 01:33 picocom
wijk% strip picocom
wijk% ls -l picocom
-rwxr-xr-x 1 andrew admin 44036 Apr 18 01:33 picocom
werdnum
04/18/2023, 1:34 AMwerdnum
04/18/2023, 1:34 AMwijk% make CC=!arm:0 CFLAGS='-static -Os'
DhanOS
04/18/2023, 1:34 AMwerdnum
04/18/2023, 1:34 AM-static
because I can't be bothered getting the right glibc where I'm building itDhanOS
04/18/2023, 1:35 AMwerdnum
04/18/2023, 1:36 AMDhanOS
04/18/2023, 1:36 AMwerdnum
04/18/2023, 1:36 AMDhanOS
04/18/2023, 1:37 AMDhanOS
04/18/2023, 1:38 AMwerdnum
04/18/2023, 8:11 AMwerdnum
04/18/2023, 12:30 PM$ docker run werdnum/dockcross-tpi2-bmc >./dockcross-tpi2-bmc
$ chmod +x ./dockcross-tpi2-bmc
$ ./dockcross-tpi2-bmc make
werdnum
04/18/2023, 12:30 PMwerdnum
04/18/2023, 12:34 PMrubberduck
04/18/2023, 7:52 PMdockcross
gives me some home that I might be able to join the fun without getting an intel PC to build arm images on...
Seems to be a problem though:
➜ dockcross git:(master) docker run werdnum/dockcross-tpi2-bmc >./dockcross-tpi2-bmc
➜ dockcross git:(master) chmod +x ./dockcross-tpi2-bmc
➜ dockcross git:(master) ./dockcross-tpi2-bmc make
Unable to find image 'containers.andrewgarrett.dev/dockcross/linux-armv7-lts:20230418-484f06a' locally
docker: Error response from daemon: Get "https://containers.andrewgarrett.dev/v2/": Service Unavailable.
See 'docker run --help'.
Any idea what is missing?destos
04/18/2023, 8:35 PMwerdnum
04/18/2023, 8:45 PMwerdnum
04/18/2023, 8:46 PMwerdnum
04/18/2023, 8:49 PMrubberduck
04/18/2023, 8:51 PMwerdnum
04/18/2023, 8:52 PMwerdnum
04/18/2023, 8:54 PMrubberduck
04/18/2023, 9:15 PMcjson-rebuild
target (following the instructions in the readme.md
of the official build...)
$ ./dockcross-tpi2-bmc make -C buildroot BR2_EXTERNAL="../br2t113pro" 100ask_t113-pro_spinand_core_defconfig
make: Entering directory '/work/buildroot'
...
#
# configuration written to /work/buildroot/.config
#
make: Leaving directory '/work/buildroot'
$ ./dockcross-tpi2-bmc make -C buildroot cjson-rebuild
make: Entering directory '/work/buildroot'
...
>>> toolchain-external-custom Configuring
Cannot execute cross-compiler '/work/buildroot/output/host/opt/ext-toolchain/bin/arm-linux-gnueabi-gcc'
make: *** [package/pkg-generic.mk:282: /work/buildroot/output/build/toolchain-external-custom/.stamp_configured] Error 1
make: Leaving directory '/work/buildroot'
rubberduck
04/18/2023, 9:17 PMbuildroot
as the build script can't find the path ../br2t113pro
.rubberduck
04/18/2023, 9:18 PMwerdnum
04/18/2023, 9:18 PMDhanOS
04/19/2023, 3:02 PMkey1
buttonjpnadas
04/19/2023, 3:06 PMtpi
calls the api, same as the web interface, the issue happens in either. I have tested with tpi
here, both from the BMC and from a remote host.Michael Feher
04/19/2023, 4:34 PM60kb
in size vs the 1.4MB
size of the current UI. Built with Picocss + SvelteKit. It also supports connecting to multiple BMC's from the same UI (as well as long polling the updates). Right now, a reverse proxy is required to patch the Headers until the firmware API is updated. Feed back is welcome! (Planning on getting it to 5x100 on Lighthouse)
https://turing-pi-ui.vercel.app/
https://github.com/PhearZero/turing-pi-uiDhanOS
04/19/2023, 5:12 PMDhanOS
04/19/2023, 5:12 PMwalkjivefly
04/19/2023, 5:12 PMdestos
04/19/2023, 5:13 PMdestos
04/19/2023, 5:15 PMDhanOS
04/19/2023, 5:18 PMDhanOS
04/19/2023, 5:19 PMDhanOS
04/19/2023, 5:20 PMMichael Feher
04/19/2023, 5:36 PMDhanOS
04/19/2023, 5:37 PMMichael Feher
04/19/2023, 5:37 PMDhanOS
04/19/2023, 5:39 PMMichael Feher
04/19/2023, 5:50 PMDhanOS
04/19/2023, 5:53 PMDhanOS
04/19/2023, 5:54 PMdestos
04/19/2023, 5:56 PMMichael Feher
04/19/2023, 6:00 PMDhanOS
04/19/2023, 6:01 PMdestos
04/19/2023, 6:01 PMMichael Feher
04/19/2023, 6:03 PMdestos
04/19/2023, 6:03 PMDhanOS
04/19/2023, 6:04 PMMichael Feher
04/19/2023, 6:04 PMDhanOS
04/19/2023, 6:05 PMMichael Feher
04/19/2023, 6:05 PMdestos
04/19/2023, 6:05 PMMichael Feher
04/19/2023, 6:07 PMDhanOS
04/19/2023, 6:07 PMDhanOS
04/19/2023, 6:08 PMMichael Feher
04/19/2023, 6:09 PMDhanOS
04/19/2023, 6:09 PMMichael Feher
04/19/2023, 6:11 PMDhanOS
04/19/2023, 6:11 PMdestos
04/19/2023, 6:11 PMDhanOS
04/19/2023, 6:12 PMDhanOS
04/19/2023, 6:12 PMDhanOS
04/19/2023, 6:13 PMDhanOS
04/19/2023, 6:15 PMdestos
04/19/2023, 6:16 PMMichael Feher
04/19/2023, 6:17 PMMichael Feher
04/19/2023, 6:18 PMdestos
04/19/2023, 6:18 PMDhanOS
04/19/2023, 6:18 PMDhanOS
04/19/2023, 6:20 PMDhanOS
04/19/2023, 6:20 PMDhanOS
04/19/2023, 6:21 PMdestos
04/19/2023, 6:22 PMDhanOS
04/19/2023, 6:22 PMdestos
04/19/2023, 6:23 PMMichael Feher
04/19/2023, 6:26 PMDhanOS
04/19/2023, 6:27 PMMichael Feher
04/19/2023, 6:33 PMDhanOS
04/19/2023, 6:33 PMDan D.
04/19/2023, 8:37 PMDhanOS
04/19/2023, 8:41 PMDhanOS
04/19/2023, 8:41 PMDhanOS
04/19/2023, 8:41 PMDhanOS
04/19/2023, 8:42 PMDan D.
04/19/2023, 8:52 PMrubberduck
04/19/2023, 8:53 PMDhanOS
04/19/2023, 8:56 PMDhanOS
04/19/2023, 8:56 PMrubberduck
04/19/2023, 8:56 PMDhanOS
04/19/2023, 8:57 PMDhanOS
04/19/2023, 8:57 PMrubberduck
04/19/2023, 8:58 PMDhanOS
04/19/2023, 8:59 PMDan D.
04/19/2023, 9:00 PMrubberduck
04/19/2023, 9:02 PMDan D.
04/19/2023, 9:03 PMDhanOS
04/19/2023, 9:04 PMDhanOS
04/19/2023, 9:05 PMDan D.
04/19/2023, 9:05 PMDhanOS
04/19/2023, 9:06 PMrubberduck
04/19/2023, 9:06 PMDan D.
04/19/2023, 9:07 PMMichael Feher
04/19/2023, 9:08 PMrubberduck
04/19/2023, 9:09 PMDhanOS
04/19/2023, 9:10 PMrubberduck
04/19/2023, 9:10 PMDhanOS
04/19/2023, 9:11 PMrubberduck
04/19/2023, 9:11 PMDhanOS
04/19/2023, 9:11 PMMichael Feher
04/19/2023, 9:11 PMDhanOS
04/19/2023, 9:11 PMMichael Feher
04/19/2023, 9:12 PMDhanOS
04/19/2023, 9:12 PMDhanOS
04/19/2023, 9:12 PMrubberduck
04/19/2023, 9:13 PMDhanOS
04/19/2023, 9:13 PMDhanOS
04/19/2023, 9:14 PMrubberduck
04/19/2023, 9:20 PMDhanOS
04/19/2023, 9:23 PMrubberduck
04/19/2023, 9:25 PMrubberduck
04/19/2023, 9:26 PMDhanOS
04/19/2023, 9:27 PMmerlinvn
04/20/2023, 1:00 AMDhanOS
04/20/2023, 1:01 AMmerlinvn
04/20/2023, 1:04 AMDhanOS
04/20/2023, 1:07 AMmerlinvn
04/20/2023, 1:10 AMgamerhaas
04/20/2023, 1:56 AMkathy.auteberry
04/20/2023, 2:01 AMkathy.auteberry
04/20/2023, 2:02 AMrubberduck
04/20/2023, 4:55 AMrubberduck
04/20/2023, 5:03 AMMichael Feher
04/20/2023, 4:36 PMrubberduck
04/20/2023, 7:40 PMjpnadas
04/21/2023, 6:27 AMdougbertinexile
04/21/2023, 6:54 AMmerlinvn
04/21/2023, 3:14 PMkathy.auteberry
04/21/2023, 3:17 PMMichael Feher
04/21/2023, 6:26 PMrtty
baked into my firmware but rttys
and gotty
are pretty heavy. Looking into other options but a lot of them are pretty heavy. Anyone know of any other good xterm.js
backends that are lightweight?Stuart
04/21/2023, 6:40 PMDhanOS
04/21/2023, 6:42 PMkey1
on the board, the fan will turn offmythocelt
04/22/2023, 5:34 PMDhanOS
04/22/2023, 6:04 PMtpi
tool (which also queries the webservice) can be actually executed. With a separate webserver it's had to communicate withj the firmware somehow anyway.
I'm not familiar with dropbear ssh. What would be the advantages over openssh?mythocelt
04/22/2023, 10:18 PMmythocelt
04/22/2023, 10:20 PMDhanOS
04/22/2023, 10:38 PMDhanOS
04/22/2023, 10:40 PMwerdnum
04/22/2023, 11:28 PMDhanOS
04/22/2023, 11:36 PMDhanOS
04/22/2023, 11:37 PMDhanOS
04/22/2023, 11:38 PMMichael Feher
04/22/2023, 11:39 PMMichael Feher
04/22/2023, 11:42 PMMichael Feher
04/22/2023, 11:45 PMDhanOS
04/22/2023, 11:45 PMDhanOS
04/22/2023, 11:46 PMDhanOS
04/22/2023, 11:46 PMMichael Feher
04/22/2023, 11:48 PMbash
/usr/bin/swupdate -v -w -r /var/www/swupdate -p 8080
Michael Feher
04/22/2023, 11:50 PMbash
/usr/bin/swupdate-progress
DhanOS
04/22/2023, 11:52 PMMichael Feher
04/22/2023, 11:55 PMfix.sh
🤣DhanOS
04/22/2023, 11:56 PMDhanOS
04/22/2023, 11:56 PMMichael Feher
04/22/2023, 11:57 PMDhanOS
04/22/2023, 11:58 PMMichael Feher
04/22/2023, 11:59 PMDhanOS
04/23/2023, 12:00 AMMichael Feher
04/23/2023, 12:01 AMMichael Feher
04/23/2023, 12:07 AMhttp://BMCIP.local/auth/basic/admin/
The routes/configs are stored in the BMC under /mnt/routes.tx
/mnt/auth.txt
The buildroot defaults are here: https://github.com/Telluric/turing-pi-2-community-edition-firmware/tree/master/br2t113pro/board/100ask/rootfs_overlay/mnt
helpful link: https://www.embedthis.com/goahead/doc/ref/api/goahead.htmlDhanOS
04/23/2023, 12:07 AMwerdnum
04/23/2023, 1:42 AMwerdnum
04/23/2023, 1:43 AMDhanOS
04/23/2023, 1:44 AMwerdnum
04/23/2023, 1:48 AMMichael Feher
04/23/2023, 2:10 AMinit.d
. Gives me feeellz from the past, haven't used init.d
in ages. The process is in /etc/init.d/S80swupdate
Michael Feher
04/23/2023, 2:11 AMcollectd
and haven't really dug into what exactly it's trying to grab. It's a long lived service on boot as wellMichael Feher
04/23/2023, 2:40 AMDhanOS
04/23/2023, 2:42 AMDhanOS
04/23/2023, 2:43 AMMichael Feher
04/23/2023, 2:44 AMnext
branch right now for a "global" dashboard. Wanted a super simple implementation right now but I can get a very basic redirect switch in there tmrw.DhanOS
04/23/2023, 2:44 AMDhanOS
04/23/2023, 2:45 AMMichael Feher
04/23/2023, 2:47 AMDhanOS
04/23/2023, 2:56 AMMichael Feher
04/23/2023, 3:09 AMMichael Feher
04/23/2023, 3:11 AMDhanOS
04/23/2023, 3:12 AMDhanOS
04/23/2023, 3:12 AMMichael Feher
04/23/2023, 3:12 AMDhanOS
04/23/2023, 3:12 AMDhanOS
04/23/2023, 3:14 AMDhanOS
04/23/2023, 3:15 AMDhanOS
04/23/2023, 3:15 AMMichael Feher
04/23/2023, 3:16 AMamazing-cluster.local
and let the boards be subdomains.DhanOS
04/23/2023, 3:17 AMMichael Feher
04/23/2023, 3:19 AMMichael Feher
04/23/2023, 3:38 AMtty-share
on the BMC but it's still really heavy.DhanOS
04/23/2023, 4:10 AMMichael Feher
04/23/2023, 4:11 AMDhanOS
04/23/2023, 4:14 AMDhanOS
04/23/2023, 4:15 AMMichael Feher
04/23/2023, 4:18 AMwerdnum
04/23/2023, 5:56 AMwerdnum
04/23/2023, 5:58 AMwalkjivefly
04/23/2023, 9:22 AMMichael Feher
04/23/2023, 4:55 PMStuart
04/23/2023, 5:49 PM/mnt/var/www
out of the way rather than deleting it (there is still ~6.7MB free on the BMC filesystem, plus you could move one or the other directory trees or the build.tar
to SD card - and you could even tar -cjpf - build | ssh $BMC_IP 'tar -xjvpf - -C /mnt/var
to avoid the tape archive itself using any of this space), as it gives testers a way to roll-back without having to reflash their firmware...Michael Feher
04/23/2023, 5:56 PMwww
and add the pipe.Stuart
04/23/2023, 6:30 PMMichael Feher
04/23/2023, 6:38 PMStuart
04/23/2023, 6:39 PMDhanOS
04/23/2023, 7:19 PMDhanOS
04/23/2023, 7:27 PMStuart
04/23/2023, 7:54 PMStuart
04/23/2023, 7:54 PMDhanOS
04/23/2023, 7:58 PMDhanOS
04/23/2023, 7:58 PMMichael Feher
04/23/2023, 8:03 PMStuart
04/23/2023, 8:04 PMDhanOS
04/23/2023, 8:05 PMDhanOS
04/23/2023, 8:06 PMDhanOS
04/23/2023, 8:08 PMMichael Feher
04/23/2023, 8:09 PMDhanOS
04/23/2023, 8:10 PMMichael Feher
04/23/2023, 8:11 PMkathy.auteberry
04/24/2023, 2:13 AMS99hello.sh
(or anything in the /etc/init.d
directory), be aware that the scripts in there are run on any run level change
What that means, specifically, is that any commands you add in there will be run both on BMC boot as well as just prior to a BMC safe shutdown (via shutdown -h now
or similar). If you want to run commands only on startup, check the $1
variable for start
value, similarly $1
will equal stop
when it’s time to shut down the service
Ref: https://discord.com/channels/754950670175436841/754950670175436848/1099875572051615794Michael Feher
04/24/2023, 9:20 PMDhanOS
04/24/2023, 9:33 PMDhanOS
04/24/2023, 9:35 PMDhanOS
04/24/2023, 9:36 PMMichael Feher
04/24/2023, 9:38 PMDhanOS
04/24/2023, 9:39 PMDhanOS
04/24/2023, 9:43 PMMichael Feher
04/24/2023, 9:45 PMDhanOS
04/24/2023, 9:51 PMMichael Feher
04/24/2023, 10:02 PMDhanOS
04/24/2023, 10:12 PMMichael Feher
04/24/2023, 10:18 PMMichael Feher
04/24/2023, 10:19 PMStuart
04/25/2023, 8:02 AMshellcheck
of these would be awesome too!), in order to allow each to be considered independently.werdnum
04/25/2023, 10:42 PMset -eu
would do the trick right?werdnum
04/25/2023, 11:04 PMwerdnum
04/25/2023, 11:06 PMDhanOS
04/25/2023, 11:08 PMDhanOS
04/25/2023, 11:10 PMDhanOS
04/25/2023, 11:11 PMDhanOS
04/25/2023, 11:12 PMagainst having that movement go in the right direction
partDhanOS
04/25/2023, 11:13 PMagainst
in this contextBeepDog
04/27/2023, 3:44 AMBeepDog
04/27/2023, 3:45 AMDhanOS
04/27/2023, 3:45 AMjpnadas
04/27/2023, 5:31 AMStuart
04/27/2023, 10:23 AMDhanOS
04/27/2023, 2:41 PMMichael Feher
04/27/2023, 3:38 PMv2
which cleans up the API calls as well as staging the API/UI for Authentication.
https://github.com/PhearZero/zero-pi-2werdnum
04/28/2023, 5:23 AMwerdnum
04/28/2023, 5:24 AMser2net
werdnum
04/28/2023, 5:27 AMDhanOS
04/28/2023, 10:26 AMwerdnum
04/28/2023, 10:29 AMwerdnum
04/28/2023, 10:30 AMDhanOS
04/28/2023, 10:30 AMDhanOS
04/28/2023, 10:31 AMwerdnum
04/28/2023, 10:37 AMwerdnum
04/28/2023, 10:38 AMDhanOS
04/28/2023, 10:39 AMDhanOS
04/28/2023, 10:41 AMwerdnum
04/28/2023, 10:41 AMwerdnum
04/28/2023, 10:42 AMDhanOS
04/28/2023, 10:42 AMDhanOS
04/28/2023, 10:42 AMwerdnum
04/28/2023, 10:42 AMDhanOS
04/28/2023, 10:44 AMDhanOS
04/28/2023, 10:45 AMDhanOS
04/28/2023, 10:45 AMwerdnum
04/28/2023, 10:45 AMDhanOS
04/28/2023, 10:47 AMwerdnum
04/28/2023, 10:49 AMDhanOS
04/28/2023, 10:50 AMDhanOS
04/28/2023, 10:51 AMDhanOS
04/28/2023, 10:52 AMDhanOS
04/28/2023, 10:52 AMDhanOS
04/28/2023, 11:29 AMMichael Feher
04/28/2023, 3:49 PMMichael Feher
04/28/2023, 3:52 PMMichael Feher
04/28/2023, 8:23 PMDhanOS
04/28/2023, 8:35 PMj0ju
04/28/2023, 8:48 PMMichael Feher
04/28/2023, 8:49 PMDhanOS
04/28/2023, 9:08 PMx2-xx-xx-xx-xx-xx
x6-xx-xx-xx-xx-xx
xA-xx-xx-xx-xx-xx
xE-xx-xx-xx-xx-xx
Second - the goal is to be able to set given (or random) mac via the command and via the web interface. Can you implement similar thing into the bmc
since this will be the desired way?
Third - I only briefly checked your code - isn't it missing ifup
?
Fourth - if you want to modify a file like /etc/network/interfaces
, it's better to hook the image creation and "regex" the change into the file instead of replacing it entirely. This ensures multiple updates can be done conditionally
Additional question - what's the benefit of using the environmental variable compared to simply adding hwaddr etehr
into the /etc/network/interfaces
DhanOS
04/28/2023, 9:10 PMDhanOS
04/28/2023, 9:16 PMj0ju
04/28/2023, 9:28 PMfw_setenv mac_eth0 xx:xx:xx:xx:xx:xx
is the commandline for the shell. This can surely be wrapped into an API call to be set on demand.
3. that point I do not understand. What do you mean be ifup
is missing? This code is executed by the ifupdown framework itself on if up -a
eg. during the network init code.
4. Currently it is dependent on the defined uboot-hwaddress yes
in the supplied interfaces
file.
5. If the user changes the MAC in the filesystem it is lost after an update. On the other hand with the script if-pre-up.d it is set from uboot env. If the MAC address is persisted in /etc/network/interfaces it would change on updates. The uboot.env is persistend as long as you update only via webinterface.j0ju
04/28/2023, 9:29 PMj0ju
04/28/2023, 9:35 PMDhanOS
04/28/2023, 9:37 PM12:34:56:78:9A:BC
, so probably the first range 🙂
2 Yes, but I also meant this whole part to randomly generate a MAC
3. I mean:
```sh
set_MAC() {
ip link set down dev "$IFACE"
ip link set addr "$MAC" dev "$IFACE"
echo "$IFACE: set mac address $MAC" >&2
}
```and I should mention ip link set up
bot ifup
4. I understand and this is what I mean, I later provided an example of how you can only modify configuration files for the parts you need without overlay-in a whole file
5. The goal is to have more linux-like updates, the config files will remain. Also, there is going to be initial configuration file that you upload via the web interface or put into the SD card, so the user will keep it for when it'll be needed anywayDhanOS
04/28/2023, 9:39 PMDhanOS
04/28/2023, 9:40 PMDhanOS
04/28/2023, 9:40 PMDhanOS
04/28/2023, 9:41 PMj0ju
04/28/2023, 9:43 PMDhanOS
04/28/2023, 9:45 PMDhanOS
04/28/2023, 9:46 PMj0ju
04/28/2023, 9:47 PMDhanOS
04/28/2023, 9:48 PMDhanOS
04/28/2023, 9:48 PMDhanOS
04/28/2023, 9:48 PMj0ju
04/28/2023, 9:49 PMDhanOS
04/28/2023, 9:49 PMDhanOS
04/28/2023, 9:49 PMDhanOS
04/28/2023, 9:50 PMj0ju
04/28/2023, 9:51 PMDhanOS
04/28/2023, 9:52 PMDhanOS
04/28/2023, 9:53 PM/etc/tpi.cfg
is a 1.0.1 thingj0ju
04/28/2023, 9:53 PMDhanOS
04/28/2023, 9:53 PMj0ju
04/28/2023, 9:54 PMDhanOS
04/28/2023, 9:54 PMDhanOS
04/28/2023, 9:55 PMDhanOS
04/28/2023, 9:55 PMj0ju
04/28/2023, 9:56 PMDhanOS
04/28/2023, 9:56 PMj0ju
04/28/2023, 9:58 PMj0ju
04/28/2023, 10:01 PMj0ju
04/28/2023, 10:07 PMDhanOS
04/28/2023, 10:08 PM/etc/network/interfaces
as hwaddr ether this_given_mac
and on subsequent boots if this entry is missing or different than what's saved aside, it'll be updated. This means the /etc/network/interfaces
will always contain the right MAC. the advantage of this is when a board break, this can happen, or for whatever reason it has to be swapped, you only move the SD card to a new board and it's being automatically set to the same settings. If you happen to change anything controlled by this config file later, it'll be changed accordingly and assure the change will be persistent by checking everything on boot. At elast this is the way I see this.DhanOS
04/28/2023, 10:10 PMj0ju
04/28/2023, 10:12 PMDhanOS
04/28/2023, 10:14 PMj0ju
04/28/2023, 10:18 PMDhanOS
04/28/2023, 10:19 PMj0ju
04/28/2023, 10:23 PMwerdnum
04/28/2023, 10:38 PMDhanOS
04/28/2023, 10:46 PMUSB 2.0
-> USB_OTG
2. TTY
-> `UART`(since this does not have to be TTY
in my understanding)
3. Could USB Host/Device be replaced with Host (switch) Device
for easier access? (switch) is the same or similar element to how you toggle the node power
4. Server
(Section) - I'd call it BMC
I have a few more, but first I want to find out what do you think about these suggestionsMichael Feher
04/28/2023, 11:05 PMDhanOS
04/28/2023, 11:07 PMwerdnum
04/28/2023, 11:09 PMMichael Feher
04/28/2023, 11:09 PMmain
branch will always be CE/Official until they diverge.werdnum
04/28/2023, 11:11 PMDhanOS
04/28/2023, 11:12 PMMichael Feher
04/28/2023, 11:12 PMser2nets
. The maintainer of tty-share is thinking of porting to Rust/C: Discussion here: https://github.com/elisescu/tty-share/pull/68werdnum
04/28/2023, 11:13 PMDhanOS
04/28/2023, 11:13 PMMichael Feher
04/28/2023, 11:13 PMDhanOS
04/28/2023, 11:14 PMwerdnum
04/28/2023, 11:14 PMwerdnum
04/28/2023, 11:14 PMMichael Feher
04/28/2023, 11:14 PMMichael Feher
04/28/2023, 11:14 PMwerdnum
04/28/2023, 11:14 PMwerdnum
04/28/2023, 11:15 PMDhanOS
04/28/2023, 11:15 PMMichael Feher
04/28/2023, 11:16 PMwerdnum
04/28/2023, 11:16 PMwerdnum
04/28/2023, 11:16 PMwerdnum
04/28/2023, 11:16 PMwerdnum
04/28/2023, 11:17 PMDhanOS
04/28/2023, 11:18 PMDhanOS
04/28/2023, 11:18 PMwerdnum
04/28/2023, 11:19 PMDhanOS
04/28/2023, 11:19 PMMichael Feher
04/28/2023, 11:25 PMwerdnum
04/28/2023, 11:26 PMwerdnum
04/28/2023, 11:27 PMwerdnum
04/28/2023, 11:28 PMwerdnum
04/28/2023, 11:28 PMMichael Feher
04/28/2023, 11:29 PMwerdnum
04/28/2023, 11:30 PMDhanOS
04/28/2023, 11:31 PMDhanOS
04/28/2023, 11:32 PMMichael Feher
04/28/2023, 11:33 PMDhanOS
04/28/2023, 11:35 PMMichael Feher
04/28/2023, 11:35 PMDhanOS
04/28/2023, 11:36 PMDhanOS
04/28/2023, 11:36 PMMichael Feher
04/28/2023, 11:37 PMDhanOS
04/28/2023, 11:37 PMDhanOS
04/28/2023, 11:38 PMDhanOS
04/28/2023, 11:39 PMDhanOS
04/28/2023, 11:39 PMMichael Feher
04/28/2023, 11:43 PMwerdnum
04/28/2023, 11:58 PMwerdnum
04/29/2023, 12:18 AMwerdnum
04/29/2023, 12:19 AMDhanOS
04/29/2023, 12:19 AMMichael Feher
04/29/2023, 12:20 AMwerdnum
04/29/2023, 12:20 AMDhanOS
04/29/2023, 12:20 AMDhanOS
04/29/2023, 12:21 AMDhanOS
04/29/2023, 12:22 AMDhanOS
04/29/2023, 12:23 AMMichael Feher
04/29/2023, 12:23 AMDhanOS
04/29/2023, 12:24 AMwerdnum
04/29/2023, 12:25 AMwerdnum
04/29/2023, 12:25 AMMichael Feher
04/29/2023, 12:29 AMextra-raspi
package installed. Just have a "Turing Ubuntu 20.04" that has it pre-installed so that the sata controller works as expected.
Or is the expectation you put in a storage medium and send literally any image and the BMC will just "figure it out"?DhanOS
04/29/2023, 12:39 AMextra-raspi
helps and does not help. But this is not the point here.
I understand but, like I said, I also have some other ideas I want to try, like using the regular images and configuring them after installations with a some sort of packages. This will let us not have to host any images. I'll write more about this idea when I check it and prove it working or not and when I shape it in a share-able wayDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:40 AMDhanOS
04/29/2023, 12:41 AMDhanOS
04/29/2023, 12:41 AMDhanOS
04/29/2023, 12:42 AMDhanOS
04/29/2023, 12:42 AMDhanOS
04/29/2023, 12:43 AMDhanOS
04/29/2023, 12:43 AMMichael Feher
04/29/2023, 12:47 AMDhanOS
04/29/2023, 12:47 AMDhanOS
04/29/2023, 12:47 AMDhanOS
04/29/2023, 12:52 AMDhanOS
04/29/2023, 12:52 AMDhanOS
04/29/2023, 12:53 AMDhanOS
04/29/2023, 12:54 AMDhanOS
04/29/2023, 12:54 AMDhanOS
04/29/2023, 12:55 AMDhanOS
04/29/2023, 12:56 AMDhanOS
04/29/2023, 1:00 AMDhanOS
04/29/2023, 1:00 AMDhanOS
04/29/2023, 1:00 AMDhanOS
04/29/2023, 1:00 AMDhanOS
04/29/2023, 1:00 AMDhanOS
04/29/2023, 1:00 AMMichael Feher
04/29/2023, 1:09 AMMichael Feher
04/29/2023, 1:15 AMDhanOS
04/29/2023, 1:20 AMUSB_OTG
I kind out thought to keep the _
there so it's the same as on the board and in the official docs 🙂
OTG Host/Device - I understand it's in works and you moved it, but if this helps I thought of something like this:werdnum
04/29/2023, 2:01 AMwerdnum
04/29/2023, 2:02 AMwerdnum
04/29/2023, 2:02 AMwerdnum
04/29/2023, 5:35 AMwerdnum
04/29/2023, 5:41 AMwerdnum
04/29/2023, 5:41 AMwerdnum
04/29/2023, 11:17 AMwerdnum
04/29/2023, 11:17 AMwerdnum
04/29/2023, 11:20 AMDhanOS
04/29/2023, 11:37 AMwerdnum
04/29/2023, 11:54 AMwerdnum
04/29/2023, 11:55 AMDhanOS
04/29/2023, 11:55 AMDhanOS
04/29/2023, 11:56 AMwerdnum
04/29/2023, 11:56 AMwerdnum
04/29/2023, 11:56 AMwerdnum
04/29/2023, 11:56 AMDhanOS
04/29/2023, 11:57 AMDhanOS
04/29/2023, 11:58 AMDhanOS
04/29/2023, 11:59 AMwerdnum
04/29/2023, 11:59 AMwerdnum
04/29/2023, 11:59 AMDhanOS
04/29/2023, 11:59 AMwerdnum
04/29/2023, 12:01 PMwerdnum
04/29/2023, 12:02 PMwerdnum
04/29/2023, 12:20 PMMichael Feher
04/29/2023, 4:09 PMMichael Feher
04/29/2023, 4:14 PMwerdnum
04/30/2023, 12:13 AMwerdnum
04/30/2023, 12:13 AMneilcar
04/30/2023, 4:29 PMCFSworks
05/01/2023, 7:18 PMj0ju
05/01/2023, 7:23 PMCFSworks
05/01/2023, 7:26 PMmake
-> reflash and not have problems from, say, forgetting to copy over the .dtsj0ju
05/01/2023, 7:29 PMCFSworks
05/01/2023, 7:30 PMj0ju
05/01/2023, 7:31 PMCFSworks
05/01/2023, 7:32 PMj0ju
05/01/2023, 7:32 PMCFSworks
05/01/2023, 7:32 PMj0ju
05/01/2023, 7:35 PMsunxi_card0_probe
the mmc subsystem works fine in the supplied uboot. I tried with kexec to start on demand from sdcard, but that is currently a mess of kernel stacktraces and I do not feel hard enough for that rabbit hole 😕CFSworks
05/01/2023, 7:37 PMboot_normal
from bootcmd
, but wasn't sure if you've cracked that particular case.j0ju
05/01/2023, 7:40 PMSerial Console: if you cannot enter the serial console of UBoot although a bootdelay>0 is configured flash the .img once.
This suspicion was yesterday confirmed. The uboot envs are indentical between what I dumped from my untouched TuringPi2 vs that is generated out of the build from the vanilla 1.0.1 repo. At least the relevant code path/variables called by runcmd are identical. So it might be another difference. As far I understand the IMG also contains a UBootCFSworks
05/01/2023, 7:42 PMbootdelay>0
but .img updates include a uboot that resolves that issue?j0ju
05/01/2023, 7:43 PMCFSworks
05/01/2023, 7:43 PMj0ju
05/01/2023, 7:43 PMj0ju
05/01/2023, 7:46 PMCFSworks
05/01/2023, 7:47 PM7e54140e013d66592dd8cd3b34ff5aaf6102df05d8f2d5d4a8d9836d653b742b
j0ju
05/01/2023, 7:49 PM#!/bin/sh
cat /proc/mtd > mtd.txt
while read mtd _ _ name; do
case "$mtd" in
mtd[0-9]: )
mtd="${mtd%:}"
name="${name#\"}"
name="${name%\"}"
dev="/dev/$mtd"ro
f="$mtd-$name.bin.gz"
gzip -1 -c < "$dev" > "$f"
;;
esac
done < /proc/mtd
echo "name size" > ubi.txt
for ubiname in /sys/class/ubi/ubi0_*/name; do
[ -f "$ubiname" ] || \
continue
ubisize="${ubiname%name}/data_bytes"
read name < "$ubiname"
read size < "$ubisize"
printf '%-13s %-d\n' $name $size >> ubi.txt
ubi="${ubiname%/name}"
ubi="${ubi##*/}"
dev="/dev/$ubi"
f="$ubi-$name.bin.gz"
gzip -1 -c < "$dev" > "$f"
done
j0ju
05/01/2023, 7:50 PM3f35d43f10ef9e97a83433776f415350e8899557943ae093f17ebd9126958394 mtd0-boot0.bin.gz
cf6f61ed7b76d0d0628523a11d25afabf31d762111d83ccdd7ed38c24a9dbedc mtd1-uboot.bin.gz
c1ecaad3d748ba9084d5b686a616fbaa29fb16953fd0eb314d8aeed0fac2fc77 mtd2-secure_storage.bin.gz
927e1a1bdb769278bc0c5ea9c712fe8cbc604c43345c0e7df1855370f1edbb6b mtd3-sys.bin.gz
ed696d6ea86fc9d15b92cd123d7f3928bc630c082bbe2072bb4b7fe16f39b4af mtd.txt
d8b2bf7517c044076b76dd6bb614748d7a0ee2277b91035b5d0bcf614bdd4794 ubi0_0-mbr.bin.gz
285557ad2cef6e131645144fcf2b4c2ef08c887e3224a04f43c4207350753f35 ubi0_1-boot-resource.bin.gz
8119bfe5d3b6a1c8a0ce24767d1150ec7fba87f93738a4cea799199b29b6a645 ubi0_2-env.bin.gz
a5a454cbeae2adaae7d8e4fe7d050ad8e42c5ec1af1fb1b8c372a6f70b5acf26 ubi0_3-env-redund.bin.gz
2d443bda03f69367c381a62e2c8c01459e414bca3cbbfe1f124433c288a4f01a ubi0_4-boot.bin.gz
661699a360f8c882127e3a724e890bbe9f3a8073e8d2e305315abdb2c95ee2b6 ubi0_5-rootfs.bin.gz
1cfc89d37867e4aff2398c784bbac06e33d0fe87d4e6d568467f85ea769231d9 ubi0_6-recovery.bin.gz
43e99eb978f3aeb0e8e100ee626c05ecc777ec2953b9153a0112186e69ad6b70 ubi0_7-dsp0.bin.gz
98c03cfc5852a7caacabbb3dde1b162a120f340bc63797945c580cf62210bd8f ubi0_8-private.bin.gz
feb473eec89d914f2dbbabc47ff2478d4680a4b8570a4888872c61b5245a2ce8 ubi0_9-UDISK.bin.gz
7b2e27d9149fd0430d7ec57b0dd5025cb8596c2b6c25589da6060366741cc0df ubi.txt
j0ju
05/01/2023, 7:50 PMCFSworks
05/01/2023, 7:50 PMj0ju
05/01/2023, 7:50 PMCFSworks
05/01/2023, 7:51 PMgunzip < mtd1-uboot.bin.gz | sha256sum -
?j0ju
05/01/2023, 7:51 PMj0ju
05/01/2023, 7:53 PMj0ju
05/01/2023, 10:41 PMj0ju
05/01/2023, 10:43 PMCFSworks
05/01/2023, 10:44 PMCFSworks
05/01/2023, 10:44 PMj0ju
05/01/2023, 10:47 PMCFSworks
05/01/2023, 10:57 PMj0ju
05/01/2023, 11:01 PMj0ju
05/01/2023, 11:25 PMCFSworks
05/01/2023, 11:27 PMj0ju
05/01/2023, 11:29 PMCFSworks
05/01/2023, 11:33 PM950272
bytes?j0ju
05/01/2023, 11:37 PMCFSworks
05/01/2023, 11:38 PMturing-pi master $ sha256sum br2t113pro/board/100ask/dragon/u-boot.fex
e70f8c152195000e5a6f4fd2149926e63f26a8801f301909818b102d17d190e8 br2t113pro/board/100ask/dragon/u-boot.fex
turing-pi master $ ls -l !$
-rwxr-xr-x 1 cfsworks cfsworks 950272 Apr 22 23:50 br2t113pro/board/100ask/dragon/u-boot.fex
j0ju
05/01/2023, 11:39 PMCFSworks
05/01/2023, 11:40 PMturing-pi/buildroot/output/images master $ dd if=buildroot_linux_nand_uart3.img bs=256 count=3712 skip=852 of=onlyuboot.fex
3712+0 records in
3712+0 records out
950272 bytes (950 kB, 928 KiB) copied, 0.00892286 s, 106 MB/s
turing-pi/buildroot/output/images master $ sha256sum onlyuboot.fex u-boot.fex
e70f8c152195000e5a6f4fd2149926e63f26a8801f301909818b102d17d190e8 onlyuboot.fex
e70f8c152195000e5a6f4fd2149926e63f26a8801f301909818b102d17d190e8 u-boot.fex
CFSworks
05/01/2023, 11:41 PMj0ju
05/01/2023, 11:43 PM~/src/build/turing-pi/bmc-release/turingpi-1.0.1.dump > dd count=1 bs=950272 if=mtd1-uboot.bin status=none | sha256sum
943e4a3eb9cfc624a6b63bbfd1fc0fd4a6ec0cecf357dfd2675f227f89cd9695 -
CFSworks
05/01/2023, 11:44 PMCFSworks
05/01/2023, 11:53 PMj0ju
05/01/2023, 11:54 PMj0ju
05/01/2023, 11:56 PMj0ju
05/01/2023, 11:57 PMCFSworks
05/01/2023, 11:57 PMCFSworks
05/02/2023, 6:01 PMDhanOS
05/02/2023, 8:42 PMDhanOS
05/02/2023, 8:46 PMCFSworks
05/02/2023, 9:13 PMDhanOS
05/02/2023, 9:22 PMDhanOS
05/02/2023, 9:33 PMCFSworks
05/02/2023, 9:34 PMDhanOS
05/02/2023, 9:34 PMCFSworks
05/02/2023, 9:35 PMCFSworks
05/02/2023, 9:37 PMCFSworks
05/02/2023, 9:39 PMDhanOS
05/02/2023, 9:41 PMCFSworks
05/02/2023, 9:42 PMCFSworks
05/02/2023, 9:44 PMTeslamax
05/02/2023, 9:46 PMTeslamax
05/02/2023, 9:46 PMCFSworks
05/02/2023, 9:46 PMCFSworks
05/02/2023, 9:47 PMTeslamax
05/02/2023, 9:48 PMTeslamax
05/02/2023, 9:49 PMTeslamax
05/02/2023, 9:50 PMTeslamax
05/02/2023, 9:50 PMCFSworks
05/02/2023, 9:51 PMTeslamax
05/02/2023, 9:52 PMCFSworks
05/02/2023, 9:53 PMCFSworks
05/02/2023, 9:53 PMTeslamax
05/02/2023, 9:53 PMCFSworks
05/02/2023, 9:55 PMCFSworks
05/02/2023, 9:57 PMbmc
binary in Rust (there isn't much there, should take a weekend), put the current API in api_legacy.rs
or similar, and then start working on api_v1.rs
- but it seems there's a desire to do it differently.Teslamax
05/02/2023, 9:59 PMDhanOS
05/02/2023, 10:00 PMCFSworks
05/02/2023, 10:00 PMDhanOS
05/02/2023, 10:00 PMDhanOS
05/02/2023, 10:02 PMTeslamax
05/02/2023, 10:03 PMCFSworks
05/02/2023, 10:03 PMDhanOS
05/02/2023, 10:04 PMTeslamax
05/02/2023, 10:04 PMTeslamax
05/02/2023, 10:05 PMCFSworks
05/02/2023, 10:05 PMDhanOS
05/02/2023, 10:06 PMCFSworks
05/02/2023, 10:07 PMDhanOS
05/02/2023, 10:07 PMTeslamax
05/02/2023, 10:08 PMDhanOS
05/02/2023, 10:09 PMTeslamax
05/02/2023, 10:10 PMCFSworks
05/02/2023, 10:11 PMTeslamax
05/02/2023, 10:11 PMDhanOS
05/02/2023, 10:13 PMDhanOS
05/02/2023, 10:14 PMTeslamax
05/02/2023, 10:14 PMDhanOS
05/02/2023, 10:15 PMTeslamax
05/02/2023, 10:16 PMDhanOS
05/02/2023, 10:16 PMTeslamax
05/02/2023, 10:16 PMCFSworks
05/02/2023, 10:16 PMCFSworks
05/02/2023, 10:17 PMTeslamax
05/02/2023, 10:17 PMCFSworks
05/02/2023, 10:18 PMDhanOS
05/02/2023, 10:18 PMCFSworks
05/02/2023, 10:18 PMDhanOS
05/02/2023, 10:18 PMDhanOS
05/02/2023, 10:19 PMCFSworks
05/02/2023, 10:19 PMkey=value\0key=value\0
format, so the community firmware just invented its own keys for the features not available upstream.CFSworks
05/02/2023, 10:20 PMDhanOS
05/02/2023, 10:20 PMCFSworks
05/02/2023, 10:22 PMDhanOS
05/02/2023, 10:23 PMCFSworks
05/02/2023, 10:23 PMDhanOS
05/02/2023, 10:25 PMCFSworks
05/02/2023, 10:27 PMCFSworks
05/02/2023, 10:30 PMDhanOS
05/02/2023, 10:31 PMCFSworks
05/02/2023, 10:32 PMDhanOS
05/02/2023, 10:33 PMCFSworks
05/02/2023, 10:33 PMDhanOS
05/02/2023, 10:33 PMDhanOS
05/02/2023, 10:36 PMCFSworks
05/02/2023, 10:38 PMj0ju
05/02/2023, 10:54 PMDhanOS
05/02/2023, 10:54 PMCFSworks
05/02/2023, 10:56 PMdd
it onto a SD card you don't care about
3. Put it in the TP2 board, power it on, wait for the power LED to start steady blinking
4. Hold KEY1 for 5 seconds (power LED starts rapidly blinking)
5. Once the power LED is no longer rapidly blinking, remove the SD card and push the BMC reset switch.
)j0ju
05/02/2023, 10:56 PMDhanOS
05/02/2023, 10:58 PMCFSworks
05/02/2023, 10:59 PMDhanOS
05/02/2023, 11:00 PMCFSworks
05/02/2023, 11:00 PMDhanOS
05/02/2023, 11:01 PMCFSworks
05/02/2023, 11:03 PMj0ju
05/02/2023, 11:03 PMDhanOS
05/02/2023, 11:04 PMCFSworks
05/02/2023, 11:04 PMDhanOS
05/02/2023, 11:04 PMapt
with ubuntuDhanOS
05/02/2023, 11:05 PMCFSworks
05/02/2023, 11:05 PMj0ju
05/02/2023, 11:06 PMDhanOS
05/02/2023, 11:07 PMDhanOS
05/02/2023, 11:08 PMCFSworks
05/02/2023, 11:13 PMj0ju
05/02/2023, 11:13 PMCFSworks
05/02/2023, 11:14 PMj0ju
05/02/2023, 11:14 PMDhanOS
05/02/2023, 11:16 PMCFSworks
05/02/2023, 11:18 PMDhanOS
05/02/2023, 11:18 PMDhanOS
05/02/2023, 11:19 PMCFSworks
05/02/2023, 11:20 PMDhanOS
05/02/2023, 11:21 PMDhanOS
05/02/2023, 11:21 PMCFSworks
05/02/2023, 11:21 PMDhanOS
05/02/2023, 11:21 PMCFSworks
05/02/2023, 11:21 PMDhanOS
05/02/2023, 11:22 PMCFSworks
05/02/2023, 11:23 PMCFSworks
05/02/2023, 11:24 PMDhanOS
05/02/2023, 11:24 PMCFSworks
05/02/2023, 11:26 PMCFSworks
05/02/2023, 11:26 PMDhanOS
05/02/2023, 11:26 PMDhanOS
05/02/2023, 11:28 PMCFSworks
05/02/2023, 11:29 PMCFSworks
05/02/2023, 11:29 PMDhanOS
05/02/2023, 11:30 PMCFSworks
05/02/2023, 11:31 PMDhanOS
05/02/2023, 11:31 PMDhanOS
05/02/2023, 11:32 PMCFSworks
05/02/2023, 11:33 PMCFSworks
05/02/2023, 11:33 PMDhanOS
05/02/2023, 11:35 PMDhanOS
05/02/2023, 11:35 PMCFSworks
05/02/2023, 11:36 PMDhanOS
05/02/2023, 11:37 PMCFSworks
05/02/2023, 11:37 PMDhanOS
05/02/2023, 11:37 PMDhanOS
05/02/2023, 11:38 PMCFSworks
05/02/2023, 11:39 PMCFSworks
05/02/2023, 11:39 PM-Os
optimizations for all built binaries, using a very lightweight libc, ...CFSworks
05/02/2023, 11:40 PMDhanOS
05/02/2023, 11:40 PMCFSworks
05/02/2023, 11:41 PMDhanOS
05/02/2023, 11:45 PMCFSworks
05/02/2023, 11:46 PMbmc
daemon on the horizon, we should probably expect that binary to take up a few MBs.CFSworks
05/02/2023, 11:47 PMDhanOS
05/02/2023, 11:51 PMCFSworks
05/02/2023, 11:52 PMDhanOS
05/02/2023, 11:52 PMDhanOS
05/02/2023, 11:53 PMMem: 80264K used, 31216K free, 108K shrd, 0K buff, 6880K cached
CPU: 0% usr 2% sys 0% nic 97% idle 0% io 0% irq 0% sirq
Load average: 0.06 0.07 0.01 3/68 29135
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
1100 1 root S 2620 2% 0% {S11adb_server} /bin/sh /etc/init.d/S11adb_server start
28715 26830 root R 2740 2% 0% top
26813 1179 root S 5860 5% 0% sshd: root@pts/1
15 2 root SW 0 0% 0% [ksoftirqd/1]
19906 2 root IW 0 0% 0% [kworker/u4:2-ev]
28113 2 root IW 0 0% 0% [kworker/u4:0-ev]
1092 1 root S 47288 42% 0% adbd
1186 1 root S 45576 41% 0% bmctest
1009 1 root S 14032 13% 0% /sbin/udevd -d
27257 1179 root S 5996 5% 0% sshd: root@notty
20367 1179 root S 5980 5% 0% sshd: root@pts/0
1179 1 root S 5600 5% 0% sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups
1184 1 root S 2700 2% 0% /usr/sbin/collectd
27268 27257 root S 2620 2% 0% -sh
26830 26813 root S 2620 2% 0% -sh
994 1 root S 2620 2% 0% /sbin/syslogd -n
998 1 root S 2620 2% 0% /sbin/klogd -n
1171 1 root S 2620 2% 0% udhcpc -b -R -O search -p /var/run/udhcpc.eth0.pid -i eth0 -x hostname:turing
20381 20367 root S 2620 2% 0% -sh
1189 1 root S 2620 2% 0% /sbin/getty -L ttyS3 115200 vt100
29135 1100 root S 2488 2% 0% sleep 1
1111 1 root S 1828 2% 0% /usr/sbin/rpcbind
1 0 root S 1376 1% 0% init [3]
924 2 root SW 0 0% 0% [cec thread]
9 2 root SW 0 0% 0% [ksoftirqd/0]
10 2 root IW 0 0% 0% [rcu_preempt]
923 2 root SW 0 0% 0% [hdmi proc]
32 2 root IW 0 0% 0% [kworker/0:1-eve]
33 2 root IW 0 0% 0% [kworker/1:1-eve]
12946 2 root IW 0 0% 0% [kworker/0:2-eve]
14 2 root SW 0 0% 0% [migration/1]
11 2 root SW 0 0% 0% [migration/0]
632 2 root SW 0 0% 0% [spi0]
961 2 root SW 0 0% 0% [ubifs_bgt0_5]
2 0 root SW 0 0% 0% [kthreadd]
18 2 root SW 0 0% 0% [kdevtmpfs]
948 2 root SW 0 0% 0% [ubi_bgt0d]
3 2 root IW< 0 0% 0% [rcu_gp]
4 2 root IW< 0 0% 0% [rcu_par_gp]
6 2 root IW< 0 0% 0% [kworker/0:0H]
8 2 root IW< 0 0% 0% [mm_percpu_wq]
12 2 root SW 0 0% 0% [cpuhp/0]
13 2 root SW 0 0% 0% [cpuhp/1]
17 2 root IW< 0 0% 0% [kworker/1:0H]
21 2 root SW 0 0% 0% [rcu_tasks_kthre]
371 2 root SW 0 0% 0% [oom_reaper]
372 2 root IW< 0 0% 0% [writeback]
387 2 root IW< 0 0% 0% [kblockd]
523 2 root SW 0 0% 0% [ion_system_heap]
537 2 root SW 0 0% 0% [watchdogd]
642 2 root SW 0 0% 0% [kswapd0]
759 2 root SW 0 0% 0% [vsync proc 0]
760 2 root SW 0 0% 0% [vsync proc 1]
833 2 root IW< 0 0% 0% [uas]
871 2 root SW 0 0% 0% [rc0]
889 2 root SW 0 0% 0% [irq/42-mmc0]
891 2 root SW 0 0% 0% [irq/202-4020000]
910 2 root IW< 0 0% 0% [ipv6_addrconf]
953 2 root IW< 0 0% 0% [goodix_wq]
1130 2 root IW 0 0% 0% [kworker/1:2-rcu]
CFSworks
05/02/2023, 11:53 PMCFSworks
05/02/2023, 11:54 PMDhanOS
05/02/2023, 11:55 PMDhanOS
05/02/2023, 11:56 PMDhanOS
05/02/2023, 11:57 PMDhanOS
05/02/2023, 11:58 PMCFSworks
05/03/2023, 12:00 AMDhanOS
05/03/2023, 12:03 AMDhanOS
05/03/2023, 12:06 AMCFSworks
05/03/2023, 12:06 AMsvenrademakers
05/03/2023, 6:30 AMCFSworks
05/03/2023, 6:45 AMwerdnum
05/03/2023, 6:54 AMsvenrademakers
05/03/2023, 8:15 AMwalkjivefly
05/03/2023, 8:57 AMTeslamax
05/03/2023, 10:30 PMCFSworks
05/03/2023, 10:33 PMwalkjivefly
05/03/2023, 10:55 PMTeslamax
05/03/2023, 10:56 PMTeslamax
05/03/2023, 10:57 PMTeslamax
05/03/2023, 10:58 PMTeslamax
05/03/2023, 10:58 PMCFSworks
05/03/2023, 10:58 PMTeslamax
05/03/2023, 10:58 PMCFSworks
05/03/2023, 10:59 PMTeslamax
05/03/2023, 10:59 PMCFSworks
05/03/2023, 11:00 PMDhanOS
05/03/2023, 11:00 PMDhanOS
05/03/2023, 11:02 PMTeslamax
05/03/2023, 11:02 PMDhanOS
05/03/2023, 11:03 PMTeslamax
05/03/2023, 11:08 PMTeslamax
05/03/2023, 11:09 PMwerdnum
05/03/2023, 11:34 PMTeslamax
05/03/2023, 11:36 PMwerdnum
05/03/2023, 11:38 PMwerdnum
05/03/2023, 11:39 PMwerdnum
05/03/2023, 11:40 PMwerdnum
05/03/2023, 11:40 PMwerdnum
05/03/2023, 11:41 PMwerdnum
05/03/2023, 11:44 PMTeslamax
05/03/2023, 11:45 PMTeslamax
05/03/2023, 11:45 PMDhanOS
05/03/2023, 11:46 PMTeslamax
05/03/2023, 11:47 PMwerdnum
05/03/2023, 11:47 PMwerdnum
05/03/2023, 11:47 PMTeslamax
05/03/2023, 11:47 PMTeslamax
05/04/2023, 12:17 AMwerdnum
05/04/2023, 12:36 AMTeslamax
05/04/2023, 12:37 AMDhanOS
05/04/2023, 12:37 AMDhanOS
05/04/2023, 12:38 AMTeslamax
05/04/2023, 12:39 AMwerdnum
05/04/2023, 12:39 AMTeslamax
05/04/2023, 12:39 AMwerdnum
05/04/2023, 12:40 AMTeslamax
05/04/2023, 12:40 AMDhanOS
05/04/2023, 12:41 AMTeslamax
05/04/2023, 12:42 AMDhanOS
05/04/2023, 12:50 AMCFSworks
05/04/2023, 12:52 AMCFSworks
05/04/2023, 12:52 AMDhanOS
05/04/2023, 12:53 AMwerdnum
05/04/2023, 12:55 AMDhanOS
05/04/2023, 12:57 AM0xe282b0
05/04/2023, 12:32 PM-----------------update_mbr--------------------------
mbr count = 4
partitation file Path=/turing-pi-2-community-edition-firmware/buildroot/output/images/sys_partition.bin
mbr_name file Path=/turing-pi-2-community-edition-firmware/buildroot/output/images/sunxi_mbr.fex
download_name file Path=/turing-pi-2-community-edition-firmware/buildroot/output/images/dlinfo.fex
mbr size = 16384
mbr magic softw411
disk name=boot-resource
disk name=env
disk name=env-redund
disk name=boot
disk name=rootfs
ERROR: dl file rootfs-ubifs.fex size too large
ERROR: filename = rootfs-ubifs.fex
ERROR: dl_file_size = 67536 sector
ERROR: part_size = 65536 sector
update_for_part_info -1
ERROR: update mbr file fail
DhanOS
05/04/2023, 12:35 PM0xe282b0
05/04/2023, 12:39 PMDhanOS
05/04/2023, 12:41 PM0xe282b0
05/04/2023, 12:50 PMtimmy_pete
05/05/2023, 2:29 AMDhanOS
05/05/2023, 9:27 PMTeslamax
05/05/2023, 9:34 PMsvenrademakers
05/05/2023, 10:17 PMDhanOS
05/05/2023, 10:18 PMsvenrademakers
05/05/2023, 10:18 PMDhanOS
05/05/2023, 10:19 PMsvenrademakers
05/05/2023, 10:21 PMCFSworks
05/05/2023, 10:21 PMsvenrademakers
05/05/2023, 10:21 PMsvenrademakers
05/05/2023, 10:23 PMCFSworks
05/05/2023, 10:24 PMDhanOS
05/05/2023, 10:28 PMCFSworks
05/05/2023, 10:29 PMTeslamax
05/05/2023, 10:30 PMDhanOS
05/05/2023, 10:31 PMCFSworks
05/05/2023, 10:34 PMecho node3 > /sys/.../endpoint1; echo port > /sys/.../endpoint2
though that might involve writing a driver) and I very much want not to touch userspace, so there should still be plenty of room for enhancements there.svenrademakers
05/05/2023, 10:39 PMCFSworks
05/05/2023, 10:41 PMDhanOS
05/05/2023, 10:42 PMCFSworks
05/05/2023, 10:42 PMDhanOS
05/05/2023, 10:43 PMsvenrademakers
05/05/2023, 10:44 PMDhanOS
05/05/2023, 10:45 PMCFSworks
05/05/2023, 10:45 PMCFSworks
05/05/2023, 10:48 PMCFSworks
05/05/2023, 10:49 PMCONFIG_AW_SPINAND_SIMULATE_MULTIPLANE
svenrademakers
05/05/2023, 10:50 PMDhanOS
05/05/2023, 10:51 PMCFSworks
05/05/2023, 10:51 PMCFSworks
05/05/2023, 10:52 PMsvenrademakers
05/05/2023, 10:53 PMsvenrademakers
05/05/2023, 10:54 PMDhanOS
05/05/2023, 10:54 PMDhanOS
05/05/2023, 10:57 PMDhanOS
05/05/2023, 10:57 PMsvenrademakers
05/05/2023, 10:57 PMDhanOS
05/05/2023, 10:58 PMDhanOS
05/05/2023, 10:58 PMCFSworks
05/05/2023, 10:59 PM/etc/config
, the upgrade process will grab that (+ other files that you have requested it not blow away) and move them over for you. (Or you can check a box to ask it not to do that and get a fresh install.)svenrademakers
05/05/2023, 11:00 PMCFSworks
05/05/2023, 11:01 PMDhanOS
05/05/2023, 11:02 PM/etc
on the flash as wellDhanOS
05/05/2023, 11:02 PMDhanOS
05/05/2023, 11:02 PMDhanOS
05/05/2023, 11:03 PMsvenrademakers
05/05/2023, 11:03 PMDhanOS
05/05/2023, 11:04 PMDhanOS
05/05/2023, 11:04 PMCFSworks
05/05/2023, 11:04 PMDhanOS
05/05/2023, 11:05 PMDhanOS
05/05/2023, 11:05 PMDhanOS
05/05/2023, 11:06 PMsvenrademakers
05/05/2023, 11:06 PMDhanOS
05/05/2023, 11:06 PMsvenrademakers
05/05/2023, 11:06 PMDhanOS
05/05/2023, 11:06 PMCFSworks
05/05/2023, 11:07 PMCFSworks
05/05/2023, 11:08 PMDhanOS
05/05/2023, 11:08 PMsvenrademakers
05/05/2023, 11:08 PMCFSworks
05/05/2023, 11:08 PMsvenrademakers
05/05/2023, 11:08 PMDhanOS
05/05/2023, 11:08 PMCFSworks
05/05/2023, 11:09 PMDhanOS
05/05/2023, 11:10 PMCFSworks
05/05/2023, 11:10 PMsvenrademakers
05/05/2023, 11:11 PMDhanOS
05/05/2023, 11:11 PMDhanOS
05/05/2023, 11:11 PMCFSworks
05/05/2023, 11:12 PMDhanOS
05/05/2023, 11:13 PMDhanOS
05/05/2023, 11:13 PMCFSworks
05/05/2023, 11:13 PMDhanOS
05/05/2023, 11:13 PMDhanOS
05/05/2023, 11:13 PMCFSworks
05/05/2023, 11:14 PMDhanOS
05/05/2023, 11:15 PMCFSworks
05/05/2023, 11:17 PMDhanOS
05/05/2023, 11:18 PMCFSworks
05/05/2023, 11:20 PMsvenrademakers
05/05/2023, 11:20 PMDhanOS
05/05/2023, 11:22 PMwerdnum
05/05/2023, 11:22 PMwerdnum
05/05/2023, 11:23 PMtimmy_pete
05/06/2023, 9:04 AMwerdnum
05/08/2023, 2:10 AMsvenrademakers
05/08/2023, 3:48 PMDhanOS
05/08/2023, 4:01 PMCFSworks
05/08/2023, 4:11 PMsvenrademakers
05/08/2023, 4:11 PMsvenrademakers
05/08/2023, 4:13 PMsvenrademakers
05/08/2023, 4:14 PMDhanOS
05/08/2023, 4:17 PMCFSworks
05/08/2023, 4:18 PMSIMULATE_MULTIPLANE
, because it changes the flash geometry from 1024 blocks of 128KiB to 512 blocks of 256KiB, which is frustrating UBI's ability to wear-level and doubling up the erase operations.DhanOS
05/08/2023, 4:21 PMsvenrademakers
05/08/2023, 4:22 PMDhanOS
05/08/2023, 4:22 PMCFSworks
05/08/2023, 4:23 PMDhanOS
05/08/2023, 4:24 PMCFSworks
05/08/2023, 4:26 PMsvenrademakers
05/08/2023, 4:26 PMDhanOS
05/08/2023, 4:29 PMDhanOS
05/08/2023, 4:31 PMCFSworks
05/08/2023, 4:33 PMDhanOS
05/08/2023, 4:36 PMCFSworks
05/08/2023, 4:39 PMDhanOS
05/08/2023, 4:40 PMDhanOS
05/08/2023, 4:40 PMDhanOS
05/08/2023, 4:41 PMCFSworks
05/08/2023, 4:56 PMSIMULATE_MULTIPLANE
turned off (both in kernel config and a header in uboot)? I know I'm sounding like a broken record on this but it's really complicating access to NAND flash and it's likely the first step in simplifying the firmware boot/flash process. I'd look more into it myself but I'm about to go on a trip and I want my board in a stable state so I can hack on it remotely. (That and I can't quickly get either of the Suits working before I leave.)DhanOS
05/08/2023, 4:59 PMCFSworks
05/08/2023, 4:59 PMCFSworks
05/08/2023, 4:59 PMDhanOS
05/08/2023, 5:03 PMDhanOS
05/08/2023, 5:03 PMCFSworks
05/08/2023, 5:13 PMmake linux-menuconfig
, search for (and turn off) AW_SPINAND_SIMULATE_MULTIPLANE
- Edit output/build/uboot-69b04a0b3dd5c412f66e9dbfd02876eebfd99646/include/linux/mtd/aw-spinand.h
and find the line #define SIMULATE_MULTIPLANE (1)
, switching it to 0
- Rebuild both and image: make linux-rebuild uboot-rebuild target-post-image
- Flash new buildroot_linux_nand_uart3.img
to NAND on one of your boards
- ... see what happens and try to make it work and report back on how difficult the flashing wasCFSworks
05/08/2023, 5:13 PMDhanOS
05/08/2023, 6:04 PMDhanOS
05/08/2023, 6:04 PMCFSworks
05/08/2023, 6:30 PMCFSworks
05/08/2023, 6:30 PMsunxi-tools
some love and have a script to do the same for people who can't easily access the SDCFSworks
05/08/2023, 6:31 PMcosta-al
05/08/2023, 6:47 PMCFSworks
05/08/2023, 6:52 PMCFSworks
05/08/2023, 7:10 PMDhanOS
05/08/2023, 7:13 PMDhanOS
05/08/2023, 7:14 PMDhanOS
05/08/2023, 7:17 PMCFSworks
05/08/2023, 7:53 PMaw-ubi-spinand.ubootblks=
kernel parameter) number of blocks to U-Boot, 1MiB to "secure_storage" (we don't use it), and the remainder to "sys." (The fixed partitioning is one of the reasons I want to move away from AWNAND to the vanilla Linux driver.) The "sys" mtd is a UBI layer to do wear-leveling and further subpartitioning (which you probably already know about) and then within we of course have the U-Boot env, kernel, and primary/fallback rootfs.CFSworks
05/08/2023, 7:55 PMspi-nand
driver, or AWNAND with SIMULATE_MULTIPLANE
turned off). The boot0 and uboot are stored in the normal "linear" order so if we try to write to those mtds through the AWNAND+SIMULATE_MULTIPLANE driver it will end up all scrambled. (Unless we write it in a scrambled order so that it ends up non-scrambled on flash, but that's even more hideous and I just want to do away with SIMULATE_MULTIPLANE and call it done.)costa-al
05/08/2023, 7:55 PMCFSworks
05/08/2023, 7:56 PMDhanOS
05/08/2023, 8:00 PMDhanOS
05/08/2023, 8:00 PMCFSworks
05/08/2023, 8:24 PMDhanOS
05/08/2023, 8:27 PMCFSworks
05/08/2023, 8:42 PMCFSworks
05/08/2023, 8:42 PMDhanOS
05/08/2023, 8:43 PMCFSworks
05/08/2023, 8:45 PMDhanOS
05/08/2023, 8:46 PMCFSworks
05/08/2023, 8:50 PMCFSworks
05/08/2023, 8:51 PMDhanOS
05/08/2023, 8:53 PMCFSworks
05/08/2023, 8:54 PMDhanOS
05/08/2023, 8:57 PMDhanOS
05/08/2023, 8:58 PMDhanOS
05/08/2023, 8:58 PMDhanOS
05/08/2023, 8:58 PMDhanOS
05/08/2023, 8:59 PMCFSworks
05/08/2023, 9:03 PMboot0_sdcard.fex
, hex edit in some of the settings (proper DRAM timings, console UART=3, location and size of U-Boot), then just dd
that at offset 8KiB in the SD card.CFSworks
05/08/2023, 9:03 PMCFSworks
05/08/2023, 9:04 PMCFSworks
05/08/2023, 9:09 PMDhanOS
05/09/2023, 3:06 AMDevice Drivers -> Memory Technology Device (MTD) support -> sunxi-nand -> enable simulate multiplane
Other than that, just done all the steps and got the image file. I never used the PhoenixSuit so far, so this is what I am going to try now 🙂CFSworks
05/09/2023, 3:07 AMDhanOS
05/09/2023, 3:10 AMDhanOS
05/09/2023, 3:42 AMDhanOS
05/09/2023, 3:43 AMDhanOS
05/09/2023, 3:46 AMDhanOS
05/09/2023, 3:46 AM[15.228]Volume identifier header dump:
[15.232] magic 31181006
[15.234] version 221
[15.236] vol_type 139
[15.238] copy_flag 75
[15.240] compat 170
[15.242] vol_id -871235584
[15.245] lnum 0
[15.247] data_size 16777216
[15.250] used_ebs -2080309248
[15.252] data_pad 2013265952
[15.255] sqnum 4503599660924928
[15.258] hdr_crc 101011f1
[15.261]Volume identifier header hexdump:
[15.264]hexdump of PEB 850 offset 4096, length 126976[15.283]ubi0 error: check_corruption: PEB 852 contains corrupted VID header, and the data does not contain all 0xFF
DhanOS
05/09/2023, 3:46 AMDhanOS
05/09/2023, 3:46 AMDhanOS
05/09/2023, 3:46 AMDhanOS
05/09/2023, 3:47 AMCFSworks
05/09/2023, 3:48 AMDhanOS
05/09/2023, 3:48 AMCFSworks
05/09/2023, 3:49 AMCFSworks
05/09/2023, 3:50 AMDhanOS
05/09/2023, 3:51 AMDhanOS
05/09/2023, 3:51 AMHit any key to stop autoboot: 0
DhanOS
05/09/2023, 3:51 AMDhanOS
05/09/2023, 3:51 AMCFSworks
05/09/2023, 3:51 AMCFSworks
05/09/2023, 3:51 AMhttps://tenor.com/1QlC.gif▾
DhanOS
05/09/2023, 3:52 AMCFSworks
05/09/2023, 3:53 AMefex
command will get you back to USB recovery mode if you want to recover the board.CFSworks
05/09/2023, 3:53 AMDhanOS
05/09/2023, 3:56 AMDhanOS
05/09/2023, 3:58 AMCFSworks
05/09/2023, 3:59 AMCFSworks
05/09/2023, 3:59 AMDhanOS
05/09/2023, 4:00 AMDhanOS
05/09/2023, 4:01 AMCFSworks
05/09/2023, 4:02 AMefex
modeCFSworks
05/09/2023, 4:02 AMDhanOS
05/09/2023, 4:02 AMCFSworks
05/09/2023, 4:02 AMDhanOS
05/09/2023, 4:03 AMDhanOS
05/09/2023, 4:04 AMCFSworks
05/09/2023, 4:04 AMDhanOS
05/09/2023, 4:04 AMDhanOS
05/09/2023, 4:04 AMDhanOS
05/09/2023, 4:05 AMDhanOS
05/09/2023, 4:05 AMDhanOS
05/09/2023, 4:05 AMCFSworks
05/09/2023, 4:05 AMDhanOS
05/09/2023, 4:06 AMDhanOS
05/09/2023, 4:06 AMDhanOS
05/09/2023, 4:10 AMexef
worksDhanOS
05/09/2023, 4:10 AMDhanOS
05/09/2023, 4:12 AMCFSworks
05/09/2023, 4:15 AMDhanOS
05/09/2023, 4:16 AMCFSworks
05/09/2023, 4:17 AMDhanOS
05/09/2023, 4:18 AMDhanOS
05/09/2023, 4:18 AMCFSworks
05/09/2023, 4:22 AMdd if=fel-sdboot.sunxi of=/dev/mmcblk0 bs=512 seek=16
CFSworks
05/09/2023, 4:33 AMsvenrademakers
05/09/2023, 9:30 AMDhanOS
05/09/2023, 12:23 PMDhanOS
05/09/2023, 1:25 PM./buildroot/dl/uboot/git/include/linux/mtd/aw-spinand.h:29:#define SIMULATE_MULTIPLANE (1)
DhanOS
05/09/2023, 1:26 PM./bmc4tpi/config/kernelconfig:983:CONFIG_AW_SPINAND_SIMULATE_MULTIPLANE=y
DhanOS
05/09/2023, 1:27 PMDhanOS
05/09/2023, 1:40 PMDhanOS
05/09/2023, 1:45 PMDhanOS
05/09/2023, 2:13 PMCFSworks
05/09/2023, 5:31 PMSIMULATE_MULTIPLANE
disabled in are:
- The Linux kernel itself (that's easy, and we do have it right or it wouldn't be spewing UBI errors)
- The boot-time U-Boot, which is packaged into boot_package.fex
(and before that is u-boot-sun8iw20p1.bin
)
- The flash-time U-Boot, temporarily loaded into the T113 over USB by PhoenixSuit just to do the flashing operations, which is bundled in the .img (and before that is dragon/u-boot.fex
)CFSworks
05/10/2023, 4:57 AMDhanOS
05/10/2023, 12:37 PMCFSworks
05/11/2023, 5:17 AMUART>(2)
Raw UART input
Any key to exit
U-Boot SPL 2023.07-rc2-00024-g5be325423d-dirty (May 10 2023 - 21:15:29 -0600)
DRAM: 128 MiB
sunxi SPL version mismatch: expected 2, got 1
Trying to boot from FEL
CFSworks
05/11/2023, 5:18 AMCFSworks
05/11/2023, 5:18 AM$ ./sunxi-fel readl 0x5ABCDEF0
0xaedef7f7
$ ./sunxi-fel writel 0x5ABCDEF0 0xDEADBEEF
$ ./sunxi-fel readl 0x5ABCDEF0
0xdeadbeef
CFSworks
05/11/2023, 8:34 PM$ clang --target=arm-linux-gnueabi -c foo.S -o foo-clang.o
$ objdump -h foo-clang.o
...
Idx Name Size VMA LMA File off Algn
...
1 .text.test 00000008 00000000 00000000 00000034 2**0
$ .../arm-linux-gnueabi-gcc -c foo.S -o foo-gcc.o
$ objdump -h foo-gcc.o
...
Idx Name Size VMA LMA File off Algn
...
3 .text.test 00000008 00000000 00000000 00000034 2**2
CFSworks
05/11/2023, 8:35 PM.align
directive in its assembly files.DhanOS
05/11/2023, 8:41 PMDhanOS
05/11/2023, 8:42 PMwerdnum
05/13/2023, 5:33 AMwerdnum
05/13/2023, 5:34 AMCFSworks
05/13/2023, 6:09 AMj0ju
05/14/2023, 10:52 PMCFSworks
05/14/2023, 11:19 PMj0ju
05/14/2023, 11:29 PMDhanOS
05/14/2023, 11:33 PMCFSworks
05/17/2023, 5:55 PMCFSworks
05/17/2023, 5:55 PMwerdnum
05/18/2023, 8:51 AMCFSworks
05/20/2023, 6:51 PMCFSworks
05/20/2023, 6:51 PMCFSworks
05/20/2023, 6:52 PMdd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=512 seek=16
)DhanOS
05/20/2023, 7:13 PMDhanOS
05/20/2023, 7:13 PMCFSworks
05/20/2023, 8:14 PMCFSworks
05/21/2023, 10:01 PMCFSworks
05/21/2023, 10:01 PMDhanOS
05/22/2023, 8:59 PMCFSworks
05/22/2023, 9:01 PMCFSworks
05/23/2023, 6:57 PMmkbootimg
! but untested)
- MTD/NAND support (note: partition layout and block ordering very different from current official firmware, use with extreme care)
- Ethernet support (can pull kernel/initramfs/dt over TFTP!)
- Pull-up register on UART3 is enabled, for compatibility with open-drain serial cablesDhanOS
05/23/2023, 6:58 PMDhanOS
05/23/2023, 6:58 PMCFSworks
05/23/2023, 7:00 PMCFSworks
05/23/2023, 7:02 PMzImage
and .dtb from the buildroot output), that would help tons. I am either unable or too scared to try these remotely (I'm currently 900+ miles away from my board and accessing it via USBIP and a Bus Pirate wired to the UART port 🤣 )DhanOS
05/23/2023, 7:05 PMCFSworks
05/23/2023, 7:07 PMbutton
and led
commands in the U-Boot shellCFSworks
05/23/2023, 7:08 PMCFSworks
05/23/2023, 7:09 PMDhanOS
05/23/2023, 7:10 PMDhanOS
05/23/2023, 7:11 PMCFSworks
05/23/2023, 7:28 PM<inactive>
means "hasn't been accessed yet" not "not lit/pressed"DhanOS
05/23/2023, 10:37 PMDhanOS
05/23/2023, 10:37 PMDhanOS
05/23/2023, 10:38 PMCFSworks
05/23/2023, 10:40 PMDhanOS
05/23/2023, 10:41 PMDhanOS
05/23/2023, 10:41 PMCFSworks
05/23/2023, 10:41 PMCFSworks
05/23/2023, 10:41 PMDhanOS
05/23/2023, 10:44 PMDhanOS
05/23/2023, 10:44 PMU-Boot SPL 2023.07-rc2-00210-ga88a11bbc4 (May 23 2023 - 12:49:40 -0600)
DRAM: 128 MiB
Trying to boot from MMC1
U-Boot 2023.07-rc2-00210-ga88a11bbc4 (May 23 2023 - 12:49:40 -0600) Allwinner Technology
CPU: Allwinner R528 (SUN8I)
Model: Turing Machines Turing Pi 2 BMC
DRAM: 128 MiB
sunxi_set_gate: (CLK#24) unhandled
Core: 38 devices, 19 uclasses, devicetree: separate
MMC: mmc@4020000: 0
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1...
In: serial@2500c00
Out: serial@2500c00
Err: serial@2500c00
Net: eth0: ethernet@4500000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
ethernet@4500000 Waiting for PHY auto negotiation to complete. done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
DhanOS
05/23/2023, 10:45 PMDhanOS
05/23/2023, 10:45 PMBOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17
Retry time exceeded; starting again
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-02-00-fa-db-69-17
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/00000000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/0000000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/000000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/00000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/0000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/000
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/00
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/0
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm-sunxi-sunxi
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm-sunxi
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default-arm
*** ERROR: `serverip' not set
Retrieving file: pxelinux.cfg/default
*** ERROR: `serverip' not set
Config file not found
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
CFSworks
05/23/2023, 10:45 PMDhanOS
05/23/2023, 10:45 PMBOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17
Retry time exceeded; starting again
=>
CFSworks
05/23/2023, 10:45 PMCFSworks
05/23/2023, 10:45 PM?
for helpDhanOS
05/23/2023, 10:45 PMDhanOS
05/23/2023, 10:45 PMCFSworks
05/23/2023, 10:46 PMDhanOS
05/23/2023, 10:46 PMCFSworks
05/23/2023, 10:46 PMkey1
is at least easy to testDhanOS
05/23/2023, 10:46 PMDhanOS
05/23/2023, 10:46 PMCFSworks
05/23/2023, 10:47 PMDhanOS
05/23/2023, 10:47 PM=> button
button - manage buttons
Usage:
button <button_label> Get button state
button list Show a list of buttons
=> button list
fp:power <inactive>
fp:reset <inactive>
key1 <inactive>
=> button key1
off
=> button key1
on
=>
CFSworks
05/23/2023, 10:47 PMDhanOS
05/23/2023, 10:48 PMCFSworks
05/23/2023, 10:48 PMDhanOS
05/23/2023, 10:49 PMCFSworks
05/23/2023, 10:50 PMenv print
if you want to see the current environment variables (most of which contain scripts that can be run)CFSworks
05/23/2023, 10:51 PMbootcmd
var is what runs if you let the autoboot timeout run out, and it seems to follow a whole series of calls to hunt for and run a boot scriptCFSworks
05/23/2023, 10:51 PM/boot.scr
or /boot/boot.scr
on your microSD it will autorun that.DhanOS
05/23/2023, 10:52 PM=> led
led - manage LEDs
Usage:
led <led_label> on|off|toggle Change LED state
led <led_label> Get LED state
led list show a list of LEDs
=> led list
fp:sys <inactive>
fp:reset <inactive>
=> led fp:sys on
=> led fp:reset on
=>
DhanOS
05/23/2023, 10:52 PMDhanOS
05/23/2023, 10:57 PMboot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
DhanOS
05/23/2023, 10:57 PMCFSworks
05/23/2023, 11:00 PMCFSworks
05/23/2023, 11:00 PMCFSworks
05/23/2023, 11:01 PMCFSworks
05/23/2023, 11:04 PMsetenv bootargs earlycon=uart8250,mmio32,0x05000000 console=ttyS3,115200 loglevel=8 aw-ubi-spinand.ubootblks=24
load mmc 0 ${kernel_addr_r} zImage
load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-turingmachines-tp2bmc.dtb
bootz ${kernel_addr_r} - ${fdt_addr_r}
...which assumes that the zImage
and bootz ${kernel_addr_r} - ${fdt_addr_r}
files from buildroot/output/images/
are in the root of the microSD card.CFSworks
05/23/2023, 11:05 PMKernel image @ 0x41000000 [ 0x000000 - 0x373358 ]
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Working FDT set to 41800000
ERROR: reserving fdt memory region failed (addr=41900000 size=700000 flags=0)
Loading Device Tree to 42df2000, end 42dffbd5 ... OK
Working FDT set to 42df2000
Starting kernel ...
CFSworks
05/23/2023, 11:05 PMCFSworks
05/23/2023, 11:07 PMsun8iw20p1-t113-turingmachines-tp2bmc.dtb
, balking at the /memreserve/ 0x41900000 0x00100000;
directive, falling back to the builtin FDT, and the kernel goes quiet because it doesn't know how to set up the console UART.DhanOS
05/23/2023, 11:08 PMCFSworks
05/23/2023, 11:08 PMDhanOS
05/23/2023, 11:08 PMls
but I'm missing the interface name I guessCFSworks
05/23/2023, 11:08 PMls mmc 0
DhanOS
05/23/2023, 11:09 PMDhanOS
05/23/2023, 11:09 PMCFSworks
05/23/2023, 11:09 PMearlycon=
options are wrongDhanOS
05/23/2023, 11:10 PMDhanOS
05/23/2023, 11:10 PMCFSworks
05/23/2023, 11:11 PMDhanOS
05/23/2023, 11:11 PMCFSworks
05/23/2023, 11:13 PMDhanOS
05/23/2023, 11:13 PMCFSworks
05/23/2023, 11:13 PMfdisk /dev/mmcblk0
-> p
DhanOS
05/23/2023, 11:14 PMCFSworks
05/23/2023, 11:14 PMCFSworks
05/23/2023, 11:14 PMDhanOS
05/23/2023, 11:16 PMDhanOS
05/23/2023, 11:16 PMDevice Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 3932159 3930112 1,9G b W95 FAT32
CFSworks
05/23/2023, 11:17 PMDhanOS
05/23/2023, 11:17 PM/dev/sdb
DhanOS
05/23/2023, 11:17 PMDhanOS
05/23/2023, 11:17 PMCFSworks
05/23/2023, 11:18 PMCFSworks
05/23/2023, 11:18 PMCFSworks
05/23/2023, 11:20 PMearlycon=uart8250,mmio32,0x05000000
-> earlycon=uart8250,mmio32,0x02500c00
might get us some outputDhanOS
05/23/2023, 11:21 PMCFSworks
05/23/2023, 11:21 PMDhanOS
05/23/2023, 11:21 PMsun8iw20p1-t113-100ask-t113-pro.dtb
)CFSworks
05/23/2023, 11:22 PMDhanOS
05/23/2023, 11:22 PMCFSworks
05/23/2023, 11:22 PMDhanOS
05/23/2023, 11:22 PMDhanOS
05/23/2023, 11:25 PM=> setenv bootargs earlycon=uart8250,mmio32,0x02500c00 console=ttyS3,115200 loglevel=8 aw-ubi-spinand.ubootblks=24
=> load mmc 0 ${kernel_addr_r} zImage
3962896 bytes read in 656 ms (5.8 MiB/s)
=> load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
54900 bytes read in 13 ms (4 MiB/s)
=> bootz ${kernel_addr_r} - ${fdt_addr_r}
Kernel image @ 0x41000000 [ 0x000000 - 0x3c7810 ]
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Working FDT set to 41800000
ERROR: reserving fdt memory region failed (addr=41900000 size=700000 flags=0)
Loading Device Tree to 42def000, end 42dff673 ... OK
Working FDT set to 42def000
Starting kernel ...
CFSworks
05/23/2023, 11:25 PMCFSworks
05/23/2023, 11:28 PMCFSworks
05/23/2023, 11:30 PMCFSworks
05/23/2023, 11:30 PMbootargs
unless we turn on some other setting firstCFSworks
05/23/2023, 11:31 PMCFSworks
05/23/2023, 11:37 PMERROR: reserving fdt memory region failed
is not a fatal error, it just fails that one memreserve and moves on.DhanOS
05/23/2023, 11:37 PMCFSworks
05/23/2023, 11:39 PMCFSworks
05/23/2023, 11:40 PMDhanOS
05/24/2023, 12:18 AMCFSworks
05/24/2023, 12:36 AMCFSworks
05/24/2023, 12:37 AMbootz [addr [initrd[:size]] [fdt]]
means that fdt is the one it should use or just where it should relocate it to before bootCFSworks
05/24/2023, 12:38 AMDhanOS
05/24/2023, 1:12 AMDhanOS
05/24/2023, 1:12 AM=> load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
54900 bytes read in 13 ms (4 MiB/s)
=> fdt addr ${fdt_addr_r}
Working FDT set to 41800000
=> fdt boardsetup
=> fdt list
/ {
model = "sun8iw20";
compatible = "allwinner,r528", "arm,sun8iw20p1";
interrupt-parent = <0x00000001>;
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
aliases {
};
chosen {
};
firmware {
};
cpus {
};
psci {
};
dump_reg@20000 {
};
cpu-opp-table {
};
dcxo24M_clk {
};
rc16m_clk {
};
ext32k_clk {
};
dram {
};
memory@40000000 {
};
share_space@0x42100000 {
};
interrupt-controller@3020000 {
};
timer_arch {
};
pmu {
};
power-management@ff000000 {
};
iommu@2010000 {
};
pio-18 {
};
pio-33 {
};
thermal-zones {
};
soc@3000000 {
};
vdd-cpu {
};
usb1-vbus {
};
};
DhanOS
05/24/2023, 1:16 AMfdt print
outputs the whole treeCFSworks
05/24/2023, 1:39 AMCFSworks
05/24/2023, 1:40 AMfdt chosen
might be needed to populate it. I don't know what all fdt boardsetup
does. I'm really working at the fringe of my knowledge here hahaCFSworks
05/24/2023, 1:41 AMDhanOS
05/24/2023, 1:41 AMbootz ${kernel_addr_r} - ${fdt_addr_r}
I get the exact same thing (output). But again, maybe that's okCFSworks
05/24/2023, 1:42 AMCFSworks
05/24/2023, 1:43 AMDhanOS
05/24/2023, 1:43 AMDhanOS
05/24/2023, 1:44 AM=> fdt chosen
WARNING: could not set u-boot,version FDT_ERR_NOSPACE.
DhanOS
05/24/2023, 1:46 AMDhanOS
05/24/2023, 1:46 AM=> fdt rsvmem print
index start size
------------------------------------------------
0 0000000041900000 0000000000100000
1 0000000041900000 0000000000700000
2 0000000042000000 0000000000100000
3 0000000042100000 0000000000010000
DhanOS
05/24/2023, 1:47 AMDhanOS
05/24/2023, 1:47 AMDhanOS
05/24/2023, 1:47 AMWorking FDT set to 41800000
ERROR: reserving fdt memory region failed (addr=41900000 size=700000 flags=0)
DhanOS
05/24/2023, 1:49 AMDhanOS
05/24/2023, 1:53 AMDhanOS
05/24/2023, 1:53 AM=> load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
54900 bytes read in 13 ms (4 MiB/s)
=> fdt addr ${fdt_addr_r}
Working FDT set to 41800000
=> fdt rsvmem print
index start size
------------------------------------------------
0 0000000041900000 0000000000100000
1 0000000041900000 0000000000700000
2 0000000042000000 0000000000100000
3 0000000042100000 0000000000010000
=> fdt rsvmem delete 1
=> fdt rsvmem print
index start size
------------------------------------------------
0 0000000041900000 0000000000100000
1 0000000042000000 0000000000100000
2 0000000042100000 0000000000010000
=> fdt rsvmem delete 1
=> fdt rsvmem delete 1
=> fdt rsvmem add 0x42000000 0x700000
=> fdt rsvmem print
index start size
------------------------------------------------
0 0000000041900000 0000000000100000
1 0000000042000000 0000000000700000
=> fdt rsvmem add 0x42700000 0x100000
=> fdt rsvmem add 0x4200000 0x10000
=> fdt rsvmem print
index start size
------------------------------------------------
0 0000000041900000 0000000000100000
1 0000000042000000 0000000000700000
2 0000000042700000 0000000000100000
3 0000000004200000 0000000000010000
DhanOS
05/24/2023, 1:54 AMDhanOS
05/24/2023, 1:54 AM=> bootz ${kernel_addr_r} - ${fdt_addr_r}
Kernel image @ 0x41000000 [ 0x000000 - 0x3c7810 ]
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Working FDT set to 41800000
Loading Device Tree to 42def000, end 42dff673 ... OK
Working FDT set to 42def000
Starting kernel ...
DhanOS
05/24/2023, 1:54 AMDhanOS
05/24/2023, 1:55 AMDhanOS
05/24/2023, 1:57 AM=> load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
54900 bytes read in 13 ms (4 MiB/s)
=> fdt addr ${fdt_addr_r}
Working FDT set to 41800000
=> fdt rsvmem delete 1
=> fdt rsvmem delete 1
=> fdt rsvmem delete 1
=> fdt rsvmem add 0x42000000 0x700000
=> fdt rsvmem add 0x42700000 0x100000
=> fdt rsvmem add 0x42800000 0x10000
=> fdt rsvmem print
index start size
------------------------------------------------
0 0000000041900000 0000000000100000
1 0000000042000000 0000000000700000
2 0000000042700000 0000000000100000
3 0000000042800000 0000000000010000
=> load mmc 0 ${kernel_addr_r} zImage
3962896 bytes read in 656 ms (5.8 MiB/s)
=> bootz ${kernel_addr_r} - ${fdt_addr_r}
Kernel image @ 0x41000000 [ 0x000000 - 0x3c7810 ]
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Working FDT set to 41800000
Loading Device Tree to 42def000, end 42dff673 ... OK
Working FDT set to 42def000
Starting kernel ...
CFSworks
05/24/2023, 2:16 AMfdt resize
to create enough room for chosen to do its thingDhanOS
05/24/2023, 2:17 AMbdinfo
, I see:
[...]
fdt_blob = 0x47d3ad00
new_fdt = 0x47d3ad00
fdt_size = 0x000081c0
[...]
DhanOS
05/24/2023, 2:17 AMDhanOS
05/24/2023, 2:18 AMCFSworks
05/24/2023, 4:08 AMfdtcontroladdr=47d197e0
CFSworks
05/24/2023, 4:08 AMCFSworks
05/24/2023, 4:13 AMDhanOS
05/24/2023, 4:17 AMCFSworks
05/24/2023, 4:17 AMDhanOS
05/24/2023, 4:17 AMCFSworks
05/24/2023, 4:18 AMcompatible =
strings and enums for certain things from the upstream kernel (and U-Boot). 😔DhanOS
05/24/2023, 4:19 AMDhanOS
05/24/2023, 4:19 AMCFSworks
05/24/2023, 4:21 AMDhanOS
05/24/2023, 4:21 AMCFSworks
05/24/2023, 4:22 AMDhanOS
05/24/2023, 4:22 AMCFSworks
05/24/2023, 4:22 AMDhanOS
05/24/2023, 4:24 AMCFSworks
05/24/2023, 4:24 AMCFSworks
05/24/2023, 4:25 AMCFSworks
05/24/2023, 4:26 AMCFSworks
05/24/2023, 5:15 AMCONFIG_DEBUG_UART_PHYS=0x02500c00
CONFIG_DEBUG_UART_VIRT=0xf2500c00
...and added earlyprintk
to the bootargs
, and got some output.CFSworks
05/24/2023, 5:16 AMDhanOS
05/24/2023, 5:16 AMearlyprintk
since I've seen it here and thereDhanOS
05/24/2023, 5:17 AMCFSworks
05/24/2023, 5:19 AMCFSworks
05/24/2023, 5:20 AMDhanOS
05/24/2023, 5:24 AMDhanOS
05/24/2023, 5:25 AMearlyprintk
?CFSworks
05/24/2023, 5:28 AMearlyprintk
on U-Boot's FDT. I'm not changing only one variable at a time.CFSworks
05/24/2023, 5:28 AMDhanOS
05/24/2023, 5:38 AMDhanOS
05/24/2023, 5:38 AMDhanOS
05/24/2023, 5:39 AMCFSworks
05/24/2023, 5:40 AMfull-cmdline-but-uboot-fdt.txt
to the gist, which uses the control (U-Boot's) FDT to boot with the same cmdline as full-cmdline.txt
CFSworks
05/24/2023, 5:40 AMDhanOS
05/24/2023, 5:41 AMCFSworks
05/24/2023, 5:42 AMearlyprintk
so it's not switching to the correct console either wayDhanOS
05/24/2023, 5:44 AMCFSworks
05/24/2023, 5:45 AMsetenv bootargs ...; load mmc 0 ${loadaddr} zImage; bootz ${loadaddr} - ${fdtcontroladdr}
DhanOS
05/24/2023, 5:46 AMDhanOS
05/24/2023, 5:47 AMkernel_addr_r
for zImage and it's different from loadaddr
or at least is different in what I have. Is there any reason for this?DhanOS
05/24/2023, 5:48 AMCFSworks
05/24/2023, 5:49 AMbootz
on its own defaults to using loadaddr
, so I'm like "Eh, might as well load stuff at loadaddr
to keep things simple."DhanOS
05/24/2023, 5:49 AMCFSworks
05/24/2023, 5:49 AMkernel_addr_r
is also an appropriate choice thoughCFSworks
05/24/2023, 5:50 AMDhanOS
05/24/2023, 5:50 AMCFSworks
05/24/2023, 5:54 AMpsci {
compatible = "arm,psci-1.0";
method = "smc";
};
...it's saying "you can use smc
calls to access the PSCI subsystem" which is evidently untrue because it causes a kernel panic when Linux triesCFSworks
05/24/2023, 5:55 AMfdt
commands to delete the /psci
node?DhanOS
05/24/2023, 5:55 AMDhanOS
05/24/2023, 5:55 AMCFSworks
05/24/2023, 5:56 AMDhanOS
05/24/2023, 5:59 AMCFSworks
05/24/2023, 5:59 AMCFSworks
05/24/2023, 5:59 AMDhanOS
05/24/2023, 5:59 AMDhanOS
05/24/2023, 5:59 AMDhanOS
05/24/2023, 5:59 AMCFSworks
05/24/2023, 6:00 AMCFSworks
05/24/2023, 6:00 AMDhanOS
05/24/2023, 6:00 AM[ 9.864188] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
CFSworks
05/24/2023, 6:01 AMDhanOS
05/24/2023, 6:01 AMCFSworks
05/24/2023, 6:01 AMubi.mtd=sys root=ubi0_5 rootfstype=ubifs,rw init=/sbin/init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env-redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:recovery@ubi0_6:dsp0@ubi0_7:private@ubi0_8:UDISK@ubi0_9:
CFSworks
05/24/2023, 6:02 AMDhanOS
05/24/2023, 6:02 AMCFSworks
05/24/2023, 6:02 AM/psci
node)DhanOS
05/24/2023, 6:03 AMpsci
CFSworks
05/24/2023, 6:04 AMDhanOS
05/24/2023, 6:04 AMDhanOS
05/24/2023, 6:07 AMDhanOS
05/24/2023, 6:07 AMDhanOS
05/24/2023, 6:07 AMDhanOS
05/24/2023, 6:07 AM[ 46.198019] 0001e5e0: d9 06 6a bd b1 3b 39 50 bb 3d ad 35 ee c6 3c ac 74 04 21 a3 c5 6b 4b 88 b7 da 68 ee 4e c2 5e ba ..j..;9P.=.5..<.t.!..kK...h.N.^.
[ 46.198041] 0001e600: e0 94 b4 19 ee 1f b7 5c 7f 80 5c 3e 6d 5e d2 51 a4 a5 a7 44 89 d6 53 9f c1 17 04 f6 d5 f0 31 46 .......\..\>m^.Q...D..S.......1F
[ 46.198063] 0001e620: dc 45 0f c9 c3 d0 09 0e 00 96 2f fd be 8a cf fd 27 b3 ec 9d a7 e7 a7 f1 cd 40 e2 bf b1 97 ac 2d .E......../.....'........@.....-
[ 46.198085] 0001e640: 98 9c 86 fd 53 7e fe e4 b4 1b 3c 39 f1 e6 93 68 2f e9 07 3c 54 7a de 9f ee b0 bb 85 4d c9 72 7a ....S~....<9...h/..<Tz......M.rz
[ 46.198107] 0001e660: 9e a7 fb f8 fb e1 8c eb ab 2d 72 51 3d f0 ff 04 f5 95 b3 df 64 c4 1a 2f 1f 03 fd 58 cd 2e c6 68 .........-rQ=.......d../...X...h
[ 46.198129] 0001e680: c6 99 d1 f4 9a be b8 66 61 93 fd 0a d3 98 ff 9a f9 aa 70 c4 5f 65 fa 40 32 01 f8 b4 ee 7c 95 ff .......fa.........p._e.@2....|..
[ 46.198151] 0001e6a0: 1b d0 af 50 dd 76 30 ce af 7c 06 ff 40 e5 97 98 26 de 87 fa ec 55 f8 e3 a7 bf c5 b1 79 26 10 df ...P.v0..|..@...&....U......y&..
[ 46.198173] 0001e6c0: d5 e6 d1 74 b9 67 c2 be 70 06 3d 87 ee 74 0c f1 4a 13 4d ab cb 21 63 70 16 3b 0c 97 13 eb 9d e3 ...t.g..p.=..t..J.M..!cp.;......
[ 46.198195] 0001e6e0: 48 eb 32 96 c3 17 4f f5 64 10 bb 3e 5b e1 4c 39 0b c6 b3 bd d6 59 e8 3f fa 8d 98 dc f6 3e 0d fe H.2...O.d..>[.L9.....Y.?.....>..
[ 46.198217] 0001e700: fa 02 b5 4f 5f aa f6 e9 68 71 cc 93 02 9d 58 b3 47 14 51 bd d6 ad 8d 27 61 bb ec a2 6f a7 01 4b ...O_...hq....X.G.Q....'a...o..K
[ 46.198239] 0001e720: 88 ee 88 d7 f4 36 ce cb 0b 25 ad d3 3c 2d 87 c7 c5 97 b0 bf c2 35 d0 a1 99 f9 69 e9 83 34 99 f5 .....6...%..<-.......5....i..4..
[ 46.198261] 0001e740: 22 68 27 ea 7e d9 71 e9 43 75 35 ed cb f9 8d f1 42 1f 6c 1e e2 12 b3 1d 7a 89 5a 89 83 9c cc a7 "h'.~.q.Cu5.....B.l.....z.Z.....
[ 46.198283] 0001e760: 35 7c 9e e2 11 fa 29 1e c1 ab 78 84 63 45 31 0f c9 0c f9 7f 80 cd 2a ed 09 c0 78 3b 4c 77 e0 1f 5|....)...x.cE1.......*...x;Lw..
CFSworks
05/24/2023, 6:07 AMDhanOS
05/24/2023, 6:08 AMDhanOS
05/24/2023, 6:08 AMDhanOS
05/24/2023, 6:08 AMsetenv bootargs earlycon=uart8250,mmio32,0x02500c00 console=ttyS3,115200 loglevel=8 aw-ubi-spinand.ubootblks=24 ubi.mtd=sys root=ubi0_5 rootfstype=ubifs,rw init=/sbin/init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env-redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:recovery@ubi0_6:dsp0@ubi0_7:private@ubi0_8:UDISK@ubi0_9:
load mmc 0 ${kernel_addr_r} zImage
load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
fdt addr ${fdt_addr_r}
fdt rm /psci
bootz ${kernel_addr_r} - ${fdt_addr_r}
DhanOS
05/24/2023, 6:09 AMCFSworks
05/24/2023, 6:09 AMDhanOS
05/24/2023, 6:09 AMCFSworks
05/24/2023, 6:09 AMzImage
still has SIMULATE_MULTIPLANE off?DhanOS
05/24/2023, 6:09 AMDhanOS
05/24/2023, 6:09 AMDhanOS
05/24/2023, 6:10 AMDhanOS
05/24/2023, 6:10 AMCFSworks
05/24/2023, 6:10 AMDhanOS
05/24/2023, 6:10 AMDhanOS
05/24/2023, 6:11 AMDhanOS
05/24/2023, 6:11 AMDhanOS
05/24/2023, 6:12 AMDhanOS
05/24/2023, 6:14 AMDhanOS
05/24/2023, 6:14 AMCFSworks
05/24/2023, 6:14 AMzImage
built with SIMULATE_MULTIPLANE still turned off?DhanOS
05/24/2023, 6:14 AMDhanOS
05/24/2023, 6:14 AMCFSworks
05/24/2023, 6:15 AMbuildroot/output/build/linux-*/.config
DhanOS
05/24/2023, 6:15 AMDhanOS
05/24/2023, 6:15 AMDhanOS
05/24/2023, 6:15 AMDhanOS
05/24/2023, 6:15 AMDhanOS
05/24/2023, 6:15 AMCFSworks
05/24/2023, 6:16 AMDhanOS
05/24/2023, 6:20 AMDhanOS
05/24/2023, 6:20 AMCFSworks
05/24/2023, 6:21 AMDhanOS
05/24/2023, 6:21 AMDhanOS
05/24/2023, 6:21 AMDhanOS
05/24/2023, 6:21 AM[ 11.220050] ubi0: scanning is finished
[ 11.395270] ubi0: attached mtd3 (name "sys", size 123 MiB)
[ 11.402430] ubi0: PEB size: 262144 bytes (256 KiB), LEB size: 258048 bytes
[ 11.410949] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 2048
[ 11.420016] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 11.428106] ubi0: good PEBs: 492, bad PEBs: 0, corrupted PEBs: 0
[ 11.434937] ubi0: user volume: 10, internal volumes: 1, max. volumes count: 128
[ 11.443546] ubi0: max/mean erase counter: 3/1, WL threshold: 4096, image sequence number: 0
[ 11.453072] ubi0: available PEBs: 0, total reserved PEBs: 492, PEBs reserved for bad PEB handling: 20
[ 11.463774] ubi0: background thread "ubi_bgt0d" started, PID 950
[ 11.476147] sun8iw20-pinctrl 2000000.pinctrl: pin PB6 already requested by 2500c00.uart; cannot claim for 2000000.pinctrl:38
[ 11.490220] sun8iw20-pinctrl 2000000.pinctrl: pin-38 (2000000.pinctrl:38) status -22
[ 11.499281] ERR: id gpio_request failed
[ 11.516588] alloc_fd: slot 0 not NULL!
[ 11.536861] UBIFS (ubi0:5): Mounting in unauthenticated mode
[ 11.941844] UBIFS (ubi0:5): recovery needed
[ 12.376142] UBIFS (ubi0:5): recovery deferred
[ 12.383227] UBIFS (ubi0:5): UBIFS: mounted UBI device 0, volume 5, name "rootfs", R/O mode
[ 12.392806] UBIFS (ubi0:5): LEB size: 258048 bytes (252 KiB), min./max. I/O unit sizes: 4096 bytes/4096 bytes
[ 12.404135] UBIFS (ubi0:5): FS size: 31223808 bytes (29 MiB, 121 LEBs), journal size 8515584 bytes (8 MiB, 33 LEBs)
[ 12.416158] UBIFS (ubi0:5): reserved for root: 0 bytes (0 KiB)
[ 12.422861] UBIFS (ubi0:5): media format: w4/r0 (latest is w5/r0), UUID 51DFA355-BA64-4A15-A9B5-8B4ED2B09994, small LPT model
[ 12.444512] VFS: Mounted root (ubifs filesystem) readonly on device 0:15.
[ 12.464422] devtmpfs: mounted
[ 12.475645] Freeing unused kernel memory: 1024K
[ 12.481457] Run /sbin/init as init process
[ 12.747525] hdmi_hpd_sys_config_release
INIT: version booting
INIT: No inittab.d directory found
[ 14.031462] UBIFS (ubi0:5): completing deferred recovery
[ 14.390660] UBIFS (ubi0:5): background thread "ubifs_bgt0_5" started, PID 963
[ 14.417969] UBIFS (ubi0:5): deferred recovery completed
INIT: Entering runlevel: 3
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [ 17.668102] udevd[1010]: starting version 3.2.11
[ 18.200262] udevd[1011]: starting eudev-3.2.11
done
Starting adb [ 30.490789] file system registered
install_listener('tcp:5037','*smartsocket*')
[ 31.073029] read descriptors
[ 31.080389] read strings
[ 57.077454]
[ 57.077454] insmod_device_driver
[ 57.077454]
[ 57.085547] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
device_chose finished!
Initializing random number generator: FAIL
Starting rpcbind: OK
Starting network: [ 59.212171] libphy: 4500000.eth: probed
[ 59.248257] sunxi-gmac 4500000.eth eth0: eth0: Type(7) PHY ID 001cc816 at 0 IRQ poll (4500000.eth-0:00)
udhcpc: started, v1.35.0
udhcpc: broadcasting discover
[ 62.517698] sunxi-gmac 4500000.eth eth0: Link is Up - 100Mbps/Full - flow control off
[ 62.526619] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, forking to background
OK
Starting sshd: OK
Starting collectd: OK
_____ _ _ ____ ___ _ _ ____
|_ _| | | | _ \|_ _| \ | |/ ___|
| | | | | | |_) || || \| | | _
| | | |_| | _ < | || |\ | |_| |
|_| \___/|_| \_\___|_| \_|\____|
[ 72.098767] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Hello bmct start build time = 12:46:40-Nov 17 2022------>
Welcome to Turing pi
turing login: bmc init start
Cannot open /sys/class/gpio/gpio115/direction.
ping: sendto: Network is unreachable
DhanOS
05/24/2023, 6:21 AMDhanOS
05/24/2023, 6:22 AMDhanOS
05/24/2023, 6:22 AMDhanOS
05/24/2023, 6:22 AMping: sendto: Network is unreachable
Welcome to Turing pi
turing login: root
Password:
#
CFSworks
05/24/2023, 6:23 AM/firmware/optee
node too, but...CFSworks
05/24/2023, 6:23 AMDhanOS
05/24/2023, 6:23 AMDhanOS
05/24/2023, 6:23 AMCFSworks
05/24/2023, 6:24 AMCFSworks
05/24/2023, 6:24 AMDhanOS
05/24/2023, 6:24 AMDhanOS
05/24/2023, 6:25 AMDhanOS
05/24/2023, 6:25 AMCFSworks
05/24/2023, 6:25 AMboot.scr
(note: this is not just a text file, it's made with mkimage
, no idea how, could be a good exercise if you want something more to do)DhanOS
05/24/2023, 6:26 AMDhanOS
05/24/2023, 6:26 AMsetenv bootargs earlycon=uart8250,mmio32,0x02500c00 console=ttyS3,115200 loglevel=8 aw-ubi-spinand.ubootblks=24 ubi.mtd=sys root=ubi0_5 rootfstype=ubifs,rw init=/sbin/init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env-redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:recovery@ubi0_6:dsp0@ubi0_7:private@ubi0_8:UDISK@ubi0_9:
load mmc 0 ${kernel_addr_r} zImage
load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
fdt addr ${fdt_addr_r}
fdt rm /psci
fdt rm /firmware/optee
bootz ${kernel_addr_r} - ${fdt_addr_r}
DhanOS
05/24/2023, 6:26 AMDhanOS
05/24/2023, 6:38 AMDhanOS
05/24/2023, 6:39 AMDhanOS
05/24/2023, 6:40 AMDhanOS
05/24/2023, 6:40 AMDhanOS
05/24/2023, 6:40 AMdaniel@tpi2-firmware:~$ mkimage -c none -A arm -T script -d boot.txt boot.scr
Image Name:
Created: Wed May 24 08:36:06 2023
Image Type: ARM Linux Script (gzip compressed)
Data Size: 530 Bytes = 0.52 KiB = 0.00 MiB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 522 Bytes = 0.51 KiB = 0.00 MiB
Teslamax
05/24/2023, 6:44 AMsvenrademakers
05/24/2023, 9:04 AMCFSworks
05/24/2023, 5:08 PMmaster
with two patchsets from Andre Przywara and Maksim Kiselev merged in, for T113 and T113-SPI support respectively. (I'm working with them to get those respective patchsets merged upstream, but for the time being we might have to have a directory of .patch files)DhanOS
05/24/2023, 9:06 PMDhanOS
05/24/2023, 9:06 PMDhanOS
05/24/2023, 9:07 PMDhanOS
05/24/2023, 9:07 PMDhanOS
05/24/2023, 9:07 PMDhanOS
05/24/2023, 9:07 PMDhanOS
05/24/2023, 9:08 PMDhanOS
05/24/2023, 9:08 PM[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] psci: SMC Calling Convention v1.0
DhanOS
05/24/2023, 9:09 PM[ 4.463634] ------------[ cut here ]------------
[ 4.463711] WARNING: CPU: 0 PID: 26 at drivers/clk/sunxi-ng/ccu_common.c:34 ccu_nm_set_rate+0x260/0x298
[ 4.463734] Modules linked in:
[ 4.463779] CPU: 0 PID: 26 Comm: kworker/0:1 Not tainted 5.4.61 #2
[ 4.463802] Hardware name: Generic DT based system
[ 4.463849] Workqueue: events start_work
[ 4.463920] [<c010e048>] (unwind_backtrace) from [<c010a810>] (show_stack+0x10/0x14)
[ 4.463972] [<c010a810>] (show_stack) from [<c05e803c>] (dump_stack+0x7c/0x98)
[ 4.464024] [<c05e803c>] (dump_stack) from [<c011917c>] (__warn+0xb8/0xd0)
[ 4.464075] [<c011917c>] (__warn) from [<c0119204>] (warn_slowpath_fmt+0x70/0x9c)
[ 4.464129] [<c0119204>] (warn_slowpath_fmt) from [<c037b314>] (ccu_nm_set_rate+0x260/0x298)
[ 4.464187] [<c037b314>] (ccu_nm_set_rate) from [<c03737e0>] (clk_change_rate+0x104/0x238)
[ 4.464244] [<c03737e0>] (clk_change_rate) from [<c0374154>] (clk_core_set_rate_nolock+0x124/0x138)
[ 4.464299] [<c0374154>] (clk_core_set_rate_nolock) from [<c03741a0>] (clk_set_rate+0x38/0x5c)
[ 4.464354] [<c03741a0>] (clk_set_rate) from [<c0334af8>] (lcd_clk_enable+0x144/0x454)
[ 4.464407] [<c0334af8>] (lcd_clk_enable) from [<c033575c>] (disp_lcd_enable+0x13c/0x2d4)
[ 4.464466] [<c033575c>] (disp_lcd_enable) from [<c032fbf8>] (disp_device_attached_and_enable+0x134/0x264)
[ 4.464526] [<c032fbf8>] (disp_device_attached_and_enable) from [<c032fe68>] (bsp_disp_device_switch+0x84/0xe8)
[ 4.464582] [<c032fe68>] (bsp_disp_device_switch) from [<c032a7b4>] (disp_device_set_config+0xc8/0xf0)
[ 4.464636] [<c032a7b4>] (disp_device_set_config) from [<c032a8e0>] (start_work+0x104/0x16c)
[ 4.464693] [<c032a8e0>] (start_work) from [<c012f268>] (process_one_work+0x16c/0x20c)
[ 4.464750] [<c012f268>] (process_one_work) from [<c012f874>] (worker_thread+0x230/0x2d4)
[ 4.464805] [<c012f874>] (worker_thread) from [<c013403c>] (kthread+0x118/0x124)
[ 4.464855] [<c013403c>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 4.464885] Exception stack(0xc6b29fb0 to 0xc6b29ff8)
[ 4.464921] 9fa0: 00000000 00000000 00000000 00000000
[ 4.464964] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 4.465002] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 4.465047] ---[ end trace 70ba11ab2ba2b0ff ]---
DhanOS
05/24/2023, 9:10 PMCFSworks
05/24/2023, 9:11 PMCFSworks
05/24/2023, 9:12 PMCFSworks
05/24/2023, 9:12 PM/psci
node which told Linux it could use it, but that also means it has no way of turning on the second CPU core.CFSworks
05/24/2023, 9:14 PMDhanOS
05/24/2023, 9:15 PMCFSworks
05/24/2023, 9:16 PMCFSworks
05/24/2023, 9:18 PMcpucfg
stuff is the same (so it all has to be updated for T113) but I was able to find the GIC and I also have sunxi_set_entry_address
doneDhanOS
05/24/2023, 9:20 PMDhanOS
05/24/2023, 9:21 PMCFSworks
05/24/2023, 9:22 PMCFSworks
05/24/2023, 9:26 PM/psci
node anymore, and we can probably use the FDT unmodified.CFSworks
05/26/2023, 12:36 AMDhanOS
05/26/2023, 12:36 AMDhanOS
05/26/2023, 12:37 AMDhanOS
05/26/2023, 12:38 AMJoesRoom
05/26/2023, 12:25 PMDhanOS
05/26/2023, 1:26 PMBitfullByte
05/26/2023, 6:00 PMBitfullByte
05/26/2023, 6:01 PMDhanOS
05/26/2023, 8:08 PMCFSworks
05/26/2023, 8:32 PMsunxi_cpu_set_power
is empty, and I don't know anything about the PRCM registers so I don't know what I need to be hitting to get them powered upDhanOS
05/26/2023, 8:48 PMDhanOS
05/26/2023, 8:48 PMCFSworks
05/26/2023, 8:49 PMDhanOS
05/26/2023, 8:50 PMDhanOS
05/26/2023, 8:50 PMDhanOS
05/26/2023, 8:50 PMCFSworks
05/26/2023, 8:51 PMc
static void __secure sunxi_cpu_set_reset(int cpu, bool active)
{
if (active)
clrbits_le32(SUNXI_CPUX_BASE + C0_RST_CTRL, BIT(cpu));
else
setbits_le32(SUNXI_CPUX_BASE + C0_RST_CTRL, BIT(cpu));
}
CFSworks
05/26/2023, 8:52 PMDhanOS
05/26/2023, 8:53 PMDhanOS
05/26/2023, 8:53 PMCFSworks
05/26/2023, 8:53 PMCFSworks
05/26/2023, 8:54 PMDhanOS
05/26/2023, 8:55 PMDhanOS
05/26/2023, 8:56 PMCFSworks
05/26/2023, 8:56 PMCFSworks
05/26/2023, 8:57 PMsunxi_set_entry_address
DhanOS
05/26/2023, 8:57 PMactive
mean desired state?CFSworks
05/26/2023, 8:58 PMactive
means whether reset is asserted, so we're doing sunxi_cpu_set_reset(1, false);
CFSworks
05/26/2023, 8:58 PMDhanOS
05/26/2023, 8:58 PMCFSworks
05/26/2023, 8:59 PMCFSworks
05/26/2023, 9:02 PMarm
0x42e81510 001000e3 movw r1, 0
0x42e81514 011940e3 movt r1, 0x901
0x42e81518 002091e5 ldr r2, [r1] ; psci.c:0
0x42e8151c 1320c2e1 bic r2, r2, r3, lsl r0 ; psci.c:191 if (active)
0x42e81520 002081e5 str r2, [r1] ; psci.c:0
DhanOS
05/26/2023, 9:02 PMCFSworks
05/26/2023, 9:03 PMDhanOS
05/26/2023, 9:03 PMDhanOS
05/26/2023, 9:03 PM0x42e81510 001000e3 movw r1, 0
0x42e81514 011940e3 movt r1, 0x901
CFSworks
05/26/2023, 9:04 PMCFSworks
05/26/2023, 9:14 PM0x70005c8
DhanOS
05/26/2023, 10:30 PMCFSworks
05/26/2023, 10:32 PMCFSworks
05/26/2023, 10:33 PMARMV7_SECURE_BASE
(see arch/arm/cpu/armv7/Kconfig
) to relocate the PSCI code into the secure RAM areaCFSworks
05/26/2023, 10:34 PMCFSworks
05/26/2023, 10:34 PMDhanOS
05/26/2023, 10:37 PMDhanOS
05/26/2023, 10:37 PMDhanOS
05/26/2023, 10:37 PMDhanOS
05/26/2023, 10:37 PMCFSworks
05/26/2023, 10:37 PMCFSworks
05/26/2023, 10:38 PMCFSworks
05/27/2023, 3:52 AM[ 0.106693] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.114478] rcu: Hierarchical SRCU implementation.
[ 0.122954] smp: Bringing up secondary CPUs ...
1B!abcdef;-)
Does not look like much but I added a bunch of debug prints to the asm code that initializes the second CPU and it's definitely awake.CFSworks
05/27/2023, 3:53 AM1
-> request to turn on CPU1, B!
-> CPU1 beginning its init routine, abcdef
are the calls within the routine, and ;-)
is psci_arch_init
)DhanOS
05/27/2023, 4:08 AMDhanOS
05/27/2023, 4:10 AMDhanOS
05/27/2023, 4:11 AMCFSworks
05/27/2023, 4:17 AMDhanOS
05/27/2023, 4:19 AMDhanOS
05/27/2023, 4:21 AMDhanOS
05/27/2023, 4:23 AMCFSworks
05/27/2023, 4:24 AMCFSworks
05/27/2023, 4:25 AMCFSworks
05/27/2023, 4:25 AMDhanOS
05/27/2023, 4:27 AMDhanOS
05/27/2023, 4:27 AMCFSworks
05/27/2023, 4:27 AMCFSworks
05/27/2023, 4:28 AMDhanOS
05/27/2023, 4:35 AMCFSworks
05/27/2023, 4:40 AMDhanOS
05/27/2023, 4:41 AMCFSworks
05/27/2023, 4:41 AMDhanOS
05/27/2023, 4:41 AMCFSworks
05/27/2023, 4:42 AMCFSworks
05/29/2023, 11:57 PM0x01C80000
, which is correct in most of the Allwinner sunxi series... but in newer chips they moved it to 0x03020000
CFSworks
05/29/2023, 11:58 PMCFSworks
05/29/2023, 11:59 PMCFSworks
05/30/2023, 12:00 AMDhanOS
05/30/2023, 12:08 AMCFSworks
05/30/2023, 12:13 AMCFSworks
05/30/2023, 12:13 AMDhanOS
05/30/2023, 12:25 AMDhanOS
05/30/2023, 12:26 AMCFSworks
05/30/2023, 12:32 AMDhanOS
05/30/2023, 12:33 AMCFSworks
05/30/2023, 1:04 AMCFSworks
05/30/2023, 1:04 AM/psci
node (U-Boot synthesizes its own anyway)DhanOS
05/30/2023, 1:05 AM/psci
. Thank youCFSworks
05/30/2023, 1:05 AM/sys/devices/system/cpu/cpu0/
with both Allwinner's boot and this new U-Boot.DhanOS
05/30/2023, 1:06 AMCFSworks
05/30/2023, 1:06 AM/sys/devices/system/cpu/
to see if there's a cpufreq
directory that disappears when booting from U-Boot.CFSworks
05/30/2023, 1:07 AMDhanOS
05/30/2023, 1:07 AMDhanOS
05/30/2023, 1:51 AMcpufreq
does not exist while booted up un the official wayDhanOS
05/30/2023, 1:57 AM/psci
nodeCFSworks
05/30/2023, 2:00 AMDhanOS
05/30/2023, 2:00 AMDhanOS
05/30/2023, 2:01 AMsmp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (96.00 BogoMIPS).
DhanOS
05/30/2023, 2:02 AMDhanOS
05/30/2023, 2:03 AMDhanOS
05/30/2023, 2:05 AMfind /sys/devices/system/cpu/ -type f -print -exec cat "{}" \;
```to print the output but this does not follow symlinks so I also used:
find /sys/devices/system/cpu/ -follow -maxdepth 8 -print -exec cat "{}" \;
```but this contains recurrent symlinks, thus I had to use max depth to limit them a bit.
in both cases they print exactly the same thingDhanOS
05/30/2023, 2:05 AMDhanOS
05/30/2023, 2:06 AM[ 0.000000] psci: PSCIv1.0 detected in firmware.
U-boot:
[ 0.000000] psci: PSCIv65535.65535 detected in firmware.
DhanOS
05/30/2023, 2:06 AMDhanOS
05/30/2023, 2:18 AM[ 3.036322] ------------[ cut here ]------------
[ 3.036401] WARNING: CPU: 1 PID: 33 at drivers/clk/sunxi-ng/ccu_common.c:34 ccu_nm_set_rate+0x260/0x298
[ 3.036425] Modules linked in:
[ 3.036469] CPU: 1 PID: 33 Comm: kworker/1:1 Not tainted 5.4.61 #2
[ 3.036492] Hardware name: Generic DT based system
[ 3.036537] Workqueue: events start_work
[ 3.036608] [<c010e048>] (unwind_backtrace) from [<c010a810>] (show_stack+0x10/0x14)
[ 3.036660] [<c010a810>] (show_stack) from [<c05e803c>] (dump_stack+0x7c/0x98)
[ 3.036712] [<c05e803c>] (dump_stack) from [<c011917c>] (__warn+0xb8/0xd0)
[ 3.036763] [<c011917c>] (__warn) from [<c0119204>] (warn_slowpath_fmt+0x70/0x9c)
[ 3.036818] [<c0119204>] (warn_slowpath_fmt) from [<c037b314>] (ccu_nm_set_rate+0x260/0x298)
[ 3.036875] [<c037b314>] (ccu_nm_set_rate) from [<c03737e0>] (clk_change_rate+0x104/0x238)
[ 3.036932] [<c03737e0>] (clk_change_rate) from [<c0374154>] (clk_core_set_rate_nolock+0x124/0x138)
[ 3.036987] [<c0374154>] (clk_core_set_rate_nolock) from [<c03741a0>] (clk_set_rate+0x38/0x5c)
[ 3.037042] [<c03741a0>] (clk_set_rate) from [<c0334af8>] (lcd_clk_enable+0x144/0x454)
[ 3.037096] [<c0334af8>] (lcd_clk_enable) from [<c033575c>] (disp_lcd_enable+0x13c/0x2d4)
[ 3.037155] [<c033575c>] (disp_lcd_enable) from [<c032fbf8>] (disp_device_attached_and_enable+0x134/0x264)
[ 3.037215] [<c032fbf8>] (disp_device_attached_and_enable) from [<c032fe68>] (bsp_disp_device_switch+0x84/0xe8)
[ 3.037271] [<c032fe68>] (bsp_disp_device_switch) from [<c032a7b4>] (disp_device_set_config+0xc8/0xf0)
[ 3.037325] [<c032a7b4>] (disp_device_set_config) from [<c032a8e0>] (start_work+0x104/0x16c)
[ 3.037383] [<c032a8e0>] (start_work) from [<c012f268>] (process_one_work+0x16c/0x20c)
[ 3.037439] [<c012f268>] (process_one_work) from [<c012f874>] (worker_thread+0x230/0x2d4)
[ 3.037494] [<c012f874>] (worker_thread) from [<c013403c>] (kthread+0x118/0x124)
[ 3.037543] [<c013403c>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 3.037573] Exception stack(0xc6b4dfb0 to 0xc6b4dff8)
[ 3.037610] dfa0: 00000000 00000000 00000000 00000000
[ 3.037652] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 3.037691] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 3.037736] ---[ end trace 22d4eeecfee7c9ff ]---
DhanOS
05/30/2023, 2:18 AMDhanOS
05/30/2023, 2:19 AMCFSworks
05/30/2023, 3:16 AMwarn_slowpath_fmt
makes me think it's just upset that some optimization isn't available?CFSworks
05/30/2023, 3:17 AMPSCI_RET_NOT_SUPPORTED
. I think U-Boot itself is implementing v0.1?CFSworks
05/30/2023, 3:17 AM/psci
node, it sets the proper version: [ 0.000000] psci: Using PSCI v0.1 Function IDs from DT
)DhanOS
05/30/2023, 3:17 AMDhanOS
05/30/2023, 3:18 AMCFSworks
05/30/2023, 3:19 AMDhanOS
05/30/2023, 3:20 AMDhanOS
05/30/2023, 3:20 AMDhanOS
05/30/2023, 3:21 AMCFSworks
05/30/2023, 3:21 AMCFSworks
05/30/2023, 3:24 AM# time dd if=/dev/mtd0 of=/dev/zero
...
real 0m 1.15s
...
# time dd if=/dev/mtd0 of=/dev/zero
...
real 0m 1.12s
...
# time dd if=/dev/mtd0 of=/dev/zero
...
real 0m 1.09s
...
DhanOS
05/30/2023, 3:25 AM# time dd if=/dev/mtd0 of=/dev/zero
...
real 0m 0.33s
...
# time dd if=/dev/mtd0 of=/dev/zero
...
real 0m 0.33s
...
# time dd if=/dev/mtd0 of=/dev/zero
...
real 0m 0.33s
...
CFSworks
05/30/2023, 3:26 AM# time dd if=/dev/urandom of=/dev/zero bs=1024 count=65536
65536+0 records in
65536+0 records out
real 0m 10.39s
user 0m 0.13s
sys 0m 10.24s
DhanOS
05/30/2023, 3:27 AM# time dd if=/dev/urandom of=/dev/zero bs=1024 count=65536
65536+0 records in
65536+0 records out
real 0m 2.99s
user 0m 0.06s
sys 0m 2.93s
CFSworks
05/30/2023, 3:27 AMDhanOS
05/30/2023, 3:29 AMCFSworks
05/30/2023, 3:30 AM# grep BogoMIPS /proc/cpuinfo
BogoMIPS : 48.00
BogoMIPS : 48.00
CFSworks
05/30/2023, 3:30 AMDhanOS
05/30/2023, 3:31 AM# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Generic DT based system
Revision : 0000
Serial : 0000000000000000
DhanOS
05/30/2023, 3:31 AMDhanOS
05/30/2023, 3:31 AMCFSworks
05/30/2023, 3:32 AMCFSworks
05/30/2023, 3:33 AMDhanOS
05/30/2023, 3:33 AMDhanOS
05/30/2023, 3:33 AMCFSworks
05/30/2023, 3:33 AMCFSworks
05/30/2023, 3:34 AMCFSworks
05/30/2023, 5:51 PM# ./bench
Time to do 1000000000 loops: 7009826087ns
# ./bench
Time to do 1000000000 loops: 7010556087ns
# ./bench
Time to do 1000000000 loops: 7005443586ns
# ./bench
Time to do 1000000000 loops: 7008143920ns
# reboot
...system reboots to official release...
# ./bench
Time to do 1000000000 loops: 2003211084ns
# ./bench
Time to do 1000000000 loops: 2003396126ns
# ./bench
Time to do 1000000000 loops: 2003651126ns
# ./bench
Time to do 1000000000 loops: 2001892501ns
CFSworks
05/30/2023, 5:51 PMCFSworks
05/30/2023, 5:52 PMbench
programDhanOS
05/30/2023, 7:05 PMDhanOS
05/30/2023, 7:05 PMDhanOS
05/30/2023, 7:06 PMCFSworks
05/30/2023, 7:38 PMCFSworks
05/30/2023, 7:40 PMCFSworks
05/30/2023, 7:43 PMCFSworks
05/30/2023, 7:46 PMCFSworks
05/30/2023, 7:46 PMDhanOS
05/30/2023, 7:48 PMDhanOS
05/30/2023, 7:49 PMCFSworks
05/30/2023, 7:51 PMmw
commandCFSworks
05/30/2023, 7:52 PMmw
then proceeding with a normal boot (boot
goes back to the normal boot process as though you hadn't interrupted it during the 2 second timeout)DhanOS
05/30/2023, 7:54 PMCFSworks
05/30/2023, 8:15 PM=> md.l 02001000 1
02001000: ca002900 .)..
=>
U-Boot:
=> md.l 02001000 1
02001000: fa000b00 ....
=>
CFSworks
05/30/2023, 8:15 PMPLL_CPU_CTRL_REG
CFSworks
05/30/2023, 8:16 PM0x29+1
is N=42 and 0x0b+1
is N=12... which is our 3.5xDhanOS
05/30/2023, 8:17 PMCFSworks
05/30/2023, 8:19 PMDhanOS
05/30/2023, 8:20 PMCFSworks
05/30/2023, 8:20 PMDhanOS
05/30/2023, 8:21 PMDhanOS
05/30/2023, 8:21 PMDhanOS
05/30/2023, 8:21 PMDhanOS
05/30/2023, 8:22 PMDhanOS
05/30/2023, 8:24 PMCFSworks
05/30/2023, 8:26 PMondemand
frequency scaling so it goes down to this 288MHz when idling and dynamically ramps up to 1.008GHz when under load.CFSworks
05/30/2023, 8:28 PMDhanOS
05/30/2023, 8:29 PMTeslamax
05/30/2023, 8:30 PMTeslamax
05/30/2023, 8:30 PMCFSworks
05/30/2023, 8:32 PMCFSworks
05/30/2023, 8:32 PMCFSworks
05/30/2023, 8:33 PMDhanOS
05/30/2023, 8:34 PMCFSworks
05/30/2023, 8:37 PM/dev/mem
which is meant to give userspace raw access to the physical memory bus - but as that's obviously a big security hole most builds of Linux usually restrict it.CFSworks
05/30/2023, 8:38 PMCFSworks
05/30/2023, 8:39 PMCONFIG_STRICT_DEVMEM
and good news, seems the official firmware has it off.DhanOS
05/30/2023, 8:39 PMCFSworks
05/30/2023, 8:40 PM0x02001000
of /dev/mem
to learn the current PLL_CPU_CTRL_REG
settingDhanOS
05/30/2023, 8:40 PMCFSworks
05/30/2023, 8:40 PMCFSworks
05/30/2023, 8:40 PMDhanOS
05/30/2023, 8:41 PMCFSworks
05/30/2023, 8:41 PMCFSworks
05/30/2023, 8:42 PMCFSworks
05/30/2023, 8:42 PMDhanOS
05/30/2023, 8:43 PMDhanOS
05/30/2023, 8:44 PMDhanOS
05/30/2023, 8:44 PMDhanOS
05/30/2023, 8:44 PMDhanOS
05/30/2023, 8:45 PMCFSworks
05/30/2023, 8:47 PMbuildroot/output/build/linux-*/drivers/clk/sunxi-ng/ccu-sun8iw20.c
, and it might already expose the proper knob to adjust, which would mean the devicetree just needs to be updated to tell Linux "this one is for the CPU"CFSworks
05/30/2023, 8:48 PMDhanOS
05/30/2023, 8:50 PMDhanOS
05/30/2023, 8:51 PMCFSworks
05/30/2023, 8:51 PMCFSworks
05/30/2023, 8:53 PMDhanOS
05/30/2023, 8:53 PMDhanOS
05/30/2023, 8:53 PMDhanOS
05/30/2023, 8:53 PMDhanOS
05/30/2023, 8:54 PMCFSworks
05/30/2023, 8:54 PMDhanOS
05/30/2023, 8:54 PMCFSworks
05/30/2023, 8:55 PMDhanOS
05/30/2023, 8:56 PMDhanOS
05/30/2023, 8:58 PMDhanOS
05/30/2023, 8:59 PMCFSworks
05/30/2023, 9:00 PMCFSworks
05/30/2023, 9:00 PMDhanOS
05/30/2023, 9:00 PMDhanOS
05/30/2023, 9:02 PMCFSworks
05/30/2023, 9:20 PMCFSworks
05/30/2023, 9:21 PMCFSworks
05/30/2023, 9:21 PMDhanOS
05/30/2023, 9:21 PMDhanOS
05/30/2023, 9:23 PMDhanOS
05/30/2023, 9:25 PMDhanOS
05/30/2023, 9:25 PMDhanOS
05/30/2023, 9:25 PMCFSworks
05/30/2023, 9:27 PMDhanOS
05/30/2023, 9:28 PMDhanOS
05/30/2023, 9:30 PMCFSworks
05/30/2023, 9:31 PMDhanOS
05/30/2023, 9:32 PMDhanOS
05/30/2023, 9:34 PMDhanOS
05/30/2023, 9:34 PMDhanOS
05/30/2023, 9:36 PMCFSworks
05/30/2023, 9:37 PMusbboot
tool leverages this to (by default) give it an OS image that just exposes the eMMC as a USB MSDC. And then we can write a full OS to the eMMC.CFSworks
05/30/2023, 9:37 PMDhanOS
05/30/2023, 9:43 PMCFSworks
05/30/2023, 9:45 PMDhanOS
05/30/2023, 9:45 PMdd
the imageDhanOS
05/30/2023, 9:47 PMDhanOS
05/30/2023, 9:48 PMDhanOS
05/30/2023, 9:48 PMCFSworks
05/30/2023, 9:50 PMdd
the image
Are there hardware/firmware reasons for that (e.g. these are designed for "trusted computing" situations, and the Jetson enforces partitions of the storage that are only accessible depending on the current privilege level)? Or is it just a matter of "NVIDIA is busy making a package manager that suits everyone's use case and never bothered with a usbboot
equivalent?"
I guess what I'm wondering is, if we had the requisite patience and time, could we conceivably write something like usbboot
but for Jetson nodes, or is that impossible in principle?DhanOS
05/30/2023, 9:52 PMDhanOS
05/30/2023, 9:52 PMDhanOS
05/30/2023, 9:52 PMDhanOS
05/30/2023, 9:53 PMCFSworks
05/30/2023, 9:54 PMDhanOS
05/30/2023, 9:54 PMCFSworks
05/30/2023, 9:56 PMDhanOS
05/30/2023, 9:59 PMDhanOS
05/30/2023, 9:59 PMDhanOS
05/30/2023, 10:00 PMDhanOS
05/30/2023, 10:00 PMDhanOS
05/30/2023, 10:00 PMDhanOS
05/30/2023, 10:00 PMCFSworks
05/30/2023, 10:00 PMDhanOS
05/30/2023, 10:01 PMDhanOS
05/30/2023, 10:02 PMCFSworks
05/30/2023, 10:04 PMDhanOS
05/30/2023, 10:05 PMCFSworks
05/30/2023, 10:05 PMDhanOS
05/30/2023, 10:06 PMwerdnum
05/30/2023, 11:29 PMwerdnum
05/30/2023, 11:30 PMresize2fs
to modify the superblock or whatever to tell the ext4 driver that it can use the extra spaceDhanOS
05/30/2023, 11:31 PMresize2fs
. Thank you!werdnum
05/30/2023, 11:31 PMsystemd
then I seem to recall some kind of expand filesystems thing that's built inwerdnum
05/30/2023, 11:32 PMwerdnum
05/30/2023, 11:32 PMDhanOS
05/30/2023, 11:32 PMwerdnum
05/30/2023, 11:33 PMDhanOS
05/30/2023, 11:34 PMwerdnum
05/30/2023, 11:35 PMCFSworks
05/30/2023, 11:56 PMDhanOS
05/31/2023, 12:01 AMCFSworks
05/31/2023, 12:04 AMCFSworks
05/31/2023, 12:05 AMDhanOS
05/31/2023, 12:10 AMCFSworks
05/31/2023, 12:12 AMCFSworks
05/31/2023, 12:13 AMDhanOS
05/31/2023, 12:15 AMCFSworks
05/31/2023, 12:19 AMDhanOS
05/31/2023, 12:25 AMsvenrademakers
05/31/2023, 1:28 PMsvenrademakers
05/31/2023, 1:38 PMj0ju
05/31/2023, 2:31 PMCFSworks
05/31/2023, 6:59 PMsvenrademakers
05/31/2023, 7:19 PMCFSworks
05/31/2023, 7:25 PMCFSworks
05/31/2023, 9:35 PMmw 02001000 ca003a00
sleep 1
No idea if it's actually stable after boot since I haven't done much more than SSH in and run my bench
program a few times. I wouldn't necessarily recommend any user seriously rely on this - I just did it for fun. 🙂DhanOS
05/31/2023, 9:40 PMCFSworks
05/31/2023, 9:43 PMDhanOS
05/31/2023, 9:44 PMCFSworks
05/31/2023, 9:46 PMDhanOS
05/31/2023, 9:46 PMDhanOS
05/31/2023, 9:48 PMCFSworks
05/31/2023, 9:49 PMDhanOS
05/31/2023, 9:49 PMCFSworks
06/01/2023, 12:27 AMethaddr
variable in its own envCFSworks
06/01/2023, 12:28 AM02:
MAC addresses without needing to figure out how to do it post-bootDhanOS
06/01/2023, 5:27 AM=> echo ${ethaddr}
02:00:c3:c3:e0:f3
In the env.cfg in the official firmware I've seen the mac_addr
parameter in the bootargs so I tried to add mac_addr=${ethaddr}
and validated later under Linux with cat /proc/cmdline
, but this seems to have no effect anywhere (I'm expecting it's being used to set it in the device tree, but possibly not with U-boot?).
So, I read about how you usually pass the MAC address and it seems like the way to do that is to set it in the dtb. There are 2 properties:
1. local-mac-address
which is the physical address of the ethernet interface
2. mac-address
which is the last used MAC (I did not dig deep enough what exactly this is)
In linux, I checked:
# cat /proc/device-tree/aliases/gmac0
/soc@3000000/eth@4500000#
And then `ls -l /sys/firmware/devicetree/base/soc@3000000/eth@4500000/`but neither mac-address
not local-mac-address
are set. From what I read, U-boot should set local-mac-address
in dtb from the etheraddr
variable
So I checked what happens if I add these by hand:
=> fdt resize 128
=> fdt set /soc@3000000/eth@4500000 local-mac-address ${ethaddr}
=> fdt set /soc@3000000/eth@4500000 mac-address ${ethaddr}
And now under Linux:
```
# cat /sys/firmware/devicetree/base/soc@3000000/eth@4500000/local-mac-address
02:00:c3:c3:e0:f3
# cat /sys/firmware/devicetree/base/soc@3000000/eth@4500000/mac-address
02:00:c3:c3:e0:f3
```but the MAC is not being set.
This means 2 things in my opinion:
1. U-boot should set this property, most likely when you invoke the board-specific setup (an equivalent of fdt boardsetup
but after you run bootz
2. The ethernet drivers do not use this to set the MAC and it might be beneficial to look into the driver code to see if the drivers are trying to read the MAC from anywhereDhanOS
06/01/2023, 5:35 AMfdt boardsetup
, since you mentioned you don't know what exactly is it doing - Checked and the only change is (left - before, right - after invoking it):DhanOS
06/01/2023, 5:35 AMDhanOS
06/01/2023, 5:36 AMDhanOS
06/01/2023, 5:36 AMDhanOS
06/01/2023, 8:18 AM# cat /sys/class/net/eth0/addr_assign_type
0
Where:
What: /sys/class/net/<iface>/addr_assign_type
Date: July 2010
KernelVersion: 3.2
Contact: netdev@vger.kernel.org
Description:
Indicates the address assignment type. Possible values are:
0: permanent address
1: randomly generated
2: stolen from another device
3: set using dev_set_mac_address
Then:
# cat /sys/class/net/eth0/address
e6:0e:b1:15:6e:d3
And this is indeed the address I can in ip a
.
So now I'll try to find how it is being setDhanOS
06/01/2023, 9:33 AMnet/core/dev.c
-> int register_netdevice(struct net_device *dev)
this:
c
add_device_randomness(dev->dev_addr, dev->addr_len);
/* If the device has permanent device address, driver should
* set dev_addr and also addr_assign_type should be set to
* NET_ADDR_PERM (default value).
*/
if (dev->addr_assign_type == NET_ADDR_PERM)
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
and dev_addr
is not being set by the sunxi-gmac
, so it'll require patching the driver? If the dev_addr
is set by the driver, it'll be used by the network subsystem. At least this is what I understand from the code.
An alternative would be to set the mac using /etc/network/if-up.d
(/etc/network.if-pre-up.d
?) after reading it from the device tree (/sys/firmware/devicetree/base/soc@3000000/eth@4500000/local-mac-address
). We can add a script to the filesystem overlay in the buildroot.
After adding MAC to the device tree, I tested this by hand:
```
ip link set dev eth0 down
ip link set dev eth0 address $(cat /sys/firmware/devicetree/base/soc@3000000/eth@4500000/local-mac-address)
ip link set dev eth0 up
```and it works like a charm.
What do you think?DhanOS
06/01/2023, 9:34 AMsetenv bootargs earlycon=uart8250,mmio32,0x02500c00 console=ttyS3,115200 loglevel=8 aw-ubi-spinand.ubootblks=24 ubi.mtd=sys root=ubi0_5 rootfstype=ubifs,rw init=/sbin/init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env- redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:recovery@ubi0_6:dsp0@ubi0_7:private@ubi0_8:UDISK@ubi0_9: cma=8M
load mmc 0 ${kernel_addr_r} zImage
load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
fdt addr ${fdt_addr_r}
fdt rm /psci
fdt rm /firmware/optee
fdt resize 128
fdt set /soc@3000000/eth@4500000 mac-address ${ethaddr}
fdt set /soc@3000000/eth@4500000 local-mac-address ${ethaddr}
#mw 02001000 ca003a00 #OC
mw 02001000 ca002900
sleep 1
bootz ${kernel_addr_r} - ${fdt_addr_r}
CFSworks
06/01/2023, 4:32 PMmac-address
(or local-mac-address
, I don't know the difference) in 6-byte binary not :-separated-ASCII-hex formDhanOS
06/01/2023, 4:34 PMDhanOS
06/01/2023, 4:34 PMDhanOS
06/01/2023, 4:34 PMlocal-mac-address = [00 0a 35 00 00 02];
DhanOS
06/01/2023, 4:35 PMCFSworks
06/01/2023, 4:40 PMCFSworks
06/01/2023, 4:40 PM:
as whitespace? 🤔CFSworks
06/01/2023, 4:41 PMDhanOS
06/01/2023, 4:42 PMDhanOS
06/01/2023, 4:42 PMCFSworks
06/01/2023, 4:43 PMDhanOS
06/01/2023, 4:43 PMCFSworks
06/01/2023, 4:44 PMMemTotal: 113796 kB
with no cma=
in my cmdlineDhanOS
06/01/2023, 4:44 PMDhanOS
06/01/2023, 4:44 PMCFSworks
06/01/2023, 4:44 PMDhanOS
06/01/2023, 4:44 PMDhanOS
06/01/2023, 4:45 PMCFSworks
06/01/2023, 4:45 PMDhanOS
06/01/2023, 4:45 PMCFSworks
06/01/2023, 4:48 PMCFSworks
06/01/2023, 4:48 PMCFSworks
06/01/2023, 4:49 PMCFSworks
06/02/2023, 7:37 PMCFSworks
06/02/2023, 7:38 PMDhanOS
06/02/2023, 9:14 PMDhanOS
06/02/2023, 9:14 PMDhanOS
06/02/2023, 9:15 PMDhanOS
06/02/2023, 9:16 PMDhanOS
06/02/2023, 10:52 PMfdt set /soc@3000000/eth@4500000 mac-address [12 34 56 78 9A BC]
fdt set /soc@3000000/eth@4500000 local-mac-address [12 34 56 78 9A BC]
DhanOS
06/02/2023, 10:52 PMCFSworks
06/02/2023, 11:01 PMft_board_setup
function calls fdt_fixup_ethernet
which sets mac-address
and local-mac-address
if there is an alias for ethernet0
CFSworks
06/02/2023, 11:10 PMfdt set /aliases ethernet0 "/soc@3000000/eth@4500000"
+ boardsetup seems to fill in local-mac-address
correctly; wonder if we should just update the .DTS to have this alias?DhanOS
06/02/2023, 11:11 PMDhanOS
06/02/2023, 11:12 PMDhanOS
06/02/2023, 11:13 PMsetexpr
before you replied since something like ${var:0:2}
does not work in U-bootCFSworks
06/02/2023, 11:13 PMDhanOS
06/02/2023, 11:14 PMfdt
did not let me to do this:
=> fdt set /soc@3000000/eth@4500000 mac-address [${ethaddr}]
Unexpected character ':'
😄DhanOS
06/02/2023, 11:15 PMDhanOS
06/02/2023, 11:18 PMCFSworks
06/02/2023, 11:19 PMlocal-mac-address
but a random address in /sys/class/net/eth0/address
CFSworks
06/02/2023, 11:19 PMmac-address
and ignoring the local one?CFSworks
06/02/2023, 11:20 PMfdt_fixup_ethernet
will create local-mac-address
but will only set mac-address
if it's already presentDhanOS
06/02/2023, 11:21 PMmac-address
is the last used MAC, whatever this means, while local-mac-address
is the physical addressDhanOS
06/02/2023, 11:22 PMlocal-mac-address
is the physical one and mac-address
can be used to set own (and has a priority)DhanOS
06/02/2023, 11:22 PMDhanOS
06/02/2023, 11:23 PMDhanOS
06/02/2023, 11:24 PMmac-address
present nowCFSworks
06/02/2023, 11:27 PMDhanOS
06/02/2023, 11:27 PMfdt set /soc@3000000/eth@4500000 mac-address []
DhanOS
06/02/2023, 11:27 PMfdt boardsetup
to set it, there must be a MAC already presentCFSworks
06/02/2023, 11:28 PMDhanOS
06/02/2023, 11:28 PMfdt boardsetup
) and then tested in U-bootDhanOS
06/02/2023, 11:29 PMDhanOS
06/02/2023, 11:30 PMDhanOS
06/02/2023, 11:30 PMCFSworks
06/02/2023, 11:30 PMmac-address
is present or not it uses a random assignment derived from local-mac-address
DhanOS
06/02/2023, 11:32 PMfdt boardsetup
? I assumed it's being invoked when you run bootz
DhanOS
06/02/2023, 11:32 PMDhanOS
06/02/2023, 11:32 PMCFSworks
06/02/2023, 11:32 PMDhanOS
06/02/2023, 11:32 PM2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 12:34:56:78:9a:bc brd ff:ff:ff:ff:ff:ff
CFSworks
06/02/2023, 11:32 PMxxd /sys/firmware/devicetree/base/soc@3000000/eth@4500000/local-mac-address
DhanOS
06/02/2023, 11:32 PMCFSworks
06/02/2023, 11:33 PM4a:13:e4:f9:79:75
and has been sticking with it.CFSworks
06/02/2023, 11:35 PMCFSworks
06/02/2023, 11:35 PMlocal-mac-address
, but that IS enough to tell it not to randomize oneDhanOS
06/02/2023, 11:36 PM# xxd /sys/firmware/devicetree/base/soc@3000000/eth@4500000/local-mac-address
00000000: 0200 fadb 6917 ....i.
# xxd /sys/firmware/devicetree/base/soc@3000000/eth@4500000/mac-address
00000000: 0200 fadb 6917 ....i.
# ip a
[...]
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 12:34:56:78:9a:bc brd ff:ff:ff:ff:ff:ff
[...]
DhanOS
06/02/2023, 11:36 PMCFSworks
06/02/2023, 11:37 PMethernet0
alias back out and go back to setting (only) local-mac-address
by hand?DhanOS
06/02/2023, 11:37 PM# cat /sys/class/net/eth0/addr_assign_type
3
and I don't think this is correctDhanOS
06/02/2023, 11:37 PMCFSworks
06/02/2023, 11:37 PMDhanOS
06/02/2023, 11:37 PMCFSworks
06/02/2023, 11:38 PMDhanOS
06/02/2023, 11:38 PMDhanOS
06/02/2023, 11:38 PMDhanOS
06/02/2023, 11:38 PMDhanOS
06/02/2023, 11:39 PMDhanOS
06/02/2023, 11:39 PMDhanOS
06/02/2023, 11:39 PMDhanOS
06/02/2023, 11:39 PMCFSworks
06/02/2023, 11:39 PMDhanOS
06/02/2023, 11:39 PMDhanOS
06/02/2023, 11:39 PMDhanOS
06/02/2023, 11:40 PMDhanOS
06/02/2023, 11:42 PMCFSworks
06/02/2023, 11:42 PMlocal-mac-address
being present?DhanOS
06/02/2023, 11:43 PMCFSworks
06/02/2023, 11:43 PMDhanOS
06/02/2023, 11:45 PMDhanOS
06/02/2023, 11:47 PMCFSworks
06/02/2023, 11:48 PMCFSworks
06/02/2023, 11:48 PMDhanOS
06/02/2023, 11:48 PMDhanOS
06/02/2023, 11:49 PM26:96:8b:49:49:74
ae:43:61:ac:1a:48
CFSworks
06/02/2023, 11:49 PM4A:13:E4:F9:79:75
(no it's not similar to my U-Boot generated ethaddr
at all)DhanOS
06/02/2023, 11:49 PMDhanOS
06/02/2023, 11:49 PMCFSworks
06/02/2023, 11:50 PM02:00:
for my stuff)DhanOS
06/02/2023, 11:50 PMCFSworks
06/02/2023, 11:50 PMlocal-mac-address
but barring that, no ideaCFSworks
06/02/2023, 11:51 PMDhanOS
06/02/2023, 11:51 PMCFSworks
06/02/2023, 11:53 PM4A:13:E4:F9:79:75
(assign type 0
), what givesCFSworks
06/02/2023, 11:53 PMlocal-mac-address
entirelyDhanOS
06/02/2023, 11:54 PMCFSworks
06/02/2023, 11:54 PMCFSworks
06/02/2023, 11:54 PMDhanOS
06/02/2023, 11:54 PMDhanOS
06/02/2023, 11:54 PMCFSworks
06/02/2023, 11:55 PMDhanOS
06/02/2023, 11:56 PMDhanOS
06/02/2023, 11:56 PMDhanOS
06/02/2023, 11:56 PMDhanOS
06/02/2023, 11:56 PMCFSworks
06/02/2023, 11:56 PMDhanOS
06/02/2023, 11:57 PMDhanOS
06/02/2023, 11:57 PMCFSworks
06/02/2023, 11:57 PM40000000-47ffffff : System RAM
40008000-407fffff : Kernel code
40900000-4095b7e7 : Kernel data
CFSworks
06/02/2023, 11:57 PMDhanOS
06/02/2023, 11:57 PMCFSworks
06/02/2023, 11:58 PMCFSworks
06/02/2023, 11:58 PMDhanOS
06/02/2023, 11:58 PMCFSworks
06/03/2023, 12:00 AMmw.b 40008000 0 a00000
to see about maybe zeroing RAMCFSworks
06/03/2023, 12:01 AM4A:13:E4:F9:79:75
wowDhanOS
06/03/2023, 12:02 AMCFSworks
06/03/2023, 12:05 AMUse random mac address
in my kernel log at leastDhanOS
06/03/2023, 12:08 AMCFSworks
06/03/2023, 12:09 AMCFSworks
06/03/2023, 12:09 AMdrivers/net/ethernet/allwinner/sunxi-gmac.c:geth_chip_hwaddr
DhanOS
06/03/2023, 12:09 AM[ 3.179703] eth0: Use random mac address
CFSworks
06/03/2023, 12:13 AMsunxi_gmac.mac_str=${ethaddr}
CFSworks
06/03/2023, 12:13 AMCFSworks
06/03/2023, 12:14 AMCFSworks
06/03/2023, 12:15 AMDhanOS
06/03/2023, 12:20 AMmac_addr
but not sunxi_gmac.mac_str
. Incorrectly as can be seenDhanOS
06/03/2023, 12:20 AMCFSworks
06/03/2023, 12:22 AMsunxi_gmac.mac_str=${ethaddr}
solution, but I'm a little bothered to learn that my PR #50 changes will inadvertently land us on one solution for generating a stable MAC that may differ from our final one. On one hand, it's nice to have stable MACs earlier (i.e. before we get the U-Boot stuff stabilized), but on the other hand I worry about people growing attached to the MD5-generated one and getting upset when U-Boot does something else.CFSworks
06/03/2023, 12:23 AMDhanOS
06/03/2023, 12:24 AMDhanOS
06/03/2023, 12:25 AMCFSworks
06/03/2023, 12:36 AMDhanOS
06/03/2023, 12:37 AMDhanOS
06/03/2023, 12:38 AMDhanOS
06/03/2023, 12:40 AMsetenv bootargs earlycon=uart8250,mmio32,0x02500c00 console=ttyS3,115200 loglevel=8 aw-ubi-spinand.ubootblks=24 ubi.mtd=sys root=ubi0_5 rootfstype=ubifs,rw init=/sbin/init partitions=mbr@ubi0_0:boot-resource@ubi0_1:env@ubi0_2:env- redund@ubi0_3:boot@ubi0_4:rootfs@ubi0_5:recovery@ubi0_6:dsp0@ubi0_7:private@ubi0_8:UDISK@ubi0_9: cma=8M sunxi_gmac.mac_str=${ethaddr}
load mmc 0 ${kernel_addr_r} zImage
load mmc 0 ${fdt_addr_r} sun8iw20p1-t113-100ask-t113-pro.dtb
fdt addr ${fdt_addr_r}
fdt rm /psci
fdt rm /firmware/optee
fdt set /soc@3000000/eth@4500000 mac-address []
fdt set /aliases ethernet0 "/soc@3000000/eth@4500000"
mw 02001000 ca003a00 #OC
mw 02001000 ca002900
sleep 1
bootz ${kernel_addr_r} - ${fdt_addr_r}
but I'm unsure if we still need or even want to set mac-address
and static-mac-address
since we're not using thisCFSworks
06/03/2023, 12:40 AMDhanOS
06/03/2023, 12:42 AMDhanOS
06/03/2023, 12:43 AMDhanOS
06/03/2023, 12:45 AMCFSworks
06/03/2023, 12:45 AMDhanOS
06/03/2023, 12:47 AMDhanOS
06/03/2023, 12:49 AMCFSworks
06/03/2023, 12:49 AMCFSworks
06/03/2023, 12:49 AMDhanOS
06/03/2023, 12:49 AMCFSworks
06/03/2023, 12:50 AMDhanOS
06/03/2023, 12:51 AM/etc/init.d
to automatically run and set the MAC in the EEPROM if it's absentDhanOS
06/03/2023, 12:51 AMDhanOS
06/03/2023, 3:10 AMDVFS
(dynamic voltage and frequency scaling) and I checked:
# ls -l /sys/firmware/devicetree/base/cpu-opp-table/
total 0
-r--r--r-- 1 root root 34 Jan 1 1970 compatible
-r--r--r-- 1 root root 14 Jan 1 1970 name
-r--r--r-- 1 root root 6 Jan 1 1970 nvmem-cell-names
-r--r--r-- 1 root root 4 Jan 1 1970 nvmem-cells
-r--r--r-- 1 root root 0 Jan 1 1970 opp-shared
drwxr-xr-x 2 root root 0 Jan 1 1970 opp@1008000000
drwxr-xr-x 2 root root 0 Jan 1 1970 opp@1104000000
drwxr-xr-x 2 root root 0 Jan 1 1970 opp@480000000
drwxr-xr-x 2 root root 0 Jan 1 1970 opp@720000000
drwxr-xr-x 2 root root 0 Jan 1 1970 opp@912000000
-r--r--r-- 1 root root 4 Jan 1 1970 phandle
So the OOP tables exist but the cpufreq
is absent in the devfs
. I added cpupower
tool to the firmware (compiled the firmware and flashed my board) to confirm this. Now, I don't see a way to add cpufreq
and a governer. I'm also not yet sure if the driver supports this.DhanOS
06/03/2023, 3:54 AMDhanOS
06/03/2023, 4:15 AMCFSworks
06/03/2023, 4:34 AMDhanOS
06/03/2023, 4:35 AMDhanOS
06/03/2023, 4:36 AMCFSworks
06/03/2023, 4:36 AMCFSworks
06/03/2023, 4:37 AMDhanOS
06/03/2023, 4:38 AMCFSworks
06/03/2023, 4:38 AMCFSworks
06/03/2023, 4:39 AMDhanOS
06/03/2023, 4:39 AMDhanOS
06/03/2023, 4:40 AMDhanOS
06/03/2023, 4:40 AMDhanOS
06/03/2023, 4:40 AMCFSworks
06/03/2023, 4:40 AMDhanOS
06/03/2023, 4:40 AM1104000000
vs 1008000000
DhanOS
06/03/2023, 4:41 AMCFSworks
06/03/2023, 4:42 AMDhanOS
06/03/2023, 4:42 AMCFSworks
06/03/2023, 4:43 AMDhanOS
06/03/2023, 4:43 AM#
# CPU frequency scaling drivers
#
# CONFIG_CPUFREQ_DT is not set
# CONFIG_CPUFREQ_DUMMY is not set
CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y
# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set
# CONFIG_QORIQ_CPUFREQ is not set
# end of CPU Frequency scaling
and SUN50I
most likely just does not work hereCFSworks
06/03/2023, 4:44 AMCFSworks
06/03/2023, 4:45 AMCFSworks
06/03/2023, 4:48 AMDhanOS
06/03/2023, 4:48 AMDhanOS
06/03/2023, 4:49 AMCFSworks
06/03/2023, 4:49 AMCFSworks
06/03/2023, 4:50 AMDhanOS
06/03/2023, 4:50 AMDhanOS
06/03/2023, 4:52 AMPLL_CPUX supports dynamic frequency adjustment (modifying the value of N). However, for the system
stability, to configure the frequency of the PLL_CPUX from a higher value to a lower one, switch the clock
source of the CPU to another clock whose frequency is not higher than the current one first, and configure
PLL_CPUX to the target low frequency, and then switch the clock source of the CPU back to PLL_CPUX
DhanOS
06/03/2023, 4:55 AM./buildroot/output/build/linux-5112fdd843715f1615703ca5ce2a06c1abe5f9ee/arch/arm/configs/sun8iw20p1smp_t113_auto_defconfig:46:CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y
so the driver should be fineCFSworks
06/03/2023, 4:55 AMDhanOS
06/03/2023, 4:56 AMCFSworks
06/03/2023, 4:56 AMCFSworks
06/03/2023, 4:57 AMcompatible = "..."
that it could've supported (which wasn't present in the fdt) or it tried to start up but some config or related drivers were missing and it complained in dmesg.CFSworks
06/03/2023, 4:57 AMdrivers/cpufreq/sun50i-cpufreq-nvmem.c
I guessDhanOS
06/03/2023, 4:58 AMDhanOS
06/03/2023, 4:58 AMDhanOS
06/03/2023, 4:58 AMDhanOS
06/03/2023, 4:59 AM[ 0.006008] /cpus/cpu@0 missing clock-frequency property
[ 0.006035] /cpus/cpu@1 missing clock-frequency property
CFSworks
06/03/2023, 5:02 AM"arm,sun20iw1p1"
) in its compatible
property (I think it does already?)
2. It registers a driver under /sys/bus/platform/drivers
called (apparently) sun50i-cpufreq-nvmem
3. It tries to register a platform device of the same name, under /sys/bus/platform/devices
DhanOS
06/03/2023, 5:02 AMc
static const struct of_device_id sun50i_cpufreq_match_list[] = {
{ .compatible = "arm,sun50iw9p1", .data = &sun50iw9_soc_data, },
{ .compatible = "arm,sun50iw10p1", .data = &sun50iw10_soc_data, },
{ .compatible = "arm,sun8iw20p1", .data = &sun8iw20_soc_data, },
{ .compatible = "arm,sun20iw1p1", .data = &sun20iw1_soc_data, },
{}
};
CFSworks
06/03/2023, 5:03 AMarm,sun8iw20p1
DhanOS
06/03/2023, 5:04 AMNVMEM
which is enabledDhanOS
06/03/2023, 5:04 AMCFSworks
06/03/2023, 5:04 AM/sys/bus/platform/drivers
?CFSworks
06/03/2023, 5:05 AM/sys/firmware/devicetree/base/compatible
DhanOS
06/03/2023, 5:08 AMMBUS_PMU reg-dummy sunxi-gmac
alarmtimer reg-fixed-voltage sunxi-gpadc
allwinner,sunxi-hdmi simple-reset sunxi-iommu
disp spi sunxi-keyboard
dump_reg ss sunxi-mmc
eeprom-sunxi-sid sun4i-ts sunxi-ohci
gpio-clk sun6i-dma sunxi-rc-recv
i2c sun6i-prcm sunxi-rtc
of_fixed_clk sun8iw20-ccu sunxi-rtc-ccu
of_fixed_factor_clk sun8iw20-pinctrl sunxi-sram
otg manager sun8iw20-r-ccu sunxi-wdt
pwm-regulator sun8iw20-rtc-ccu sunxi_pwm
pwrseq_emmc sunxi-cedar sunxi_usb_udc
pwrseq_simple sunxi-ehci uart
CFSworks
06/03/2023, 5:08 AMsun50i-cpufreq-nvmem
CFSworks
06/03/2023, 5:08 AMDhanOS
06/03/2023, 5:09 AMCFSworks
06/03/2023, 5:10 AMCFSworks
06/03/2023, 5:19 AMDhanOS
06/03/2023, 5:27 AMFor some SoCs, the CPU frequency subset and voltage value of each OPP
varies based on the silicon variant in use. Allwinner Process Voltage
Scaling Tables defines the voltage and frequency value based on the
speedbin blown in the efuse combination. The sun50i-cpufreq-nvmem driver
reads the efuse value from the SoC to provide the OPP framework with
required information.
DhanOS
06/03/2023, 5:28 AMRequired properties:
--------------------
In 'cpus' nodes:
- operating-points-v2: Phandle to the operating-points-v2 table to use.
In 'operating-points-v2' table:
- compatible: Should be
- 'allwinner,sun50i-h6-operating-points'.
- nvmem-cells: A phandle pointing to a nvmem-cells node representing the
efuse registers that has information about the speedbin
that is used to select the right frequency/voltage value
pair. Please refer the for nvmem-cells bindings
Documentation/devicetree/bindings/nvmem/nvmem.txt and
also examples below.
In every OPP node:
- opp-microvolt-<name>: Voltage in micro Volts.
At runtime, the platform can pick a <name> and
matching opp-microvolt-<name> property.
[See: opp.txt]
HW: <name>:
sun50i-h6 speed0 speed1 speed2
CFSworks
06/03/2023, 5:28 AMDhanOS
06/03/2023, 5:31 AMCFSworks
06/03/2023, 5:38 AMclocks = <...>;
property on the dt nodes for the CPU cores, and the operating points table is for Linux to set suitable voltages when the clocks are changed.DhanOS
06/03/2023, 5:39 AMDhanOS
06/03/2023, 5:40 AMDhanOS
06/03/2023, 5:41 AM=> fdt list /cpus/cpu@0
cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a7", "arm,armv7";
reg = <0x00000000>;
enable-method = "psci";
clocks = <0x00000002 0x00000016>;
dynamic-power-coefficient = <0x0000009c>;
cpu-idle-states = <0x00000003 0x00000004>;
operating-points-v2 = <0x00000005>;
#cooling-cells = <0x00000002>;
cpu-supply = <0x00000006>;
phandle = <0x0000000b>;
};
CFSworks
06/03/2023, 5:41 AMDhanOS
06/03/2023, 5:41 AMDhanOS
06/03/2023, 5:42 AMCFSworks
06/03/2023, 5:43 AMDhanOS
06/03/2023, 5:44 AMcpufreq
is missing in the /sys/devices/system/cpu
so something is missing for sureDhanOS
06/03/2023, 5:44 AMDhanOS
06/03/2023, 5:45 AMcpufeq
to the kernel config and have seen it compilingCFSworks
06/03/2023, 5:48 AMCONFIG_CPU_FREQ
?DhanOS
06/03/2023, 5:48 AMCFSworks
06/03/2023, 5:48 AMDhanOS
06/03/2023, 5:50 AMsun50i-cpufreq-nvmem
CFSworks
06/03/2023, 5:50 AMCFSworks
06/03/2023, 5:50 AMuname -a
reflect the correct build time and everything?DhanOS
06/03/2023, 5:51 AM# uname -a
Linux turing 5.4.61 #2 SMP PREEMPT Sun Mar 5 22:37:36 CET 2023 armv7l GNU/Linux
DhanOS
06/03/2023, 5:51 AMDhanOS
06/03/2023, 5:52 AMDhanOS
06/03/2023, 5:52 AMDhanOS
06/03/2023, 5:52 AMCFSworks
06/03/2023, 5:52 AMzImage
)DhanOS
06/03/2023, 5:52 AMDhanOS
06/03/2023, 5:53 AMCFSworks
06/03/2023, 5:53 AMCFSworks
06/03/2023, 5:54 AMDhanOS
06/03/2023, 6:16 AMDhanOS
06/03/2023, 6:16 AMDhanOS
06/03/2023, 6:16 AMDhanOS
06/03/2023, 6:18 AMDhanOS
06/03/2023, 6:18 AMDhanOS
06/03/2023, 6:19 AMefex
and this is all I see:
=> efex
## jump to efex ...
[06.779][mmc]: MMC Device 2 not found
[06.783][mmc]: mmc 2 not find, so not exit▒[20]HELLO! BOOT0 is starting!
[23]BOOT0 commit : 2c94b33
[26]set pll start
[31]periph0 has been enabled
[35]set pll end
[36][pmu]: bus read error
[39]board init ok
[40]rtc[2] value = 0x5aa5a55a
[43]eraly jump fel
- no matter which method I'm tryingDhanOS
06/03/2023, 6:22 AMCFSworks
06/03/2023, 6:22 AMCFSworks
06/03/2023, 6:22 AMDhanOS
06/03/2023, 6:22 AMDhanOS
06/03/2023, 6:24 AMDhanOS
06/03/2023, 6:24 AMCFSworks
06/03/2023, 6:26 AMDhanOS
06/03/2023, 6:44 AMCFSworks
06/03/2023, 6:45 AMCFSworks
06/03/2023, 6:45 AMDhanOS
06/03/2023, 6:47 AMDhanOS
06/03/2023, 6:47 AMDhanOS
06/03/2023, 6:57 AMDhanOS
06/03/2023, 7:01 AMDhanOS
06/03/2023, 7:03 AMzImage
in buildroot/output/images
has not been updated since MarchDhanOS
06/03/2023, 7:03 AMDhanOS
06/03/2023, 7:04 AMDhanOS
06/03/2023, 7:05 AMDhanOS
06/03/2023, 7:07 AMimages
in buildroot/output
DhanOS
06/03/2023, 7:08 AMoutput
has to goDhanOS
06/03/2023, 8:46 AMcpufreq
and cpuidle
appeared in the /sys/devices/system/cpu
, but the cpufreq
is empty. But this is something to further look at later. cpupower
shows no compatible hardware.
I also learned that the uboot and zimage do not get rebuilt even if I thought they will. Kind of... silly (for a lack of a better world), so maybe somethign to look at too.
Finally, I'll look again at disabling simulate multiplane with these latest findingsmahtin_w6lhi
06/03/2023, 4:21 PMPlease note that the .swu package provided does not contain the kernel itself. To upgrade to 1.0.2 its recommended to flash the .img file using the phoenix suit.
Does phoenixsuit work on non Win platforms? I guess updating this page is where my question should be answered: https://help.turingpi.com/hc/en-us/articles/8686945524893-Baseboard-Management-Controller-BMC-scienceman
06/03/2023, 5:45 PMStuart
06/03/2023, 5:50 PMCFSworks
06/03/2023, 6:04 PMStuart
06/03/2023, 6:07 PMStuart
06/03/2023, 6:08 PMCFSworks
06/03/2023, 6:08 PMStuart
06/03/2023, 6:09 PMCFSworks
06/03/2023, 6:10 PMrecovery
volume first, reboots to that, then writes the rootfs. But it only does it for rootfs, the kernel isn't kept in there.Stuart
06/03/2023, 6:11 PMCFSworks
06/03/2023, 6:12 PMStuart
06/03/2023, 6:16 PMCFSworks
06/03/2023, 6:25 PMboot.img
you can scp
that to your BMC (somewhere in /tmp
preferably) then use ubiupdatevol /dev/ubi0_4 boot.img
and reboot
, I'm about 95% sure that will work (the other 5% is it won't boot and you'll need to break out PhoenixSuit)svenrademakers
06/03/2023, 6:46 PMsvenrademakers
06/03/2023, 7:15 PMsvenrademakers
06/03/2023, 7:18 PMCFSworks
06/03/2023, 7:18 PMsvenrademakers
06/03/2023, 7:21 PMCFSworks
06/03/2023, 7:25 PM/boot/zImage
and the boot script (what U-Boot executes to bring up the kernel) is /boot/boot.scr
, which solves the problem of the kernel and rootfs being separate upgrades.CFSworks
06/03/2023, 7:25 PMCFSworks
06/03/2023, 7:25 PMCFSworks
06/03/2023, 7:27 PMCFSworks
06/03/2023, 7:28 PMsvenrademakers
06/03/2023, 8:09 PMCFSworks
06/03/2023, 8:11 PMboot.img
in there and update the swupdate config so it writes to UBI volume #4 ("boot"); I'd recommend testing this heavily before shipping such a .swu though.CFSworks
06/03/2023, 8:13 PMsvenrademakers
06/03/2023, 8:24 PMsvenrademakers
06/03/2023, 8:26 PMsvenrademakers
06/03/2023, 8:28 PMCFSworks
06/03/2023, 8:29 PMCFSworks
06/03/2023, 8:33 PM=> ubifsmount rootfs
[153.429]UBIFS error (pid: 1): cannot open "rootfs", error -22
Error reading superblock on volume 'rootfs' errno=-22!
Lovely.svenrademakers
06/03/2023, 8:36 PMsvenrademakers
06/03/2023, 8:39 PMCFSworks
06/03/2023, 8:39 PMsvenrademakers
06/03/2023, 8:40 PMCFSworks
06/03/2023, 8:40 PMSIMULATE_MULTIPLANE
so there's a completely different view of the NAND, so it can't read it at all (without reformatting).CFSworks
06/03/2023, 8:41 PMj0ju
06/03/2023, 10:20 PMCFSworks
06/03/2023, 10:22 PMj0ju
06/03/2023, 10:22 PMvitorio
06/03/2023, 11:39 PMdamaged volume, update marker is set
on reboot.werdnum
06/04/2023, 1:48 AMdojo-major
06/04/2023, 3:03 AMCFSworks
06/04/2023, 5:34 AM???
box though!bhuism 🍊
06/04/2023, 6:38 AMsvenrademakers
06/04/2023, 7:11 AMCFSworks
06/04/2023, 7:16 AMphantom79
06/04/2023, 6:34 PMDhanOS
06/05/2023, 6:57 AMDhanOS
06/05/2023, 7:04 AMDhanOS
06/05/2023, 7:05 AMDhanOS
06/05/2023, 11:15 AMcpufreq
again and I think I made it working:
# cpupower frequency-info
analyzing CPU 0:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0 1
maximum transition latency: 244 us
hardware limits: 480 MHz - 1.10 GHz
available frequency steps: 480 MHz, 720 MHz, 912 MHz, 1.01 GHz, 1.10 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 480 MHz and 1.10 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency: 1.10 GHz (asserted by call to hardware)
# cpupower frequency-set -g conservative
Setting cpu: 0
Setting cpu: 1
# cpupower frequency-info
analyzing CPU 0:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0 1
maximum transition latency: 244 us
hardware limits: 480 MHz - 1.10 GHz
available frequency steps: 480 MHz, 720 MHz, 912 MHz, 1.01 GHz, 1.10 GHz
available cpufreq governors: conservative ondemand userspace powersave performance schedutil
current policy: frequency should be within 480 MHz and 1.10 GHz.
The governor "conservative" may decide which speed to use
within this range.
current CPU frequency: 480 MHz (asserted by call to hardware)
DhanOS
06/05/2023, 11:19 AMconvervative
scheduler. It sits at 480MHz while idle and jumps to 1.1GHz when there's a load on the CPUDhanOS
06/05/2023, 11:24 AMDhanOS
06/05/2023, 11:44 AMzImage
and now everything works as expected. We also don;t have to set mw 02001000 ca002900
- the boot process takes like a couple of seconds more (it's slower before the scheduler kicks in) but i guess settings the CPU speed in U-boot is still a good thing to doCFSworks
06/05/2023, 4:54 PM02001000
anymore at all 🎊DhanOS
06/05/2023, 4:59 PMU-boot
and zImage
got updated this time). But I have one more idea how to try it (that'd be the closest to how this should be done with appropriate patches) and well see, but it takes time now to compile everything from scratch and a VM ran out of disk space 😄CFSworks
06/05/2023, 5:00 PMDhanOS
06/05/2023, 5:00 PMcpufreq
to work is that we just gained 10% of the CPU speed, since 1.1GHz is what's the official stable maxCFSworks
06/05/2023, 5:01 PMCFSworks
06/05/2023, 5:01 PMDhanOS
06/05/2023, 5:03 PMCFSworks
06/05/2023, 5:04 PMCFSworks
06/05/2023, 5:06 PMDhanOS
06/05/2023, 5:06 PMCFSworks
06/05/2023, 5:07 PMDhanOS
06/05/2023, 5:07 PMDhanOS
06/05/2023, 5:07 PMCFSworks
06/05/2023, 5:08 PMDhanOS
06/05/2023, 5:08 PMCFSworks
06/05/2023, 5:09 PMDhanOS
06/05/2023, 5:09 PMDhanOS
06/05/2023, 5:11 PMCFSworks
06/05/2023, 5:58 PMDhanOS
06/05/2023, 6:00 PMadbd
is not necessary. About any way that's easy to use a USB will be enough. adbd
is cross-platform and easy to install. I don't know about the ACM
CFSworks
06/05/2023, 6:04 PMDhanOS
06/05/2023, 6:05 PMCFSworks
06/05/2023, 6:07 PMDhanOS
06/05/2023, 6:08 PMDhanOS
06/05/2023, 6:08 PMCFSworks
06/05/2023, 6:08 PMDhanOS
06/05/2023, 6:09 PMDhanOS
06/05/2023, 6:10 PMDhanOS
06/05/2023, 6:21 PM./buildroot/dl/uboot/git/include/linux/mtd/aw-spinand.h:29:#define SIMULATE_MULTIPLANE (0)
```and removed the `output` folder to make the image fully from scratch, but when it makes it's way to the `output` folder:
./buildroot/output/build/uboot-69b04a0b3dd5c412f66e9dbfd02876eebfd99646/include/linux/mtd/aw-spinand.h:29:#define SIMULATE_MULTIPLANE (1)
```and I don't quite understand how and whyCFSworks
06/05/2023, 6:21 PMDhanOS
06/05/2023, 6:22 PMDhanOS
06/05/2023, 6:22 PMDhanOS
06/05/2023, 6:22 PMCFSworks
06/05/2023, 6:30 PMU-Boot SPL 2023.07-rc2-00319-gb5a03a4ae6 (Jun 05 2023 - 12:17:57 -0600)
DRAM: 128 MiB
Unknown boot source 4
resetting ...
U-Boot SPL 2023.07-rc2-00319-gb5a03a4ae6 (Jun 05 2023 - 12:17:57 -0600)
DRAM: 128 MiB
Unknown boot source 4
resetting ...
DhanOS
06/05/2023, 6:30 PMCFSworks
06/05/2023, 6:47 PMU-Boot SPL 2023.07-rc2-00320-g95ea8c294b (Jun 05 2023 - 12:44:42 -0600)
DRAM: 128 MiB
Trying to boot from sunxi SPI
U-Boot 2023.07-rc2-00320-g95ea8c294b (Jun 05 2023 - 12:44:42 -0600) Allwinner Technology
CPU: Allwinner R528 (SUN8I)
Model: Turing Machines Turing Pi 2 BMC
DRAM: 128 MiB
...okay nice so we can now write U-Boot straight to the NAND and it worksDhanOS
06/05/2023, 6:51 PMsvenrademakers
06/05/2023, 7:16 PMDhanOS
06/05/2023, 8:17 PMCFSworks
06/05/2023, 8:44 PMDhanOS
06/05/2023, 8:46 PMDhanOS
06/05/2023, 8:51 PMCFSworks
06/05/2023, 9:24 PMCFSworks
06/06/2023, 12:06 AMCFSworks
06/06/2023, 12:08 AMCFSworks
06/06/2023, 12:08 AMDhanOS
06/06/2023, 4:05 AMsvenrademakers
06/06/2023, 4:06 AMDhanOS
06/06/2023, 4:10 AMDhanOS
06/06/2023, 4:10 AMCFSworks
06/06/2023, 4:12 AMu-boot-sun8iw20p1.bin
while the U-Boot that PhoenixSuit itself temporarily loads up during install is u-boot.fex
and I don't think we have the source to the latter. What I don't know is for how much of the installation it has simulate_multiplane enabled. It can't be enabled for writing the boot package or boot0, since those things don't understand the simulate_multiplane layout, but it's definitely enabled for writing the sys
partition (with the UBI images).CFSworks
06/06/2023, 4:12 AMsvenrademakers
06/06/2023, 4:14 AMsvenrademakers
06/06/2023, 4:15 AMDhanOS
06/06/2023, 4:15 AMCFSworks
06/06/2023, 4:15 AMCFSworks
06/06/2023, 4:16 AMDhanOS
06/06/2023, 4:17 AMCFSworks
06/06/2023, 4:17 AMsvenrademakers
06/06/2023, 4:18 AMsvenrademakers
06/06/2023, 4:19 AMDhanOS
06/06/2023, 4:21 AMsvenrademakers
06/06/2023, 4:21 AMCFSworks
06/06/2023, 4:22 AMDhanOS
06/06/2023, 4:22 AMcpupower
toolCFSworks
06/06/2023, 4:24 AMDhanOS
06/06/2023, 4:24 AMCFSworks
06/06/2023, 4:25 AMDhanOS
06/06/2023, 4:25 AMCFSworks
06/06/2023, 4:26 AMDhanOS
06/06/2023, 4:27 AMDhanOS
06/06/2023, 4:27 AMDhanOS
06/06/2023, 4:27 AMCFSworks
06/06/2023, 4:28 AMDhanOS
06/06/2023, 4:28 AMsvenrademakers
06/06/2023, 4:29 AMCFSworks
06/06/2023, 4:30 AMDhanOS
06/06/2023, 4:30 AMDhanOS
06/06/2023, 4:32 AMDhanOS
06/06/2023, 4:32 AMDhanOS
06/06/2023, 4:32 AMDhanOS
06/06/2023, 4:33 AMCFSworks
06/06/2023, 4:35 AMsvenrademakers
06/06/2023, 4:36 AMDhanOS
06/06/2023, 4:37 AMCFSworks
06/06/2023, 4:40 AMDhanOS
06/06/2023, 4:40 AMDhanOS
06/06/2023, 4:40 AMDhanOS
06/06/2023, 4:42 AMDhanOS
06/06/2023, 4:42 AMCFSworks
06/06/2023, 4:43 AMsvenrademakers
06/06/2023, 4:43 AMDhanOS
06/06/2023, 4:43 AMCFSworks
06/06/2023, 4:44 AMsvenrademakers
06/06/2023, 4:44 AMDhanOS
06/06/2023, 4:47 AMDhanOS
06/06/2023, 4:47 AMDhanOS
06/06/2023, 4:48 AMCFSworks
06/06/2023, 4:48 AMDhanOS
06/06/2023, 4:49 AMDhanOS
06/06/2023, 4:49 AMDhanOS
06/06/2023, 4:50 AMDhanOS
06/06/2023, 4:50 AMCFSworks
06/06/2023, 4:51 AMDhanOS
06/06/2023, 4:51 AMCFSworks
06/06/2023, 4:53 AMconfig.txt
has some option like that: if you set it, it raises the limit for how high you're allowed to overvolt, but it also blows an eFuse so they know the warranty is void.DhanOS
06/06/2023, 5:03 AMDhanOS
06/06/2023, 5:06 AMDhanOS
06/06/2023, 5:07 AMCFSworks
06/06/2023, 5:10 AMsunxi-thermal
driver in the latest firmware:
# ls /sys/bus/platform/drivers/sunxi-thermal/
2009400.ths bind uevent unbind
# ls /sys/bus/platform/drivers/sunxi-thermal/2009400.ths/
driver of_node supplier:2001000.ccu
driver_override power supplier:3006000.sid
modalias subsystem uevent
#
CFSworks
06/06/2023, 5:10 AMhwmon
entry so I could read the temperature. This driver isn't doing anything interesting at all.DhanOS
06/06/2023, 5:11 AMCFSworks
06/06/2023, 5:11 AMCFSworks
06/06/2023, 5:12 AMsvenrademakers
06/06/2023, 5:12 AMsvenrademakers
06/06/2023, 5:12 AMCFSworks
06/06/2023, 5:12 AM# cat /sys/class/thermal/thermal_zone0/temp
30150
CFSworks
06/06/2023, 5:12 AMDhanOS
06/06/2023, 5:13 AMDhanOS
06/06/2023, 5:13 AMDhanOS
06/06/2023, 5:13 AMDhanOS
06/06/2023, 5:13 AMDhanOS
06/06/2023, 5:15 AMDhanOS
06/06/2023, 5:15 AMCFSworks
06/06/2023, 5:17 AMCFSworks
06/06/2023, 5:18 AMCFSworks
06/06/2023, 5:31 AMDhanOS
06/06/2023, 5:45 AMCFSworks
06/06/2023, 5:48 AM/etc/config
) are preserved across upgrades anyway. I think the overlayfs default is if the base file changes but it's been overridden in the upper layer, the upper layer still takes precedence.DhanOS
06/06/2023, 5:51 AMCFSworks
06/06/2023, 5:55 AM/usr/local
while /usr
and /
are the realm of the base image?CFSworks
06/06/2023, 5:55 AM/opt
is another good candidate for "not part of base installation" packages)DhanOS
06/06/2023, 5:59 AMDhanOS
06/06/2023, 5:59 AMCFSworks
06/06/2023, 6:01 AMCFSworks
06/06/2023, 6:01 AMbhuism 🍊
06/06/2023, 8:39 AMsvenrademakers
06/06/2023, 9:15 AMDhanOS
06/06/2023, 9:17 AMsvenrademakers
06/06/2023, 9:17 AMbhuism 🍊
06/06/2023, 9:20 AMbhuism 🍊
06/06/2023, 9:21 AMBus 003 Device 015: ID 18d1:0002 Google Inc. Configfs ffs gadget
bhuism 🍊
06/06/2023, 9:21 AMbhuism 🍊
06/06/2023, 9:23 AMbhuism 🍊
06/06/2023, 9:24 AMsvenrademakers
06/06/2023, 10:08 AMbhuism 🍊
06/06/2023, 10:08 AMbhuism 🍊
06/06/2023, 10:09 AMbhuism 🍊
06/06/2023, 10:09 AMsvenrademakers
06/06/2023, 10:10 AMbhuism 🍊
06/06/2023, 10:10 AMbhuism 🍊
06/06/2023, 10:10 AMbhuism 🍊
06/06/2023, 10:10 AMbhuism 🍊
06/06/2023, 10:11 AMbhuism 🍊
06/06/2023, 10:11 AMbhuism 🍊
06/06/2023, 10:12 AMsvenrademakers
06/06/2023, 10:17 AMbhuism 🍊
06/06/2023, 10:18 AMbhuism 🍊
06/06/2023, 10:29 AMwerdnum
06/06/2023, 10:33 AMbhuism 🍊
06/06/2023, 10:35 AMwerdnum
06/06/2023, 10:57 AMCFSworks
06/06/2023, 6:14 PMsvenrademakers
06/06/2023, 6:27 PMCFSworks
06/06/2023, 6:30 PMCFSworks
06/06/2023, 6:31 PMsvenrademakers
06/06/2023, 6:39 PMCFSworks
06/06/2023, 6:44 PMturing-pi/buildroot master $ make clean
...
turing-pi/buildroot master $ git pull
...
turing-pi/buildroot master $ make BR2_EXTERNAL=../tp2bmc tp2bmc_defconfig
...
turing-pi/buildroot master $ nice make
...my gosh this takes forever when ccache isn't yet warmed up, go get coffee...
turing-pi/buildroot master $ cd output/images/
turing-pi/buildroot/output/images master $ ssh root@tp2 uname -a
Linux turing 5.4.61 #31 SMP PREEMPT Thu Oct 20 00:11:14 CST 2022 armv7l GNU/Linux
turing-pi/buildroot/output/images master $ scp boot.img root@tp2:/tmp
boot.img 100% 3490KB 7.0MB/s 00:00
turing-pi/buildroot/output/images master $ ssh root@tp2 ubiupdatevol /dev/ubi0_4 /tmp/boot.img
turing-pi/buildroot/output/images master $ ssh root@tp2 reboot
turing-pi/buildroot/output/images master $ ssh root@tp2 uname -a
Linux turing 5.4.61 #1 SMP PREEMPT Tue Jun 6 12:36:32 MDT 2023 armv7l GNU/Linux
CFSworks
06/06/2023, 6:46 PMubiupdatevol
, but beyond that it's a pretty good method.CFSworks
06/06/2023, 6:47 PMubiupdatevol
took less than a second though, so a power outage during that window would be a real "the universe is out to get you today" moment. 😅)svenrademakers
06/06/2023, 6:51 PMsvenrademakers
06/06/2023, 6:51 PMCFSworks
06/06/2023, 6:52 PMDhanOS
06/06/2023, 7:12 PMDhanOS
06/06/2023, 7:17 PMsvenrademakers
06/06/2023, 7:27 PMDhanOS
06/06/2023, 7:31 PMDhanOS
06/06/2023, 7:31 PMDhanOS
06/06/2023, 7:32 PMCFSworks
06/06/2023, 7:34 PMDhanOS
06/06/2023, 7:35 PMCFSworks
06/06/2023, 7:47 PMDhanOS
06/06/2023, 7:48 PMCFSworks
06/06/2023, 7:53 PMCFSworks
06/06/2023, 7:53 PMDhanOS
06/06/2023, 7:55 PMCFSworks
06/06/2023, 7:55 PMreset
command, working PSCI support, fastboot
support, probably other things I'm forgetting)CFSworks
06/06/2023, 7:56 PMfdt set
, the two mw
, and the sleep 1
. The rest is probably best to retain.CFSworks
06/06/2023, 8:01 PMmtd
commands to script U-Boot to rewrite the NAND from a file kept on the SD card.CFSworks
06/06/2023, 8:01 PMboot.scr
(as usual), but that script just erases+rewrites the NAND to a golden image.CFSworks
06/06/2023, 8:02 PMwerdnum
06/06/2023, 11:04 PMwerdnum
06/06/2023, 11:04 PMCFSworks
06/06/2023, 11:56 PMubiupdatevol
method will only update the kernel and not the devicetreebooth5381
06/07/2023, 12:21 AMDhanOS
06/07/2023, 12:22 AMwerdnum
06/07/2023, 12:25 AMwerdnum
06/07/2023, 12:26 AMwerdnum
06/07/2023, 12:26 AMwerdnum
06/07/2023, 12:26 AMwerdnum
06/07/2023, 12:26 AMbooth5381
06/07/2023, 12:29 AMdojo-major
06/07/2023, 12:57 AMdojo-major
06/07/2023, 12:57 AMwerdnum
06/07/2023, 12:58 AMdojo-major
06/07/2023, 1:01 AMwerdnum
06/07/2023, 1:01 AMdojo-major
06/07/2023, 1:04 AMCFSworks
06/07/2023, 1:08 AMCFSworks
06/07/2023, 1:10 AMbooth5381
06/07/2023, 1:25 AMdojo-major
06/07/2023, 1:30 AMdojo-major
06/07/2023, 1:34 AMsteveax
06/07/2023, 2:30 AMsteveax
06/07/2023, 2:32 AMwalkjivefly
06/07/2023, 9:57 AMDhanOS
06/07/2023, 10:43 AMDhanOS
06/07/2023, 10:45 AMwalkjivefly
06/07/2023, 10:54 AMDhanOS
06/07/2023, 10:54 AMwalkjivefly
06/07/2023, 10:55 AMDhanOS
06/07/2023, 10:56 AMDan D.
06/07/2023, 1:40 PMDhanOS
06/07/2023, 1:43 PMDan D.
06/07/2023, 1:46 PMbhuism 🍊
06/07/2023, 2:24 PMj0ju
06/07/2023, 10:48 PMj0ju
06/07/2023, 10:48 PMDan D.
06/07/2023, 11:59 PMj0ju
06/08/2023, 4:57 PMCFSworks
06/08/2023, 8:55 PMDhanOS
06/08/2023, 9:00 PMDhanOS
06/08/2023, 9:01 PMCFSworks
06/08/2023, 9:05 PMCFSworks
06/08/2023, 9:05 PMDhanOS
06/08/2023, 9:05 PMDhanOS
06/08/2023, 9:07 PMDhanOS
06/08/2023, 9:07 PMDhanOS
06/08/2023, 9:08 PMDhanOS
06/08/2023, 9:09 PMCFSworks
06/08/2023, 9:11 PMCFSworks
06/08/2023, 9:12 PMCFSworks
06/08/2023, 9:13 PMCFSworks
06/08/2023, 9:13 PMDhanOS
06/08/2023, 9:17 PMDhanOS
06/08/2023, 9:17 PMCFSworks
06/08/2023, 9:18 PMDhanOS
06/08/2023, 9:20 PMCFSworks
06/08/2023, 9:20 PMDhanOS
06/08/2023, 9:22 PMDhanOS
06/08/2023, 9:23 PMCFSworks
06/08/2023, 9:23 PMCFSworks
06/08/2023, 9:23 PMCFSworks
06/08/2023, 9:23 PMDhanOS
06/08/2023, 9:24 PMDhanOS
06/08/2023, 9:25 PMCFSworks
06/08/2023, 9:26 PMDhanOS
06/08/2023, 9:27 PMDhanOS
06/08/2023, 9:27 PMDhanOS
06/08/2023, 9:28 PMDhanOS
06/08/2023, 9:28 PMbooth5381
06/08/2023, 11:38 PMStuart
06/10/2023, 9:31 AMdmesg
output) of a couple of bad NAND blocks - so, unless this enough to RMA the board, bad-block handling is going to be required 😩DhanOS
06/10/2023, 6:28 PMCFSworks
06/10/2023, 7:15 PMbuild/
in the firmware root, it keeps trapping my tabcomplete for buildroot/
DhanOS
06/11/2023, 5:20 AMCFSworks
06/11/2023, 6:21 AM/mnt/sdcard
endpoint can't be created, etc.CFSworks
06/11/2023, 6:21 AMTeslamax
06/11/2023, 11:15 PMTeslamax
06/11/2023, 11:16 PMDan D.
06/11/2023, 11:36 PMTeslamax
06/12/2023, 12:06 AMTeslamax
06/12/2023, 12:06 AMTeslamax
06/12/2023, 12:07 AMTeslamax
06/12/2023, 12:08 AMTeslamax
06/12/2023, 12:08 AMunknown
for each nodeTeslamax
06/12/2023, 12:09 AMTeslamax
06/12/2023, 12:11 AMDan D.
06/12/2023, 12:11 AMTeslamax
06/12/2023, 12:12 AMTeslamax
06/12/2023, 12:13 AMTeslamax
06/12/2023, 12:33 AMwerdnum
06/12/2023, 2:25 AMDan D.
06/12/2023, 2:27 AMBatz_10K
06/12/2023, 7:30 AMDhanOS
06/12/2023, 12:52 PMmtd read.oob
. Did you mean to use mtd read
for the data part and mtd read.oob
for the spare cell data (with the corresponding fatwrite
commands)?
Then, I did a test - I flashed a card with the newest U-boot you shared here, booted the board off of it and erased flash. Then I used the recovery SD card to run efex
and flash the v1.0.2 using PhoenixSuit. Then I again booted the board using a card with your newest U-boot and dumped the image using mtd read
(not .oob
since I don't need this part I believe) and fatwite
. I then took my other board and booted off of the SD card with your u-boot, erased the NAND and reversed the rest of the steps - fatload
and mtd write
, but the board does not book with (what I think is) important part:
```
device nand0 , # parts = 4
#: name size offset mask_flags
0: boot0 0x00100000 0x00000000 1
1: uboot 0x00300000 0x00100000 1
2: secure_storage 0x00100000 0x00400000 1
3: sys 0x07b00000 0x00500000 0
active partition: nand0,0 - (boot0) 0x00100000 @ 0x00000000
defaults:
mtdids : nand0=nand
mtdparts: mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
[00.680]LCD open finish
[00.737]ubi0: attaching mtd4
[00.922]ubi0: scanning is finished
[00.925]ubi0 error: ubi_read_volume_table: the layout volume was not found
[00.931]ubi0 error: ubi_attach_mtd_dev: failed to attach mtd4, error -22
[00.938]UBI error: cannot attach mtd4
[00.941]UBI error: cannot initialize UBI, error -22
UBI init error 22
Please check, if the correct MTD partition is used (size big enough?)
```and then there's a bunch of read errors. Any idea what am I missing?CFSworks
06/12/2023, 2:50 PMmtd read.oob
seems to be "read raw data, append OOB" not "only OOB." I'm wondering if what's upsetting UBI is that the OOB is missing.DhanOS
06/12/2023, 2:53 PMmtd read.raw
is doing. but I may be wrongDhanOS
06/12/2023, 2:54 PMCFSworks
06/12/2023, 3:06 PMCFSworks
06/12/2023, 3:19 PMDhanOS
06/12/2023, 3:21 PMCFSworks
06/12/2023, 3:24 PMDhanOS
06/12/2023, 3:28 PMCFSworks
06/12/2023, 3:49 PMDhanOS
06/12/2023, 3:49 PMDhanOS
06/12/2023, 3:49 PMDhanOS
06/12/2023, 3:50 PM00
on the right lasts up to 03FE07FF
DhanOS
06/12/2023, 3:51 PMCFSworks
06/12/2023, 3:51 PMDhanOS
06/12/2023, 3:51 PMDhanOS
06/12/2023, 3:52 PMCFSworks
06/12/2023, 3:53 PMDhanOS
06/12/2023, 3:53 PMDhanOS
06/12/2023, 3:53 PMCFSworks
06/12/2023, 3:55 PMDhanOS
06/12/2023, 3:56 PMDhanOS
06/12/2023, 3:58 PMDhanOS
06/12/2023, 3:59 PMUBI#
every 0x40000
starting at 0x500000
, except for the address from aboveDhanOS
06/12/2023, 4:01 PMDhanOS
06/12/2023, 4:02 PMDhanOS
06/12/2023, 4:04 PMCFSworks
06/12/2023, 4:13 PMIt is well-known that NAND chips have some amount of physical eraseblocks marked as bad by the manufacturer. During the lifetime of the NAND device, other bad blocks may appear. Nonetheless, manufacturers usually guarantee that the first few physical eraseblocks are not bad and that the total number of bad PEBs will not exceed certain number.
That first sentence makes me think that the boards have non-overlapping bad-at-manufacture-time blocks.DhanOS
06/12/2023, 4:22 PMubi_read_volume_table
was on the board 1's flash?DhanOS
06/12/2023, 4:23 PMNonetheless, manufacturers usually guarantee that the first few physical eraseblocks
is for the boot areaCFSworks
06/12/2023, 4:24 PMDhanOS
06/12/2023, 4:24 PMDhanOS
06/12/2023, 4:25 PMubi
commandDhanOS
06/12/2023, 4:25 PMubi read
and ubi write
maybe?DhanOS
06/12/2023, 4:26 PM- 0x000000000000-0x000008000000 : "spi-nand0"
- 0x000000000000-0x000000100000 : "boot"
- 0x000000100000-0x000008000000 : "ubi"
CFSworks
06/12/2023, 4:27 PMCFSworks
06/12/2023, 4:29 PMSIMULATE_MULTIPLANE
DhanOS
06/12/2023, 4:29 PMDhanOS
06/12/2023, 4:30 PMDhanOS
06/12/2023, 4:30 PMCFSworks
06/12/2023, 4:34 PMCFSworks
06/12/2023, 4:41 PMDhanOS
06/12/2023, 4:45 PMDhanOS
06/13/2023, 9:24 AMmtdids
and mtdparts
variables, but all I'm getting from mtd
is Device nand0 not found!
. flinfo
also returns an empty string while the U-boot on the board (after interrupting the boot procedure) shows some info. I guess I cannot use the U-boot from the NAND image (buildroot/output/images/u-boot-sun8iw20p1.bin
) - I tried to flash it on the SD card but the BMC does not try to boot from the SD card. I may be missing something, so any idea will be helpful. It feels like without the SD card image sources not much can be done.CFSworks
06/13/2023, 8:01 PMmtd info
give a differently-named device?CFSworks
06/13/2023, 8:01 PMDhanOS
06/13/2023, 8:07 PMmtd info
returns an empty string before I set mtdids
variable and Device nand0 not found!
after I set it to nand0=nand
DhanOS
06/13/2023, 8:07 PM=> setenv mtdids nand0=nand
=> setenv mtdparts mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
=> mtd
Device nand0 not found!
=> mtd info
Device nand0 not found!
DhanOS
06/13/2023, 8:08 PMDhanOS
06/13/2023, 8:09 PMDhanOS
06/13/2023, 8:11 PMenv print
to dump the variables and tried to set the different ones on the recovery SD card U-boot, like:
mtd_name=sys
mtddevname=boot0
mtddevnum=0
mtdids=nand0=nand
mtdparts=mtdparts=nand:1024k@0(boot0)ro,3072k@1048576(uboot)ro,1024k@4194304(secure_storage)ro,-(sys)
CFSworks
06/13/2023, 11:31 PM[ 6.771020] read strings
and [ 13.608496] insmod_device_driver
while bootingCFSworks
06/13/2023, 11:33 PMusb_device
exists, and I bet changing it to /sys/bus/platform/devices/*/usb_device
cuts those 6 seconds out of the bootCFSworks
06/13/2023, 11:36 PMdiff --git a/tp2bmc/board/tp2bmc/overlay/etc/init.d/S11adb_server b/tp2bmc/board/tp2bmc/overlay/etc/init.d/S11adb_server
index 4473175d..d4bd9a72 100755
--- a/tp2bmc/board/tp2bmc/overlay/etc/init.d/S11adb_server
+++ b/tp2bmc/board/tp2bmc/overlay/etc/init.d/S11adb_server
@@ -64,7 +64,7 @@ function start_adb(){
sleep 1
# enable udc
- UDC_DEVICE=`find -name "usb_device"`
+ UDC_DEVICE=/sys/bus/platform/devices/*/usb_device
cat $UDC_DEVICE
#cat /sys/bus/platform/drivers/otg\ manager/soc@3000000:usbc0@0/usb_device
⏬ ⏬ ⏬
[ 6.664612] read strings
[ 8.731075]
[ 8.731075] insmod_device_driver
[ 8.731075]
DhanOS
06/13/2023, 11:42 PMDhanOS
06/13/2023, 11:42 PMDhanOS
06/13/2023, 11:43 PMDhanOS
06/13/2023, 11:43 PMCFSworks
06/13/2023, 11:44 PMDhanOS
06/13/2023, 11:44 PMDhanOS
06/14/2023, 8:51 AMDhanOS
06/14/2023, 8:52 AMDhanOS
06/14/2023, 8:53 AMDhanOS
06/14/2023, 8:53 AMDhanOS
06/14/2023, 8:55 AMcpu_freq
, and run it on one of my boardssvenrademakers
06/14/2023, 10:18 AMDhanOS
06/14/2023, 10:20 AMcpu_freq
. Also the dtsi
file he has is older from what we just got. The dtsi
file contained with the firmware does not even contain the 1.2GHz entry
I guess we can find some people who'll be willing to test this 🙂DhanOS
06/14/2023, 10:21 AMsvenrademakers
06/14/2023, 10:54 AMCFSworks
06/14/2023, 11:04 PMsvenrademakers
06/15/2023, 11:49 AMCFSworks
06/18/2023, 7:23 PMbhuism 🍊
06/18/2023, 7:53 PMStuart
06/19/2023, 9:38 AMDan D.
06/19/2023, 3:29 PMCFSworks
06/19/2023, 6:28 PMCFSworks
06/19/2023, 6:32 PMCFSworks
06/19/2023, 6:38 PMDan D.
06/19/2023, 10:26 PMDhanOS
06/20/2023, 1:18 PMcpu_freq
enabled and updated dtsi
, but the max reported frequency is 1.1GHz.
From the oop table, last 2 entries:
```json
opp@1104000000 {
opp-hz = /bits/ 64 ;
clock-latency-ns = ; /* 8 32k periods */
opp-microvolt-a0 = ;
opp-microvolt-a1 = ;
opp-microvolt-b0 = ;
opp-supported-hw = ;
};
opp@1200000000 {
opp-hz = /bits/ 64 ;
clock-latency-ns = ; /* 8 32k periods */
opp-microvolt-a0 = ;
opp-microvolt-a1 = ;
opp-supported-hw = ;
};
```1.2 GHz has opp-supported-hw = <0x1>
, so I guess the hardware version of our chip is different.
Do you have any idea on how to read the hardware version? I can search too, but maybe you knowCFSworks
06/20/2023, 6:16 PMopp-supported-hw
property.DhanOS
06/20/2023, 6:28 PMCFSworks
06/20/2023, 8:34 PMDhanOS
06/20/2023, 8:37 PMCFSworks
06/20/2023, 8:38 PMDhanOS
06/20/2023, 8:40 PMCFSworks
06/20/2023, 8:40 PMDhanOS
06/20/2023, 8:42 PMDhanOS
06/20/2023, 8:43 PMCFSworks
06/20/2023, 9:12 PMsvenrademakers
06/21/2023, 7:49 AMxfel ddr t113-s3
xfel write 0x43000000 buildroot/output/images/u-boot-sun8iw20p1.bin
xfel exec 0x43000000
https://github.com/xboot/xfelsvenrademakers
06/21/2023, 8:36 AMDhanOS
06/21/2023, 10:06 AMDhanOS
06/21/2023, 10:10 AMDhanOS
06/21/2023, 10:15 AMsvenrademakers
06/21/2023, 10:17 AMDhanOS
06/21/2023, 10:17 AMDhanOS
06/21/2023, 10:20 AMsvenrademakers
06/21/2023, 10:29 AMsvenrademakers
06/21/2023, 10:30 AMsvenrademakers
06/21/2023, 10:31 AMDhanOS
06/21/2023, 10:35 AMDhanOS
06/21/2023, 10:35 AMDhanOS
06/21/2023, 10:38 AMDhanOS
06/21/2023, 10:40 AMDhanOS
06/21/2023, 10:42 AMmtd
and UBI partitions using ubi
, and I would have this working already if only the damn flash was initialized with the recovery SD card image 😄svenrademakers
06/21/2023, 10:43 AMDhanOS
06/21/2023, 10:45 AMDhanOS
06/21/2023, 10:45 AMDhanOS
06/21/2023, 10:45 AMDhanOS
06/21/2023, 10:45 AMmtd.oob
svenrademakers
06/21/2023, 10:47 AMDhanOS
06/21/2023, 10:48 AMmtd.raw
that reads both cell array and spare cell array. Otherwise mtd
reads only cell array and mtd.oob
only spare cell arrayDhanOS
06/21/2023, 10:49 AMDhanOS
06/21/2023, 10:50 AMsvenrademakers
06/21/2023, 10:58 AMDhanOS
06/21/2023, 10:59 AMmtd.raw
, I don't want to overwrite the oob since this can mean some troublesDhanOS
06/21/2023, 11:00 AMDhanOS
06/21/2023, 11:01 AMDhanOS
06/21/2023, 11:01 AMmtd
(or even xfel
) is not a way to copy/flash the UBI areaDhanOS
06/21/2023, 11:02 AMsvenrademakers
06/21/2023, 11:04 AMnand-image-builder
DhanOS
06/21/2023, 11:06 AMDhanOS
06/21/2023, 11:09 AMsvenrademakers
06/21/2023, 11:23 AMDhanOS
06/21/2023, 11:26 AMubi
tool would be the right way of doing this.DhanOS
06/21/2023, 11:28 AMDhanOS
06/21/2023, 11:31 AMefex
was usually a way and re-flashing so UBI can handle the bad blocks and swap blocks which makes teh OS runnig againDhanOS
06/21/2023, 11:32 AMsvenrademakers
06/21/2023, 1:23 PMDhanOS
06/21/2023, 1:29 PMDhanOS
06/21/2023, 1:30 PMCFSworks
06/21/2023, 1:30 PMCFSworks
06/21/2023, 1:34 PMsvenrademakers
06/21/2023, 2:02 PMCFSworks
06/21/2023, 2:11 PMDhanOS
06/21/2023, 2:29 PMCFSworks
06/21/2023, 2:40 PMCFSworks
06/21/2023, 2:41 PMDhanOS
06/21/2023, 2:45 PMCFSworks
06/21/2023, 2:55 PMsvenrademakers
06/21/2023, 3:04 PMsvenrademakers
06/21/2023, 3:05 PMDhanOS
06/21/2023, 3:08 PMCFSworks
06/21/2023, 3:08 PMCFSworks
06/21/2023, 3:09 PMDhanOS
06/21/2023, 3:10 PMDhanOS
06/21/2023, 3:10 PMCFSworks
06/21/2023, 3:21 PMDhanOS
06/21/2023, 3:22 PMDhanOS
06/21/2023, 3:22 PMDhanOS
06/21/2023, 3:22 PMCFSworks
06/21/2023, 3:23 PMDhanOS
06/21/2023, 3:24 PMCFSworks
06/21/2023, 3:26 PMCFSworks
06/21/2023, 3:27 PMDhanOS
06/21/2023, 3:28 PMDhanOS
06/21/2023, 3:28 PMDhanOS
06/21/2023, 3:28 PMDhanOS
06/21/2023, 3:28 PMCFSworks
06/21/2023, 3:34 PMDhanOS
06/21/2023, 3:35 PMCFSworks
06/21/2023, 3:35 PMDhanOS
06/21/2023, 3:36 PMCFSworks
06/21/2023, 3:36 PMDhanOS
06/21/2023, 3:36 PMsvenrademakers
06/21/2023, 3:39 PMCFSworks
06/21/2023, 3:42 PMDhanOS
06/21/2023, 3:43 PMsvenrademakers
06/21/2023, 3:45 PMCFSworks
06/21/2023, 3:46 PMCFSworks
06/21/2023, 3:47 PMCFSworks
06/21/2023, 3:51 PMCFSworks
06/21/2023, 4:00 PMsvenrademakers
06/21/2023, 4:03 PMCFSworks
06/21/2023, 4:05 PMCFSworks
06/21/2023, 4:05 PMCFSworks
06/21/2023, 4:07 PMsvenrademakers
06/21/2023, 4:11 PMsvenrademakers
06/21/2023, 4:16 PMCFSworks
06/21/2023, 4:19 PMCFSworks
06/21/2023, 4:23 PMCFSworks
06/21/2023, 4:24 PMCFSworks
06/22/2023, 5:35 AMuboot.env
needs more fleshing out; I'll probably be focused on this for a bit (both the boot logic and recovery logic)
2) The mount_overlay
script needs to be implemented (so that it can do a normal, non-safemode boot)
3) There's still no installer
binary, so the "installer SD card" functionality doesn't do anything (I still need to push the Rust code for this)
4) The Ethernet switch management needs testing: confirm that the RJ45 jacks are isolated when in the bootloader and bridged when Linux is up
5) The uboot build config is definitely not final, that should be done according to what features we wantsvenrademakers
06/22/2023, 6:55 AMCFSworks
06/22/2023, 7:59 AMCFSworks
06/22/2023, 8:03 AMsvenrademakers
06/22/2023, 8:06 AMCFSworks
06/22/2023, 9:43 PMCFSworks
06/22/2023, 9:44 PMDan D.
06/24/2023, 9:52 PMCFSworks
06/25/2023, 1:44 AMCFSworks
06/26/2023, 4:31 AMrootfs_new
), and the nextboot
mechanism can be used to schedule it as the next booted firmware. Then, once(/if) it boots successfully, it renames itself to rootfs
. As a result, the worst a horribly-timed power outage can do is rollback the upgrade.svenrademakers
06/26/2023, 12:01 PMCFSworks
06/26/2023, 5:26 PMCFSworks
06/27/2023, 5:51 AMsvenrademakers
06/27/2023, 5:57 AMsvenrademakers
06/27/2023, 5:59 AMCFSworks
06/27/2023, 6:00 AMCFSworks
06/27/2023, 6:04 AMstartup-delay-us = <...>;
in the DT, and Linux blocks "enabled"
writes until that delay is up (so the tokio::fs::write(sys_path, node_value).await?;
actually awaits until power is stable already). So the sleep(...)
is only necessary if the smoothing delay is greater than the "stable power" delay.svenrademakers
06/27/2023, 6:23 AMCFSworks
06/27/2023, 6:24 AMsvenrademakers
06/27/2023, 6:25 AMsvenrademakers
06/27/2023, 6:26 AMCFSworks
06/27/2023, 6:27 AMsvenrademakers
06/30/2023, 8:07 AMCFSworks
06/30/2023, 8:22 AMsvenrademakers
06/30/2023, 8:36 AMsvenrademakers
06/30/2023, 8:37 AMsvenrademakers
06/30/2023, 8:39 AMCFSworks
06/30/2023, 8:40 AMCFSworks
07/03/2023, 1:33 AMCFSworks
07/03/2023, 1:34 AMBR2_PACKAGE_EUDEV_ENABLE_HWDB
CFSworks
07/03/2023, 1:35 AMkeyutils
CFSworks
07/03/2023, 6:04 AM35M output/images/rootfs.erofs
60M output/images/rootfs.tar
24M output/images/rootfs.tar.gz
After disabling those 4 things:
27M output/images/rootfs.erofs
43M output/images/rootfs.tar
19M output/images/rootfs.tar.gz
CFSworks
07/03/2023, 9:40 PMCFSworks
07/03/2023, 9:41 PMj0ju
07/04/2023, 4:29 PMsvenrademakers
07/04/2023, 4:57 PMCFSworks
07/04/2023, 6:24 PMj0ju
07/04/2023, 8:59 PMCFSworks
07/04/2023, 9:12 PM