├── .clang-format ├── .gitchangelog.rc ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── Makefile ├── README.md ├── cache └── .gitkeep ├── image ├── LICENSE ├── build_image.sh ├── build_image_x1.sh └── exeopener.exe.gz ├── os-brainux ├── override-pre.sh ├── override.sh ├── override │ ├── etc │ │ ├── X11 │ │ │ ├── Xsession.d │ │ │ │ └── 96calibrate │ │ │ └── xorg.conf │ │ ├── jwm │ │ │ └── system.jwmrc │ │ ├── motd │ │ ├── sudoers │ │ └── xdg │ │ │ └── weston │ │ │ └── weston.ini │ ├── home │ │ └── user │ │ │ ├── .config │ │ │ └── fcitx │ │ │ │ └── profile │ │ │ ├── .xprofile │ │ │ └── lxterminal │ │ │ └── lxterminal.conf │ ├── lib │ │ └── systemd │ │ │ └── system │ │ │ ├── boot.mount │ │ │ └── rndis_gadget.service │ └── usr │ │ └── bin │ │ └── enable_rndis_gadget └── setup_brainux.sh ├── os-buildroot └── override │ └── root │ └── blink.sh ├── r3build.toml └── tools ├── aptcache.go ├── aptcache_linux_amd64 ├── build_aptcache.sh ├── getcross └── version /.clang-format: -------------------------------------------------------------------------------- 1 | # It's copied from torvalds/linux (master). 2 | 3 | # SPDX-License-Identifier: GPL-2.0 4 | # 5 | # clang-format configuration file. Intended for clang-format >= 4. 6 | # 7 | # For more information, see: 8 | # 9 | # Documentation/process/clang-format.rst 10 | # https://clang.llvm.org/docs/ClangFormat.html 11 | # https://clang.llvm.org/docs/ClangFormatStyleOptions.html 12 | # 13 | --- 14 | AccessModifierOffset: -4 15 | AlignAfterOpenBracket: Align 16 | AlignConsecutiveAssignments: false 17 | AlignConsecutiveDeclarations: false 18 | #AlignEscapedNewlines: Left # Unknown to clang-format-4.0 19 | AlignOperands: true 20 | AlignTrailingComments: false 21 | AllowAllParametersOfDeclarationOnNextLine: false 22 | AllowShortBlocksOnASingleLine: false 23 | AllowShortCaseLabelsOnASingleLine: false 24 | AllowShortFunctionsOnASingleLine: None 25 | AllowShortIfStatementsOnASingleLine: false 26 | AllowShortLoopsOnASingleLine: false 27 | AlwaysBreakAfterDefinitionReturnType: None 28 | AlwaysBreakAfterReturnType: None 29 | AlwaysBreakBeforeMultilineStrings: false 30 | AlwaysBreakTemplateDeclarations: false 31 | BinPackArguments: true 32 | BinPackParameters: true 33 | BraceWrapping: 34 | AfterClass: false 35 | AfterControlStatement: false 36 | AfterEnum: false 37 | AfterFunction: true 38 | AfterNamespace: true 39 | AfterObjCDeclaration: false 40 | AfterStruct: false 41 | AfterUnion: false 42 | #AfterExternBlock: false # Unknown to clang-format-5.0 43 | BeforeCatch: false 44 | BeforeElse: false 45 | IndentBraces: false 46 | #SplitEmptyFunction: true # Unknown to clang-format-4.0 47 | #SplitEmptyRecord: true # Unknown to clang-format-4.0 48 | #SplitEmptyNamespace: true # Unknown to clang-format-4.0 49 | BreakBeforeBinaryOperators: None 50 | BreakBeforeBraces: Custom 51 | #BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0 52 | BreakBeforeTernaryOperators: false 53 | BreakConstructorInitializersBeforeComma: false 54 | #BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0 55 | BreakAfterJavaFieldAnnotations: false 56 | BreakStringLiterals: false 57 | ColumnLimit: 80 58 | CommentPragmas: '^ IWYU pragma:' 59 | #CompactNamespaces: false # Unknown to clang-format-4.0 60 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 61 | ConstructorInitializerIndentWidth: 8 62 | ContinuationIndentWidth: 8 63 | Cpp11BracedListStyle: false 64 | DerivePointerAlignment: false 65 | DisableFormat: false 66 | ExperimentalAutoDetectBinPacking: false 67 | #FixNamespaceComments: false # Unknown to clang-format-4.0 68 | 69 | # Taken from: 70 | # git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ \ 71 | # | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \ 72 | # | sort | uniq 73 | ForEachMacros: 74 | - 'apei_estatus_for_each_section' 75 | - 'ata_for_each_dev' 76 | - 'ata_for_each_link' 77 | - '__ata_qc_for_each' 78 | - 'ata_qc_for_each' 79 | - 'ata_qc_for_each_raw' 80 | - 'ata_qc_for_each_with_internal' 81 | - 'ax25_for_each' 82 | - 'ax25_uid_for_each' 83 | - '__bio_for_each_bvec' 84 | - 'bio_for_each_bvec' 85 | - 'bio_for_each_bvec_all' 86 | - 'bio_for_each_integrity_vec' 87 | - '__bio_for_each_segment' 88 | - 'bio_for_each_segment' 89 | - 'bio_for_each_segment_all' 90 | - 'bio_list_for_each' 91 | - 'bip_for_each_vec' 92 | - 'bitmap_for_each_clear_region' 93 | - 'bitmap_for_each_set_region' 94 | - 'blkg_for_each_descendant_post' 95 | - 'blkg_for_each_descendant_pre' 96 | - 'blk_queue_for_each_rl' 97 | - 'bond_for_each_slave' 98 | - 'bond_for_each_slave_rcu' 99 | - 'bpf_for_each_spilled_reg' 100 | - 'btree_for_each_safe128' 101 | - 'btree_for_each_safe32' 102 | - 'btree_for_each_safe64' 103 | - 'btree_for_each_safel' 104 | - 'card_for_each_dev' 105 | - 'cgroup_taskset_for_each' 106 | - 'cgroup_taskset_for_each_leader' 107 | - 'cpufreq_for_each_entry' 108 | - 'cpufreq_for_each_entry_idx' 109 | - 'cpufreq_for_each_valid_entry' 110 | - 'cpufreq_for_each_valid_entry_idx' 111 | - 'css_for_each_child' 112 | - 'css_for_each_descendant_post' 113 | - 'css_for_each_descendant_pre' 114 | - 'device_for_each_child_node' 115 | - 'dma_fence_chain_for_each' 116 | - 'do_for_each_ftrace_op' 117 | - 'drm_atomic_crtc_for_each_plane' 118 | - 'drm_atomic_crtc_state_for_each_plane' 119 | - 'drm_atomic_crtc_state_for_each_plane_state' 120 | - 'drm_atomic_for_each_plane_damage' 121 | - 'drm_client_for_each_connector_iter' 122 | - 'drm_client_for_each_modeset' 123 | - 'drm_connector_for_each_possible_encoder' 124 | - 'drm_for_each_bridge_in_chain' 125 | - 'drm_for_each_connector_iter' 126 | - 'drm_for_each_crtc' 127 | - 'drm_for_each_encoder' 128 | - 'drm_for_each_encoder_mask' 129 | - 'drm_for_each_fb' 130 | - 'drm_for_each_legacy_plane' 131 | - 'drm_for_each_plane' 132 | - 'drm_for_each_plane_mask' 133 | - 'drm_for_each_privobj' 134 | - 'drm_mm_for_each_hole' 135 | - 'drm_mm_for_each_node' 136 | - 'drm_mm_for_each_node_in_range' 137 | - 'drm_mm_for_each_node_safe' 138 | - 'flow_action_for_each' 139 | - 'for_each_active_dev_scope' 140 | - 'for_each_active_drhd_unit' 141 | - 'for_each_active_iommu' 142 | - 'for_each_aggr_pgid' 143 | - 'for_each_available_child_of_node' 144 | - 'for_each_bio' 145 | - 'for_each_board_func_rsrc' 146 | - 'for_each_bvec' 147 | - 'for_each_card_auxs' 148 | - 'for_each_card_auxs_safe' 149 | - 'for_each_card_components' 150 | - 'for_each_card_dapms' 151 | - 'for_each_card_pre_auxs' 152 | - 'for_each_card_prelinks' 153 | - 'for_each_card_rtds' 154 | - 'for_each_card_rtds_safe' 155 | - 'for_each_card_widgets' 156 | - 'for_each_card_widgets_safe' 157 | - 'for_each_cgroup_storage_type' 158 | - 'for_each_child_of_node' 159 | - 'for_each_clear_bit' 160 | - 'for_each_clear_bit_from' 161 | - 'for_each_cmsghdr' 162 | - 'for_each_compatible_node' 163 | - 'for_each_component_dais' 164 | - 'for_each_component_dais_safe' 165 | - 'for_each_comp_order' 166 | - 'for_each_console' 167 | - 'for_each_cpu' 168 | - 'for_each_cpu_and' 169 | - 'for_each_cpu_not' 170 | - 'for_each_cpu_wrap' 171 | - 'for_each_dapm_widgets' 172 | - 'for_each_dev_addr' 173 | - 'for_each_dev_scope' 174 | - 'for_each_displayid_db' 175 | - 'for_each_dma_cap_mask' 176 | - 'for_each_dpcm_be' 177 | - 'for_each_dpcm_be_rollback' 178 | - 'for_each_dpcm_be_safe' 179 | - 'for_each_dpcm_fe' 180 | - 'for_each_drhd_unit' 181 | - 'for_each_dss_dev' 182 | - 'for_each_efi_memory_desc' 183 | - 'for_each_efi_memory_desc_in_map' 184 | - 'for_each_element' 185 | - 'for_each_element_extid' 186 | - 'for_each_element_id' 187 | - 'for_each_endpoint_of_node' 188 | - 'for_each_evictable_lru' 189 | - 'for_each_fib6_node_rt_rcu' 190 | - 'for_each_fib6_walker_rt' 191 | - 'for_each_free_mem_pfn_range_in_zone' 192 | - 'for_each_free_mem_pfn_range_in_zone_from' 193 | - 'for_each_free_mem_range' 194 | - 'for_each_free_mem_range_reverse' 195 | - 'for_each_func_rsrc' 196 | - 'for_each_hstate' 197 | - 'for_each_if' 198 | - 'for_each_iommu' 199 | - 'for_each_ip_tunnel_rcu' 200 | - 'for_each_irq_nr' 201 | - 'for_each_link_codecs' 202 | - 'for_each_link_cpus' 203 | - 'for_each_link_platforms' 204 | - 'for_each_lru' 205 | - 'for_each_matching_node' 206 | - 'for_each_matching_node_and_match' 207 | - 'for_each_member' 208 | - 'for_each_mem_region' 209 | - 'for_each_memblock_type' 210 | - 'for_each_memcg_cache_index' 211 | - 'for_each_mem_pfn_range' 212 | - '__for_each_mem_range' 213 | - 'for_each_mem_range' 214 | - '__for_each_mem_range_rev' 215 | - 'for_each_mem_range_rev' 216 | - 'for_each_migratetype_order' 217 | - 'for_each_msi_entry' 218 | - 'for_each_msi_entry_safe' 219 | - 'for_each_net' 220 | - 'for_each_net_continue_reverse' 221 | - 'for_each_netdev' 222 | - 'for_each_netdev_continue' 223 | - 'for_each_netdev_continue_rcu' 224 | - 'for_each_netdev_continue_reverse' 225 | - 'for_each_netdev_feature' 226 | - 'for_each_netdev_in_bond_rcu' 227 | - 'for_each_netdev_rcu' 228 | - 'for_each_netdev_reverse' 229 | - 'for_each_netdev_safe' 230 | - 'for_each_net_rcu' 231 | - 'for_each_new_connector_in_state' 232 | - 'for_each_new_crtc_in_state' 233 | - 'for_each_new_mst_mgr_in_state' 234 | - 'for_each_new_plane_in_state' 235 | - 'for_each_new_private_obj_in_state' 236 | - 'for_each_node' 237 | - 'for_each_node_by_name' 238 | - 'for_each_node_by_type' 239 | - 'for_each_node_mask' 240 | - 'for_each_node_state' 241 | - 'for_each_node_with_cpus' 242 | - 'for_each_node_with_property' 243 | - 'for_each_nonreserved_multicast_dest_pgid' 244 | - 'for_each_of_allnodes' 245 | - 'for_each_of_allnodes_from' 246 | - 'for_each_of_cpu_node' 247 | - 'for_each_of_pci_range' 248 | - 'for_each_old_connector_in_state' 249 | - 'for_each_old_crtc_in_state' 250 | - 'for_each_old_mst_mgr_in_state' 251 | - 'for_each_oldnew_connector_in_state' 252 | - 'for_each_oldnew_crtc_in_state' 253 | - 'for_each_oldnew_mst_mgr_in_state' 254 | - 'for_each_oldnew_plane_in_state' 255 | - 'for_each_oldnew_plane_in_state_reverse' 256 | - 'for_each_oldnew_private_obj_in_state' 257 | - 'for_each_old_plane_in_state' 258 | - 'for_each_old_private_obj_in_state' 259 | - 'for_each_online_cpu' 260 | - 'for_each_online_node' 261 | - 'for_each_online_pgdat' 262 | - 'for_each_pci_bridge' 263 | - 'for_each_pci_dev' 264 | - 'for_each_pci_msi_entry' 265 | - 'for_each_pcm_streams' 266 | - 'for_each_physmem_range' 267 | - 'for_each_populated_zone' 268 | - 'for_each_possible_cpu' 269 | - 'for_each_present_cpu' 270 | - 'for_each_prime_number' 271 | - 'for_each_prime_number_from' 272 | - 'for_each_process' 273 | - 'for_each_process_thread' 274 | - 'for_each_property_of_node' 275 | - 'for_each_registered_fb' 276 | - 'for_each_requested_gpio' 277 | - 'for_each_requested_gpio_in_range' 278 | - 'for_each_reserved_mem_range' 279 | - 'for_each_reserved_mem_region' 280 | - 'for_each_rtd_codec_dais' 281 | - 'for_each_rtd_codec_dais_rollback' 282 | - 'for_each_rtd_components' 283 | - 'for_each_rtd_cpu_dais' 284 | - 'for_each_rtd_cpu_dais_rollback' 285 | - 'for_each_rtd_dais' 286 | - 'for_each_set_bit' 287 | - 'for_each_set_bit_from' 288 | - 'for_each_set_clump8' 289 | - 'for_each_sg' 290 | - 'for_each_sg_dma_page' 291 | - 'for_each_sg_page' 292 | - 'for_each_sgtable_dma_page' 293 | - 'for_each_sgtable_dma_sg' 294 | - 'for_each_sgtable_page' 295 | - 'for_each_sgtable_sg' 296 | - 'for_each_sibling_event' 297 | - 'for_each_subelement' 298 | - 'for_each_subelement_extid' 299 | - 'for_each_subelement_id' 300 | - '__for_each_thread' 301 | - 'for_each_thread' 302 | - 'for_each_unicast_dest_pgid' 303 | - 'for_each_wakeup_source' 304 | - 'for_each_zone' 305 | - 'for_each_zone_zonelist' 306 | - 'for_each_zone_zonelist_nodemask' 307 | - 'fwnode_for_each_available_child_node' 308 | - 'fwnode_for_each_child_node' 309 | - 'fwnode_graph_for_each_endpoint' 310 | - 'gadget_for_each_ep' 311 | - 'genradix_for_each' 312 | - 'genradix_for_each_from' 313 | - 'hash_for_each' 314 | - 'hash_for_each_possible' 315 | - 'hash_for_each_possible_rcu' 316 | - 'hash_for_each_possible_rcu_notrace' 317 | - 'hash_for_each_possible_safe' 318 | - 'hash_for_each_rcu' 319 | - 'hash_for_each_safe' 320 | - 'hctx_for_each_ctx' 321 | - 'hlist_bl_for_each_entry' 322 | - 'hlist_bl_for_each_entry_rcu' 323 | - 'hlist_bl_for_each_entry_safe' 324 | - 'hlist_for_each' 325 | - 'hlist_for_each_entry' 326 | - 'hlist_for_each_entry_continue' 327 | - 'hlist_for_each_entry_continue_rcu' 328 | - 'hlist_for_each_entry_continue_rcu_bh' 329 | - 'hlist_for_each_entry_from' 330 | - 'hlist_for_each_entry_from_rcu' 331 | - 'hlist_for_each_entry_rcu' 332 | - 'hlist_for_each_entry_rcu_bh' 333 | - 'hlist_for_each_entry_rcu_notrace' 334 | - 'hlist_for_each_entry_safe' 335 | - '__hlist_for_each_rcu' 336 | - 'hlist_for_each_safe' 337 | - 'hlist_nulls_for_each_entry' 338 | - 'hlist_nulls_for_each_entry_from' 339 | - 'hlist_nulls_for_each_entry_rcu' 340 | - 'hlist_nulls_for_each_entry_safe' 341 | - 'i3c_bus_for_each_i2cdev' 342 | - 'i3c_bus_for_each_i3cdev' 343 | - 'ide_host_for_each_port' 344 | - 'ide_port_for_each_dev' 345 | - 'ide_port_for_each_present_dev' 346 | - 'idr_for_each_entry' 347 | - 'idr_for_each_entry_continue' 348 | - 'idr_for_each_entry_continue_ul' 349 | - 'idr_for_each_entry_ul' 350 | - 'in_dev_for_each_ifa_rcu' 351 | - 'in_dev_for_each_ifa_rtnl' 352 | - 'inet_bind_bucket_for_each' 353 | - 'inet_lhash2_for_each_icsk_rcu' 354 | - 'key_for_each' 355 | - 'key_for_each_safe' 356 | - 'klp_for_each_func' 357 | - 'klp_for_each_func_safe' 358 | - 'klp_for_each_func_static' 359 | - 'klp_for_each_object' 360 | - 'klp_for_each_object_safe' 361 | - 'klp_for_each_object_static' 362 | - 'kunit_suite_for_each_test_case' 363 | - 'kvm_for_each_memslot' 364 | - 'kvm_for_each_vcpu' 365 | - 'list_for_each' 366 | - 'list_for_each_codec' 367 | - 'list_for_each_codec_safe' 368 | - 'list_for_each_continue' 369 | - 'list_for_each_entry' 370 | - 'list_for_each_entry_continue' 371 | - 'list_for_each_entry_continue_rcu' 372 | - 'list_for_each_entry_continue_reverse' 373 | - 'list_for_each_entry_from' 374 | - 'list_for_each_entry_from_rcu' 375 | - 'list_for_each_entry_from_reverse' 376 | - 'list_for_each_entry_lockless' 377 | - 'list_for_each_entry_rcu' 378 | - 'list_for_each_entry_reverse' 379 | - 'list_for_each_entry_safe' 380 | - 'list_for_each_entry_safe_continue' 381 | - 'list_for_each_entry_safe_from' 382 | - 'list_for_each_entry_safe_reverse' 383 | - 'list_for_each_prev' 384 | - 'list_for_each_prev_safe' 385 | - 'list_for_each_safe' 386 | - 'llist_for_each' 387 | - 'llist_for_each_entry' 388 | - 'llist_for_each_entry_safe' 389 | - 'llist_for_each_safe' 390 | - 'mci_for_each_dimm' 391 | - 'media_device_for_each_entity' 392 | - 'media_device_for_each_intf' 393 | - 'media_device_for_each_link' 394 | - 'media_device_for_each_pad' 395 | - 'nanddev_io_for_each_page' 396 | - 'netdev_for_each_lower_dev' 397 | - 'netdev_for_each_lower_private' 398 | - 'netdev_for_each_lower_private_rcu' 399 | - 'netdev_for_each_mc_addr' 400 | - 'netdev_for_each_uc_addr' 401 | - 'netdev_for_each_upper_dev_rcu' 402 | - 'netdev_hw_addr_list_for_each' 403 | - 'nft_rule_for_each_expr' 404 | - 'nla_for_each_attr' 405 | - 'nla_for_each_nested' 406 | - 'nlmsg_for_each_attr' 407 | - 'nlmsg_for_each_msg' 408 | - 'nr_neigh_for_each' 409 | - 'nr_neigh_for_each_safe' 410 | - 'nr_node_for_each' 411 | - 'nr_node_for_each_safe' 412 | - 'of_for_each_phandle' 413 | - 'of_property_for_each_string' 414 | - 'of_property_for_each_u32' 415 | - 'pci_bus_for_each_resource' 416 | - 'pcm_for_each_format' 417 | - 'ping_portaddr_for_each_entry' 418 | - 'plist_for_each' 419 | - 'plist_for_each_continue' 420 | - 'plist_for_each_entry' 421 | - 'plist_for_each_entry_continue' 422 | - 'plist_for_each_entry_safe' 423 | - 'plist_for_each_safe' 424 | - 'pnp_for_each_card' 425 | - 'pnp_for_each_dev' 426 | - 'protocol_for_each_card' 427 | - 'protocol_for_each_dev' 428 | - 'queue_for_each_hw_ctx' 429 | - 'radix_tree_for_each_slot' 430 | - 'radix_tree_for_each_tagged' 431 | - 'rbtree_postorder_for_each_entry_safe' 432 | - 'rdma_for_each_block' 433 | - 'rdma_for_each_port' 434 | - 'rdma_umem_for_each_dma_block' 435 | - 'resource_list_for_each_entry' 436 | - 'resource_list_for_each_entry_safe' 437 | - 'rhl_for_each_entry_rcu' 438 | - 'rhl_for_each_rcu' 439 | - 'rht_for_each' 440 | - 'rht_for_each_entry' 441 | - 'rht_for_each_entry_from' 442 | - 'rht_for_each_entry_rcu' 443 | - 'rht_for_each_entry_rcu_from' 444 | - 'rht_for_each_entry_safe' 445 | - 'rht_for_each_from' 446 | - 'rht_for_each_rcu' 447 | - 'rht_for_each_rcu_from' 448 | - '__rq_for_each_bio' 449 | - 'rq_for_each_bvec' 450 | - 'rq_for_each_segment' 451 | - 'scsi_for_each_prot_sg' 452 | - 'scsi_for_each_sg' 453 | - 'sctp_for_each_hentry' 454 | - 'sctp_skb_for_each' 455 | - 'shdma_for_each_chan' 456 | - '__shost_for_each_device' 457 | - 'shost_for_each_device' 458 | - 'sk_for_each' 459 | - 'sk_for_each_bound' 460 | - 'sk_for_each_entry_offset_rcu' 461 | - 'sk_for_each_from' 462 | - 'sk_for_each_rcu' 463 | - 'sk_for_each_safe' 464 | - 'sk_nulls_for_each' 465 | - 'sk_nulls_for_each_from' 466 | - 'sk_nulls_for_each_rcu' 467 | - 'snd_array_for_each' 468 | - 'snd_pcm_group_for_each_entry' 469 | - 'snd_soc_dapm_widget_for_each_path' 470 | - 'snd_soc_dapm_widget_for_each_path_safe' 471 | - 'snd_soc_dapm_widget_for_each_sink_path' 472 | - 'snd_soc_dapm_widget_for_each_source_path' 473 | - 'tb_property_for_each' 474 | - 'tcf_exts_for_each_action' 475 | - 'udp_portaddr_for_each_entry' 476 | - 'udp_portaddr_for_each_entry_rcu' 477 | - 'usb_hub_for_each_child' 478 | - 'v4l2_device_for_each_subdev' 479 | - 'v4l2_m2m_for_each_dst_buf' 480 | - 'v4l2_m2m_for_each_dst_buf_safe' 481 | - 'v4l2_m2m_for_each_src_buf' 482 | - 'v4l2_m2m_for_each_src_buf_safe' 483 | - 'virtio_device_for_each_vq' 484 | - 'while_for_each_ftrace_op' 485 | - 'xa_for_each' 486 | - 'xa_for_each_marked' 487 | - 'xa_for_each_range' 488 | - 'xa_for_each_start' 489 | - 'xas_for_each' 490 | - 'xas_for_each_conflict' 491 | - 'xas_for_each_marked' 492 | - 'xbc_array_for_each_value' 493 | - 'xbc_for_each_key_value' 494 | - 'xbc_node_for_each_array_value' 495 | - 'xbc_node_for_each_child' 496 | - 'xbc_node_for_each_key_value' 497 | - 'zorro_for_each_dev' 498 | 499 | #IncludeBlocks: Preserve # Unknown to clang-format-5.0 500 | IncludeCategories: 501 | - Regex: '.*' 502 | Priority: 1 503 | IncludeIsMainRegex: '(Test)?$' 504 | IndentCaseLabels: false 505 | #IndentPPDirectives: None # Unknown to clang-format-5.0 506 | IndentWidth: 8 507 | IndentWrappedFunctionNames: false 508 | JavaScriptQuotes: Leave 509 | JavaScriptWrapImports: true 510 | KeepEmptyLinesAtTheStartOfBlocks: false 511 | MacroBlockBegin: '' 512 | MacroBlockEnd: '' 513 | MaxEmptyLinesToKeep: 1 514 | NamespaceIndentation: None 515 | #ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0 516 | ObjCBlockIndentWidth: 8 517 | ObjCSpaceAfterProperty: true 518 | ObjCSpaceBeforeProtocolList: true 519 | 520 | # Taken from git's rules 521 | #PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0 522 | PenaltyBreakBeforeFirstCallParameter: 30 523 | PenaltyBreakComment: 10 524 | PenaltyBreakFirstLessLess: 0 525 | PenaltyBreakString: 10 526 | PenaltyExcessCharacter: 100 527 | PenaltyReturnTypeOnItsOwnLine: 60 528 | 529 | PointerAlignment: Right 530 | ReflowComments: false 531 | SortIncludes: false 532 | #SortUsingDeclarations: false # Unknown to clang-format-4.0 533 | SpaceAfterCStyleCast: false 534 | SpaceAfterTemplateKeyword: true 535 | SpaceBeforeAssignmentOperators: true 536 | #SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0 537 | #SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0 538 | SpaceBeforeParens: ControlStatements 539 | #SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0 540 | SpaceInEmptyParentheses: false 541 | SpacesBeforeTrailingComments: 1 542 | SpacesInAngles: false 543 | SpacesInContainerLiterals: false 544 | SpacesInCStyleCastParentheses: false 545 | SpacesInParentheses: false 546 | SpacesInSquareBrackets: false 547 | Standard: Cpp03 548 | TabWidth: 8 549 | UseTab: Always 550 | ... 551 | -------------------------------------------------------------------------------- /.gitchangelog.rc: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8; mode: python -*- 2 | ## 3 | ## Format 4 | ## 5 | ## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...] 6 | ## 7 | ## Description 8 | ## 9 | ## ACTION is one of 'chg', 'fix', 'new' 10 | ## 11 | ## Is WHAT the change is about. 12 | ## 13 | ## 'chg' is for refactor, small improvement, cosmetic changes... 14 | ## 'fix' is for bug fixes 15 | ## 'new' is for new features, big improvement 16 | ## 17 | ## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc' 18 | ## 19 | ## Is WHO is concerned by the change. 20 | ## 21 | ## 'dev' is for developpers (API changes, refactors...) 22 | ## 'usr' is for final users (UI changes) 23 | ## 'pkg' is for packagers (packaging changes) 24 | ## 'test' is for testers (test only related changes) 25 | ## 'doc' is for doc guys (doc only changes) 26 | ## 27 | ## COMMIT_MSG is ... well ... the commit message itself. 28 | ## 29 | ## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic' 30 | ## 31 | ## They are preceded with a '!' or a '@' (prefer the former, as the 32 | ## latter is wrongly interpreted in github.) Commonly used tags are: 33 | ## 34 | ## 'refactor' is obviously for refactoring code only 35 | ## 'minor' is for a very meaningless change (a typo, adding a comment) 36 | ## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...) 37 | ## 'wip' is for partial functionality but complete subfunctionality. 38 | ## 39 | ## Example: 40 | ## 41 | ## new: usr: support of bazaar implemented 42 | ## chg: re-indentend some lines !cosmetic 43 | ## new: dev: updated code to be compatible with last version of killer lib. 44 | ## fix: pkg: updated year of licence coverage. 45 | ## new: test: added a bunch of test around user usability of feature X. 46 | ## fix: typo in spelling my name in comment. !minor 47 | ## 48 | ## Please note that multi-line commit message are supported, and only the 49 | ## first line will be considered as the "summary" of the commit message. So 50 | ## tags, and other rules only applies to the summary. The body of the commit 51 | ## message will be displayed in the changelog without reformatting. 52 | 53 | 54 | ## 55 | ## ``ignore_regexps`` is a line of regexps 56 | ## 57 | ## Any commit having its full commit message matching any regexp listed here 58 | ## will be ignored and won't be reported in the changelog. 59 | ## 60 | ignore_regexps = [ 61 | r'@minor', r'!minor', 62 | r'@cosmetic', r'!cosmetic', 63 | r'@refactor', r'!refactor', 64 | r'@wip', r'!wip', 65 | r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:', 66 | r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:', 67 | r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$', 68 | r'^$', ## ignore commits with empty messages 69 | ] 70 | 71 | 72 | ## ``section_regexps`` is a list of 2-tuples associating a string label and a 73 | ## list of regexp 74 | ## 75 | ## Commit messages will be classified in sections thanks to this. Section 76 | ## titles are the label, and a commit is classified under this section if any 77 | ## of the regexps associated is matching. 78 | ## 79 | ## Please note that ``section_regexps`` will only classify commits and won't 80 | ## make any changes to the contents. So you'll probably want to go check 81 | ## ``subject_process`` (or ``body_process``) to do some changes to the subject, 82 | ## whenever you are tweaking this variable. 83 | ## 84 | section_regexps = [ 85 | ('New', [ 86 | r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', 87 | ]), 88 | ('Changes', [ 89 | r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', 90 | ]), 91 | ('Fix', [ 92 | r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$', 93 | ]), 94 | 95 | ('Other', None ## Match all lines 96 | ), 97 | 98 | ] 99 | 100 | 101 | ## ``body_process`` is a callable 102 | ## 103 | ## This callable will be given the original body and result will 104 | ## be used in the changelog. 105 | ## 106 | ## Available constructs are: 107 | ## 108 | ## - any python callable that take one txt argument and return txt argument. 109 | ## 110 | ## - ReSub(pattern, replacement): will apply regexp substitution. 111 | ## 112 | ## - Indent(chars=" "): will indent the text with the prefix 113 | ## Please remember that template engines gets also to modify the text and 114 | ## will usually indent themselves the text if needed. 115 | ## 116 | ## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns 117 | ## 118 | ## - noop: do nothing 119 | ## 120 | ## - ucfirst: ensure the first letter is uppercase. 121 | ## (usually used in the ``subject_process`` pipeline) 122 | ## 123 | ## - final_dot: ensure text finishes with a dot 124 | ## (usually used in the ``subject_process`` pipeline) 125 | ## 126 | ## - strip: remove any spaces before or after the content of the string 127 | ## 128 | ## - SetIfEmpty(msg="No commit message."): will set the text to 129 | ## whatever given ``msg`` if the current text is empty. 130 | ## 131 | ## Additionally, you can `pipe` the provided filters, for instance: 132 | #body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ") 133 | #body_process = Wrap(regexp=r'\n(?=\w+\s*:)') 134 | #body_process = noop 135 | body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip 136 | 137 | 138 | ## ``subject_process`` is a callable 139 | ## 140 | ## This callable will be given the original subject and result will 141 | ## be used in the changelog. 142 | ## 143 | ## Available constructs are those listed in ``body_process`` doc. 144 | subject_process = (strip | 145 | ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') | 146 | SetIfEmpty("No commit message.") | ucfirst | final_dot) 147 | 148 | 149 | ## ``tag_filter_regexp`` is a regexp 150 | ## 151 | ## Tags that will be used for the changelog must match this regexp. 152 | ## 153 | tag_filter_regexp = r'^[0-9-]+$' 154 | 155 | 156 | ## ``unreleased_version_label`` is a string or a callable that outputs a string 157 | ## 158 | ## This label will be used as the changelog Title of the last set of changes 159 | ## between last valid tag and HEAD if any. 160 | unreleased_version_label = "(unreleased)" 161 | 162 | 163 | ## ``output_engine`` is a callable 164 | ## 165 | ## This will change the output format of the generated changelog file 166 | ## 167 | ## Available choices are: 168 | ## 169 | ## - rest_py 170 | ## 171 | ## Legacy pure python engine, outputs ReSTructured text. 172 | ## This is the default. 173 | ## 174 | ## - mustache() 175 | ## 176 | ## Template name could be any of the available templates in 177 | ## ``templates/mustache/*.tpl``. 178 | ## Requires python package ``pystache``. 179 | ## Examples: 180 | ## - mustache("markdown") 181 | ## - mustache("restructuredtext") 182 | ## 183 | ## - makotemplate() 184 | ## 185 | ## Template name could be any of the available templates in 186 | ## ``templates/mako/*.tpl``. 187 | ## Requires python package ``mako``. 188 | ## Examples: 189 | ## - makotemplate("restructuredtext") 190 | ## 191 | output_engine = rest_py 192 | #output_engine = mustache("restructuredtext") 193 | #output_engine = mustache("markdown") 194 | #output_engine = makotemplate("restructuredtext") 195 | 196 | 197 | ## ``include_merge`` is a boolean 198 | ## 199 | ## This option tells git-log whether to include merge commits in the log. 200 | ## The default is to include them. 201 | include_merge = True 202 | 203 | 204 | ## ``log_encoding`` is a string identifier 205 | ## 206 | ## This option tells gitchangelog what encoding is outputed by ``git log``. 207 | ## The default is to be clever about it: it checks ``git config`` for 208 | ## ``i18n.logOutputEncoding``, and if not found will default to git's own 209 | ## default: ``utf-8``. 210 | #log_encoding = 'utf-8' 211 | 212 | 213 | ## ``publish`` is a callable 214 | ## 215 | ## Sets what ``gitchangelog`` should do with the output generated by 216 | ## the output engine. ``publish`` is a callable taking one argument 217 | ## that is an interator on lines from the output engine. 218 | ## 219 | ## Some helper callable are provided: 220 | ## 221 | ## Available choices are: 222 | ## 223 | ## - stdout 224 | ## 225 | ## Outputs directly to standard output 226 | ## (This is the default) 227 | ## 228 | ## - FileInsertAtFirstRegexMatch(file, pattern, idx=lamda m: m.start()) 229 | ## 230 | ## Creates a callable that will parse given file for the given 231 | ## regex pattern and will insert the output in the file. 232 | ## ``idx`` is a callable that receive the matching object and 233 | ## must return a integer index point where to insert the 234 | ## the output in the file. Default is to return the position of 235 | ## the start of the matched string. 236 | ## 237 | ## - FileRegexSubst(file, pattern, replace, flags) 238 | ## 239 | ## Apply a replace inplace in the given file. Your regex pattern must 240 | ## take care of everything and might be more complex. Check the README 241 | ## for a complete copy-pastable example. 242 | ## 243 | # publish = FileInsertIntoFirstRegexMatch( 244 | # "CHANGELOG.rst", 245 | # r'/(?P[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n/', 246 | # idx=lambda m: m.start(1) 247 | # ) 248 | #publish = stdout 249 | 250 | 251 | ## ``revs`` is a list of callable or a list of string 252 | ## 253 | ## callable will be called to resolve as strings and allow dynamical 254 | ## computation of these. The result will be used as revisions for 255 | ## gitchangelog (as if directly stated on the command line). This allows 256 | ## to filter exaclty which commits will be read by gitchangelog. 257 | ## 258 | ## To get a full documentation on the format of these strings, please 259 | ## refer to the ``git rev-list`` arguments. There are many examples. 260 | ## 261 | ## Using callables is especially useful, for instance, if you 262 | ## are using gitchangelog to generate incrementally your changelog. 263 | ## 264 | ## Some helpers are provided, you can use them:: 265 | ## 266 | ## - FileFirstRegexMatch(file, pattern): will return a callable that will 267 | ## return the first string match for the given pattern in the given file. 268 | ## If you use named sub-patterns in your regex pattern, it'll output only 269 | ## the string matching the regex pattern named "rev". 270 | ## 271 | ## - Caret(rev): will return the rev prefixed by a "^", which is a 272 | ## way to remove the given revision and all its ancestor. 273 | ## 274 | ## Please note that if you provide a rev-list on the command line, it'll 275 | ## replace this value (which will then be ignored). 276 | ## 277 | ## If empty, then ``gitchangelog`` will act as it had to generate a full 278 | ## changelog. 279 | ## 280 | ## The default is to use all commits to make the changelog. 281 | #revs = ["^1.0.3", ] 282 | #revs = [ 283 | # Caret( 284 | # FileFirstRegexMatch( 285 | # "CHANGELOG.rst", 286 | # r"(?P[0-9]+\.[0-9]+(\.[0-9]+)?)\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)\n--+\n")), 287 | # "HEAD" 288 | #] 289 | revs = [] 290 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: ci* 6 | tags: '*' 7 | 8 | jobs: 9 | create_release: 10 | name: Create release 11 | runs-on: ubuntu-latest 12 | outputs: 13 | upload_url: ${{ steps.create_release.outputs.upload_url }} 14 | steps: 15 | - uses: actions/checkout@v3 16 | with: 17 | fetch-depth: 0 18 | submodules: false 19 | - name: Generate release name 20 | id: release_name 21 | # https://github.community/t/how-to-get-just-the-tag-name/16241/4 22 | run: echo ::set-output name=name::${GITHUB_REF/refs\/*s\//} 23 | - name: Generate changes file 24 | uses: sarnold/gitchangelog-action@master 25 | with: 26 | config_file: .gitchangelog.rc 27 | github_token: ${{ secrets.GITHUB_TOKEN }} 28 | - name: Create release 29 | id: create_release 30 | uses: actions/create-release@v1 31 | env: 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | with: 34 | tag_name: ${{ steps.release_name.outputs.name }}-tag 35 | release_name: ${{ steps.release_name.outputs.name }} 36 | body_path: CHANGES.md 37 | draft: false 38 | prerelease: true 39 | 40 | build-linux: 41 | runs-on: ubuntu-20.04 42 | needs: [create_release] 43 | steps: 44 | - uses: actions/checkout@v3 45 | with: 46 | submodules: true 47 | - name: Workaround for apt update failure 48 | run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.* 49 | - name: Install deps 50 | run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap python3-pip 51 | - name: Upgrade pip and setuptools 52 | run: pip3 install -U pip 'setuptools<71' 53 | - name: Install listconfig 54 | run: pip3 install listconfig 55 | - name: Configure for Linux 56 | run: make ldefconfig 57 | - name: Build Linux 58 | run: make lbuild 59 | - name: Setup releases 60 | id: release_name 61 | run: | 62 | mkdir release 63 | cp ./linux-brain/arch/arm/boot/dts/imx28-pwsh*.dtb release/ 64 | cp ./linux-brain/arch/arm/boot/zImage release/zImage 65 | zip -r release.zip release/ 66 | - name: Generate archive name 67 | id: archive_name 68 | run: echo ::set-output name=name::linux-${GITHUB_REF/refs\/*s\//} 69 | - name: Upload release.zip 70 | uses: actions/upload-release-asset@v1 71 | env: 72 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 73 | with: 74 | upload_url: ${{ needs.create_release.outputs.upload_url }} 75 | asset_path: release.zip 76 | asset_name: ${{ steps.archive_name.outputs.name }}.zip 77 | asset_content_type: application/zip 78 | - name: Generate listconfig 79 | run: listconfig ./linux-brain/Kconfig ./linux-brain/.config > listconfig 80 | - name: Upload listconfig 81 | uses: actions/upload-release-asset@v1 82 | env: 83 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 84 | with: 85 | upload_url: ${{ needs.create_release.outputs.upload_url }} 86 | asset_path: listconfig 87 | asset_name: listconfig 88 | asset_content_type: text/plain 89 | 90 | build-linux-x1: 91 | runs-on: ubuntu-20.04 92 | needs: [create_release] 93 | steps: 94 | - uses: actions/checkout@v3 95 | with: 96 | submodules: true 97 | - name: Workaround for apt update failure 98 | run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.* 99 | - name: Install deps 100 | run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap 101 | - name: Configure for Linux 102 | run: make ldefconfig-x1 103 | - name: Build Linux 104 | run: make lbuild 105 | - name: Setup releases 106 | id: release_name 107 | run: | 108 | mkdir release 109 | cp ./linux-brain/arch/arm/boot/dts/imx7ulp-pwh*.dtb release/ 110 | cp ./linux-brain/arch/arm/boot/zImage release/zImage 111 | zip -r release.zip release/ 112 | - name: Generate archive name 113 | id: archive_name 114 | run: echo ::set-output name=name::linux-x1-${GITHUB_REF/refs\/*s\//} 115 | - name: Upload release.zip 116 | uses: actions/upload-release-asset@v1 117 | env: 118 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 119 | with: 120 | upload_url: ${{ needs.create_release.outputs.upload_url }} 121 | asset_path: release.zip 122 | asset_name: ${{ steps.archive_name.outputs.name }}.zip 123 | asset_content_type: application/zip 124 | 125 | build-uboot: 126 | runs-on: ubuntu-20.04 127 | needs: [create_release] 128 | strategy: 129 | matrix: 130 | include: 131 | - model: a7200 132 | nk: edna3exe.bin 133 | lilo: gen2.bin 134 | - model: a7400 135 | nk: edna3exe.bin 136 | lilo: gen2_7400.bin 137 | - model: sh1 138 | nk: edsa1exe.bin 139 | lilo: gen3_1.bin 140 | - model: sh2 141 | nk: edsa2exe.bin 142 | lilo: gen3_2.bin 143 | - model: sh3 144 | nk: edsa3exe.bin 145 | lilo: gen3_3.bin 146 | - model: sh4 147 | nk: edsh4exe.bin 148 | lilo: gen3_4.bin 149 | - model: sh5 150 | nk: edsh5exe.bin 151 | lilo: gen3_5.bin 152 | - model: sh6 153 | nk: edsh6exe.bin 154 | lilo: gen3_6.bin 155 | - model: sh7 156 | nk: edsh7exe.bin 157 | lilo: gen3_7.bin 158 | 159 | steps: 160 | - uses: actions/checkout@v3 161 | with: 162 | submodules: true 163 | - name: Workaround for apt update failure 164 | run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.* 165 | - name: Install deps 166 | run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap 167 | - name: Build nkbin-maker 168 | run: make nkbin-maker 169 | - name: Configure for U-Boot 170 | run: make udefconfig-${{ matrix.model }} 171 | - name: Build U-Boot 172 | run: make ubuild 173 | - name: Generate NK.bin 174 | run: make nk.bin 175 | - name: Setup releases 176 | id: release_name 177 | run: | 178 | mkdir release 179 | cp ./u-boot-brain/u-boot.bin release/u-boot.bin 180 | cp ./u-boot-brain/u-boot.bin release/${{ matrix.lilo }} 181 | cp ./u-boot-brain/u-boot.sb release/u-boot.sb 182 | cp ./nk.bin release/${{ matrix.nk }} 183 | zip -r release.zip release/ 184 | - name: Generate archive name 185 | id: archive_name 186 | run: echo ::set-output name=name::uboot-${{ matrix.model }}-${GITHUB_REF/refs\/*s\//} 187 | - name: Upload release.zip 188 | uses: actions/upload-release-asset@v1 189 | env: 190 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 191 | with: 192 | upload_url: ${{ needs.create_release.outputs.upload_url }} 193 | asset_path: release.zip 194 | asset_name: ${{ steps.archive_name.outputs.name }}.zip 195 | asset_content_type: application/zip 196 | 197 | build-uboot-x1: 198 | runs-on: ubuntu-20.04 199 | needs: [create_release] 200 | strategy: 201 | matrix: 202 | include: 203 | - model: h1 204 | 205 | steps: 206 | - uses: actions/checkout@v3 207 | with: 208 | submodules: true 209 | - name: Workaround for apt update failure 210 | run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.* 211 | - name: Install deps 212 | run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap 213 | - name: Configure for U-Boot 214 | run: make udefconfig-${{ matrix.model }} 215 | - name: Build U-Boot 216 | run: make ubuild 217 | - name: Setup releases 218 | id: release_name 219 | run: | 220 | mkdir release 221 | cp ./u-boot-brain/u-boot.bin release/u-boot.bin 222 | zip -r release.zip release/ 223 | - name: Generate archive name 224 | id: archive_name 225 | run: echo ::set-output name=name::uboot-${{ matrix.model }}-${GITHUB_REF/refs\/*s\//} 226 | - name: Upload release.zip 227 | uses: actions/upload-release-asset@v1 228 | env: 229 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 230 | with: 231 | upload_url: ${{ needs.create_release.outputs.upload_url }} 232 | asset_path: release.zip 233 | asset_name: ${{ steps.archive_name.outputs.name }}.zip 234 | asset_content_type: application/zip 235 | 236 | build-sd: 237 | runs-on: ubuntu-20.04 238 | needs: [create_release] 239 | steps: 240 | - uses: actions/checkout@v3 241 | with: 242 | submodules: true 243 | - name: Make /opt writable 244 | run: sudo chown "$(whoami):$(whoami)" /opt 245 | - name: Install cegcc 246 | run: | 247 | wget -O cegcc.zip https://github.com/brain-hackers/cegcc-build/releases/download/2022-04-11-133546/cegcc-2022-04-11-133546.zip 248 | unzip -q cegcc.zip 249 | cp -r cegcc /opt/ 250 | - name: Workaround for apt update failure 251 | run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.* 252 | - name: Install deps 253 | run: sudo apt update && sudo apt install kpartx build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap 254 | - name: Configure for Linux 255 | run: make ldefconfig 256 | - name: Build Linux 257 | run: make lbuild 258 | - name: Build Debian Root 259 | run: make brainux 260 | - name: Build bsd-ce 261 | run: make -C nkbin_maker bsd-ce 262 | - name: Generate image name 263 | id: image_name 264 | run: echo ::set-output name=name::sdimage-${GITHUB_REF/refs\/*s\//} 265 | - name: Build SD image 266 | run: make image/sd.img && mv image/sd.img ${{ steps.image_name.outputs.name }}.img 267 | - name: Compress 268 | run: zip ${{ steps.image_name.outputs.name }}.zip ${{ steps.image_name.outputs.name }}.img 269 | - name: Upload the image 270 | uses: actions/upload-release-asset@v1 271 | env: 272 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 273 | with: 274 | upload_url: ${{ needs.create_release.outputs.upload_url }} 275 | asset_path: ${{ steps.image_name.outputs.name }}.zip 276 | asset_name: ${{ steps.image_name.outputs.name }}.zip 277 | asset_content_type: application/zip 278 | 279 | build-sd-x1: 280 | runs-on: ubuntu-20.04 281 | needs: [create_release] 282 | steps: 283 | - uses: actions/checkout@v3 284 | with: 285 | submodules: true 286 | - name: Workaround for apt update failure 287 | run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.* 288 | - name: Install deps 289 | run: sudo apt update && sudo apt install kpartx build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap 290 | - name: Upgrade pip and setuptools 291 | run: pip3 install -U pip setuptools 292 | - name: Install pyelftools 293 | run: pip3 install pyelftools 294 | - name: Build Boot4u 295 | run: make boot4ubuild 296 | - name: Configure for U-Boot 297 | run: make udefconfig-h1 298 | - name: Build U-Boot 299 | run: make ubuild 300 | - name: Configure for Linux 301 | run: make ldefconfig-x1 302 | - name: Build Linux 303 | run: make lbuild 304 | - name: Build Debian Root 305 | run: make brainux 306 | - name: Generate image name 307 | id: image_name 308 | run: echo ::set-output name=name::sdimage-x1-${GITHUB_REF/refs\/*s\//} 309 | - name: Build SD image 310 | run: make image/sd_x1.img && mv image/sd_x1.img ${{ steps.image_name.outputs.name }}.img 311 | - name: Compress 312 | run: zip ${{ steps.image_name.outputs.name }}.zip ${{ steps.image_name.outputs.name }}.img 313 | - name: Upload the image 314 | uses: actions/upload-release-asset@v1 315 | env: 316 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 317 | with: 318 | upload_url: ${{ needs.create_release.outputs.upload_url }} 319 | asset_path: ${{ steps.image_name.outputs.name }}.zip 320 | asset_name: ${{ steps.image_name.outputs.name }}.zip 321 | asset_content_type: application/zip 322 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | env 2 | brainux 3 | cache/* 4 | !cache/.gitkeep 5 | nk.bin 6 | image/sd.img 7 | image/work 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "u-boot-brain"] 2 | path = u-boot-brain 3 | url = https://github.com/brain-hackers/u-boot-brain.git 4 | [submodule "linux-brain"] 5 | path = linux-brain 6 | url = https://github.com/brain-hackers/linux-brain.git 7 | [submodule "nkbin_maker"] 8 | path = nkbin_maker 9 | url = https://github.com/brain-hackers/nkbin_maker.git 10 | [submodule "boot4u"] 11 | path = boot4u 12 | url = https://github.com/brain-hackers/boot4u.git 13 | [submodule "brainlilo"] 14 | path = brainlilo 15 | url = https://github.com/brain-hackers/brainlilo.git 16 | [submodule "buildroot"] 17 | path = buildroot 18 | url = https://github.com/brain-hackers/buildroot.git 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | # The copyright notice and the license agreement is applied to all portions 2 | # in this repository except the ones in submodules. 3 | 4 | MIT License 5 | 6 | Copyright (c) 2020 Takumi Sueda 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | JOBS=$(shell grep -c '^processor' /proc/cpuinfo) 2 | 3 | UBOOT_CROSS=$(shell ./tools/getcross u-boot) 4 | LINUX_CROSS=$(shell ./tools/getcross linux) 5 | ROOTFS_CROSS=$(shell ./tools/getcross rootfs) 6 | export ARCH=arm 7 | 8 | .PHONY: 9 | setup: 10 | @echo "Updating submodules" 11 | @git submodule update --init --recursive 12 | 13 | .PHONY: 14 | setup-dev: 15 | @echo "Creating venv" 16 | @python3 -m venv env 17 | @echo "Installing r3build" 18 | @. ./env/bin/activate; \ 19 | pip install wheel; \ 20 | pip install r3build 21 | 22 | .PHONY: 23 | watch: 24 | @echo "Watching changes in linux-brain and u-boot-brain" 25 | @. ./env/bin/activate; \ 26 | @python3 -m r3build 27 | 28 | .PHONY: 29 | udefconfig: 30 | make -C ./u-boot-brain pwsh1_defconfig 31 | 32 | .PHONY: 33 | udefconfig-%: 34 | make -C ./u-boot-brain pw$*_defconfig 35 | 36 | .PHONY: 37 | usavedefconfig: 38 | make CROSS_COMPILE=$(UBOOT_CROSS) -C ./u-boot-brain savedefconfig 39 | 40 | .PHONY: 41 | umenuconfig: 42 | make CROSS_COMPILE=$(UBOOT_CROSS) -C ./u-boot-brain menuconfig 43 | 44 | .PHONY: 45 | uclean: 46 | make -C ./u-boot-brain distclean 47 | 48 | .PHONY: 49 | ubuild: 50 | if [ "$(UBOOT_CROSS)" = "arm-linux-gnueabi-" ]; then \ 51 | make CROSS_COMPILE=$(UBOOT_CROSS) -j$(JOBS) -C ./u-boot-brain u-boot.sb; \ 52 | else \ 53 | make CROSS_COMPILE=$(UBOOT_CROSS) -j$(JOBS) -C ./u-boot-brain u-boot.imx; \ 54 | fi 55 | 56 | .PHONY: 57 | ldefconfig: 58 | make -C ./linux-brain brain_defconfig 59 | 60 | .PHONY: 61 | ldefconfig-x1: 62 | make -C ./linux-brain imx_v7_defconfig 63 | 64 | .PHONY: 65 | lmenuconfig: 66 | make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain menuconfig 67 | 68 | .PHONY: 69 | lsavedefconfig: 70 | make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain savedefconfig 71 | mv ./linux-brain/defconfig ./linux-brain/arch/arm/configs/brain_defconfig 72 | 73 | .PHONY: 74 | lsavedefconfig-x1: 75 | make CROSS_COMPILE=$(LINUX_CROSS) -C ./linux-brain savedefconfig 76 | mv ./linux-brain/defconfig ./linux-brain/arch/arm/configs/imx_v7_defconfig 77 | 78 | .PHONY: 79 | lclean: 80 | make -C ./linux-brain distclean 81 | 82 | .PHONY: 83 | lbuild: 84 | make CROSS_COMPILE=$(LINUX_CROSS) -j$(JOBS) -C ./linux-brain 85 | 86 | .PHONY: 87 | ldebpkg: 88 | $(MAKE) ldebpkg-build || $(MAKE) ldebpkg-clean 89 | mkdir -p debian 90 | mv linux-*.buildinfo debian/ 91 | mv linux-*.changes debian/ 92 | mv linux-*.diff.gz debian/ 93 | mv linux-*.dsc debian/ 94 | mv linux-*.orig.tar.gz debian/ 95 | mv linux-*.deb debian/ 96 | 97 | .PHONY: 98 | ldebpkg-build: 99 | make -j$(JOBS) -C ./linux-brain deb-pkg 100 | 101 | .PHONY: 102 | ldebpkg-clean: 103 | rm -f linux-*.buildinfo 104 | rm -f linux-*.changes 105 | rm -f linux-*.diff.gz 106 | rm -f linux-*.dsc 107 | rm -f linux-*.orig.tar.gz 108 | rm -f linux-*.deb 109 | 110 | .PHONY: 111 | uuu: 112 | sudo uuu ./u-boot-brain/u-boot.sb 113 | 114 | .PHONY: 115 | nkbin-maker: 116 | make -C ./nkbin_maker 117 | 118 | .PHONY: 119 | nk.bin: 120 | ./nkbin_maker/bsd-ce ./u-boot-brain/u-boot.bin 121 | 122 | .PHONY: 123 | boot4ubuild: 124 | make -C ./boot4u 125 | 126 | .PHONY: 127 | boot4uclean: 128 | make -C ./boot4u clean 129 | 130 | .PHONY: 131 | lilobuild: 132 | make -C ./brainlilo 133 | 134 | .PHONY: 135 | liloclean: 136 | make -C ./brainlilo clean 137 | 138 | brainux: 139 | @if [ "$(shell uname)" != "Linux" ]; then \ 140 | echo "Debootstrap is only available in Linux!"; \ 141 | exit 1; \ 142 | fi 143 | sudo mkdir -p brainux 144 | @if [ "$(CI)" = "true" ]; then \ 145 | echo "I'm in CI and debootstrap without cache."; \ 146 | sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign bullseye brainux/; \ 147 | else \ 148 | sudo debootstrap --arch=$(ROOTFS_CROSS) --foreign bullseye brainux/ http://localhost:65432/debian/; \ 149 | fi 150 | sudo cp /usr/bin/qemu-arm-static brainux/usr/bin/ 151 | sudo cp ./os-brainux/setup_brainux.sh brainux/ 152 | sudo ./os-brainux/override-pre.sh ./os-brainux/override ./brainux 153 | sudo -E chroot brainux /setup_brainux.sh 154 | sudo rm brainux/setup_brainux.sh 155 | sudo ./os-brainux/override.sh ./os-brainux/override ./brainux 156 | 157 | buildroot_rootfs: 158 | make -C buildroot brain_imx28_defconfig 159 | make -C buildroot -j 12 160 | sudo mkdir -p buildroot_rootfs 161 | sudo tar -C ./buildroot_rootfs -xf buildroot/output/images/rootfs.tar 162 | 163 | image/sd.img: clean_work 164 | ./image/build_image.sh brainux sd.img 3072 165 | 166 | image/sd_x1.img: clean_work 167 | ./image/build_image_x1.sh brainux sd_x1.img 3072 168 | 169 | image/sd_buildroot.img: clean_work 170 | ./image/build_image.sh buildroot_rootfs sd_buildroot.img 128 171 | 172 | 173 | .PHONY: 174 | clean_work: 175 | sudo rm -rf image/work 176 | 177 | .PHONY: 178 | aptcache: 179 | ./tools/aptcache_linux_amd64 \ 180 | -rule 'local=localhost:65432, remote=ftp.jaist.ac.jp' \ 181 | -rule 'local=localhost:65433, remote=security.debian.org' 182 | 183 | .PHONY: 184 | datetag: 185 | git tag $(shell ./tools/version) 186 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | buildbrain 2 | ========== 3 | 4 | This repository includes: 5 | 6 | - linux-brain, u-boot-brain, nkbin_maker and boot4u as submodules 7 | - Useful build targets in Makefile 8 | - r3build.toml to watch changes that occur in submodules 9 | 10 | 11 | Confirmed environments 12 | ---------------------- 13 | 14 | - Debian 10 (buster) amd64 15 | - Debian 11 (bullseye) amd64 16 | 17 | 18 | Getting Started 19 | --------------- 20 | 21 | 1. Install dependencies. 22 | 23 | ``` 24 | $ sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf libssl-dev bc lzop qemu-user-static debootstrap kpartx libyaml-dev python3-pyelftools 25 | ``` 26 | 27 | 1. Clone this repository with recursive clone enabled. 28 | 29 | ``` 30 | $ git clone --recursive git@github.com:brain-hackers/buildbrain.git 31 | ``` 32 | 33 | - If you've cloned it without `--recursive`, run following command: 34 | 35 | ``` 36 | $ git submodule update --init --recursive 37 | ``` 38 | 39 | 1. Install uuu. 40 | 41 | - Follow [the instruction](https://github.com/NXPmicro/mfgtools#linux) and build `uuu` executable. 42 | - Put `uuu` where the PATH executable points to. 43 | 44 | 45 | Build U-Boot 46 | ----------------------- 47 | 48 | 1. Run `make udefconfig-sh*` to generate `.config`. 49 | 50 | - For Sx1: `make udefconfig-sh1` 51 | - For Sx6: `make udefconfig-sh6` 52 | - For x1: `make udefconfig-h1` 53 | 54 | 2. Run `make ubuild` to build whole repository and generate `u-boot.sb` or `u-boot.bin`. 55 | 56 | - i.MX283 loads a packed U-Boot executable called `u-boot.sb`. 57 | 58 | 59 | Inject U-Boot into i.MX283 in recovery mode 60 | ----------------------- 61 | 1. Follow `Build U-Boot` procedure to make U-Boot binary. 62 | 63 | 1. Run `make uuu` 64 | 65 | Build and make NK.bin 66 | ----------------------- 67 | 68 | 1. Follow `Build U-Boot` procedure to make U-Boot binary. 69 | 70 | 1. Run `make nkbin-maker`. 71 | 72 | 1. To make `nk.bin`, run `make nk.bin`. 73 | 74 | - nkbin_maker packs `u-boot.bin` into `nk.bin`. 75 | 76 | Build and deploy boot4u 77 | ----------------------- 78 | 79 | 1. Run `make boot4u` 80 | 81 | 1. Create index.din and copy AppMain.bin 82 | - `mkdir /path/to/your/sd/1st/partition/App/boot4u` 83 | - `touch /path/to/your/sd/1st/partition/App/boot4u/index.din` 84 | - `cp boot4u/AppMain.bin /path/to/your/sd/1st/partition/App/boot4u/` 85 | 86 | 87 | Build Linux 88 | ----------- 89 | 90 | 1. Run `make ldefconfig` to generate `.config`. 91 | 92 | 1. Run `make lbuild` to generate `zImage`. 93 | 94 | 1. Confirm that `linux-brain/arch/arm/boot/zImage` exists. 95 | 96 | 97 | Build a Debian rootfs 98 | --------------------- 99 | 100 | 1. Run `make ldefconfig lbuild`. 101 | 102 | 1. Run APT cache in background (mandatory): `make aptcache`. 103 | 104 | 1. Run `make brainux`. 105 | 106 | 1. Run `make image/sd.img` 107 | 108 | 1. Confirm that `image/sd.img` is built and burn it to an SD card. 109 | 110 | 111 | Build a Buildroot rootfs 112 | ------------------------ 113 | 114 | Buildroot rootfs aims to be the most lightweight rootfs for experimental use. `make buildroot_rootfs` runs the defconfig target for rootfs-only build and then builds the rootfs tarball and a CPIO archive for initramfs. `make image/sd_buildroot.img` makes a bootable SD image in `image` directory like the typical Brainux SD image. 115 | 116 | If you want to customize the build of Buildroot, `cd` into `buildroot` and use the following targets: 117 | 118 | - `make menuconfig` to change the configuration 119 | - `make` to build the rootfs (`-j` option might give you extra speed) 120 | 121 | `image/sd_buildroot.img` target expects presence of the tarball at `buildroot/output/images/rootfs.tar`. You'll have to `clean` and rebuild every time you change the Buildroot's config before making the SD image. 122 | 123 | 124 | Known issues 125 | ---------------------------------------- 126 | If you use GCC 10 for the host compiler, `make ubuild` may fail. 127 | To complete build, open `/u-boot-brain/scripts/dtc/dtc-lexer.lex.c` or `/u-boot-brain/scripts/dtc/dtc-parser.tab.c` then comment out `YYLTYPE yylloc;` 128 | 129 | Watch changes in submodules & auto-build 130 | ---------------------------------------- 131 | 132 | 1. Run `make setup-dev` to prepare a Python venv to watch code changes. Namely; 133 | 134 | - Python 3 venv in `env` 135 | - r3build command in the env 136 | 137 | 1. Run `r3build`. It'll detect the changes you make and builds the corresponding executable automatically. 138 | 139 | 140 | What's r3build? 141 | --------------- 142 | 143 | [r3build](https://github.com/puhitaku/r3build) is a smart file watcher that aims to provide hot-reloading feature like Web frontend development. 144 | -------------------------------------------------------------------------------- /cache/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brain-hackers/buildbrain/cf7cc41efe532ab27bd8bf02ba85145fa2b29c81/cache/.gitkeep -------------------------------------------------------------------------------- /image/LICENSE: -------------------------------------------------------------------------------- 1 | *** exeopener *** 2 | 3 | MIT License 4 | 5 | Copyright (c) 2022 Chiharu Shirasaka 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /image/build_image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -uex -o pipefail 3 | 4 | JOBS=$(nproc) 5 | REPO=$(git rev-parse --show-toplevel) 6 | WORK=${REPO}/image/work 7 | LINUX=${REPO}/linux-brain 8 | ROOTFS=$1 9 | IMG_NAME=$2 10 | IMG=${REPO}/image/${IMG_NAME} 11 | SIZE_M=$3 12 | export CROSS_COMPILE=arm-linux-gnueabi- 13 | 14 | mkdir -p ${WORK} 15 | mkdir -p ${WORK}/lilobin 16 | 17 | for i in "a7200" "a7400" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do 18 | NUM=$(echo $i | sed -E 's/sh//g') 19 | 20 | make -C ${REPO}/u-boot-brain distclean pw${i}_defconfig 21 | make -j${JOBS} -C ${REPO}/u-boot-brain u-boot.bin 22 | ${REPO}/nkbin_maker/bsd-ce ${REPO}/u-boot-brain/u-boot.bin 23 | 24 | case $i in 25 | "a7200") 26 | mv ${REPO}/nk.bin ${WORK}/edna3exe.bin 27 | mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2.bin;; 28 | "a7400") 29 | mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2_7400.bin;; 30 | "sh1" | "sh2" | "sh3") 31 | mv ${REPO}/nk.bin ${WORK}/edsa${NUM}exe.bin 32 | mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen3_${NUM}.bin;; 33 | "sh4" | "sh5" | "sh6" | "sh7") 34 | mv ${REPO}/nk.bin ${WORK}/edsh${NUM}exe.bin 35 | mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen3_${NUM}.bin;; 36 | *) 37 | echo "WTF: $i" 38 | exit 1;; 39 | esac 40 | done 41 | 42 | dd if=/dev/zero of=${IMG} bs=1M count=${SIZE_M} 43 | 44 | START1=2048 45 | SECTORS1=$((1024 * 1024 * 64 / 512)) 46 | START2=$((2048 + ${SECTORS1})) 47 | 48 | cat < ${WORK}/part.sfdisk 49 | ${IMG}1 : start=${START1}, size=${SECTORS1}, type=b 50 | ${IMG}2 : start=${START2}, type=83 51 | EOF 52 | 53 | sfdisk ${IMG} < ${WORK}/part.sfdisk 54 | 55 | sudo kpartx -av ${IMG} 56 | 57 | LOOPDEV=$(losetup -l | grep ${IMG_NAME} | grep -o 'loop.' | tail -n 1) 58 | 59 | sudo mkfs.fat -n boot -F32 -v -I /dev/mapper/${LOOPDEV}p1 60 | sudo mkfs.ext4 -L rootfs /dev/mapper/${LOOPDEV}p2 61 | 62 | mkdir -p ${WORK}/p1 ${WORK}/p2 63 | sudo mount -o utf8=true /dev/mapper/${LOOPDEV}p1 ${WORK}/p1 64 | sudo mount /dev/mapper/${LOOPDEV}p2 ${WORK}/p2 65 | 66 | sudo cp ${LINUX}/arch/arm/boot/zImage ${WORK}/p1/ 67 | sudo cp ${LINUX}/arch/arm/boot/dts/imx28-pw*.dtb ${WORK}/p1/ 68 | sudo mkdir -p ${WORK}/p1/nk 69 | sudo cp ${WORK}/*.bin ${WORK}/p1/nk/ 70 | 71 | make -C ${REPO}/brainlilo 72 | 73 | LILO="${WORK}/p1/アプリ/Launch Linux" 74 | sudo mkdir -p "${LILO}" 75 | sudo touch "${LILO}/index.din" 76 | sudo touch "${LILO}/AppMain.cfg" 77 | sudo cp ${REPO}/brainlilo/*.dll "${LILO}/" 78 | sudo cp ${REPO}/brainlilo/BrainLILO.exe "${LILO}/AppMain_.exe" 79 | gzip -cd ${REPO}/image/exeopener.exe.gz > ${REPO}/image/exeopener.exe 80 | sudo cp ${REPO}/image/exeopener.exe "${LILO}/AppMain.exe" 81 | 82 | sudo mkdir -p ${WORK}/p1/loader 83 | sudo cp ${WORK}/lilobin/*.bin ${WORK}/p1/loader/ 84 | 85 | sudo cp -ra ${REPO}/${ROOTFS}/* ${WORK}/p2/ 86 | 87 | sudo umount ${WORK}/p1 ${WORK}/p2 88 | sudo kpartx -d ${IMG} 89 | 90 | rmdir ${WORK}/p1 ${WORK}/p2 91 | 92 | -------------------------------------------------------------------------------- /image/build_image_x1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -uex -o pipefail 3 | 4 | JOBS=$(nproc) 5 | REPO=$(git rev-parse --show-toplevel) 6 | WORK=${REPO}/image/work 7 | LINUX=${REPO}/linux-brain 8 | IMG=${REPO}/image/sd_x1.img 9 | export CROSS_COMPILE=arm-linux-gnueabihf- 10 | 11 | mkdir -p ${WORK} 12 | 13 | dd if=/dev/zero of=${IMG} bs=1M count=3072 14 | 15 | START1=2048 16 | SECTORS1=$((1024 * 1024 * 64 / 512)) 17 | START2=$((2048 + ${SECTORS1})) 18 | 19 | cat < ${WORK}/part.sfdisk 20 | ${IMG}1 : start=${START1}, size=${SECTORS1}, type=b 21 | ${IMG}2 : start=${START2}, type=83 22 | EOF 23 | 24 | sfdisk ${IMG} < ${WORK}/part.sfdisk 25 | 26 | sudo kpartx -av ${IMG} 27 | 28 | LOOPDEV=$(losetup -l | grep sd_x1.img | grep -o 'loop.') 29 | 30 | sudo mkfs.fat -F32 -v -I /dev/mapper/${LOOPDEV}p1 31 | sudo mkfs.ext4 /dev/mapper/${LOOPDEV}p2 32 | 33 | mkdir -p ${WORK}/p1 ${WORK}/p2 34 | sudo mount /dev/mapper/${LOOPDEV}p1 ${WORK}/p1 35 | sudo mount /dev/mapper/${LOOPDEV}p2 ${WORK}/p2 36 | 37 | sudo cp ${LINUX}/arch/arm/boot/zImage ${WORK}/p1/ 38 | sudo cp ${LINUX}/arch/arm/boot/dts/imx7ulp-pwh*.dtb ${WORK}/p1/ 39 | 40 | sudo cp ${REPO}/u-boot-brain/u-boot.bin ${WORK}/p1/ 41 | 42 | sudo mkdir -p ${WORK}/p1/App/boot4u 43 | sudo cp ${REPO}/boot4u/AppMain.bin ${WORK}/p1/App/boot4u/ 44 | sudo touch ${WORK}/p1/App/boot4u/index.din 45 | 46 | sudo cp -ra ${REPO}/brainux/* ${WORK}/p2/ 47 | 48 | sudo umount ${WORK}/p1 ${WORK}/p2 49 | sudo kpartx -d ${IMG} 50 | 51 | rmdir ${WORK}/p1 ${WORK}/p2 52 | 53 | -------------------------------------------------------------------------------- /image/exeopener.exe.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brain-hackers/buildbrain/cf7cc41efe532ab27bd8bf02ba85145fa2b29c81/image/exeopener.exe.gz -------------------------------------------------------------------------------- /os-brainux/override-pre.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -uex -o pipefail 4 | 5 | SRC=$1 6 | DST=$2 7 | 8 | install -g root -o root -m 0644 $SRC/lib/systemd/system/boot.mount $DST/lib/systemd/system/boot.mount 9 | install -g root -o root -m 0644 $SRC/lib/systemd/system/rndis_gadget.service $DST/lib/systemd/system/rndis_gadget.service 10 | install -g root -o root -m 0755 $SRC/usr/bin/enable_rndis_gadget $DST/usr/bin/enable_rndis_gadget 11 | -------------------------------------------------------------------------------- /os-brainux/override.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -uex -o pipefail 4 | 5 | SRC=$1 6 | DST=$2 7 | 8 | install -g root -o root -m 0644 $SRC/etc/motd $DST/etc/motd 9 | install -g root -o root -m 0440 $SRC/etc/sudoers $DST/etc/sudoers 10 | 11 | install -g root -o root -m 0644 $SRC/etc/X11/xorg.conf $DST/etc/X11/xorg.conf 12 | install -g root -o root -m 0644 $SRC/etc/X11/Xsession.d/96calibrate $DST/etc/X11/Xsession.d/96calibrate 13 | 14 | install -g root -o root -m 0644 -D $SRC/etc/xdg/weston/weston.ini $DST/etc/xdg/weston/weston.ini 15 | 16 | install -g 1000 -o 1000 -m 0644 $SRC/home/user/.xprofile $DST/home/user/.xprofile 17 | sudo -u#1000 -g#1000 mkdir -p $DST/home/user/.config/fcitx 18 | install -g 1000 -o 1000 -m 0644 $SRC/home/user/.config/fcitx/profile $DST/home/user/.config/fcitx/profile 19 | sudo -u#1000 -g#1000 mkdir -p $DST/home/user/lxterminal 20 | install -g 1000 -o 1000 -m 0644 $SRC/home/user/lxterminal/lxterminal.conf $DST/home/user/lxterminal/lxterminal.conf 21 | install -g root -o root -m 0644 -D $SRC/etc/jwm/system.jwmrc $DST/etc/jwm/system.jwmrc 22 | -------------------------------------------------------------------------------- /os-brainux/override/etc/X11/Xsession.d/96calibrate: -------------------------------------------------------------------------------- 1 | if [ ! -e /etc/X11/xorg.conf.d/99-calibrator.conf ]; then 2 | xinput_calibrator --output-filename /etc/X11/xorg.conf.d/99-calibrator.conf 3 | fi 4 | 5 | -------------------------------------------------------------------------------- /os-brainux/override/etc/X11/xorg.conf: -------------------------------------------------------------------------------- 1 | Section "Device" 2 | Identifier "device" 3 | Driver "fbdev" 4 | EndSection 5 | Section "Screen" 6 | Identifier "screen" 7 | Device "device" 8 | EndSection 9 | -------------------------------------------------------------------------------- /os-brainux/override/etc/jwm/system.jwmrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | /etc/jwm/debian-menu 7 | lxterminal 8 | 9 | 10 | xlock -mode blank 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Pidgin 24 | 25 | 26 | 27 | xterm 28 | 29 | 30 | 31 | xclock 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | root:1 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Sans-9:bold 54 | 4 55 | 21 56 | 3 57 | #FFFFFF 58 | #555555 59 | #777777 60 | 0.5 61 | 62 | #FFFFFF 63 | #0077CC 64 | #1AA0FF 65 | 1.0 66 | 67 | 68 | 69 | Sans-9 70 | #222222 71 | #FFFFFF 72 | #222222 73 | 0.75 74 | 75 | 76 | Sans-9 77 | 78 | #FFFFFF 79 | #333333 80 | 81 | #FFFFFF 82 | #222222 83 | 84 | 85 | #3B3B3B 86 | #555555 87 | #333333 88 | #FFFFFF 89 | 90 | #0077CC 91 | #004488 92 | 93 | 94 | 95 | Sans-9 96 | #FFFFFF 97 | #333333 98 | #000000 99 | 100 | #FFFFFF 101 | #0077CC 102 | 103 | 0.85 104 | 105 | 106 | Sans-9 107 | #000000 108 | #999999 109 | 110 | 111 | 115 | /usr/share/icons/gnome/256x256/actions 116 | /usr/share/icons/gnome/256x256/apps 117 | /usr/share/icons/gnome/256x256/categories 118 | /usr/share/icons/gnome/256x256/devices 119 | /usr/share/icons/gnome/256x256/emblems 120 | /usr/share/icons/gnome/256x256/mimetypes 121 | /usr/share/icons/gnome/256x256/places 122 | /usr/share/icons/gnome/256x256/status 123 | /usr/share/icons/gnome/32x32/actions 124 | /usr/share/icons/gnome/32x32/animations 125 | /usr/share/icons/gnome/32x32/apps 126 | /usr/share/icons/gnome/32x32/categories 127 | /usr/share/icons/gnome/32x32/devices 128 | /usr/share/icons/gnome/32x32/emblems 129 | /usr/share/icons/gnome/32x32/mimetypes 130 | /usr/share/icons/gnome/32x32/places 131 | /usr/share/icons/gnome/32x32/status 132 | /usr/share/icons/gnome/scalable/actions 133 | /usr/share/icons/gnome/scalable/apps 134 | /usr/share/icons/gnome/scalable/categories 135 | /usr/share/icons/gnome/scalable/devices 136 | /usr/share/icons/gnome/scalable/emblems 137 | /usr/share/icons/gnome/scalable/mimetypes 138 | /usr/share/icons/gnome/scalable/places 139 | /usr/share/icons/gnome/scalable/status 140 | /usr/share/icons/hicolor/256x256/apps 141 | /usr/share/icons/hicolor/256x256/mimetypes 142 | /usr/share/icons/hicolor/32x32/actions 143 | /usr/share/icons/hicolor/32x32/apps 144 | /usr/share/icons/hicolor/32x32/categories 145 | /usr/share/icons/hicolor/32x32/devices 146 | /usr/share/icons/hicolor/32x32/emblems 147 | /usr/share/icons/hicolor/32x32/mimetypes 148 | /usr/share/icons/hicolor/32x32/status 149 | /usr/share/icons/hicolor/512x512/apps 150 | /usr/share/icons/hicolor/512x512/mimetypes 151 | /usr/share/icons/hicolor/scalable/actions 152 | /usr/share/icons/hicolor/scalable/apps 153 | /usr/share/icons/hicolor/scalable/categories 154 | /usr/share/icons/hicolor/scalable/devices 155 | /usr/share/icons/hicolor/scalable/emblems 156 | /usr/share/icons/hicolor/scalable/mimetypes 157 | /usr/share/icons/hicolor/scalable/places 158 | /usr/share/icons/hicolor/scalable/status 159 | /usr/share/icons 160 | /usr/share/pixmaps 161 | 162 | /usr/local/share/jwm 163 | 164 | 165 | 166 | 167 | 168 | 172 | #111111 173 | 174 | 175 | 176 | 400 177 | 178 | 179 | 2 180 | 181 | 182 | sloppy 183 | 184 | 185 | border 186 | 187 | 188 | opaque 189 | 190 | 191 | opaque 192 | 193 | 194 | up 195 | down 196 | right 197 | left 198 | left 199 | down 200 | up 201 | right 202 | select 203 | escape 204 | 205 | nextstacked 206 | close 207 | desktop# 208 | root:1 209 | window 210 | maximize 211 | rdesktop 212 | ldesktop 213 | udesktop 214 | ddesktop 215 | 216 | 217 | -------------------------------------------------------------------------------- /os-brainux/override/etc/motd: -------------------------------------------------------------------------------- 1 | 2 | ____ _ 3 | | _ \ (_) 4 | | |_) |_ __ __ _ _ _ __ _ ___ __ 5 | | _ <| '__/ _` | | '_ \| | | \ \/ / 6 | | |_) | | | (_| | | | | | |_| |> < 7 | |____/|_| \__,_|_|_| |_|\__,_/_/\_\ 8 | 9 | by Brain Hackers 10 | 11 | https://github.com/brain-hackers 12 | 13 | -------------------------------------------------------------------------------- /os-brainux/override/etc/sudoers: -------------------------------------------------------------------------------- 1 | # 2 | # This file MUST be edited with the 'visudo' command as root. 3 | # 4 | # Please consider adding local content in /etc/sudoers.d/ instead of 5 | # directly modifying this file. 6 | # 7 | # See the man page for details on how to write a sudoers file. 8 | # 9 | Defaults env_reset,pwfeedback 10 | Defaults mail_badpass 11 | Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 12 | 13 | # Host alias specification 14 | 15 | # User alias specification 16 | 17 | # Cmnd alias specification 18 | 19 | # User privilege specification 20 | root ALL=(ALL:ALL) ALL 21 | 22 | # Allow members of group sudo to execute any command 23 | %sudo ALL=(ALL:ALL) ALL 24 | 25 | # See sudoers(5) for more information on "@include" directives: 26 | 27 | @includedir /etc/sudoers.d 28 | -------------------------------------------------------------------------------- /os-brainux/override/etc/xdg/weston/weston.ini: -------------------------------------------------------------------------------- 1 | [core] 2 | xwayland=true 3 | backend=fbdev-backend.so 4 | 5 | -------------------------------------------------------------------------------- /os-brainux/override/home/user/.config/fcitx/profile: -------------------------------------------------------------------------------- 1 | [Profile] 2 | # Use Full Width Character 3 | # Available Value: 4 | # True False 5 | #FullWidth=False 6 | # Use Wide Punctuation 7 | # Available Value: 8 | # True False 9 | #WidePunc=True 10 | # Prompt the phrases after input 11 | # Available Value: 12 | # True False 13 | #UseRemind=False 14 | # Current Input Method Name 15 | IMName=anthy 16 | # Current Enabled Input Method List 17 | EnabledIMList=fcitx-keyboard-us:True,anthy:True,fcitx-keyboard-af:False,fcitx-keyboard-af-fa-olpc:False,fcitx-keyboard-af-olpc-ps:False,fcitx-keyboard-af-ps:False,fcitx-keyboard-af-uz:False,fcitx-keyboard-af-uz-olpc:False,fcitx-keyboard-al:False,fcitx-keyboard-al-plisi:False,fcitx-keyboard-am:False,fcitx-keyboard-am-eastern:False,fcitx-keyboard-am-eastern-alt:False,fcitx-keyboard-am-olpc-phonetic:False,fcitx-keyboard-am-phonetic:False,fcitx-keyboard-am-phonetic-alt:False,fcitx-keyboard-am-western:False,fcitx-keyboard-apl:False,fcitx-keyboard-apl-apl2:False,fcitx-keyboard-apl-aplplusII:False,fcitx-keyboard-apl-aplx:False,fcitx-keyboard-apl-dyalog:False,fcitx-keyboard-apl-sax:False,fcitx-keyboard-apl-unified:False,fcitx-keyboard-ara:False,fcitx-keyboard-ara-azerty:False,fcitx-keyboard-ara-azerty_digits:False,fcitx-keyboard-ara-basic_ext:False,fcitx-keyboard-ara-basic_ext_digits:False,fcitx-keyboard-ara-buckwalter:False,fcitx-keyboard-ara-digits:False,fcitx-keyboard-ara-mac:False,fcitx-keyboard-ara-olpc:False,fcitx-keyboard-ara-qwerty:False,fcitx-keyboard-ara-qwerty_digits:False,fcitx-keyboard-ara-sun_type6:False,fcitx-keyboard-ara-uga:False,fcitx-keyboard-at:False,fcitx-keyboard-at-mac:False,fcitx-keyboard-at-nodeadkeys:False,fcitx-keyboard-at-sundeadkeys:False,fcitx-keyboard-au:False,fcitx-keyboard-az:False,fcitx-keyboard-az-cyrillic:False,fcitx-keyboard-ba:False,fcitx-keyboard-ba-alternatequotes:False,fcitx-keyboard-ba-unicode:False,fcitx-keyboard-ba-unicodeus:False,fcitx-keyboard-ba-us:False,fcitx-keyboard-bd:False,fcitx-keyboard-bd-probhat:False,fcitx-keyboard-be:False,fcitx-keyboard-be-iso-alternate:False,fcitx-keyboard-be-nodeadkeys:False,fcitx-keyboard-be-oss:False,fcitx-keyboard-be-oss_latin9:False,fcitx-keyboard-be-oss_sundeadkeys:False,fcitx-keyboard-be-sun_type6:False,fcitx-keyboard-be-sundeadkeys:False,fcitx-keyboard-be-wang:False,fcitx-keyboard-bg:False,fcitx-keyboard-bg-bas_phonetic:False,fcitx-keyboard-bg-phonetic:False,fcitx-keyboard-br:False,fcitx-keyboard-br-dvorak:False,fcitx-keyboard-br-nativo:False,fcitx-keyboard-br-nativo-epo:False,fcitx-keyboard-br-nativo-us:False,fcitx-keyboard-br-nodeadkeys:False,fcitx-keyboard-br-sun_type6:False,fcitx-keyboard-br-thinkpad:False,fcitx-keyboard-brai:False,fcitx-keyboard-brai-left_hand:False,fcitx-keyboard-brai-left_hand_invert:False,fcitx-keyboard-brai-right_hand:False,fcitx-keyboard-brai-right_hand_invert:False,fcitx-keyboard-bt:False,fcitx-keyboard-bw:False,fcitx-keyboard-by:False,fcitx-keyboard-by-latin:False,fcitx-keyboard-by-legacy:False,fcitx-keyboard-ca:False,fcitx-keyboard-ca-eng:False,fcitx-keyboard-ca-fr-dvorak:False,fcitx-keyboard-ca-fr-legacy:False,fcitx-keyboard-ca-ike:False,fcitx-keyboard-ca-kut:False,fcitx-keyboard-ca-multi:False,fcitx-keyboard-ca-multi-2gr:False,fcitx-keyboard-ca-multix:False,fcitx-keyboard-ca-shs:False,fcitx-keyboard-ca-sun_type6:False,fcitx-keyboard-cd:False,fcitx-keyboard-ch:False,fcitx-keyboard-ch-de_mac:False,fcitx-keyboard-ch-de_nodeadkeys:False,fcitx-keyboard-ch-de_sundeadkeys:False,fcitx-keyboard-ch-fr:False,fcitx-keyboard-ch-fr_mac:False,fcitx-keyboard-ch-fr_nodeadkeys:False,fcitx-keyboard-ch-fr_sundeadkeys:False,fcitx-keyboard-ch-legacy:False,fcitx-keyboard-ch-sun_type6_de:False,fcitx-keyboard-ch-sun_type6_fr:False,fcitx-keyboard-cm:False,fcitx-keyboard-cm-azerty:False,fcitx-keyboard-cm-dvorak:False,fcitx-keyboard-cm-french:False,fcitx-keyboard-cm-mmuock:False,fcitx-keyboard-cm-qwerty:False,fcitx-keyboard-cn:False,fcitx-keyboard-cn-altgr-pinyin:False,fcitx-keyboard-cn-tib:False,fcitx-keyboard-cn-tib_asciinum:False,fcitx-keyboard-cn-ug:False,fcitx-keyboard-cz:False,fcitx-keyboard-cz-bksl:False,fcitx-keyboard-cz-dvorak-ucw:False,fcitx-keyboard-cz-qwerty:False,fcitx-keyboard-cz-qwerty_bksl:False,fcitx-keyboard-cz-rus:False,fcitx-keyboard-cz-sun_type6:False,fcitx-keyboard-cz-ucw:False,fcitx-keyboard-de:False,fcitx-keyboard-de-T3:False,fcitx-keyboard-de-adnw:False,fcitx-keyboard-de-bone:False,fcitx-keyboard-de-bone_eszett_home:False,fcitx-keyboard-de-deadacute:False,fcitx-keyboard-de-deadgraveacute:False,fcitx-keyboard-de-deadtilde:False,fcitx-keyboard-de-dsb:False,fcitx-keyboard-de-dsb_qwertz:False,fcitx-keyboard-de-dvorak:False,fcitx-keyboard-de-hu:False,fcitx-keyboard-de-koy:False,fcitx-keyboard-de-lld:False,fcitx-keyboard-de-mac:False,fcitx-keyboard-de-mac_nodeadkeys:False,fcitx-keyboard-de-neo:False,fcitx-keyboard-de-neo_qwerty:False,fcitx-keyboard-de-neo_qwertz:False,fcitx-keyboard-de-nodeadkeys:False,fcitx-keyboard-de-pl:False,fcitx-keyboard-de-qwerty:False,fcitx-keyboard-de-ro:False,fcitx-keyboard-de-ro_nodeadkeys:False,fcitx-keyboard-de-ru:False,fcitx-keyboard-de-ru-recom:False,fcitx-keyboard-de-ru-translit:False,fcitx-keyboard-de-sun_type6:False,fcitx-keyboard-de-sundeadkeys:False,fcitx-keyboard-de-tr:False,fcitx-keyboard-de-us:False,fcitx-keyboard-dk:False,fcitx-keyboard-dk-dvorak:False,fcitx-keyboard-dk-mac:False,fcitx-keyboard-dk-mac_nodeadkeys:False,fcitx-keyboard-dk-nodeadkeys:False,fcitx-keyboard-dk-sun_type6:False,fcitx-keyboard-dk-winkeys:False,fcitx-keyboard-dz:False,fcitx-keyboard-dz-ar:False,fcitx-keyboard-dz-ber:False,fcitx-keyboard-ee:False,fcitx-keyboard-ee-dvorak:False,fcitx-keyboard-ee-nodeadkeys:False,fcitx-keyboard-ee-sun_type6:False,fcitx-keyboard-ee-us:False,fcitx-keyboard-epo:False,fcitx-keyboard-epo-legacy:False,fcitx-keyboard-es:False,fcitx-keyboard-es-ast:False,fcitx-keyboard-es-cat:False,fcitx-keyboard-es-deadtilde:False,fcitx-keyboard-es-dvorak:False,fcitx-keyboard-es-mac:False,fcitx-keyboard-es-nodeadkeys:False,fcitx-keyboard-es-sun_type6:False,fcitx-keyboard-es-sundeadkeys:False,fcitx-keyboard-es-winkeys:False,fcitx-keyboard-et:False,fcitx-keyboard-eu:False,fcitx-keyboard-fi:False,fcitx-keyboard-fi-classic:False,fcitx-keyboard-fi-das:False,fcitx-keyboard-fi-fidvorak:False,fcitx-keyboard-fi-mac:False,fcitx-keyboard-fi-nodeadkeys:False,fcitx-keyboard-fi-smi:False,fcitx-keyboard-fi-sun_type6:False,fcitx-keyboard-fi-winkeys:False,fcitx-keyboard-fo:False,fcitx-keyboard-fo-nodeadkeys:False,fcitx-keyboard-fr:False,fcitx-keyboard-fr-azerty:False,fcitx-keyboard-fr-bepo:False,fcitx-keyboard-fr-bepo_latin9:False,fcitx-keyboard-fr-bre:False,fcitx-keyboard-fr-dvorak:False,fcitx-keyboard-fr-geo:False,fcitx-keyboard-fr-latin9:False,fcitx-keyboard-fr-latin9_nodeadkeys:False,fcitx-keyboard-fr-latin9_sundeadkeys:False,fcitx-keyboard-fr-mac:False,fcitx-keyboard-fr-nodeadkeys:False,fcitx-keyboard-fr-oci:False,fcitx-keyboard-fr-oss:False,fcitx-keyboard-fr-oss_latin9:False,fcitx-keyboard-fr-oss_nodeadkeys:False,fcitx-keyboard-fr-oss_sundeadkeys:False,fcitx-keyboard-fr-sun_type6:False,fcitx-keyboard-fr-sundeadkeys:False,fcitx-keyboard-fr-us:False,fcitx-keyboard-fr-us-alt:False,fcitx-keyboard-fr-us-azerty:False,fcitx-keyboard-gb:False,fcitx-keyboard-gb-colemak:False,fcitx-keyboard-gb-dvorak:False,fcitx-keyboard-gb-dvorakukp:False,fcitx-keyboard-gb-extd:False,fcitx-keyboard-gb-intl:False,fcitx-keyboard-gb-mac:False,fcitx-keyboard-gb-mac_intl:False,fcitx-keyboard-gb-pl:False,fcitx-keyboard-gb-sun_type6:False,fcitx-keyboard-ge:False,fcitx-keyboard-ge-ergonomic:False,fcitx-keyboard-ge-mess:False,fcitx-keyboard-ge-os:False,fcitx-keyboard-ge-ru:False,fcitx-keyboard-gh:False,fcitx-keyboard-gh-akan:False,fcitx-keyboard-gh-avn:False,fcitx-keyboard-gh-ewe:False,fcitx-keyboard-gh-fula:False,fcitx-keyboard-gh-ga:False,fcitx-keyboard-gh-generic:False,fcitx-keyboard-gh-gillbt:False,fcitx-keyboard-gh-hausa:False,fcitx-keyboard-gn:False,fcitx-keyboard-gr:False,fcitx-keyboard-gr-colemak:False,fcitx-keyboard-gr-extended:False,fcitx-keyboard-gr-nodeadkeys:False,fcitx-keyboard-gr-polytonic:False,fcitx-keyboard-gr-simple:False,fcitx-keyboard-gr-sun_type6:False,fcitx-keyboard-hr:False,fcitx-keyboard-hr-alternatequotes:False,fcitx-keyboard-hr-unicode:False,fcitx-keyboard-hr-unicodeus:False,fcitx-keyboard-hr-us:False,fcitx-keyboard-hu:False,fcitx-keyboard-hu-101_qwerty_comma_dead:False,fcitx-keyboard-hu-101_qwerty_comma_nodead:False,fcitx-keyboard-hu-101_qwerty_dot_dead:False,fcitx-keyboard-hu-101_qwerty_dot_nodead:False,fcitx-keyboard-hu-101_qwertz_comma_dead:False,fcitx-keyboard-hu-101_qwertz_comma_nodead:False,fcitx-keyboard-hu-101_qwertz_dot_dead:False,fcitx-keyboard-hu-101_qwertz_dot_nodead:False,fcitx-keyboard-hu-102_qwerty_comma_dead:False,fcitx-keyboard-hu-102_qwerty_comma_nodead:False,fcitx-keyboard-hu-102_qwerty_dot_dead:False,fcitx-keyboard-hu-102_qwerty_dot_nodead:False,fcitx-keyboard-hu-102_qwertz_comma_dead:False,fcitx-keyboard-hu-102_qwertz_comma_nodead:False,fcitx-keyboard-hu-102_qwertz_dot_dead:False,fcitx-keyboard-hu-102_qwertz_dot_nodead:False,fcitx-keyboard-hu-nodeadkeys:False,fcitx-keyboard-hu-oldhun:False,fcitx-keyboard-hu-qwerty:False,fcitx-keyboard-hu-standard:False,fcitx-keyboard-id:False,fcitx-keyboard-ie:False,fcitx-keyboard-ie-CloGaelach:False,fcitx-keyboard-ie-UnicodeExpert:False,fcitx-keyboard-ie-ogam:False,fcitx-keyboard-ie-ogam_is434:False,fcitx-keyboard-il:False,fcitx-keyboard-il-biblical:False,fcitx-keyboard-il-biblicalSIL:False,fcitx-keyboard-il-lyx:False,fcitx-keyboard-il-phonetic:False,fcitx-keyboard-in:False,fcitx-keyboard-in-ben:False,fcitx-keyboard-in-ben_baishakhi:False,fcitx-keyboard-in-ben_bornona:False,fcitx-keyboard-in-ben_gitanjali:False,fcitx-keyboard-in-ben_inscript:False,fcitx-keyboard-in-ben_probhat:False,fcitx-keyboard-in-bolnagri:False,fcitx-keyboard-in-eeyek:False,fcitx-keyboard-in-eng:False,fcitx-keyboard-in-guj:False,fcitx-keyboard-in-guru:False,fcitx-keyboard-in-hin-kagapa:False,fcitx-keyboard-in-hin-wx:False,fcitx-keyboard-in-jhelum:False,fcitx-keyboard-in-kan:False,fcitx-keyboard-in-kan-kagapa:False,fcitx-keyboard-in-mal:False,fcitx-keyboard-in-mal_enhanced:False,fcitx-keyboard-in-mal_lalitha:False,fcitx-keyboard-in-mar-kagapa:False,fcitx-keyboard-in-olck:False,fcitx-keyboard-in-ori:False,fcitx-keyboard-in-san-kagapa:False,fcitx-keyboard-in-tam:False,fcitx-keyboard-in-tam_tamilnet:False,fcitx-keyboard-in-tam_tamilnet_TAB:False,fcitx-keyboard-in-tam_tamilnet_TSCII:False,fcitx-keyboard-in-tam_tamilnet_with_tam_nums:False,fcitx-keyboard-in-tel:False,fcitx-keyboard-in-tel-kagapa:False,fcitx-keyboard-in-tel-sarala:False,fcitx-keyboard-in-urd-phonetic:False,fcitx-keyboard-in-urd-phonetic3:False,fcitx-keyboard-in-urd-winkeys:False,fcitx-keyboard-iq:False,fcitx-keyboard-iq-ku:False,fcitx-keyboard-iq-ku_alt:False,fcitx-keyboard-iq-ku_ara:False,fcitx-keyboard-iq-ku_f:False,fcitx-keyboard-ir:False,fcitx-keyboard-ir-ave:False,fcitx-keyboard-ir-ku:False,fcitx-keyboard-ir-ku_alt:False,fcitx-keyboard-ir-ku_ara:False,fcitx-keyboard-ir-ku_f:False,fcitx-keyboard-ir-pes_keypad:False,fcitx-keyboard-is:False,fcitx-keyboard-is-Sundeadkeys:False,fcitx-keyboard-is-dvorak:False,fcitx-keyboard-is-mac:False,fcitx-keyboard-is-mac_legacy:False,fcitx-keyboard-is-nodeadkeys:False,fcitx-keyboard-it:False,fcitx-keyboard-it-fur:False,fcitx-keyboard-it-geo:False,fcitx-keyboard-it-ibm:False,fcitx-keyboard-it-intl:False,fcitx-keyboard-it-lld:False,fcitx-keyboard-it-mac:False,fcitx-keyboard-it-nodeadkeys:False,fcitx-keyboard-it-scn:False,fcitx-keyboard-it-sun_type6:False,fcitx-keyboard-it-us:False,fcitx-keyboard-it-winkeys:False,fcitx-keyboard-jp:False,fcitx-keyboard-jp-OADG109A:False,fcitx-keyboard-jp-dvorak:False,fcitx-keyboard-jp-kana:False,fcitx-keyboard-jp-kana86:False,fcitx-keyboard-jp-mac:False,fcitx-keyboard-jp-sun_type6:False,fcitx-keyboard-jp-sun_type7:False,fcitx-keyboard-jp-sun_type7_suncompat:False,fcitx-keyboard-ke:False,fcitx-keyboard-ke-kik:False,fcitx-keyboard-kg:False,fcitx-keyboard-kg-phonetic:False,fcitx-keyboard-kh:False,fcitx-keyboard-kr:False,fcitx-keyboard-kr-kr104:False,fcitx-keyboard-kr-sun_type6:False,fcitx-keyboard-kz:False,fcitx-keyboard-kz-ext:False,fcitx-keyboard-kz-kazrus:False,fcitx-keyboard-kz-latin:False,fcitx-keyboard-kz-ruskaz:False,fcitx-keyboard-la:False,fcitx-keyboard-la-stea:False,fcitx-keyboard-latam:False,fcitx-keyboard-latam-colemak:False,fcitx-keyboard-latam-colemak-gaming:False,fcitx-keyboard-latam-deadtilde:False,fcitx-keyboard-latam-dvorak:False,fcitx-keyboard-latam-nodeadkeys:False,fcitx-keyboard-latam-sundeadkeys:False,fcitx-keyboard-lk:False,fcitx-keyboard-lk-tam_TAB:False,fcitx-keyboard-lk-tam_unicode:False,fcitx-keyboard-lk-us:False,fcitx-keyboard-lt:False,fcitx-keyboard-lt-ibm:False,fcitx-keyboard-lt-lekp:False,fcitx-keyboard-lt-lekpa:False,fcitx-keyboard-lt-std:False,fcitx-keyboard-lt-sun_type6:False,fcitx-keyboard-lt-us:False,fcitx-keyboard-lt-us_dvorak:False,fcitx-keyboard-lv:False,fcitx-keyboard-lv-adapted:False,fcitx-keyboard-lv-apostrophe:False,fcitx-keyboard-lv-apostrophecolemak:False,fcitx-keyboard-lv-colemak:False,fcitx-keyboard-lv-dvorak:False,fcitx-keyboard-lv-dvorakprogr:False,fcitx-keyboard-lv-ergonomic:False,fcitx-keyboard-lv-fkey:False,fcitx-keyboard-lv-minuskeydvorak:False,fcitx-keyboard-lv-minuskeydvorakprogr:False,fcitx-keyboard-lv-modern:False,fcitx-keyboard-lv-sun_type6:False,fcitx-keyboard-lv-tilde:False,fcitx-keyboard-lv-ykeydvorak:False,fcitx-keyboard-lv-ykeydvorakprogr:False,fcitx-keyboard-ma:False,fcitx-keyboard-ma-french:False,fcitx-keyboard-ma-tifinagh:False,fcitx-keyboard-ma-tifinagh-alt:False,fcitx-keyboard-ma-tifinagh-alt-phonetic:False,fcitx-keyboard-ma-tifinagh-extended:False,fcitx-keyboard-ma-tifinagh-extended-phonetic:False,fcitx-keyboard-ma-tifinagh-phonetic:False,fcitx-keyboard-mao:False,fcitx-keyboard-md:False,fcitx-keyboard-md-gag:False,fcitx-keyboard-me:False,fcitx-keyboard-me-cyrillic:False,fcitx-keyboard-me-cyrillicalternatequotes:False,fcitx-keyboard-me-cyrillicyz:False,fcitx-keyboard-me-latinalternatequotes:False,fcitx-keyboard-me-latinunicode:False,fcitx-keyboard-me-latinunicodeyz:False,fcitx-keyboard-me-latinyz:False,fcitx-keyboard-mk:False,fcitx-keyboard-mk-nodeadkeys:False,fcitx-keyboard-ml:False,fcitx-keyboard-ml-fr-oss:False,fcitx-keyboard-ml-us-intl:False,fcitx-keyboard-ml-us-mac:False,fcitx-keyboard-mm:False,fcitx-keyboard-mm-zawgyi:False,fcitx-keyboard-mn:False,fcitx-keyboard-mt:False,fcitx-keyboard-mt-us:False,fcitx-keyboard-mv:False,fcitx-keyboard-my:False,fcitx-keyboard-my-phonetic:False,fcitx-keyboard-nec_vndr/jp:False,fcitx-keyboard-ng:False,fcitx-keyboard-ng-hausa:False,fcitx-keyboard-ng-igbo:False,fcitx-keyboard-ng-yoruba:False,fcitx-keyboard-nl:False,fcitx-keyboard-nl-mac:False,fcitx-keyboard-nl-std:False,fcitx-keyboard-nl-sun_type6:False,fcitx-keyboard-nl-sundeadkeys:False,fcitx-keyboard-no:False,fcitx-keyboard-no-colemak:False,fcitx-keyboard-no-dvorak:False,fcitx-keyboard-no-mac:False,fcitx-keyboard-no-mac_nodeadkeys:False,fcitx-keyboard-no-nodeadkeys:False,fcitx-keyboard-no-smi:False,fcitx-keyboard-no-smi_nodeadkeys:False,fcitx-keyboard-no-sun_type6:False,fcitx-keyboard-no-winkeys:False,fcitx-keyboard-np:False,fcitx-keyboard-ph:False,fcitx-keyboard-ph-capewell-dvorak:False,fcitx-keyboard-ph-capewell-dvorak-bay:False,fcitx-keyboard-ph-capewell-qwerf2k6:False,fcitx-keyboard-ph-capewell-qwerf2k6-bay:False,fcitx-keyboard-ph-colemak:False,fcitx-keyboard-ph-colemak-bay:False,fcitx-keyboard-ph-dvorak:False,fcitx-keyboard-ph-dvorak-bay:False,fcitx-keyboard-ph-qwerty-bay:False,fcitx-keyboard-pk:False,fcitx-keyboard-pk-ara:False,fcitx-keyboard-pk-snd:False,fcitx-keyboard-pk-urd-crulp:False,fcitx-keyboard-pk-urd-nla:False,fcitx-keyboard-pl:False,fcitx-keyboard-pl-colemak:False,fcitx-keyboard-pl-csb:False,fcitx-keyboard-pl-dvorak:False,fcitx-keyboard-pl-dvorak_altquotes:False,fcitx-keyboard-pl-dvorak_quotes:False,fcitx-keyboard-pl-dvp:False,fcitx-keyboard-pl-glagolica:False,fcitx-keyboard-pl-intl:False,fcitx-keyboard-pl-legacy:False,fcitx-keyboard-pl-qwertz:False,fcitx-keyboard-pl-ru_phonetic_dvorak:False,fcitx-keyboard-pl-sun_type6:False,fcitx-keyboard-pl-szl:False,fcitx-keyboard-pt:False,fcitx-keyboard-pt-colemak:False,fcitx-keyboard-pt-mac:False,fcitx-keyboard-pt-mac_nodeadkeys:False,fcitx-keyboard-pt-mac_sundeadkeys:False,fcitx-keyboard-pt-nativo:False,fcitx-keyboard-pt-nativo-epo:False,fcitx-keyboard-pt-nativo-us:False,fcitx-keyboard-pt-nodeadkeys:False,fcitx-keyboard-pt-sun_type6:False,fcitx-keyboard-pt-sundeadkeys:False,fcitx-keyboard-ro:False,fcitx-keyboard-ro-cedilla:False,fcitx-keyboard-ro-crh_dobruja:False,fcitx-keyboard-ro-ergonomic:False,fcitx-keyboard-ro-std:False,fcitx-keyboard-ro-std_cedilla:False,fcitx-keyboard-ro-sun_type6:False,fcitx-keyboard-ro-winkeys:False,fcitx-keyboard-rs:False,fcitx-keyboard-rs-alternatequotes:False,fcitx-keyboard-rs-combiningkeys:False,fcitx-keyboard-rs-latin:False,fcitx-keyboard-rs-latinalternatequotes:False,fcitx-keyboard-rs-latinunicode:False,fcitx-keyboard-rs-latinunicodeyz:False,fcitx-keyboard-rs-latinyz:False,fcitx-keyboard-rs-rue:False,fcitx-keyboard-rs-yz:False,fcitx-keyboard-ru:False,fcitx-keyboard-ru-bak:False,fcitx-keyboard-ru-chm:False,fcitx-keyboard-ru-chu:False,fcitx-keyboard-ru-cv:False,fcitx-keyboard-ru-cv_latin:False,fcitx-keyboard-ru-dos:False,fcitx-keyboard-ru-kom:False,fcitx-keyboard-ru-legacy:False,fcitx-keyboard-ru-mac:False,fcitx-keyboard-ru-os_legacy:False,fcitx-keyboard-ru-os_winkeys:False,fcitx-keyboard-ru-phonetic:False,fcitx-keyboard-ru-phonetic_azerty:False,fcitx-keyboard-ru-phonetic_dvorak:False,fcitx-keyboard-ru-phonetic_fr:False,fcitx-keyboard-ru-phonetic_winkeys:False,fcitx-keyboard-ru-phonetic_yazherty:False,fcitx-keyboard-ru-prxn:False,fcitx-keyboard-ru-rulemak:False,fcitx-keyboard-ru-ruu:False,fcitx-keyboard-ru-sah:False,fcitx-keyboard-ru-srp:False,fcitx-keyboard-ru-sun_type6:False,fcitx-keyboard-ru-tt:False,fcitx-keyboard-ru-typewriter:False,fcitx-keyboard-ru-typewriter-legacy:False,fcitx-keyboard-ru-udm:False,fcitx-keyboard-ru-unipunct:False,fcitx-keyboard-ru-xal:False,fcitx-keyboard-se:False,fcitx-keyboard-se-dvorak:False,fcitx-keyboard-se-dvorak_a5:False,fcitx-keyboard-se-mac:False,fcitx-keyboard-se-nodeadkeys:False,fcitx-keyboard-se-ovd:False,fcitx-keyboard-se-rus:False,fcitx-keyboard-se-rus_nodeadkeys:False,fcitx-keyboard-se-smi:False,fcitx-keyboard-se-sun_type6:False,fcitx-keyboard-se-svdvorak:False,fcitx-keyboard-se-swl:False,fcitx-keyboard-se-us:False,fcitx-keyboard-se-us_dvorak:False,fcitx-keyboard-si:False,fcitx-keyboard-si-alternatequotes:False,fcitx-keyboard-si-us:False,fcitx-keyboard-sk:False,fcitx-keyboard-sk-bksl:False,fcitx-keyboard-sk-qwerty:False,fcitx-keyboard-sk-qwerty_bksl:False,fcitx-keyboard-sk-sun_type6:False,fcitx-keyboard-sn:False,fcitx-keyboard-sy:False,fcitx-keyboard-sy-ku:False,fcitx-keyboard-sy-ku_alt:False,fcitx-keyboard-sy-ku_f:False,fcitx-keyboard-sy-syc:False,fcitx-keyboard-sy-syc_phonetic:False,fcitx-keyboard-tg:False,fcitx-keyboard-th:False,fcitx-keyboard-th-pat:False,fcitx-keyboard-th-tis:False,fcitx-keyboard-tj:False,fcitx-keyboard-tj-legacy:False,fcitx-keyboard-tm:False,fcitx-keyboard-tm-alt:False,fcitx-keyboard-tr:False,fcitx-keyboard-tr-alt:False,fcitx-keyboard-tr-crh:False,fcitx-keyboard-tr-crh_alt:False,fcitx-keyboard-tr-crh_f:False,fcitx-keyboard-tr-f:False,fcitx-keyboard-tr-intl:False,fcitx-keyboard-tr-ku:False,fcitx-keyboard-tr-ku_alt:False,fcitx-keyboard-tr-ku_f:False,fcitx-keyboard-tr-sun_type6:False,fcitx-keyboard-tr-sundeadkeys:False,fcitx-keyboard-trans:False,fcitx-keyboard-tw:False,fcitx-keyboard-tw-indigenous:False,fcitx-keyboard-tw-saisiyat:False,fcitx-keyboard-tz:False,fcitx-keyboard-ua:False,fcitx-keyboard-ua-homophonic:False,fcitx-keyboard-ua-legacy:False,fcitx-keyboard-ua-phonetic:False,fcitx-keyboard-ua-rstu:False,fcitx-keyboard-ua-rstu_ru:False,fcitx-keyboard-ua-sun_type6:False,fcitx-keyboard-ua-typewriter:False,fcitx-keyboard-ua-winkeys:False,fcitx-keyboard-us-alt-intl:False,fcitx-keyboard-us-alt-intl-unicode:False,fcitx-keyboard-us-altgr-intl:False,fcitx-keyboard-us-ats:False,fcitx-keyboard-us-carpalx:False,fcitx-keyboard-us-carpalx-altgr-intl:False,fcitx-keyboard-us-carpalx-full:False,fcitx-keyboard-us-carpalx-full-altgr-intl:False,fcitx-keyboard-us-carpalx-full-intl:False,fcitx-keyboard-us-carpalx-intl:False,fcitx-keyboard-us-chr:False,fcitx-keyboard-us-colemak:False,fcitx-keyboard-us-crd:False,fcitx-keyboard-us-cz_sk_de:False,fcitx-keyboard-us-dvorak:False,fcitx-keyboard-us-dvorak-alt-intl:False,fcitx-keyboard-us-dvorak-classic:False,fcitx-keyboard-us-dvorak-intl:False,fcitx-keyboard-us-dvorak-l:False,fcitx-keyboard-us-dvorak-r:False,fcitx-keyboard-us-dvp:False,fcitx-keyboard-us-euro:False,fcitx-keyboard-us-hbs:False,fcitx-keyboard-us-ibm238l:False,fcitx-keyboard-us-intl:False,fcitx-keyboard-us-intl-unicode:False,fcitx-keyboard-us-mac:False,fcitx-keyboard-us-norman:False,fcitx-keyboard-us-olpc2:False,fcitx-keyboard-us-rus:False,fcitx-keyboard-us-scn:False,fcitx-keyboard-us-sun_type6:False,fcitx-keyboard-us-workman:False,fcitx-keyboard-us-workman-intl:False,fcitx-keyboard-uz:False,fcitx-keyboard-uz-latin:False,fcitx-keyboard-vn:False,fcitx-keyboard-vn-aderty:False,fcitx-keyboard-vn-fr:False,fcitx-keyboard-vn-qderty:False,fcitx-keyboard-vn-us:False,fcitx-keyboard-za:False 18 | # Show Preedit String in Client Window 19 | # Available Value: 20 | # True False 21 | #PreeditStringInClientWindow=True 22 | 23 | -------------------------------------------------------------------------------- /os-brainux/override/home/user/.xprofile: -------------------------------------------------------------------------------- 1 | export GTK_IM_MODULE=fcitx 2 | export QT_IM_MODULE=fcitx 3 | export XMODIFIERS=@im=fcitx 4 | 5 | # Uncomment the following line to enable fcitx-mozc 6 | # fcitx-autostart & 7 | 8 | -------------------------------------------------------------------------------- /os-brainux/override/home/user/lxterminal/lxterminal.conf: -------------------------------------------------------------------------------- 1 | [general] 2 | fontname=Noto Sans Mono CJK JP 10 3 | selchars=-A-Za-z0-9,./?%&#:_ 4 | scrollback=1000 5 | bgcolor=rgb(0,0,0) 6 | fgcolor=rgb(211,215,207) 7 | palette_color_0=rgb(0,0,0) 8 | palette_color_1=rgb(205,0,0) 9 | palette_color_2=rgb(78,154,6) 10 | palette_color_3=rgb(196,160,0) 11 | palette_color_4=rgb(52,101,164) 12 | palette_color_5=rgb(117,80,123) 13 | palette_color_6=rgb(6,152,154) 14 | palette_color_7=rgb(211,215,207) 15 | palette_color_8=rgb(85,87,83) 16 | palette_color_9=rgb(239,41,41) 17 | palette_color_10=rgb(138,226,52) 18 | palette_color_11=rgb(252,233,79) 19 | palette_color_12=rgb(114,159,207) 20 | palette_color_13=rgb(173,127,168) 21 | palette_color_14=rgb(52,226,226) 22 | palette_color_15=rgb(238,238,236) 23 | color_preset=Tango 24 | disallowbold=false 25 | cursorblinks=false 26 | cursorunderline=false 27 | audiblebell=false 28 | tabpos=top 29 | geometry_columns=80 30 | geometry_rows=24 31 | hidescrollbar=false 32 | hidemenubar=false 33 | hideclosebutton=false 34 | hidepointer=false 35 | disablef10=false 36 | disablealt=false 37 | disableconfirm=false 38 | 39 | [shortcut] 40 | new_window_accel=n 41 | new_tab_accel=t 42 | close_tab_accel=w 43 | close_window_accel=q 44 | copy_accel=c 45 | paste_accel=v 46 | name_tab_accel=i 47 | previous_tab_accel=Page_Up 48 | next_tab_accel=Page_Down 49 | move_tab_left_accel=Page_Up 50 | move_tab_right_accel=Page_Down 51 | zoom_in_accel=plus 52 | zoom_out_accel=underscore 53 | zoom_reset_accel=parenright 54 | -------------------------------------------------------------------------------- /os-brainux/override/lib/systemd/system/boot.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Mount boot partition 3 | 4 | [Mount] 5 | What=/dev/mmcblk1p1 6 | Where=/boot 7 | Options=ro 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /os-brainux/override/lib/systemd/system/rndis_gadget.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Enable RNDIS USB Gadget 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/bin/enable_rndis_gadget 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /os-brainux/override/usr/bin/enable_rndis_gadget: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | g=/sys/kernel/config/usb_gadget/eth 4 | 5 | mkdir ${g} 6 | 7 | echo "0x3066" > ${g}/bcdDevice 8 | echo "1" > ${g}/os_desc/use 9 | echo "0xcd" > ${g}/os_desc/b_vendor_code 10 | echo "MSFT100" > ${g}/os_desc/qw_sign 11 | 12 | mkdir ${g}/functions/rndis.rn0 13 | echo "RNDIS" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/compatible_id 14 | echo "5162001" > ${g}/functions/rndis.rn0/os_desc/interface.rndis/sub_compatible_id 15 | echo "8a:15:8b:44:3a:02" > ${g}/functions/rndis.rn0/dev_addr 16 | echo "8a:15:8b:44:3a:01" > ${g}/functions/rndis.rn0/host_addr 17 | 18 | mkdir ${g}/configs/c.1 19 | ln -s ${g}/functions/rndis.rn0 ${g}/configs/c.1/ 20 | 21 | echo "ci_hdrc.0" > ${g}/UDC 22 | 23 | sleep 1 24 | ifconfig usb0 up 25 | dhclient 26 | -------------------------------------------------------------------------------- /os-brainux/setup_brainux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -uex -o pipefail 3 | 4 | if [ ! -v TIMEZONE ]; then 5 | TIMEZONE=Asia/Tokyo 6 | fi 7 | 8 | if [ ! -v CI ]; then 9 | CI=false 10 | fi 11 | 12 | /debootstrap/debootstrap --second-stage 13 | 14 | if [ "${CI}" == "true" ]; then 15 | REPO=deb.debian.org 16 | REPO_SECURITY=deb.debian.org 17 | else 18 | REPO=localhost:65432 19 | REPO_SECURITY=localhost:65433 20 | fi 21 | 22 | cat < /etc/apt/sources.list 23 | deb http://${REPO}/debian bullseye main contrib non-free 24 | deb-src http://${REPO}/debian bullseye main contrib non-free 25 | deb http://${REPO}/debian bullseye-updates main contrib non-free 26 | deb-src http://${REPO}/debian bullseye-updates main contrib non-free 27 | deb http://${REPO_SECURITY}/debian-security bullseye-security/updates main contrib non-free 28 | deb-src http://${REPO_SECURITY}/debian-security bullseye-security/updates main contrib non-free 29 | EOF 30 | 31 | cat < /etc/apt/apt.conf.d/90-norecommend 32 | APT::Install-Recommends "0"; 33 | APT::Install-Suggests "0"; 34 | EOF 35 | 36 | # locales: locale has to be set before going any further 37 | apt update -y 38 | DEBIAN_FRONTEND=noninteractive \ 39 | apt install -y locales 40 | 41 | echo "$TIMEZONE" > /etc/timezone && \ 42 | dpkg-reconfigure -f noninteractive tzdata && \ 43 | sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ 44 | echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \ 45 | dpkg-reconfigure -f noninteractive locales && \ 46 | update-locale LANG=en_US.UTF-8 47 | 48 | LANG=en_US.UTF-8 49 | 50 | rm /etc/localtime 51 | ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime 52 | 53 | echo "brain" > /etc/hostname 54 | 55 | # Install packagecloud repository 56 | # Reference: https://packagecloud.io/brainhackers/brainux/install 57 | 58 | # curl, ca-certificates: downloads the GPG key from packagecloud 59 | # gnupg, debian-archive-keyring: packagecloud verification dependency 60 | DEBIAN_FRONTEND=noninteractive \ 61 | apt install -y curl ca-certificates gnupg debian-archive-keyring 62 | 63 | # apt-transport-https can be installed after debian-archive-keyring being installed 64 | DEBIAN_FRONTEND=noninteractive \ 65 | apt install -y apt-transport-https 66 | 67 | # Install GPG key and packagecloud repository config 68 | mkdir -p /etc/apt/keyrings 69 | curl -fsSL "https://packagecloud.io/brainhackers/brainux/gpgkey" \ 70 | | gpg --dearmor > /etc/apt/keyrings/brainhackers_brainux-archive-keyring.gpg 71 | 72 | cat < /etc/apt/sources.list.d/packagecloud.list 73 | deb [signed-by=/etc/apt/keyrings/brainhackers_brainux-archive-keyring.gpg] https://packagecloud.io/brainhackers/brainux/any/ any main 74 | deb-src [signed-by=/etc/apt/keyrings/brainhackers_brainux-archive-keyring.gpg] https://packagecloud.io/brainhackers/brainux/any/ any main 75 | EOF 76 | 77 | # Fetch packagecloud repository 78 | apt update -y 79 | 80 | DEBIAN_FRONTEND=noninteractive \ 81 | apt install -y dialog sudo \ 82 | libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \ 83 | xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xserver-xorg-input-evdev xinput-calibrator xorg-dev x11-apps x11-ico-dvd xinit \ 84 | jwm \ 85 | bash tmux vim htop \ 86 | midori pcmanfm lxterminal xterm gnome-terminal fbterm uim-fep uim-anthy fonts-noto-cjk \ 87 | dbus udev alsa-utils usbutils iw fake-hwclock systemd-timesyncd\ 88 | build-essential flex bison pkg-config autotools-dev libtool autoconf automake device-tree-compiler \ 89 | python3 python3-dev python3-setuptools python3-wheel python3-pip python3-smbus \ 90 | resolvconf net-tools ssh openssh-client avahi-daemon wget git \ 91 | network-manager zip neofetch sl python3-numpy ipython3 netsurf-gtk fcitx-anthy 92 | 93 | # Packages from packagecloud 94 | DEBIAN_FRONTEND=noninteractive \ 95 | apt install -y --install-recommends brain-config 96 | 97 | systemctl enable fake-hwclock 98 | 99 | # Ly 100 | DEBIAN_FRONTEND=noninteractive \ 101 | apt install -y libpam0g-dev libxcb-xkb-dev 102 | cd / 103 | git clone --recurse-submodules -b master-24f017e https://github.com/brain-hackers/ly.git 104 | cd ly 105 | make 106 | make install 107 | make installsystemd 108 | cd / 109 | rm -r ly 110 | systemctl enable ly 111 | 112 | # Create editable xorg.conf.d 113 | install -m 0777 -d /etc/X11/xorg.conf.d 114 | 115 | # Fix Midori launch failure 116 | sudo update-mime-database /usr/share/mime 117 | 118 | # Setup users 119 | adduser --gecos "" --disabled-password --home /home/user user 120 | echo user:brain | chpasswd 121 | echo "user ALL=(ALL:ALL) ALL" > /etc/sudoers.d/user 122 | echo -e "127.0.1.1\tbrain" >> /etc/hosts 123 | 124 | echo root:root | chpasswd 125 | 126 | # Fix Xorg permission for non-root users 127 | # https://unix.stackexchange.com/questions/315169/how-can-i-run-usr-bin-xorg-without-sudo 128 | chown root:input /usr/lib/xorg/Xorg 129 | chmod g+s /usr/lib/xorg/Xorg 130 | usermod -a -G video user 131 | 132 | # Allow root login via UART 133 | cat <> /etc/securetty 134 | ttymxc0 135 | ttyLP0 136 | EOF 137 | 138 | # Enable /boot mount 139 | systemctl enable boot.mount 140 | 141 | # Enable RNDIS gadget 142 | systemctl enable rndis_gadget 143 | 144 | # Get wild 145 | cat < /etc/apt/sources.list 146 | deb http://deb.debian.org/debian bullseye main contrib non-free 147 | deb-src http://deb.debian.org/debian bullseye main contrib non-free 148 | deb http://deb.debian.org/debian bullseye-updates main contrib non-free 149 | deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free 150 | deb http://deb.debian.org/debian-security bullseye-security/updates main contrib non-free 151 | deb-src http://deb.debian.org/debian-security bullseye-security/updates main contrib non-free 152 | EOF 153 | 154 | -------------------------------------------------------------------------------- /os-buildroot/override/root/blink.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -u 3 | 4 | VERBOSE=0 5 | PIN="" 6 | SLEEP=1 7 | GPIOS="" 8 | 9 | while getopts "hvr:p:s:" OPT; do 10 | case "$OPT" in 11 | h) 12 | echo "Usage: blink.sh [-hv] [-r PIN_RANGE_FROM-PIN_RANGE_TO] [-p PIN] [-s SLEEP_SEC]" 13 | echo "Example: blink.sh -r 0-10 -p 12" 14 | echo " (blink from GPIO 0 to 10 and 12)" 15 | exit 0 16 | ;; 17 | v) 18 | VERBOSE=1 19 | ;; 20 | r) 21 | RE='^([0-9]+)-([0-9]+)$' 22 | if echo $OPTARG | grep -qvE $RE; then 23 | echo "Error: invalid range: $OPTARG" 24 | exit 1 25 | fi 26 | FROM=$(echo $OPTARG | sed -E "s/$RE/\\1/") 27 | TO=$(echo $OPTARG | sed -E "s/$RE/\\2/") 28 | GPIOS="$GPIOS$(seq -s " " $FROM $TO) " 29 | ;; 30 | p) 31 | if echo $OPTARG | grep -qvE "^[0-9]+$"; then 32 | echo "Error: invalid pin number: $OPTARG" 33 | exit 1 34 | fi 35 | GPIOS="$GPIOS$OPTARG " 36 | ;; 37 | s) 38 | if echo $OPTARG | grep -qvE "^[0-9]+$"; then 39 | echo "Error: invalid sleep duration: $OPTARG" 40 | exit 1 41 | fi 42 | SLEEP=$OPTARG 43 | ;; 44 | esac 45 | done 46 | 47 | if [ $VERBOSE -eq 1 ]; then 48 | echo "Pins to iterate over: $GPIOS" 49 | fi 50 | 51 | if [ "$(id -u)" -ne "0" ]; then 52 | echo "Error: please run as root" 53 | exit 1 54 | fi 55 | 56 | AVAILABLE_GPIOS="" 57 | 58 | export_gpio() { 59 | echo $1 > /sys/class/gpio/export 60 | } 61 | 62 | set_direction() { 63 | echo out > /sys/class/gpio/gpio$1/direction 64 | } 65 | 66 | set_value() { 67 | echo $2 > /sys/class/gpio/gpio$1/value 68 | } 69 | 70 | for i in $GPIOS; do 71 | if [ ! -e "/sys/class/gpio/gpio$i" ]; then 72 | export_gpio $i 2>/dev/null 73 | if [ $? -ne 0 ]; then 74 | echo "Error: failed to export the pin $i" 75 | continue 76 | fi 77 | fi 78 | 79 | set_direction $i 2>/dev/null 80 | if [ $? -ne 0 ]; then 81 | # Ignore the failure if the actual direction is out 82 | if grep -vq "out" /dsys/class/gpio/gpio$i/direction; then 83 | echo "Error: failed to set the direction of the pin $i to out" 84 | continue 85 | fi 86 | fi 87 | 88 | AVAILABLE_GPIOS="$AVAILABLE_GPIOS$i " 89 | done 90 | 91 | echo "Available GPIOs: $AVAILABLE_GPIOS" 92 | 93 | while [ 1 ]; do 94 | for i in $AVAILABLE_GPIOS; do 95 | set_value $i 1 2>/dev/null 96 | if [ $? -ne 0 ]; then 97 | echo "Warning: failed to set the value of the pin $i to high" 98 | fi 99 | done 100 | 101 | sleep $SLEEP 102 | 103 | for i in $AVAILABLE_GPIOS; do 104 | set_value $i 0 2>/dev/null 105 | if [ $? -ne 0 ]; then 106 | echo "Warning: failed to set the value of the pin $i to low" 107 | fi 108 | done 109 | 110 | sleep $SLEEP 111 | done 112 | 113 | -------------------------------------------------------------------------------- /r3build.toml: -------------------------------------------------------------------------------- 1 | [log] 2 | time = true 3 | 4 | [[job]] 5 | name = "U-Boot" 6 | path = './u-boot-brain' 7 | 8 | type = "make" 9 | directory = "u-boot-brain" 10 | target = "u-boot.sb" 11 | 12 | when = "modified" 13 | glob = [ 14 | './u-boot-brain/*.c', 15 | './u-boot-brain/*.h', 16 | './u-boot-brain/*.dts', 17 | './u-boot-brain/*config', 18 | ] 19 | 20 | environment.ARCH = "arm" 21 | environment.CROSS_COMPILE = "arm-linux-gnueabi-" 22 | 23 | [[job]] 24 | name = "Linux" 25 | path = "./linux-brain" 26 | 27 | type = "make" 28 | target = "lbuild" 29 | 30 | when = "modified" 31 | regex = [ 32 | './linux-brain/.+\.[ch]$', 33 | './linux-brain/.+\.dts$', 34 | ] 35 | 36 | environment.ARCH = "arm" 37 | environment.CROSS_COMPILE = "arm-linux-gnueabi-" 38 | 39 | -------------------------------------------------------------------------------- /tools/aptcache.go: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | * See https://github.com/puhitaku/empera for the original source code. 4 | 5 | MIT License 6 | 7 | Copyright (c) 2020 Takumi Sueda 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in all 17 | copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 25 | SOFTWARE. 26 | 27 | */ 28 | 29 | package main 30 | 31 | import ( 32 | "flag" 33 | "fmt" 34 | "io" 35 | "net/http" 36 | "net/url" 37 | "os" 38 | "path/filepath" 39 | "strconv" 40 | "strings" 41 | "sync" 42 | "syscall" 43 | "time" 44 | ) 45 | 46 | type Proxy struct { 47 | remote string 48 | 49 | cli *http.Client 50 | cache map[string]struct{} 51 | cacheLock sync.Mutex 52 | } 53 | 54 | func NewProxy() (*Proxy, error) { 55 | p := &Proxy{ 56 | cli: http.DefaultClient, 57 | cache: map[string]struct{}{}, 58 | } 59 | 60 | stat, err := os.Stat("cache") 61 | if err != nil { 62 | if err.(*os.PathError).Err != syscall.ENOENT { 63 | return nil, fmt.Errorf("failed to stat cache directory: %s", err) 64 | } 65 | err = os.Mkdir("cache", 0755) 66 | if err != nil { 67 | return nil, fmt.Errorf("failed to create cache directory: %s", err) 68 | } 69 | } else if !stat.IsDir() { 70 | return nil, fmt.Errorf("non-directory 'cache' exists") 71 | } 72 | 73 | matches, err := filepath.Glob("cache/*") 74 | if err != nil { 75 | return nil, fmt.Errorf("failed to glob cache directory: %s", err) 76 | } 77 | 78 | for i := range matches { 79 | p.cache[strings.TrimPrefix(matches[i], "cache/")] = struct{}{} 80 | } 81 | return p, nil 82 | } 83 | 84 | func (p *Proxy) Run(local, remote string) { 85 | p.remote = remote 86 | err := http.ListenAndServe(local, p) 87 | if err != nil { 88 | panic(err) 89 | } 90 | } 91 | 92 | // ServeHTTP implements http.Handler interface 93 | func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { 94 | var err error 95 | encoded := url.PathEscape(r.URL.Path) 96 | 97 | exclude := []string{"Release", "Packages", "Contents"} 98 | nocache := false 99 | for _, ex := range exclude { 100 | nocache = nocache || strings.Contains(encoded, ex) 101 | } 102 | 103 | if nocache { 104 | fmt.Printf("GET (no cache): %s%s -> ", p.remote, r.URL.Path) 105 | err = p.fetchFromRemote(w, r, false) 106 | } else if _, ok := p.cache[encoded]; ok { 107 | fmt.Printf("GET (cache hit): %s%s -> ", p.remote, r.URL.Path) 108 | err = p.fetchFromCache(w, r) 109 | } else { 110 | fmt.Printf("GET (cache miss): %s%s -> ", p.remote, r.URL.Path) 111 | err = p.fetchFromRemote(w, r, true) 112 | } 113 | 114 | if err != nil { 115 | fmt.Printf("%s\n", err) 116 | } else { 117 | fmt.Printf("200\n") 118 | } 119 | } 120 | 121 | func (p *Proxy) fetchFromRemote(w http.ResponseWriter, r *http.Request, cache bool) error { 122 | var f io.WriteCloser = NullWriter{} 123 | var err error 124 | 125 | encoded := url.PathEscape(r.URL.Path) 126 | fpath := filepath.Join("cache", encoded) 127 | 128 | newURL, err := url.Parse(r.URL.String()) 129 | if err != nil { 130 | w.WriteHeader(http.StatusInternalServerError) 131 | w.Write([]byte(err.Error())) 132 | return fmt.Errorf("failed to parse URL: %s", err) 133 | } 134 | newURL.Scheme = "http" 135 | newURL.Host = p.remote 136 | 137 | req, err := http.NewRequest(http.MethodGet, newURL.String(), nil) 138 | if err != nil { 139 | w.WriteHeader(http.StatusInternalServerError) 140 | w.Write([]byte(err.Error())) 141 | return fmt.Errorf("failed to create a new request: %s", err) 142 | } 143 | 144 | req.Header = r.Header 145 | res, err := p.cli.Do(req) 146 | if err != nil { 147 | w.WriteHeader(http.StatusInternalServerError) 148 | w.Write([]byte(err.Error())) 149 | return fmt.Errorf("failed to GET: %s", err) 150 | } 151 | defer res.Body.Close() 152 | 153 | _, err = os.Stat(fpath) 154 | if err != nil { 155 | if err.(*os.PathError).Err != syscall.ENOENT { 156 | w.WriteHeader(http.StatusInternalServerError) 157 | w.Write([]byte(err.Error())) 158 | return fmt.Errorf("failed to stat cached file: %s", err) 159 | } 160 | } 161 | 162 | if cache && res.StatusCode == http.StatusOK { 163 | f, err = os.Create(fpath) 164 | if err != nil { 165 | w.WriteHeader(http.StatusInternalServerError) 166 | w.Write([]byte(err.Error())) 167 | return fmt.Errorf("failed to create file: %s", err) 168 | } 169 | defer f.Close() 170 | } 171 | 172 | for k, vs := range res.Header { 173 | for _, v := range vs { 174 | w.Header().Add(k, v) 175 | } 176 | } 177 | w.WriteHeader(res.StatusCode) 178 | 179 | _, err = io.Copy(w, io.TeeReader(res.Body, f)) 180 | if err != nil { 181 | return fmt.Errorf("failed to copy: %s", err) 182 | } 183 | 184 | if res.StatusCode == http.StatusOK { 185 | p.cacheLock.Lock() 186 | defer p.cacheLock.Unlock() 187 | p.cache[encoded] = struct{}{} 188 | return nil 189 | } else { 190 | return fmt.Errorf(strconv.Itoa(res.StatusCode)) 191 | } 192 | } 193 | 194 | func (p *Proxy) fetchFromCache(w http.ResponseWriter, r *http.Request) error { 195 | encoded := url.PathEscape(r.URL.Path) 196 | f, err := os.Open(filepath.Join("cache", encoded)) 197 | if err != nil { 198 | w.WriteHeader(http.StatusInternalServerError) 199 | w.Write([]byte(err.Error())) 200 | return fmt.Errorf("failed to open '%s': %s", encoded, err) 201 | } 202 | defer f.Close() 203 | 204 | _, err = io.Copy(w, f) 205 | if err != nil { 206 | return fmt.Errorf("failed to copy: %s", err) 207 | } 208 | return nil 209 | } 210 | 211 | type NullWriter struct{} 212 | 213 | func (w NullWriter) Write(b []byte) (int, error) { 214 | return len(b), nil 215 | } 216 | 217 | func (w NullWriter) Close() error { 218 | return nil 219 | } 220 | 221 | type rule struct { 222 | Local, Remote string 223 | } 224 | 225 | type rules []rule 226 | 227 | func (r *rules) String() string { 228 | return "" 229 | } 230 | 231 | func (r *rules) Set(raw string) error { 232 | var local, remote string 233 | 234 | kvs := strings.Split(raw, ",") 235 | for _, kv := range kvs { 236 | tokens := strings.Split(kv, "=") 237 | if len(tokens) != 2 { 238 | return fmt.Errorf("rule is malformed") 239 | } 240 | tokens[0], tokens[1] = strings.TrimSpace(tokens[0]), strings.TrimSpace(tokens[1]) 241 | switch tokens[0] { 242 | case "local": 243 | local = tokens[1] 244 | case "remote": 245 | remote = tokens[1] 246 | default: 247 | return fmt.Errorf("rule has unknown key: '%s'", tokens[0]) 248 | } 249 | } 250 | 251 | if local == "" || remote == "" { 252 | return fmt.Errorf("rule lacks mendatory keys: 'local' and/or 'remote'") 253 | } 254 | 255 | *r = append(*r, rule{Local: local, Remote: remote}) 256 | return nil 257 | } 258 | 259 | func main() { 260 | var rules rules 261 | flag.Var(&rules, "rule", "Proxy rule. example: -rule 'local=localhost:8080, remote=super.slow.repository.example.com'") 262 | flag.Parse() 263 | 264 | if len(rules) == 0 { 265 | fmt.Fprintf(os.Stderr, "Fatal: specify one or more rules.\n") 266 | flag.Usage() 267 | os.Exit(1) 268 | } 269 | 270 | for i, rule := range rules { 271 | fmt.Printf("Proxy Rule %d: %s -> %s\n", i+1, rule.Local, rule.Remote) 272 | 273 | p, err := NewProxy() 274 | if err != nil { 275 | panic(err) 276 | } 277 | go p.Run(rule.Local, rule.Remote) 278 | } 279 | for { 280 | time.Sleep(9999999999) 281 | } 282 | } 283 | -------------------------------------------------------------------------------- /tools/aptcache_linux_amd64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brain-hackers/buildbrain/cf7cc41efe532ab27bd8bf02ba85145fa2b29c81/tools/aptcache_linux_amd64 -------------------------------------------------------------------------------- /tools/build_aptcache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o aptcache_linux_amd64 . 4 | strip aptcache_linux_amd64 5 | -------------------------------------------------------------------------------- /tools/getcross: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | uboot() { 5 | . ./u-boot-brain/.config 6 | case "${CONFIG_SYS_CPU}" in 7 | arm926ejs) echo -n "arm-linux-gnueabi-"; return;; 8 | armv7) echo -n "arm-linux-gnueabihf-"; return;; 9 | *) exit 1;; 10 | esac 11 | } 12 | 13 | linux() { 14 | . ./linux-brain/.config 15 | case "${CONFIG_CPU_ARM926T}_${CONFIG_ARCH_MULTI_V7}" in 16 | y_) echo -n "arm-linux-gnueabi-"; return;; 17 | _y) echo -n "arm-linux-gnueabihf-"; return;; 18 | *) exit 1;; 19 | esac 20 | } 21 | 22 | rootfs() { 23 | . ./linux-brain/.config 24 | case "${CONFIG_CPU_ARM926T}_${CONFIG_ARCH_MULTI_V7}" in 25 | y_) echo -n "armel"; return;; 26 | _y) echo -n "armhf"; return;; 27 | *) exit 1;; 28 | esac 29 | } 30 | 31 | case "$1" in 32 | u-boot) uboot ;; 33 | linux) linux ;; 34 | rootfs) rootfs ;; 35 | *) exit 1; ;; 36 | esac 37 | -------------------------------------------------------------------------------- /tools/version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | date +"%Y-%m-%d-%H%M%S" 4 | --------------------------------------------------------------------------------