Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1713293746, "reponame":"qi", "desc":"Straight-to-Linux bootloader", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/qi", "f":3, "items": [ { "schema":"libjg2-1", "oid":{ "oid": "4e5d46affe909f9f331f05eff1c00d7b1c06f173", "alias": [ "refs/heads/master"]},"tree": [ { "name": "include","mode": "16384", "size":0}, { "name": "src","mode": "16384", "size":0}, { "name": "tools","mode": "16384", "size":0}, { "name": ".gitignore","mode": "33188", "size":26}, { "name": "6410-partition-sd.sh","mode": "33261", "size":8473}, { "name": "Makefile","mode": "33188", "size":3458}, { "name": "README","mode": "33188", "size":4484}, { "name": "add-mkimage-header.sh","mode": "33188", "size":2232}, { "name": "build","mode": "33261", "size":561}, { "name": "config.mk","mode": "33188", "size":715}, { "name": "dfu-qi","mode": "33261", "size":258}, { "name": "gta02-qi.ocd","mode": "33261", "size":575}, { "name": "openocd-openmoko-debug-6410.cfg","mode": "33188", "size":639}, { "name": "txtr-a-clone-sd.sh","mode": "33261", "size":8458}, { "name": "txtr-partition-sd.sh","mode": "33261", "size":16526}, { "name": "txtr-qi-imx31.spec","mode": "33188", "size":773}, { "name": "update-imx-sdcard-leave-partition.sh","mode": "33261", "size":689}],"s":{"c":1713293746,"u": 9392}} ,{"schema":"libjg2-1", "cid":"8161a15d69d6282d05675aa7d3987a63", "oid":{ "oid": "4e5d46affe909f9f331f05eff1c00d7b1c06f173", "alias": [ "refs/heads/master"]},"blobname": "README", "blob": "Qi\n\u003d\u003d\n\nQi (named by Alan Cox on Openmoko kernel list) is a minimal bootloader that\n\u0022breathes life\u0022 into Linux. Its goal is to stay close to the minimum needed\nto \u0022load\u0022 and then \u0022boot\u0022 Linux -- no boot menus, additional peripheral init\nor private states.\n\nQuick start\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nAdapt the cross tuple according to your toolchain\n\n $ CROSS_TUPLE\u003darmv5tel-redhat-linux-gnueabi ./build\n\nThis will build all supported CPU bootloaders, you can find the results down\n./image\n\n\nWhat's wrong with U-Boot, they keep telling people to not reinvent the wheel?\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nU-Boot is gradually becoming a simplified knockoff of Linux. After using it a\nwhile, it became clear we were cutting and pasting drivers into U-Boot from\nLinux, cutting them down and not having a plan to maintain the U-Boot versions\nas the Linux ones were changed.\n\nWe decided that we would use full Linux for things that Linux is good at and\nonly have the bootloader do the device init that is absolutely required before\nLinux can be pulled into memory and started. In practice since we had a working\nU-Boot implementation it meant cutting that right down to the bone (start.S\nmainly for s3c2442) and then building it up from scratch optimized to just do\nload and boot.\n\n\nSamsung - specific boot sequence\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nRight now Qi supports Samsung \u0022steppingstone\u0022 scheme devices, but in fact it's\nthe same in processors like iMX31 that there is a small area of SRAM that is\nprepped with NAND content via ROM on the device. There's nothing that stops Qi\nuse on processors without steppingstone, although the ATAG stuff assumes we deal\nwith ARM based processor.\n\n\nPer-CPU Qi\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nQi has a concept of a single bootloader binary created per CPU type. The\ndifferent devices that use that CPU are all supported in the same binary. At\nruntime after the common init is done, Qi asks each supported device code in\nturn if it recognizes the device as being handled by it, the first one to reply\nthat it knows the device gets to control the rest of the process.\n\nConsequently, there is NO build-time configuration file as found on U-Boot\nexcept a make env var that sets the CPU type being built, eg:\n\n make CPU\u003ds3c6410\n\n\nBooting Heuristics\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nQi has one or more ways to fetch a kernel depending on the device it finds it is\nrunning on, for example on GTA02 it can use NAND and SD card devices. It goes\nthrough these device-specific storage devices in order and tries to boot the\nfirst viable kernel it finds, usually /boot/\u003cuImage-device\u003e.bin for example\n/boot/uImage-GTA02.bin.\n\nThe default order for GTA02 is: 1st SD primary partition, 2nd primary\npartition, 3rd primary partition, NAND kernel partition.\n\nYou can disable a rootfs for consideration for boot if you add a file\n/boot/noboot-\u003cdevice\u003e, eg, /boot/noboot-GTA02. This differs from renaming or\ndeleting the kernel image because updating the kernel package would give you a\nworking kernel again and allow boot, whereas the noboot indication will remain\nuntil you remove it.\n\nThe kernel commandline used is associated with the storage device and partition,\nthis allows the correct root\u003d line to be arrived at without any work.\n\nIf no kernel image can be found, Qi falls back to doing a memory test.\n\n\nAppending to commandline\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nYou can append to the Qi commandline by creating a file /boot/append-\u003cdevice\u003e,\neg, /boot/append-GTA02 containing the additional kernel commandline you want.\n\nThis means you can affect the boot per-rootfs, but that if you reimage the\nrootfs you at the same time define what is appeneded. Because these files are\nlooked for with the \u003cdevice\u003e name in them, options can be selected depending on\nthe device the rootfs is run on.\n\n\nInitrd support\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nInitrd or initramfs in separate file is supported to be loaded at given\nmemory address in addition to kernel image. The ATAGs are issued accordingly.\n\n\nInteractive UI\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nThere is generic support for \u0022indicators\u0022 and \u0022input\u0022, so you can typically\nfeed back to the user with an LED or change boot action if a button is held.\n\nSome more notes:\n\n - You can disable a partition for boot by creating /boot/noboot-\u003cdevicename\u003e,\n eg, /boot/noboot-GTA02, it will skip it and check the next partition\n\n - There is no concept of \u0022staying in the bootloader\u0022. The bootloader exits to\n Linux as fast as possible, that's all it does.\n\n","s":{"c":1713293746,"u": 154}} ],"g": 10646,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}