Advertisement
sliq19882

Musebook's primary U-Boot environment (one in SPI NOR)

Aug 14th, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.91 KB | None | 0 0
  1. |@W�arch=riscv
  2. autoboot=if test ${boot_device} = nand; then run nand_boot; elif test ${boot_device} = nor; then run nor_boot; elif test ${boot_device} = mmc; then run mmc_boot; fi;
  3. autoload=0
  4. baudrate=115200
  5. baudrate=115200
  6. board=k1-x
  7. board_name=k1-x
  8. boot_default=echo "Current Boot Device: ${boot_device}"
  9. bootcmd=bootm 0x11000000
  10. bootcmd=run autoboot; echo "run autoboot"
  11. bootdelay=0
  12. bootdelay=0
  13. bootmenu_0="-------- Boot Options --------"=run boot_default
  14. bootmenu_1="Boot from Nor"=run nor_boot
  15. bootmenu_2="Boot from Nand"=run nand_boot
  16. bootmenu_3="Boot from MMC"=run mmc_boot
  17. bootmenu_4="Autoboot"=run autoboot
  18. bootmenu_5="Show current Boot Device"=run boot_default
  19. bootmenu_6="-------- Flash Options --------"=run flash_default
  20. bootmenu_7="recovery from usb"=run flash_from_usb
  21. bootmenu_8="recovery from mmc"=run flash_from_mmc
  22. bootmenu_9="recovery from net"=run flash_from_net
  23. bootmenu_delay=5
  24. commonargs=setenv bootargs earlycon=${earlycon} earlyprintk console=tty1 console=${console} loglevel=${loglevel} clk_ignore_unused swiotlb=65536 rdinit=${init} workqueue.default_affinity_scope=${workqueue.default_affinity_scope}
  25. console=ttyS0,115200
  26. cpu=x60
  27. detect_dtb=echo "product_name: ${product_name}"; run dtb_env; echo "select ${dtb_name} to load";
  28. device_version=1
  29. dtb_addr=0x31000000
  30. dtb_env=if test -n "${product_name}"; then if test "${product_name}" = k1_evb; then setenv dtb_name ${dtb_dir}/k1-x_evb.dtb; elif test "${product_name}" = k1_deb1; then setenv dtb_name ${dtb_dir}/k1-x_deb1.dtb; elif test "${product_name}" = k1_deb2; then setenv dtb_name ${dtb_dir}/k1-x_deb2.dtb; elif test "${product_name}" = k1_hs450; then setenv dtb_name ${dtb_dir}/k1-x_hs450.dtb; elif test "${product_name}" = k1_kx312; then setenv dtb_name ${dtb_dir}/k1-x_kx312.dtb; elif test "${product_name}" = k1_mingo; then setenv dtb_name ${dtb_dir}/k1-x_mingo.dtb; elif test "${product_name}" = k1_MINI-PC; then setenv dtb_name ${dtb_dir}/k1-x_MINI-PC.dtb; else echo "match dtb by product_name: ${dtb_dir}/${product_name}.dtb"; setenv dtb_name ${dtb_dir}/${product_name}.dtb; fi; fi;
  31. dtb_name=k1-x_evb.dtb
  32. earlycon=sbi
  33. eeprom_i2c_index=2
  34. eeprom_pin_group=0
  35. flash_default=echo "Returning to Boot Menu..."
  36. flash_from_mmc=echo "recovery from mmc...... " flash_image mmc;
  37. flash_from_net=echo "recovery from net...... " flash_image net;
  38. flash_from_usb=echo "recovery from usb...... "; flash_image usb;
  39. gatewayip=10.0.92.1
  40. gatewayip=10.0.92.1
  41. gatewayip=192.168.1.1
  42. get_rootfs_env=part number ${bootfs_devname} ${boot_devnum} rootfs rootfs_part; setexpr rootfs_part ${rootfs_part} + 0; if test ${rootfs_part} > 9 ; then run rootfs_part_to_ul;fi; echo "get rootfs_part index:${rootfs_part}";
  43. init=/init
  44. ipaddr=10.0.92.253
  45. ipaddr=10.0.92.100
  46. ipaddr=192.168.1.15
  47. kernel_addr_r=0x11000000
  48. kernel_comp_addr_r=0x200000
  49. kernel_comp_size=0x10000000
  50. knl_name=Image.itb
  51. loadaddr=0x200000
  52. loaddtb=echo "Loading dtb..."; if load ${bootfs_devname} ${boot_devnum}:${bootfs_part} ${dtb_addr} ${dtb_name}; then else echo "load dtb from bootfs fail, use built-in dtb"; setenv dtb_addr ""; fi;
  53. loadknl=echo "Loading kernel..."; load ${bootfs_devname} ${boot_devnum}:${bootfs_part} ${kernel_addr_r} ${knl_name};
  54. loadramdisk=echo "Loading ramdisk ..."; if load ${bootfs_devname} ${boot_devnum}:${bootfs_part} ${ramdisk_addr} ${ramdisk_name}; then size ${bootfs_devname} ${boot_devnum}:${bootfs_part} ${ramdisk_name}; setenv ramdisk_size ${filesize}; setenv ramdisk_combo ${ramdisk_addr}:${ramdisk_size}; else echo "load ramdisk from bootfs fail, use built-in ramdisk"; setenv ramdisk_addr -; fi;
  55. loglevel=8
  56. manufacture_date=01/16/2023 11:02:20
  57. manufacturer=spacemit
  58. mmc_boot=echo "Try to boot from ${bootfs_devname}${boot_devnum} ..."; run commonargs; run set_mmc_root; run set_mmc_args; run detect_dtb; run loadknl; run loaddtb; run loadramdisk; bootm ${kernel_addr_r} ${ramdisk_combo} ${dtb_addr}; echo "########### boot kernel failed by default config, check your boot config #############"
  59. mmc_rootfstype=ext4
  60. mtdids=nor0=spi-nor
  61. mtdparts=spi-nor:64K@0(bootinfo),64K@64K(private),256K@128K(fsbl),64K@384K(env),192K@448K(opensbi),-@640K(uboot)
  62. net_data_path=net_flash_file/net_flash_file/
  63. net_data_path=spacemit_flash_file/net_flash_file/
  64. netdev=eth0
  65. netmask=255.255.255.0
  66. netmask=255.255.255.0
  67. netmask=255.255.255.0
  68. nor_boot=echo "Try to boot from ${bootfs_devname}${boot_devnum} ..."; run commonargs; run set_nor_root; run set_nor_args; run detect_dtb; run loadknl; run loaddtb; run loadramdisk; bootm ${kernel_addr_r} ${ramdisk_combo} ${dtb_addr}; echo "########### boot kernel failed by default config, check your boot config #############"
  69. nor_root=/dev/mtdblock6
  70. nor_rootfstype=squashfs
  71. phy_link_time=10000
  72. phyaddr0=1
  73. pmic_type=0
  74. product_name=k1-x_deb1
  75. pxefile_addr_r=0x0c200000
  76. ramdisk_addr=0x21000000
  77. ramdisk_combo=-
  78. ramdisk_name=initramfs-generic.img
  79. ramdisk_size=-
  80. rootfs_part_to_ul=echo "set rootfs_part to ul"; setexpr temp_num_0 ${rootfs_part} / a; setexpr temp_num_1 ${rootfs_part} % a; setenv rootfs_part ${temp_num_0}${temp_num_1};
  81. scriptaddr=0x2c100000
  82. sdk_version=1
  83. serial#=0123456789ABCDEF
  84. serverip=10.0.92.134
  85. serverip=10.0.92.134
  86. serverip=10.0.92.134
  87. set_mmc_args=setenv bootargs "${bootargs}" root=${blk_root} rootwait rootfstype=${mmc_rootfstype};
  88. set_mmc_root=run get_rootfs_env; run set_rootfs_env;
  89. set_nor_args=setenv bootargs ${bootargs} mtdparts=${mtdparts} root=${blk_root} rootfstype=ext4
  90. set_nor_root=run get_rootfs_env; run set_rootfs_env;
  91. set_rootfs_env=if test "${bootfs_devname}" = mmc; then setenv blk_root "/dev/mmcblk${boot_devnum}p${rootfs_part}"; elif test "${bootfs_devname}" = nvme; then setenv blk_root "/dev/nvme${boot_devnum}n1p${rootfs_part}"; else echo "not define rootfs part at this blk device, add to env"; fi;
  92. splashfile=bianbu.bmp
  93. splashfile=bianbu.bmp
  94. splashimage=0x11000000
  95. splashpos=m,m
  96. stderr=serial
  97. stdin=serial,usbkbd
  98. stdout=serial
  99. stdout_flash=serial,vidconsole
  100. vendor=spacemit
  101. workqueue.default_affinity_scope=system
  102.  
  103.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement