Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
3ecbb9b
init commit -- staging untouched boiler plate (copy from milkv-duos-sd)
Jan 24, 2025
460bd6f
build script (copy rename)
Jan 24, 2025
a409f1a
hack - move clock change closer to kernel handoff (to prevent serial …
Jan 24, 2025
cc59a80
setup partitions
Jan 24, 2025
dd68622
more boilerplate copy from milkv-duos-sd device tree
Jan 24, 2025
8374dd1
ota rootfs config (copy from milkv-duos-sd) configured swupdate
Jan 24, 2025
7ceab42
u-boot config (enable persistent env with ext4 storage backend)
Jan 24, 2025
31e130d
additional sd partition mapping (recoverya, recoveryb)
Jan 24, 2025
6d510eb
u-boot command logic to handle first time inits and partition switching
Jan 24, 2025
0d15ba2
Merge branch 'zeroth-robotics:develop' into ota
nfreq Jan 24, 2025
0b43cc1
cleanup (early mistake)
nfreq Jan 25, 2025
970d754
naming convention
nfreq Jan 25, 2025
6777415
added filesytem handler to swupdate and created new confiig
nfreq Jan 25, 2025
e294ce9
added swupdate.cfg for target
nfreq Jan 25, 2025
f5f69f7
added data and staging partitions.Now using GPT instead of MBR (supp…
nfreq Jan 26, 2025
bd6d0f8
swupate config (add support ssl, hash verification and compression)
nfreq Jan 27, 2025
6321951
partition updates
nfreq Jan 27, 2025
82df99c
added environment variable for swupdate staging location
nfreq Jan 27, 2025
ef4f99c
start swupdate service on boot for otafs
nfreq Jan 27, 2025
0556056
upgrading to genimage v18
nfreq Jan 27, 2025
c47593e
upgraded genimage does not need old patch
nfreq Jan 27, 2025
9db42e2
hybrid gpt/mbr parition table, u-boot happy, mac/windows happy
nfreq Jan 27, 2025
a4d16ba
auto mount staging
nfreq Jan 27, 2025
d40fc0d
configure swupdate pre/post command execution
nfreq Jan 27, 2025
d6cf263
ota cli tool (creates update packages and updates to bots)
nfreq Jan 27, 2025
e8e77ad
example sw-description file
nfreq Jan 27, 2025
3561d43
persisting root env variable (check this to determine which parition …
nfreq Jan 27, 2025
263a126
added initial request to make swupdate api behave
nfreq Jan 27, 2025
93dbec0
wpa_supplicant init script (copies conf from /boot and waits for wlan…
nfreq Jan 27, 2025
d8bceb8
reduce bootdelay back to 1 second
nfreq Jan 27, 2025
92b9ee3
changed the boot label
nfreq Jan 27, 2025
d0bb436
dummy wpa_supplicant
nfreq Jan 27, 2025
ab5a91a
bump make executable
nfreq Jan 27, 2025
0301d07
make sure we flush any pending writes to environment before we reboot
nfreq Jan 27, 2025
e42e6ce
fixed check for S60wpa_supplicant
nfreq Jan 28, 2025
4b1054e
cleanup
nfreq Jan 28, 2025
0a091fa
added readme for ota setup and use
nfreq Jan 28, 2025
3609e09
increased rootfs and staging partitions to account for larger zbot r…
nfreq Jan 28, 2025
deb5531
Notes for ota usage
nfreq Jan 28, 2025
8bdced6
helper for booting from rootfs to otafs
nfreq Jan 28, 2025
f3637cf
readme update
nfreq Jan 28, 2025
af0f45e
upgrade swupdate to v2022.12
nfreq Jan 29, 2025
06d121e
implement websocket keepalive (long downloads would cause connection …
nfreq Jan 29, 2025
739146d
small fix to parsing swupdate messages
nfreq Jan 29, 2025
7abe81b
cleaning up otafs overlay
nfreq Jan 29, 2025
a4a320a
adding more etc overlays (hostname, fstab, fw_env)
nfreq Jan 29, 2025
a274f58
seperated u-boot config header (ota vs zbot)
nfreq Jan 29, 2025
2f70306
reduced size of zbot rootfs partition (768M to 275M)
nfreq Jan 29, 2025
50d9933
added pack_sd_image_gz (package and compress)
nfreq Jan 29, 2025
6a8d64a
adding wpa_supplicant init script to zbot rootfs
nfreq Jan 29, 2025
48aafbd
fix etc overlay
nfreq Jan 29, 2025
2e2dfc1
new make rules [gen_swu_ota, pack_sd_image_gz]
nfreq Jan 29, 2025
cb64638
documentation
nfreq Jan 29, 2025
ea1f332
stripped swu create function (now a make rule)
nfreq Jan 29, 2025
cd855c3
documentation
nfreq Jan 29, 2025
b74f2fc
renamed boot_ota
nfreq Jan 29, 2025
296976a
discovery/reboot PoC placeholder
nfreq Jan 29, 2025
53b4cc3
updater cli improvements
nfreq Jan 29, 2025
4a36ef2
documentation
nfreq Jan 29, 2025
a4f92a6
documentation
nfreq Jan 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ ncscope.*

__pycache__
.vscode

buildroot-2021.05/buildroot-2021.05/
buildroot-2021.05/dl/

build.log
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ milkv-duos-emmc cv1813h_milkv_duos_emmc
milkv-duo-spinand cv1800b_milkv_duo_spinand
milkv-duo-spinor milkv-duo-spinor
milkv-duos-sd cv1813h_milkv_duos_sd
milkv-duos-ota-sd milkv-duos-ota-sd_musl_riscv64_defconfig
```

```bash
Expand Down
27 changes: 27 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,33 @@ else
$(COMMON_TOOLS_PATH)/sd_tools/sd_gen_burn_image.sh $(OUTPUT_DIR)
endif

sd_image_gz:
$(call print_target)
-${Q}rm $(OUTPUT_DIR)/fs
ifeq ($(CONFIG_BUILDROOT_FS),y)
${Q}rm $(OUTPUT_DIR)/br-rootfs -rf
${Q}ln -s $(OUTPUT_DIR)/br-rootfs $(OUTPUT_DIR)/fs
${Q}mkdir $(OUTPUT_DIR)/br-rootfs
${Q}tar xvf $(BR_DIR)/output/$(BR_BOARD)/images/rootfs.tar.xz -C $(OUTPUT_DIR)/br-rootfs
else
${Q}ln -s $(OUTPUT_DIR)/rootfs $(OUTPUT_DIR)/fs
endif
ifeq ($(MV_VENDOR), milkv)
$(TOP_DIR)/device/gen_burn_image_sd.sh $(OUTPUT_DIR)
else
$(COMMON_TOOLS_PATH)/sd_tools/sd_gen_burn_image.sh $(OUTPUT_DIR)
endif
${Q}if [ -f "$(OUTPUT_DIR)/$(MV_BOARD).img" ]; then \
gzip -f $(OUTPUT_DIR)/$(MV_BOARD).img; \
fi


gen_swu_ota:
$(call print_target)
@echo "Generating SWU package..."
@$(TOP_DIR)/device/gen_swu.sh $(OUTPUT_DIR)/rootfs.ext4 $(SWU_VERSION)


jffs2:
$(call print_target)
ifeq ($(STORAGE_TYPE),spinor)
Expand Down
9 changes: 9 additions & 0 deletions build/boards/cv181x/cv1813h_milkv_duos_ota_sd/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ddr_cfg_list": [
"",
"ddr3_1866_x16",
"ddr3_2133_x16",
"ddr_auto_x16"
],
"board_information": "C906B + EMMC 8GB + BGA SIP 256MB"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CONFIG_CHIP_cv1813h=y
CONFIG_BOARD_milkv_duos_ota_sd=y
CONFIG_DDR_CFG_ddr3_1866_x16=y
CONFIG_ARCH="riscv"
CONFIG_CROSS_COMPILE="riscv64-unknown-linux-musl-"
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_KERNEL_ENTRY_HACK=y
CONFIG_KERNEL_ENTRY_HACK_ADDR="0x80200000"
CONFIG_TOOLCHAIN_MUSL_RISCV64=y
CONFIG_FLASH_SIZE_SHRINK=y
CONFIG_BOOT_IMAGE_SINGLE_DTB=y
CONFIG_OD_CLK_SEL=y
CONFIG_STORAGE_TYPE_sd=y
CONFIG_SENSOR_GCORE_GC2053=y
CONFIG_SENSOR_GCORE_GC2083=y
CONFIG_SENSOR_GCORE_GC4653=y
CONFIG_SENSOR_OV_OV5647=y
CONFIG_SENSOR_SMS_SC035HGS=y
CONFIG_SENSOR_SMS_SC200AI=y
CONFIG_MIPI_PANEL_MILKV_8HD=y
CONFIG_UBOOT_2021_10=y
CONFIG_KERNEL_SRC_5.10=y
CONFIG_KERNEL_LZMA=y
CONFIG_SKIP_RAMDISK=y
CONFIG_BUILDROOT_FS=y
CONFIG_ENABLE_FREERTOS=y
CONFIG_ENABLE_RTOS_DUMP_PRINT=y
CONFIG_DUMP_PRINT_SZ_IDX=17
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/dts-v1/;
#include "cv181x_base_riscv.dtsi"
#include "cv181x_asic_bga.dtsi"
#include "cv181x_asic_sd.dtsi"
#include "cv181x_default_memmap.dtsi"

&mipi_rx{
snsr-reset = <&porta 2 GPIO_ACTIVE_LOW>, <&porta 2 GPIO_ACTIVE_LOW>, <&porta 2 GPIO_ACTIVE_LOW>;
};

&dac{
/delete-property/ mute-gpio-l;
/delete-property/ mute-gpio-r;
};

&i2c0 {
status = "disabled";
};

&i2c1 {
status = "okay";
};

&i2c2 {
status = "okay";
};

&i2c3 {
status = "okay";
};

&i2c4 {
status = "okay";

gt9xx: gt9xx@14 {
compatible = "goodix,gt9xx";
reg = <0x14>;
goodix,irq-gpio = <&porta 18 0>;
goodix,rst-gpio = <&porta 19 GPIO_ACTIVE_HIGH>;
status = "okay";
};
};

&spi3 {
status = "okay";

spidev@0 {
status = "okay";
};
};

&usb {
vbus-gpio = <&portb 6 0>;
};

&wifisd {
status = "okay";
cap-sd-highspeed;
sd-uhs-sdr25;
sd-uhs-ddr50;
sd-uhs-sdr104;
min-frequency = <400000>;
max-frequency = <187500000>;
};

&wifi_pin {
compatible = "cvitek,wifi-pin";
poweron-gpio = <&porta 15 GPIO_ACTIVE_HIGH>;
wakeup-gpio = <&porte 7 GPIO_ACTIVE_HIGH>;
};

&uart1 {
status = "okay";
};

&uart2 {
status = "okay";
};

&uart3 {
status = "okay";
};

&uart4 {
status = "okay";
};

/* mipi dsi for u-boot */
&vo {
compatible = "cvitek,vo";
reset-gpio = <&porte 2 GPIO_ACTIVE_LOW>;
pwm-gpio = <&porte 0 GPIO_ACTIVE_HIGH>;
power-gpio = <&porte 1 GPIO_ACTIVE_HIGH>;
status = "okay";
};

/* mipi dsi for kernel */
&mipi_tx {
compatible = "cvitek,mipi_tx";
reset-gpio = <&porte 2 GPIO_ACTIVE_LOW>;
pwm-gpio = <&porte 0 GPIO_ACTIVE_HIGH>;
power-ct-gpio = <&porte 1 GPIO_ACTIVE_HIGH>;
status = "okay";
};

/ {
model = "Milk-V DuoS";
};

Loading